/* =========================================================
   Maikel van der Wouden — maikelvanderwouden.com
   Shared stylesheet. Editorial, minimal, type-led.
   ========================================================= */

/* ---- Fonts -------------------------------------------------
   Drop the .woff2 files into /assets/fonts/ with these exact
   names. Export woff2 from your licensed originals.
   ----------------------------------------------------------- */
@font-face {
  font-family: "TT Ramillas";
  src: url("/assets/fonts/TTRamillas-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "TT Ramillas";
  src: url("/assets/fonts/TTRamillas-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Telegraf";
  src: url("/assets/fonts/Telegraf-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Telegraf";
  src: url("/assets/fonts/Telegraf-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Neue Machina";
  src: url("/assets/fonts/NeueMachina-Regular.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* ---- Tokens ---- */
:root {
  --bg: #ffffff;
  --ink: #141414;
  --ink-soft: #2a2a2a;
  --rule: #e6e6e6;

  --serif: "TT Ramillas", Georgia, "Times New Roman", serif;
  --sans: "Telegraf", "Helvetica Neue", Arial, sans-serif;
  --mono: "Neue Machina", "Telegraf", "Helvetica Neue", Arial, sans-serif;

  --grad: linear-gradient(90deg, #7c3aed 0%, #9333ea 32%, #ec4899 62%, #f97316 100%);

  --wrap-max: 1240px;
  --gutter: clamp(1.25rem, 5vw, 4rem);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
figure { margin: 0; }
h1 { margin: 0; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: .6rem 1rem;
  z-index: 10;
}
.skip-link:focus { left: 1rem; top: 1rem; }

:focus-visible {
  outline: 2px solid #7c3aed;
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---- Layout container ---- */
.wrap {
  width: 100%;
  max-width: var(--wrap-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---- Header ---- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: clamp(1.75rem, 3vw, 2.75rem);
  padding-bottom: 1rem;
}
.wordmark {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  letter-spacing: .01em;
  white-space: nowrap;
}

/* Shared nav (header + footer) */
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(.72rem, 1vw, .82rem);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.site-nav a {
  position: relative;
  padding-bottom: 2px;
}
/* "/" separators between items */
.site-nav a:not(:last-child)::after {
  content: "/";
  margin-left: .55rem;
  font-weight: 900;
   background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  display: inline-block; 
}

.site-nav a::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--grad);
  transition: width .28s ease;
}
.site-nav a:hover::before,
.site-nav a:focus-visible::before { width: calc(100% - .9rem); }

/* ---- Hero ---- */
.hero {
  text-align: center;
  padding-top: clamp(2.5rem, 8vw, 6.5rem);
}
.hero-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.9rem, 11.5vw, 8.25rem);
  line-height: 0.96;
  letter-spacing: -0.02em;
  color: var(--ink);
  max-width: 15ch;
  text-wrap: balance;
  margin-inline: auto;
}
.hero-title em { font-style: italic; }

/* ---- Work heading ---- */
.work-head {
  text-align: center;
  margin-bottom: clamp(2rem, 4vw, 3.25rem);
}
.work-head .eyebrow { margin: 0; }
.work-title {
  margin: .9rem auto 0;
  max-width: 18ch;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 4.4vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
}
.work-title em { font-style: italic; }

.eyebrow {
  display: inline-block;
  margin: clamp(1.25rem, 2.5vw, 2rem) 0 0;
  font-family: var(--sans);
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-wrap: balance;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hero-sub {
  margin: .7rem auto 0;
  max-width: 48ch;
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  color: var(--ink-soft);
}

/* ---- Client logo row (scrolling) ---- */
.logo-marquee {
  margin: clamp(1.75rem, 3vw, 2.5rem) auto 0;
  max-width: 960px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 88%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 88%, transparent 100%);
}
.logo-track {
  display: flex;
  width: max-content;
  animation: logoScroll 32s linear infinite;
}
.logo-marquee:hover .logo-track { animation-play-state: paused; }
.logo-set {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}
.logo-item {
  display: flex;
  align-items: center;
  height: 48px;
  padding-right: clamp(2.5rem, 5vw, 4.5rem); /* spacing lives here so the loop stays seamless */
}
.logo-item img { max-height: 34px; width: auto; }
.logo-ph {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  letter-spacing: .02em;
  white-space: nowrap;
  color: #9ca0a8;
}
@keyframes logoScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .logo-track { animation: none; width: auto; }
  .logo-set { flex-wrap: wrap; justify-content: center; row-gap: .5rem; }
  .logo-set[aria-hidden="true"] { display: none; }
  .logo-marquee { -webkit-mask-image: none; mask-image: none; }
}

/* ---- Work grid ---- */
.work { padding-top: clamp(2.75rem, 6vw, 5rem); }

.work-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: clamp(1.5rem, 4vw, 3.25rem);
  row-gap: clamp(1.75rem, 3.5vw, 2.75rem);
}
.work-frame {
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background: #f1f2f4;
}
.work-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}
.work-item:hover .work-frame img { transform: scale(1.03); }

.work-meta {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  margin: .85rem 0 0;
  font-family: var(--sans);
  font-size: clamp(.8rem, 1vw, .9rem);
}
.work-num { font-weight: 700; letter-spacing: .02em; }
.work-label { font-weight: 400; color: var(--ink-soft); }

/* ---- Outro + button ---- */
.work-outro {
  text-align: center;
  padding-top: clamp(2.5rem, 5vw, 4rem);
}
.work-note {
  margin: 0 auto;
  max-width: 44ch;
  font-family: var(--sans);
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  color: var(--ink);
}
.btn {
  display: inline-block;
  padding: 1.05rem 2.2rem;
  border: 1.5px solid #d1d5db;
  font-family: var(--mono);
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .04em;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  text-transform: uppercase;
  transition: background-color .25s ease, color .25s ease;
  margin-top: 1.75rem;
}
.btn:hover,
.btn:focus-visible {
  background: var(--ink);
  color: #fff;
}


/* ---- Footer ---- */
.site-footer {
  margin-top: clamp(4rem, 9vw, 7.5rem);
  border-top: 1px solid var(--rule);
}
.footer-inner {
  max-width: 1440px; /* wider than the content column so it fits on one line */
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2.5rem;
  padding-block: clamp(1.5rem, 3vw, 2.25rem);
}
.footer-copy {
  margin: 0;
  font-family: var(--sans);
  font-size: .95rem;
  color: #6b6f76;
}
.footer-cc {
  margin-left: .2rem;
  font-size: .72rem;
  letter-spacing: .06em;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem clamp(1rem, 2vw, 2rem);
  font-family: var(--sans);
  font-weight: 500;
  font-size: .92rem;
}
.footer-links a {
  color: #4b4f56;
  transition: color .2s ease;
}
.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--ink);
}
@media (max-width: 680px) {
  .footer-inner { flex-direction: column-reverse; align-items: flex-start; }
}

/* ---- Responsive ---- */
@media (max-width: 680px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: .9rem;
  }
  .work-grid { grid-template-columns: 1fr; }
  .work-meta { gap: 1.1rem; }
}

