:root {
  --bg: #fbfbfa;
  --ink: #1c1c22;
  --ink-mid: #494e4b;
  --ink-soft: #6b706d;
  --accent: #0f3d29;
  --field: #0f3d29;
  --on-field: #eef3ef;
  --line: #e0e4e1;

  --font: "Familjen Grotesk", system-ui, sans-serif;

  /* four sizes */
  --t-display: clamp(2.25rem, 8.3vw, 7.5rem);
  --t-section: clamp(1.875rem, 4.2vw, 3.75rem);
  --t-item: clamp(1.125rem, 1.35vw, 1.25rem);
  --t-body: 1.0625rem;

  --s1: 24px;
  --s2: 48px;
  --s3: 96px;
  --s4: 192px;

  --gutter: 40px;
  --max: 1240px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121415;
    --ink: #f1f3f2;
    --ink-mid: #c6ccc9;
    --ink-soft: #969d99;
    --accent: #7fc4a2;
    --field: #0c3322;
    --on-field: #eef3ef;
    --line: #262b29;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-body);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-weight: 500;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.035em;
  line-height: 1.0;
}

p { margin: 0; color: var(--ink-soft); }

a { color: inherit; }

img { max-width: 100%; display: block; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* one grid: left 1–5, right 6–12 */
.wrap-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 32px;
}

.wrap-grid > :first-child { grid-column: 1 / 5; }
.wrap-grid > :last-child { grid-column: 5 / 13; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--bg); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  border-bottom: 1px solid var(--line);
}

.logo { display: flex; align-items: center; line-height: 0; }
.logo img { height: 24px; width: auto; }
.logo .logo-dark-bg { display: none; }

@media (prefers-color-scheme: dark) {
  .logo .logo-light-bg { display: none; }
  .logo .logo-dark-bg { display: block; }
}

.nav { display: flex; gap: 34px; }

.nav a {
  text-decoration: none;
  font-size: 0.9375rem;
  color: var(--ink-soft);
  transition: color 0.15s ease;
}

