:root {
  --paper: #FFFFFF;
  --ink: #161616;
  --muted: #666666;
  --line: #E6E6E6;
  --tile: transparent;
  --accent: #2340D3;
  --hl: #E4F222; /* lime: only ever behind or under ink text, never as text color */
  --display: 'Schibsted Grotesk', -apple-system, sans-serif;
  --sans: 'Libre Franklin', -apple-system, sans-serif;
}

/* lime underline on hover for titles and links; static on case-study headings */
:is(.row-title, .nav-link, .next-project a, .footer-email, .case-back) { text-decoration-skip-ink: none; }
:is(.work-row:hover .row-title, .nav-link:hover, .nav-link.active, .next-project a:hover, .footer-email:hover, .case-back:hover) {
  text-decoration-line: underline; text-decoration-color: var(--hl); text-decoration-thickness: .2em; text-underline-offset: .14em;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
::selection { background: var(--hl); color: var(--ink); }
a { color: inherit; }
.display { font-family: var(--display); font-weight: 500; letter-spacing: -0.02em; }

/* ---------- nav ---------- */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 44px; background: var(--paper);
  border-bottom: 1px solid transparent; transition: border-color 0.3s;
}
nav.scrolled { border-bottom-color: var(--line); }
.logo { display: flex; align-items: center; text-decoration: none; cursor: pointer; color: var(--ink); }
/* HC logo: Schibsted Grotesk, upright H + italic C + cobalt dot */
.hc { display:inline-flex; align-items:baseline; line-height:1; font-family:'Schibsted Grotesk', sans-serif; font-weight:800; font-size:28px; letter-spacing:-.05em; color:var(--ink); }
.hc .c { font-style:italic; font-weight:700; margin-left:-.02em; }
.hc .dot { display:inline-block; width:.2em; height:.2em; border-radius:50%; background:#2340D3; margin-left:.06em; }
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-link {
  font-size: 15px; font-weight: 500; color: var(--ink); text-decoration: none;
  padding: 8px 12px; cursor: pointer; text-underline-offset: 6px; text-decoration-thickness: 1px;
}
.nav-link:hover, .nav-link.active { text-decoration-line: underline; }

/* ---------- layout ---------- */
.page { display: none; padding-top: 76px; min-height: 100vh; }
.page.visible { display: block; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 32px; }
.narrow { max-width: 760px; }

/* ---------- hero ---------- */
.hero { padding: 56px 0 36px; }
.hero-split { display:grid; grid-template-columns: 1.05fr .95fr; gap:40px; align-items:center; }
.hero h1 { font-size: clamp(34px, 4.4vw, 54px); line-height: 1.12; max-width: 18ch; }
.hero-sub { margin-top: 24px; font-size: 18px; color: var(--muted); max-width: 48ch; }
.hero-sub b { color: var(--ink); font-weight: 600; }
.hero-cta { display:flex; gap:12px; flex-wrap:wrap; margin-top:28px; }
.collage { position:relative; aspect-ratio: 1.12; }
.collage .thumb { position:absolute; width:74%; background:none; cursor:pointer; }
.collage .t1 { left:-4%; top:30px; z-index:2; }
.collage .t2 { right:-6%; top:-10px; z-index:1; }
.collage .t3 { left:16%; bottom:-6px; z-index:3; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; text-decoration: none; cursor: pointer;
  font-size: 15px; font-weight: 600; padding: 12px 22px; border-radius: 6px;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #1A31A8; }
.btn-ghost { border: 1px solid var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

/* ---------- image tile ---------- */
.thumb { position:relative; aspect-ratio: 1420 / 976; background:var(--tile); border-radius:6px; overflow:hidden; }
.thumb > img { width:100%; height:100%; object-fit:cover; display:block; }
.thumb.cutout .art { position:absolute; inset:8% 15.35%; }
.thumb.cutout .art img { width:100%; height:100%; display:block; }

/* ---------- work index ---------- */
.work-index { padding-top: 48px; padding-bottom: 90px; }
.index-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  border-bottom: 1px solid var(--ink); padding-bottom: 14px;
}
.index-head h2 { font-size: 30px; }
.chips { display:flex; gap:6px; flex-wrap:wrap; }
.chip { font: inherit; font-size:14px; font-weight:500; padding:5px 12px; border-radius:4px; border:1px solid var(--line); background:var(--paper); color:var(--ink); cursor:pointer; }
.chip:hover { border-color:var(--ink); }
.chip.on { background:var(--ink); color:var(--paper); border-color:var(--ink); }
.work-row {
  display: grid; grid-template-columns: 1fr 260px; gap: 32px; align-items: center;
  padding: 32px 0; border-bottom: 1px solid var(--line);
  text-decoration: none; color: var(--ink); cursor: pointer;
}
.work-row.dim { display:none; }
.row-title { font-size: clamp(26px, 3.2vw, 36px); line-height: 1.15; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.work-row:hover .row-title { text-decoration-line: underline; }
.row-sub { display:block; font-size: 16px; color: var(--muted); margin-top: 8px; max-width: 56ch; }
.meta { display: flex; flex-wrap: wrap; column-gap: 24px; row-gap: 2px; margin-top: 12px; font-size: 14px; color: var(--ink); }
.meta .yr { color: var(--muted); }

/* ---------- case pages ---------- */
.case-hero { padding: 64px 0 8px; }
.case-back { font-size: 15px; font-weight: 500; color: var(--muted); text-decoration: none; cursor: pointer; display: inline-block; margin-bottom: 30px; }
.case-back:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.case-hero h1 { font-size: clamp(38px, 5.6vw, 60px); line-height: 1.08; }
.case-tagline { font-size: 20px; color: var(--muted); margin-top: 12px; max-width: 46ch; }
.case-hero .meta { margin-top: 20px; font-size: 15px; }
.case-led { margin-top: 18px; font-size: 16px; color: #333; max-width: 64ch; }
.case-led b { font-weight: 600; color: var(--ink); }
.case-img { margin: 40px 0 8px; }
.case-section { padding: 36px 0 4px; }
.case-section h2 { font-size: 30px; line-height: 1.2; margin-bottom: 12px; width: fit-content; text-decoration: underline var(--hl); text-decoration-thickness: .2em; text-underline-offset: .14em; text-decoration-skip-ink: none; }
.case-section h3 { font-family: var(--sans); font-size: 18px; font-weight: 650; margin: 22px 0 4px; }
.case-section p, .case-section li { font-size: 17.5px; line-height: 1.75; color: #333; max-width: 68ch; }
.case-section p + p { margin-top: 14px; }
.case-section ul { margin: 12px 0 12px 22px; }
.case-section li { margin: 8px 0; }
.case-section b, .case-section strong, .metric { color: var(--ink); font-weight: 650; }
.case-cta { display: flex; gap: 14px; flex-wrap: wrap; margin: 40px 0 20px; }
.next-project { margin-top: 56px; border-top: 1px solid var(--ink); padding: 30px 0 80px; }
.next-project .label { font-size: 15px; color: var(--muted); }
.next-project a { font-size: clamp(28px, 4.2vw, 42px); color: var(--ink); text-decoration: none; cursor: pointer; display: inline-block; margin-top: 4px; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.next-project a:hover { text-decoration-line: underline; }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: 280px 1fr; gap: 56px; padding: 72px 0 40px; align-items: start; }
.about-photo { position: sticky; top: 110px; }
.about-photo img { width: 100%; height: auto; border-radius: 6px; display: block; }
.about-copy h1 { font-size: clamp(36px, 5vw, 52px); line-height: 1.1; margin-bottom: 10px; }
.about-copy .lede { font-size: 22px; line-height: 1.45; color: var(--ink); margin-bottom: 24px; }
.about-copy p { margin-bottom: 18px; max-width: 62ch; color: #333; }
.about-copy p b { color: var(--ink); }
.offhours { position: relative; max-width: 62ch; margin-top: 44px; padding: 28px 24px 20px; border: 1px solid var(--ink); border-radius: 8px; color: #333; }
.offhours p { margin: 0; }
.oh-label {
  position: absolute; top: -16px; left: 18px; display: inline-flex; align-items: center; gap: 7px;
  background: var(--hl); color: var(--ink); padding: 5px 12px 5px 9px; border-radius: 4px; transform: rotate(-3deg);
  font-family: var(--display); font-weight: 600; font-size: 15px; line-height: 1.2;
}
.oh-label .d20 { width: 18px; height: 18px; flex: none; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--ink); margin-top: 60px; padding: 56px 0 40px; }
.footer-kicker { font-size: 17px; color: var(--muted); }
.footer-email { display: inline-block; margin-top: 8px; font-size: clamp(28px, 5vw, 52px); color: var(--ink); text-decoration: none; text-underline-offset: 8px; text-decoration-thickness: 1px; }
.footer-email:hover { text-decoration-line: underline; }
.footer-row { display: flex; justify-content: space-between; align-items: center; margin-top: 44px; flex-wrap: wrap; gap: 12px; font-size: 15px; }
.footer-row .small { color: var(--muted); }
.footer-row a { color: var(--ink); text-decoration: none; font-weight: 500; }
.footer-row a:hover { text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 760px) {
  nav { padding: 14px 20px; }
  .hc { font-size: 26px; }
  .nav-links { gap: 0; }
  .nav-link { font-size: 15px; padding: 8px 8px; }
  .page { padding-top: 64px; }
  .container { padding: 0 20px; }
  .hero { padding: 28px 0 18px; }
  .hero-sub { font-size: 16px; margin-top: 16px; }
  .hero-split { grid-template-columns: 1fr; gap: 22px; }
  .collage { width: 100%; max-width: 460px; margin: 6px auto 0; }
  .index-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .work-index { padding-top: 26px; }
  .work-row { grid-template-columns: 1fr; gap: 16px; padding: 26px 0; }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .about-photo { position: static; max-width: 260px; }
}

/* anchor target sits below the fixed nav */
#work { scroll-margin-top: 72px; }