@media (max-width: 400px) {
  .site-nav { gap: .4rem; }
  .site-nav a:not(:last-child)::after { margin-left: .4rem; }
}

/* ---- Motion preferences ---- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* =========================================================
   Homepage intro: dark band, portrait rising out of it
   ========================================================= */
.intro {
  margin-top: clamp(11rem, 19vw, 15rem);
  background:
    radial-gradient(ellipse 30% 75% at 70% 48%, rgba(56, 98, 148, .55), transparent 70%),
    linear-gradient(180deg, #08121a 0%, #10233a 46%, #0c1a28 100%);
  box-shadow: 0 -2px 0 #08121a; /* hides the 1px seam where the photo meets the band */
  color: #fff;
}
.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  column-gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start; /* photo pinned to the band's top edge; band grows with the text */
}
.intro-text {
  align-self: center;
  padding-block: clamp(2rem, 4vw, 3.5rem);
}
.intro .eyebrow { margin: 0 0 1rem; }
.intro-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 3.8vw, 3.75rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin: 0;
}
.intro-title em { font-style: italic; }
.intro-copy p {
  margin: 1.1rem 0 0;
  max-width: 44ch;
  font-family: var(--sans);
  font-size: clamp(1rem, 1.25vw, 1.125rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, .76);
}
.intro-copy p:first-child { margin-top: clamp(1.25rem, 2vw, 1.75rem); color: rgba(255, 255, 255, .92); }
.intro-copy a {
  color: #fff;
  padding-bottom: 2px;
  background: var(--grad) 0 100% / 100% 2px no-repeat;
  transition: background-size .3s ease;
}
.intro-copy a:hover,
.intro-copy a:focus-visible { background-size: 100% 100%; }