.nav a:hover { color: var(--ink); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span { display: block; height: 1.5px; background: var(--ink); }

/* one link convention, one arrow colour */
.link-lg {
  display: inline-block;
  font-weight: 500;
  font-size: var(--t-item);
  letter-spacing: -0.025em;
  text-decoration: none;
  color: var(--ink);
  transition: color 0.15s ease;
}

.link-lg span,
.link-inline span { color: var(--accent); display: inline-block; transition: transform 0.2s ease; }

.link-lg:hover { color: var(--accent); }
.link-lg:hover span { transform: translateX(4px); }

.link-inline { text-decoration: none; color: var(--ink); }
.link-inline:hover { color: var(--accent); }
.link-inline:hover span { transform: translate(3px, -3px); }

/* Hero */
.hero { padding: var(--s2) 0 var(--s4); }

.cta {
  justify-self: start;
  display: inline-block;
  font-weight: 500;
  font-size: clamp(1.375rem, 1.95vw, 1.75rem);
  letter-spacing: -0.025em;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 6px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.cta span { display: inline-block; transition: transform 0.2s ease; }
.cta:hover { color: var(--accent); }
.cta:hover span { transform: translateX(5px); }

.hero h1 {
  font-size: var(--t-display);
  letter-spacing: -0.045em;
  margin-bottom: var(--s1);
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 32px;
}

.hero-grid h1 { grid-column: 1 / 13; grid-row: 1; }

.hero-side {
  grid-column: 1 / 13;
  grid-row: 2;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 32px;
  align-items: end;
  padding-top: var(--s2);
}

.hero-side .lead { grid-column: 1 / 5; }
.hero-side .cta { grid-column: 9 / 13; justify-self: start; }

.lead {
  max-width: 30ch;
  color: var(--ink);
  font-size: clamp(1.25rem, 1.8vw, 1.625rem);
  line-height: 1.35;
  letter-spacing: -0.02em;
}

/* Work — the one moment that breaks the column */
.work { padding: 0 0 var(--s4); }

.section-top { border-top: 1px solid var(--ink); padding-top: var(--s1); }

.case-head { margin-bottom: var(--s3); align-items: start; }

.case-head h2 { font-size: clamp(1.5rem, 2.2vw, 2rem); }

.case-lead { color: var(--ink-mid); max-width: 38ch; }

/* two screens of the same project, snapped to the grid */
.shots {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 32px;
  align-items: end;
  margin-bottom: var(--s2);
  line-height: 0;
}

.shot-desk {
  grid-column: 1 / 10;
  border: 1px solid var(--line);
  width: 100%;
  height: auto;
  aspect-ratio: 2880 / 958;
  object-fit: cover;
}

.shot-phone {
  grid-column: 10 / 13;
  border: 1px solid var(--line);
  width: 100%;
  height: auto;
  aspect-ratio: 1440 / 2403;
  object-fit: cover;
  object-position: top;
}

.shots img { transition: opacity 0.3s ease; }
.shots:hover img { opacity: 0.88; }
.shots:hover img:hover { opacity: 1; }

/* One ruled component, used three times */
.rule-list { list-style: none; margin: 0; padding: 0; }

.rule-list li {
  border-top: 1px solid var(--line);
  padding: 20px 0;
  align-items: baseline;
}

.rule-list li:first-child { border-top: 1px solid var(--ink); }
.rule-list li:last-child { border-bottom: 1px solid var(--line); }

.rule-list h3 { font-size: var(--t-item); }
.rule-list p { color: var(--ink-mid); font-size: 1.3125rem; letter-spacing: -0.012em; }

.case-caption {
  color: var(--ink-mid);
  max-width: 62ch;
  font-size: 1.0625rem;
}

.case-caption em { font-style: italic; }

/* Services and Process */
.services { padding: 0 0 var(--s3); }
.process { padding: 0 0 var(--s4); }

.section-head { font-size: var(--t-section); margin-bottom: var(--s2); }

.process-copy {
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  line-height: 1.45;
  color: var(--ink-mid);
  max-width: 54ch;
}

/* Contact — the page's one field, and the close */
.contact {
  background: var(--field);
  color: var(--on-field);
  padding: var(--s3) 0 var(--s2);
}

.email {
  display: block;
  border-bottom: 2px solid color-mix(in srgb, var(--on-field) 35%, transparent);
  padding-bottom: 10px;
  font-weight: 500;
  font-size: clamp(1.75rem, 8.9vw, 8rem);
  letter-spacing: -0.045em;
  line-height: 1.0;
  text-decoration: none;
  color: var(--on-field);
  margin-bottom: var(--s3);
  white-space: nowrap;
  transition: color 0.2s ease;
}

.email:hover { color: var(--accent); }

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding-top: 22px;
  border-top: 1px solid color-mix(in srgb, var(--on-field) 22%, transparent);
  font-size: 0.875rem;
  color: color-mix(in srgb, var(--on-field) 72%, transparent);
}

.footer-nav { display: flex; gap: 26px; justify-self: center; }
.footer-inner > :last-child { justify-self: end; }
.footer-nav a { text-decoration: none; transition: color 0.15s ease; }
.footer-nav a:hover { color: var(--on-field); }

/* Responsive */
@media (max-width: 900px) {
  :root {
    --gutter: 24px;
    --s1: 20px;
    --s2: 40px;
    --s3: 64px;
    --s4: 96px;
  }
  .br-lg { display: none; }
  .hero { padding: var(--s2) 0 var(--s3); }
  .hero-grid { display: block; }
  .hero-side { display: block; padding-top: 32px; }
  .hero-side .cta { margin-top: 24px; }
  .wrap-grid { grid-template-columns: 1fr; row-gap: 24px; }
  .wrap-grid > :first-child,
  .wrap-grid > :last-child { grid-column: 1 / -1; }
  .lead, .case-lead, .rule-list p { max-width: 100%; }
  .shots { grid-template-columns: 1fr; row-gap: 16px; }
  .shot-desk { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
  .shot-phone { grid-column: 1 / -1; aspect-ratio: 16 / 10; object-position: top; }
  .email { margin-bottom: var(--s2); }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 14px; }
}

@media (max-width: 640px) {
  .nav { display: none; }
  .nav-toggle { display: flex; }
  .header-inner.nav-open .nav {
    display: flex;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    padding: 20px var(--gutter);
    gap: 18px;
  }
}