.intro-logos {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem clamp(1.4rem, 2.3vw, 2rem);
  margin: clamp(1.5rem, 2.6vw, 2rem) 0 0;
  padding: 0;
}
.intro-logos img {
  transition: transform .2s ease;
}
.intro-logos a:hover img,
.intro-logos a:focus-visible img { transform: translateY(-2px); }

/* Transparent cutout: the part above eye level rises out of the band. */
.intro-photo img {
  width: 100%;
  margin-top: calc(-27.682% - 1px);
  -webkit-mask-image: linear-gradient(180deg, #000 86%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 86%, transparent 100%);
}

@media (min-width: 1001px) {
  .intro-photo img { width: 118%; max-width: none; margin-top: calc(-27.682% * 1.18 - 1px); } /* fill the band's full height on desktop */
}
@media (max-width: 1000px) {
  .intro { margin-top: calc(min(460px, 100vw - 2.5rem) * 0.2768 + 3rem);
    background:
      radial-gradient(ellipse 70% 32% at 50% 22%, rgba(56, 98, 148, .55), transparent 70%),
      linear-gradient(180deg, #08121a 0%, #10233a 46%, #0c1a28 100%);
  }
  .intro-grid { grid-template-columns: 1fr; }
  .intro-photo { order: -1; width: min(460px, 100%); margin-inline: auto; }
  .intro-text { margin-top: -2.5rem; position: relative; }
  .intro-text { padding-block: 2rem 2.75rem; }
}
@media (max-width: 520px) {
  .intro-logos { gap: 1rem 1.4rem; } /* keep all four on one row */
}
@media (prefers-reduced-motion: reduce) {
  .intro-copy a, .intro-logos img { transition: none; }
}

/* =========================================================
   Podcast page
   ========================================================= */
.podcast { padding-top: clamp(1rem, 2vw, 1.5rem); padding-bottom: clamp(3rem, 6vw, 5.5rem); }
.podcast.wrap { max-width: 1340px; }
.podcast-panel {
  background: linear-gradient(158deg, #d0d5e1 0%, #dee1ec 46%, #e9ecf7 100%);
  border-radius: 16px;
  padding: clamp(2.75rem, 5.5vw, 5.25rem) clamp(1.5rem, 4.5vw, 4rem);
  text-align: center;
}
.podcast-quote {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.8rem, 4.2vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--ink);
  max-width: 1010px;
  margin: 0 auto;
}
.podcast-quote strong { font-weight: 700; }

.podcast .eyebrow { margin-top: clamp(1.75rem, 4vw, 3rem); }
.podcast-body {
  margin: 1.1rem auto 0;
  max-width: 940px;
  font-family: var(--sans);
  font-size: clamp(1rem, 1.35vw, 1.1875rem);
  line-height: 1.55;
  color: var(--ink-soft);
}
.podcast-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: clamp(2rem, 4vw, 3rem);
}
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 210px;
  padding: 1.05rem 2rem;
  border: 1.5px solid rgba(20, 20, 20, .32);
  border-radius: 999px;
  background: transparent;
  font-family: var(--sans);
  font-size: 1rem;
  letter-spacing: .01em;
  color: var(--ink);
  cursor: pointer;
  transition: border-color .25s ease, background-color .25s ease, color .25s ease;
}
.pill:hover,
.pill:focus-visible {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}
@media (max-width: 520px) {
  .podcast-actions { flex-direction: column; align-items: stretch; }
  .pill { width: 100%; }
}

/* ---- Trailer modal ---- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(16, 17, 22, .74);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.modal[hidden] { display: none; }
.modal-dialog {
  position: relative;
  width: min(100%, 980px);
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .5);
}
.modal-dialog iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.modal-close {
  position: absolute;
  top: clamp(.75rem, 3vw, 1.5rem);
  right: clamp(.75rem, 3vw, 1.5rem);
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color .2s ease;
}
.modal-close:hover,
.modal-close:focus-visible { background: rgba(255, 255, 255, .3); }

/* =========================================================
   Access-code layer over a project image (NDA projects)
   ========================================================= */
.work-media { position: relative; }
.work-link { display: block; }
.access-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.1rem, 4vw, 2.5rem);
  background: rgba(8, 18, 26, .72);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: #fff;
  animation: layerIn .28s ease;
}
@keyframes layerIn { from { opacity: 0; } to { opacity: 1; } }
.access-inner { width: min(100%, 380px); margin-inline: auto; }
.access-layer .eyebrow { margin: 0; }
.access-label {
  display: block;
  margin-top: 0;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  line-height: 1.1;
}
.access-row { display: flex; gap: .5rem; margin-top: clamp(.8rem, 1.8vw, 1.2rem); }
.access-input {
  flex: 1;
  min-width: 0;
  padding: .8rem .95rem;
  border: 1.5px solid rgba(255, 255, 255, .4);
  border-radius: 0;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font: 500 1rem var(--sans);
  letter-spacing: .08em;
}
.access-input::placeholder { color: rgba(255, 255, 255, .55); letter-spacing: .02em; }
.access-input:focus { outline: none; border-color: #fff; }
.access-input[aria-invalid="true"] { border-color: #fb7185; }
.access-submit {
  padding: .8rem 1.2rem;
  border: 1.5px solid #fff;
  background: #fff;
  color: var(--ink);
  font: 700 .78rem var(--mono);
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.access-submit:hover,
.access-submit:focus-visible { background: transparent; color: #fff; }
.access-error { margin: .5rem 0 0; font: .85rem var(--sans); color: #fda4af; }
.access-help {
  margin: clamp(.8rem, 1.8vw, 1.2rem) 0 0;
  font: .88rem/1.45 var(--sans);
  color: rgba(255, 255, 255, .75);
}
.access-help a {
  color: #fff;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.access-close {
  position: absolute;
  top: .5rem;
  right: .5rem;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.access-close:hover,
.access-close:focus-visible { background: rgba(255, 255, 255, .14); }
@media (max-width: 420px) {
  .access-help { font-size: .8rem; }
}
@media (prefers-reduced-motion: reduce) {
  .access-layer { animation: none; }
}

/* =========================================================
   Clients page
   ========================================================= */
.clients-page {
  background: linear-gradient(180deg, #ffffff 0%, #f6f7f9 52%, #e1e5ec 100%);
  min-height: 100vh;
}
.clients {
  text-align: center;
  padding-top: clamp(1.5rem, 4vw, 3.5rem);
  padding-bottom: clamp(3rem, 7vw, 6rem);
}
.clients-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.3rem, 6vw, 5.3rem);
  line-height: 1.03;
  letter-spacing: -0.015em;
  max-width: 18ch;
  margin: 0 auto;
}
.clients-title strong { font-weight: 700; }
.clients .eyebrow { margin-top: clamp(1.25rem, 3vw, 2.25rem); }

.logo-wall {
  list-style: none;
  margin: clamp(2.5rem, 5vw, 4.5rem) auto 0;
  padding: 0;
  max-width: 1200px;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  column-gap: clamp(1rem, 2.5vw, 2.5rem);
  row-gap: clamp(2rem, 4vw, 3.5rem);
}
.logo-wall li {
  display: flex;
  align-items: center;
  justify-content: center;
  height: clamp(52px, 6vw, 72px);
}
.client-logo {
  max-height: clamp(30px, 3.5vw, 46px);
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0;
  animation: logoIn .7s ease both;
}
@keyframes logoIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.clients-cta { margin-top: clamp(2.75rem, 5vw, 4.5rem); }

@media (max-width: 1000px) {
  .logo-wall { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 560px) {
  .logo-wall {
    grid-template-columns: repeat(3, 1fr);
    column-gap: 1rem;
    row-gap: 2rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .client-logo { animation: none; opacity: 1; }
}

/* =========================================================
   Mobile hamburger + full-screen menu
   ========================================================= */
.site-header .site-nav { display: none; } /* menu lives behind the hamburger on all screens */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin: -8px calc(var(--gutter) * -0.25) -8px 0; /* keep header height tidy */
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
  z-index: 100;                /* stays above the overlay so it doubles as close */
}
.nav-toggle-bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  transition: transform .3s ease, opacity .3s ease, background-color .3s ease;
}
/* Bars morph into an X and turn white while the menu is open */
body.menu-open .nav-toggle-bar { background: #fff; }
body.menu-open .nav-toggle-bar:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
body.menu-open .nav-toggle-bar:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: #000;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow-y: auto;
  padding: var(--gutter);
  /* line the menu up with the wordmark on wide screens */
  padding-inline: max(var(--gutter), calc((100vw - var(--wrap-max)) / 2 + var(--gutter)));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .35s ease, visibility .35s ease;
}
.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.mobile-menu-nav {
  display: flex;
  flex-direction: column;
  gap: clamp(.9rem, 2.6vh, 1.6rem);
}
.mobile-menu-nav a.is-external::after {
  content: "\2197"; /* ↗ marks links to the company sites */
  margin-left: .35em;
  font-family: var(--sans);
  font-size: .4em;
  vertical-align: .9em;
  opacity: .6;
}
.mobile-menu-nav a {
  position: relative;
  width: max-content;
  max-width: 100%;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.1rem, min(7vw, 7.5vh), 4rem);
  line-height: 1;
  letter-spacing: -0.015em;
  color: #fff;
}
/* Gradient underline echo of the desktop nav */
.mobile-menu-nav a::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -.15em;
  width: 0;
  height: 3px;
  background: var(--grad);
  transition: width .3s ease;
}
.mobile-menu-nav a:hover::before,
.mobile-menu-nav a:focus-visible::before,
.mobile-menu-nav a:active::before { width: 100%; }

@media (max-width: 680px) {
  /* Header back to a single row: wordmark left, hamburger right */
  .site-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }
  .site-header .site-nav { display: none; }  /* inline links replaced by hamburger */
  .nav-toggle { display: inline-flex; }
}

/* =========================================================
   Shared additions for About, Work and Contact
   ========================================================= */

/* Current page in the menu keeps its gradient underline */
.mobile-menu-nav a[aria-current="page"]::before { width: 100%; }

/* Logo whose file isn't uploaded yet (shown as its name) */
.logo-ph {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  letter-spacing: .02em;
  white-space: nowrap;
  color: #9ca0a8;
}
.logo-item img {
  max-height: 34px;
  width: auto;
  filter: grayscale(100%);
  opacity: .6;
}

/* ---- Page header (About, Work) ---- */
.page-head {
  text-align: center;
  padding-top: clamp(2.5rem, 7vw, 5.5rem);
}
.page-head .eyebrow { margin: 0; }
.page-title {
  margin: .9rem auto 0;
  max-width: 14ch;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.9rem, 9vw, 7rem);
  line-height: .98;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.page-title em { font-style: italic; }
.page-lead {
  margin: clamp(1.1rem, 2vw, 1.5rem) auto 0;
  max-width: 44ch;
  font-family: var(--sans);
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.55;
  color: var(--ink-soft);
  text-wrap: balance;
}

/* Light outlined button for dark backgrounds */
.btn-light {
  border-color: rgba(255, 255, 255, .5);
  color: #fff;
}
.btn-light:hover,
.btn-light:focus-visible { background: #fff; color: var(--ink); }

/* Centered call to action */
.cta {
  text-align: center;
  padding-top: clamp(3.5rem, 7vw, 6rem);
}
.cta-text {
  margin: 0 auto;
  max-width: 40ch;
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.cta-text em { font-style: italic; }

/* =========================================================
   Work page
   ========================================================= */
.work-page .work { padding-top: clamp(2.5rem, 5vw, 4rem); }

.client-wall {
  list-style: none;
  margin: clamp(3.5rem, 7vw, 6rem) auto 0;
  padding: clamp(2rem, 4vw, 3rem) 0 0;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(1.75rem, 4vw, 3.5rem) clamp(2.25rem, 5vw, 4.5rem);
}
.client-wall-head {
  margin: 0 0 1.75rem;
  text-align: center;
}
.client-wall li {
  display: flex;
  align-items: center;
  height: 48px;
}
.client-wall img {
  max-height: 40px;
  max-width: 140px;
  width: auto;
  filter: grayscale(100%);
  opacity: .65;
  transition: filter .25s ease, opacity .25s ease, transform .25s ease;
}
.client-wall li:hover img { filter: none; opacity: 1; transform: translateY(-2px); }

/* Intro screen, shown once per visit */
.preloader { display: none; }
.show-preloader .preloader {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--gutter);
  background: linear-gradient(180deg, #05090d 0%, #08121a 55%, #0c1a28 100%);
  color: #fff;
  pointer-events: none;
  animation: preloaderOut .5s ease-in-out 1.9s forwards;
}
.preloader-glow {
  position: absolute;
  inset: auto 0 0 0;
  height: 42vh;
  background: linear-gradient(to top, rgba(176, 204, 240, .55) 0%, rgba(56, 98, 148, .6) 42%, rgba(8, 18, 26, 0) 100%);
  opacity: 0;
  animation: fadeIn .6s ease-out .1s forwards;
}
.preloader-content {
  position: relative;
  z-index: 1;
  width: min(100%, 900px);
  text-align: center;
  opacity: 0;
  animation: fadeUp .5s ease-out .15s forwards;
}
.preloader-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 6vw, 4.25rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.preloader-title em { font-style: italic; }
.preloader-logos {
  list-style: none;
  margin: clamp(2rem, 5vw, 3.25rem) 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1.25rem clamp(1.5rem, 3.2vw, 2.5rem);
}
.preloader-logos li {
  display: flex;
  align-items: center;
  height: 40px;
  opacity: 0;
  animation: logoIn .35s ease-out forwards;
}
.preloader-logos li:nth-child(1) { animation-delay: .30s; }
.preloader-logos li:nth-child(2) { animation-delay: .40s; }
.preloader-logos li:nth-child(3) { animation-delay: .50s; }
.preloader-logos li:nth-child(4) { animation-delay: .60s; }
.preloader-logos li:nth-child(5) { animation-delay: .70s; }
.preloader-logos li:nth-child(6) { animation-delay: .80s; }
.preloader-logos li:nth-child(7) { animation-delay: .90s; }
.preloader-logos li:nth-child(n+8) { animation-delay: 1s; }
.preloader-logos img {
  max-height: 32px;
  max-width: 120px;
  width: auto;
  filter: brightness(0) invert(1);
}
.preloader-logos .logo-ph { color: rgba(255, 255, 255, .85); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes preloaderOut { to { opacity: 0; visibility: hidden; } }

/* =========================================================
   About page
   ========================================================= */
.story-image {
  margin: clamp(2.5rem, 5vw, 4rem) auto 0;
  max-width: 1100px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  /* shows until about.jpg is uploaded */
  background:
    radial-gradient(ellipse 45% 70% at 70% 45%, rgba(56, 98, 148, .55), transparent 70%),
    linear-gradient(180deg, #08121a 0%, #10233a 55%, #0c1a28 100%);
}
.story-image img { width: 100%; height: 100%; object-fit: cover; }

.story {
  max-width: 760px;
  margin: clamp(2.75rem, 6vw, 4.5rem) auto 0;
}
.statement {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  line-height: 1.22;
  letter-spacing: -0.012em;
}
.statement em { font-style: italic; }
.story-body {
  margin: clamp(1.6rem, 3vw, 2.25rem) 0 0;
  font-family: var(--sans);
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  line-height: 1.65;
  color: var(--ink-soft);
}
.principles { margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.principles .eyebrow { margin: 0; }
.principles ol {
  list-style: none;
  margin: 1.1rem 0 0;
  padding: 0;
}
.principles li {
  display: flex;
  gap: 1.5rem;
  padding: 1.15rem 0;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: clamp(1.02rem, 1.35vw, 1.15rem);
  line-height: 1.5;
  color: var(--ink);
}
.principles li:last-child { border-bottom: 1px solid var(--rule); }
.principles .work-num { flex: none; width: 1.75rem; padding-top: .1rem; font-family: var(--sans); font-size: .85rem; }

/* =========================================================
   Contact page (full screen, dark)
   ========================================================= */
.contact-page {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  background: linear-gradient(180deg, #05090d 0%, #08121a 50%, #0c1a28 100%);
  color: #fff;
}
.contact-page .site-header { position: relative; z-index: 3; }
.contact-page .wordmark { color: #fff; }
.contact-page .nav-toggle-bar { background: #fff; }
.contact-glow {
  position: absolute;
  inset: auto 0 0 0;
  height: 40vh;
  background: linear-gradient(to top, rgba(176, 204, 240, .5) 0%, rgba(56, 98, 148, .55) 42%, rgba(8, 18, 26, 0) 100%);
  pointer-events: none;
  opacity: 0;
  animation: fadeIn 1.2s ease-out forwards;
}
.contact {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-block: 2rem 7rem;
  opacity: 0;
  animation: fadeUp 1s ease-out .25s forwards;
}
.contact .eyebrow { margin: 0; }
.contact-title {
  margin: .9rem 0 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3.2rem, 11vw, 8rem);
  line-height: .95;
  letter-spacing: -0.02em;
}
.contact-title em { font-style: italic; }
.contact-text {
  margin: clamp(1.25rem, 2.5vw, 1.75rem) auto 0;
  max-width: 46ch;
  font-family: var(--sans);
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, .8);
  text-wrap: balance;
}
.contact .btn { margin-top: clamp(1.75rem, 3.5vw, 2.5rem); text-transform: none; letter-spacing: .02em; }
.back-link {
  position: absolute;
  right: max(var(--gutter), calc((100vw - var(--wrap-max)) / 2 + var(--gutter)));
  bottom: clamp(1.5rem, 4vw, 2.5rem);
  z-index: 3;
  font-family: var(--sans);
  font-size: 1.05rem;
  color: #fff;
  opacity: 0;
  animation: fadeIn .8s ease-out 1.2s forwards;
  transition: transform .2s ease;
}
.back-link:hover,
.back-link:focus-visible { transform: translateX(3px); }

@media (prefers-reduced-motion: reduce) {
  /* intro screen stays still; the script removes it after 2 seconds */
  .preloader-content, .preloader-glow, .preloader-logos li { opacity: 1; }
  .contact, .contact-glow, .back-link { animation: none; opacity: 1; }
}

/* =========================================================
   Company pages (Norfelt, Voice Branding, Podcast)
   ========================================================= */
.story-frame {
  overflow: hidden;
  /* shows until the photo is uploaded */
  background:
    radial-gradient(ellipse 60% 60% at 60% 40%, rgba(56, 98, 148, .5), transparent 70%),
    linear-gradient(180deg, #08121a 0%, #10233a 55%, #0c1a28 100%);
}
.story-frame img { width: 100%; height: 100%; object-fit: cover; }
.story-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 2rem);
  max-width: 1100px;
  margin: clamp(2.75rem, 6vw, 4.5rem) auto 0;
}
.story-gallery .story-frame { aspect-ratio: 4 / 5; }
.story-wide {
  max-width: 1100px;
  margin: clamp(2.75rem, 6vw, 4.5rem) auto 0;
  aspect-ratio: 9 / 5;
}
.story-link {
  margin: clamp(2rem, 4vw, 3rem) 0 0;
  text-align: center;
}
.story-link .btn { margin-top: 0; }
@media (max-width: 600px) {
  .story-gallery { grid-template-columns: 1fr; }
  .story-gallery .story-frame { aspect-ratio: 4 / 3; }
}
