/* ==========================================================================
   Enya Bousseau — portfolio
   Palette and type are set once here; change a token and it updates everywhere.
   ========================================================================== */

@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/fonts/instrument-serif-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/fonts/instrument-serif-latin-ext-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/fonts/instrument-serif-latin-400-italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("/assets/fonts/hanken-grotesk-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("/assets/fonts/hanken-grotesk-latin-ext-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Colour */
  --paper: #FBF9F5;        /* bright ivory */
  --paper-2: #F1ECE4;      /* soft taupe surface */
  --ink: #23211F;          /* charcoal */
  --ink-soft: #5A544D;
  --taupe: #9C8E7C;        /* soft taupe */
  --line: #E3DBCF;
  --green: #4E9A62;        /* availability */
  --blue: #4E6477;         /* muted blue, the "studio backdrop" */
  --blue-deep: #3D4F5F;
  --terra: #A9533A;        /* terracotta */
  --on-blue: #EEF0EE;

  /* Soft tints, one per discipline */
  --terra-tint: #EED6C9;   /* e-commerce */
  --blue-tint: #D3DCE4;    /* digital marketing */
  --sand: #E6D3A8;         /* creative production */
  --sand-deep: #8A6A2C;

  /* Type */
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-small: 0.84rem;
  --fs-body: 1rem;
  --fs-lead: clamp(1.05rem, 1.2vw, 1.15rem);
  --fs-h3: clamp(1.4rem, 2vw, 1.75rem);
  --fs-h2: clamp(2rem, 3.6vw, 3rem);
  --fs-h1: clamp(2.7rem, 5.6vw, 5.4rem);

  /* Space */
  --gutter: clamp(1rem, 4vw, 3.5rem);
  --section: clamp(3.5rem, 7.5vw, 6.5rem);
  --max: 1380px;
  --measure: 62ch;

  --ease: cubic-bezier(.2, .7, .1, 1);
}

/* Reset ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul[class], ol[class], nav ul, .expertise ul, .case-block__content ul { list-style: none; padding: 0; }
img { display: block; max-width: 100%; height: auto; }
button, input, textarea { font: inherit; color: inherit; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@view-transition { navigation: auto; }

/* Base ------------------------------------------------------------------- */
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--blue); color: var(--on-blue); }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--terra); outline-offset: 3px; }
main { display: block; overflow-x: clip; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.02; letter-spacing: -0.01em; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--ink); color: var(--paper); padding: .6rem 1rem; text-decoration: none;
}
.skip-link:focus { top: 1rem; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.prose > * + * { margin-top: 1em; }
.prose ul { list-style: none; padding: 0; }
.prose li { position: relative; padding-left: 1.4em; }
.prose li + li { margin-top: .45em; }
.prose li::before {
  content: ""; position: absolute; left: 0; top: .72em;
  width: .55em; height: 1px; background: var(--taupe);
}
.prose--lead { font-size: var(--fs-lead); line-height: 1.55; }

/* Buttons and links ------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: .75rem 1.4rem;
  background: var(--ink); color: var(--paper);
  border: 1px solid var(--ink); border-radius: 2px;
  font-size: .95rem; font-weight: 500; letter-spacing: .01em;
  text-decoration: none; cursor: pointer;
  transition: background-color .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
}
.btn:hover { background: var(--blue); border-color: var(--blue); color: var(--on-blue); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.text-link {
  font-weight: 500; text-decoration: underline;
  text-decoration-color: var(--terra); text-decoration-thickness: 1px; text-underline-offset: .3em;
  transition: text-underline-offset .25s var(--ease);
}
.text-link:hover { text-underline-offset: .45em; }

/* Crop marks: the studio "proof print" frame used around images ----------- */
.proof { position: relative; }
.proof::before {
  --m: var(--taupe);
  content: ""; position: absolute; inset: -14px; pointer-events: none;
  background:
    linear-gradient(var(--m), var(--m)) left 0 top 14px / 9px 1px no-repeat,
    linear-gradient(var(--m), var(--m)) left 14px top 0 / 1px 9px no-repeat,
    linear-gradient(var(--m), var(--m)) right 0 top 14px / 9px 1px no-repeat,
    linear-gradient(var(--m), var(--m)) right 14px top 0 / 1px 9px no-repeat,
    linear-gradient(var(--m), var(--m)) left 0 bottom 14px / 9px 1px no-repeat,
    linear-gradient(var(--m), var(--m)) left 14px bottom 0 / 1px 9px no-repeat,
    linear-gradient(var(--m), var(--m)) right 0 bottom 14px / 9px 1px no-repeat,
    linear-gradient(var(--m), var(--m)) right 14px bottom 0 / 1px 9px no-repeat;
}
.proof img { width: 100%; height: 100%; object-fit: cover; background: var(--paper-2); }

/* Header ----------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header__inner {
  max-width: var(--max); margin: 0 auto; padding: 1.1rem var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
}
.wordmark { font-family: var(--serif); font-size: 1.6rem; line-height: 1; text-decoration: none; letter-spacing: -0.01em; }
.site-nav { display: flex; align-items: center; gap: 2.5rem; }
.site-nav ul { display: flex; gap: 2rem; }
.site-nav ul a {
  text-decoration: none; font-size: .95rem; padding: .3rem 0;
  background: linear-gradient(var(--terra), var(--terra)) left bottom / 0 1px no-repeat;
  transition: background-size .3s var(--ease);
}
.site-nav ul a:hover, .site-nav ul a[aria-current="page"] { background-size: 100% 1px; }
.lang-switch { display: flex; align-items: center; gap: .15rem; font-size: .85rem; border: 1px solid var(--line); border-radius: 2px; padding: .15rem; }
.lang-switch__item { padding: .2rem .5rem; text-decoration: none; color: var(--ink-soft); border-radius: 1px; }
.lang-switch__item.is-active { background: var(--ink); color: var(--paper); }
a.lang-switch__item:hover { color: var(--ink); background: var(--paper-2); }
.menu-toggle { display: none; }

@media (max-width: 860px) {
  .menu-toggle {
    display: inline-flex; background: none; border: 1px solid var(--ink); border-radius: 2px;
    padding: .45rem .9rem; font-size: .9rem; cursor: pointer; position: relative; z-index: 2;
  }
  .menu-toggle__close { display: none; }
  .menu-open .menu-toggle__open { display: none; }
  .menu-open .menu-toggle__close { display: inline; }
  .site-nav {
    position: fixed; inset: 0; z-index: 1;
    flex-direction: column; align-items: flex-start; justify-content: center; gap: 3rem;
    padding: 6rem var(--gutter) 3rem; background: var(--paper);
    opacity: 0; visibility: hidden; transition: opacity .3s var(--ease), visibility .3s;
  }
  .menu-open .site-nav { opacity: 1; visibility: visible; }
  .site-nav ul { flex-direction: column; gap: .4rem; }
  .site-nav ul a { font-family: var(--serif); font-size: 3rem; line-height: 1.15; }
  .menu-open { overflow: hidden; }
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--paper); }
}

/* Shared section bits ---------------------------------------------------- */
.section, .page-intro, .paths, .contact-cta, .work-list, .gallery-section, .contact-page, .about-hero, .cv-section, .cv-download, .case {
  max-width: var(--max); margin-left: auto; margin-right: auto;
  padding-left: var(--gutter); padding-right: var(--gutter);
}
.section-head { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1rem 2rem; align-items: end; margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.section-title { font-size: var(--fs-h2); grid-column: 1 / span 6; }
.section-intro { grid-column: 8 / span 5; color: var(--ink-soft); max-width: 42ch; }
.section-more { margin-top: 3rem; text-align: right; }

.page-intro { padding-top: clamp(3.5rem, 9vw, 7.5rem); padding-bottom: clamp(3rem, 7vw, 5rem); }
.page-title { font-size: var(--fs-h1); max-width: 14ch; }
.page-title--long { font-size: clamp(2.6rem, 6vw, 5.6rem); max-width: 18ch; }
.page-lead { margin-top: 1.75rem; font-size: var(--fs-lead); color: var(--ink-soft); max-width: 50ch; }
.page-lead--alt { margin-top: 1rem; font-size: 1rem; }
.page-intro--center { text-align: center; padding-bottom: var(--section); }
.page-intro--center .page-title, .page-intro--center .page-lead { margin-left: auto; margin-right: auto; }
.page-intro--center .btn { margin-top: 2.5rem; }

/* Home: hero ------------------------------------------------------------- */
.hero {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 6rem) var(--gutter) var(--section);
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 2rem; row-gap: 3rem;
}
.hero__text { grid-column: 1 / span 8; position: relative; z-index: 1; }
.hero__title { font-size: var(--fs-h1); line-height: .94; letter-spacing: -0.02em; max-width: 10.5ch; }
.hero__position { margin-top: 2rem; font-size: var(--fs-lead); font-weight: 500; }
.hero__intro { margin-top: 1.25rem; max-width: 52ch; color: var(--ink-soft); }
.hero__actions { margin-top: 2.5rem; display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; }
.hero__portrait { grid-column: 9 / span 4; margin-top: clamp(1rem, 12vw, 11rem); }
.hero__portrait .proof { aspect-ratio: 4 / 5; }
.hero__portrait figcaption { margin-top: 1.4rem; font-size: var(--fs-small); color: var(--ink-soft); display: flex; gap: .6rem; align-items: baseline; }
.status-dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--terra); flex: none; transform: translateY(-1px); }

/* The one orchestrated moment: headline words settle, then the frame marks appear */
.js [data-split] .w { display: inline-block; overflow: clip; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.js [data-split] .w > span { display: inline-block; transform: translateY(105%); }
.js.is-ready [data-split] .w > span { transform: none; transition: transform 1s var(--ease); transition-delay: calc(var(--i) * 70ms); }
.js .hero__portrait .proof::before { opacity: 0; transform: scale(1.06); }
.js .hero__portrait img { clip-path: inset(0 0 100% 0); }
.js.is-ready .hero__portrait .proof::before { opacity: 1; transform: none; transition: opacity .8s var(--ease) .75s, transform .8s var(--ease) .75s; }
.js.is-ready .hero__portrait img { clip-path: inset(0); transition: clip-path 1.1s var(--ease) .2s; }

@media (max-width: 860px) {
  .hero__text, .hero__portrait { grid-column: 1 / -1; }
  .hero__portrait { margin-top: 0; max-width: 26rem; }
}

/* Home: two paths -------------------------------------------------------- */
.paths { display: grid; grid-template-columns: 1fr 1fr; padding-bottom: var(--section); }
.path {
  display: block; text-decoration: none; padding: 2.25rem 2.5rem 2.5rem 0;
  border-top: 1px solid var(--ink); transition: background-color .3s var(--ease), padding .3s var(--ease);
}
.path--alt { padding-left: 2.5rem; border-left: 1px solid var(--line); }
.path:hover { background: var(--paper-2); padding-left: 1.5rem; }
.path--alt:hover { padding-left: 3rem; }
.path__title { font-size: var(--fs-h3); margin-bottom: .8rem; }
.path p { color: var(--ink-soft); max-width: 40ch; }
.path__cta { display: inline-block; margin-top: 1.5rem; font-weight: 500; text-decoration: underline; text-decoration-color: var(--terra); text-underline-offset: .3em; }
@media (max-width: 720px) {
  .paths { grid-template-columns: 1fr; }
  .path, .path--alt { padding: 2rem 0; border-left: 0; }
  .path:hover, .path--alt:hover { padding-left: 1rem; }
}

/* Home: selected work ---------------------------------------------------- */
.work-home { padding-bottom: var(--section); }
.work-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(3rem, 6vw, 5rem) 2rem; }
.work-card--l { grid-column: 1 / span 7; grid-row: span 2; }
.work-card--m { grid-column: 9 / span 4; }
.work-card--m:nth-child(3) { align-self: end; }
.work-card--w { grid-column: 3 / span 8; }
.work-card__link { display: block; text-decoration: none; }
.work-card__media { aspect-ratio: 4 / 3; }
.work-card--l .work-card__media { aspect-ratio: 4 / 5; }
.work-card--w .work-card__media { aspect-ratio: 16 / 9; }
.work-card__media img { transition: transform 1.2s var(--ease), filter .6s var(--ease); }
.work-card__media { overflow: visible; }
.work-card__media::after { content: ""; position: absolute; inset: 0; outline: 1px solid transparent; transition: outline-color .4s; }
.work-card__link:hover .work-card__media img { filter: saturate(1.08) contrast(1.03); }
.work-card__kpi {
  position: absolute; left: 0; bottom: 0; max-width: 80%;
  background: var(--paper); padding: 1rem 1.25rem 1.1rem;
  display: flex; flex-direction: column;
}
.kpi-value { font-family: var(--serif); font-size: clamp(2.8rem, 5vw, 4.2rem); line-height: .95; color: var(--blue); }
.kpi-label { font-size: var(--fs-small); color: var(--ink-soft); max-width: 22ch; margin-top: .35rem; line-height: 1.4; }
.work-card__body { padding-top: 1.6rem; }
.work-card__title { font-size: var(--fs-h3); }
.work-card--l .work-card__title { font-size: clamp(2rem, 3.4vw, 3rem); }
.work-card__meta { margin-top: .5rem; font-size: var(--fs-small); color: var(--taupe); }
.work-card__summary { margin-top: .75rem; color: var(--ink-soft); max-width: 46ch; }
.work-card__cta {
  display: inline-block; margin-top: 1rem; font-weight: 500; font-size: .95rem;
  background: linear-gradient(var(--terra), var(--terra)) left bottom / 0 1px no-repeat; padding-bottom: 2px;
  transition: background-size .35s var(--ease);
}
a:hover .work-card__cta { background-size: 100% 1px; }
@media (max-width: 860px) {
  .work-card--l, .work-card--m, .work-card--w { grid-column: 1 / -1; grid-row: auto; }
  .work-card--l .work-card__media { aspect-ratio: 4 / 3; }
}

/* Home: expertise band --------------------------------------------------- */
.expertise { background: var(--blue); color: var(--on-blue); }
.expertise__inner { max-width: var(--max); margin: 0 auto; padding: var(--section) var(--gutter); }
.expertise .section-title { margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.expertise__grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.expertise__col { padding: 0 2rem 0 0; }
.expertise__col + .expertise__col { padding-left: 2rem; border-left: 1px solid rgb(238 240 238 / .25); }
.expertise h3 { font-size: var(--fs-h3); }
.expertise__lead { margin-top: .75rem; color: rgb(238 240 238 / .8); max-width: 28ch; }
.expertise ul { margin-top: 1.75rem; }
.expertise li { padding: .55rem 0; border-top: 1px solid rgb(238 240 238 / .18); font-size: .98rem; }
@media (max-width: 860px) {
  .expertise__grid { grid-template-columns: 1fr; gap: 3rem; }
  .expertise__col, .expertise__col + .expertise__col { padding: 0; border-left: 0; }
}

/* Contact call-to-action ------------------------------------------------- */
.contact-cta { padding-top: var(--section); padding-bottom: var(--section); }
.contact-cta__title { font-size: clamp(2.6rem, 7.2vw, 6.5rem); line-height: .98; max-width: 15ch; }
.contact-cta__text { margin-top: 1.75rem; max-width: 48ch; color: var(--ink-soft); font-size: var(--fs-lead); }
.contact-cta__mail { margin-top: 2.5rem; font-family: var(--serif); font-size: clamp(1.7rem, 3.6vw, 2.8rem); line-height: 1.1; }
.contact-cta__mail a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; text-decoration-color: var(--terra); overflow-wrap: anywhere; }
.contact-cta__mail a:hover { color: var(--blue); }
.contact-cta__actions { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .75rem; }

/* Footer ----------------------------------------------------------------- */
.site-footer { background: var(--ink); color: var(--paper); }
.site-footer__inner {
  max-width: var(--max); margin: 0 auto; padding: 3.5rem var(--gutter) 2.5rem;
  display: grid; grid-template-columns: 1fr auto; gap: 2rem 3rem; align-items: start;
}
.site-footer__name { font-family: var(--serif); font-size: 2rem; line-height: 1; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: .5rem 2rem; font-size: .95rem; }
.site-footer__links a { text-decoration: none; opacity: .85; }
.site-footer__links a:hover { opacity: 1; text-decoration: underline; text-underline-offset: .3em; text-decoration-color: var(--terra); }
.site-footer__small { grid-column: 1 / -1; font-size: .8rem; opacity: .55; padding-top: 1.5rem; border-top: 1px solid rgb(242 237 228 / .15); }
@media (max-width: 720px) { .site-footer__inner { grid-template-columns: 1fr; } }

/* Work list -------------------------------------------------------------- */
.work-list { padding-bottom: var(--section); display: grid; gap: clamp(4rem, 9vw, 7.5rem); }
.work-row__link { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2rem; align-items: center; text-decoration: none; }
.work-row__media { grid-column: 1 / span 7; aspect-ratio: 4 / 3; }
.work-row__body { grid-column: 9 / span 4; }
.work-row:nth-child(even) .work-row__media { grid-column: 6 / span 7; order: 2; }
.work-row:nth-child(even) .work-row__body { grid-column: 1 / span 4; }
.work-row__meta { font-size: var(--fs-small); color: var(--taupe); }
.work-row__title { margin-top: .6rem; font-size: clamp(2.4rem, 4.6vw, 4rem); }
.work-row__summary { margin-top: 1rem; color: var(--ink-soft); }
.work-row__kpi { margin-top: 1.5rem; display: flex; align-items: baseline; gap: .75rem; font-size: var(--fs-small); color: var(--ink-soft); }
.work-row__kpi .kpi-value { font-size: 2.6rem; }
.work-row__media img { transition: filter .6s var(--ease); }
.work-row__link:hover img { filter: saturate(1.08) contrast(1.03); }
@media (max-width: 860px) {
  .work-row__media, .work-row__body,
  .work-row:nth-child(even) .work-row__media, .work-row:nth-child(even) .work-row__body { grid-column: 1 / -1; order: 0; }
}

/* About ------------------------------------------------------------------ */
.about-hero {
  padding-top: clamp(3.5rem, 9vw, 7.5rem); padding-bottom: var(--section);
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 3rem 2rem;
}
.about-hero__text { grid-column: 1 / span 7; }
.about-hero__text .prose { margin-top: 2.25rem; color: var(--ink-soft); max-width: 58ch; }
.about-hero__portrait { grid-column: 9 / span 4; align-self: start; margin-top: 2rem; }
.about-hero__portrait .proof { aspect-ratio: 4 / 5; }
.cv-buttons { margin-top: 2.25rem; display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; }
@media (max-width: 860px) {
  .about-hero__text, .about-hero__portrait { grid-column: 1 / -1; }
  .about-hero__portrait { max-width: 22rem; margin-top: 0; }
}

.cv-section { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2rem; padding-bottom: clamp(4rem, 8vw, 6.5rem); }
.cv-section__title { grid-column: 1 / span 3; font-size: clamp(1.9rem, 3vw, 2.6rem); padding-top: 1.1rem; border-top: 1px solid var(--ink); align-self: start; }
.cv-section > :not(.cv-section__title) { grid-column: 4 / span 9; }
.timeline__item { display: grid; grid-template-columns: minmax(9rem, 1fr) 3fr; gap: 1.5rem; padding: 1.25rem 0 1.6rem; border-top: 1px solid var(--line); }
.timeline__when { font-size: var(--fs-small); color: var(--taupe); display: flex; flex-direction: column; gap: .2rem; padding-top: .35rem; }
.timeline__what h3 { font-size: var(--fs-h3); }
.timeline__role { margin-top: .25rem; font-weight: 500; }
.timeline__what p:last-child:not(.timeline__role) { margin-top: .6rem; color: var(--ink-soft); max-width: 58ch; }
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.skills-grid h3 { font-size: 1.5rem; margin-bottom: 1rem; }
.plain-list li { padding: .3rem 0; color: var(--ink-soft); font-size: .98rem; }
.cv-section--split > div:first-of-type { grid-column: 1 / span 6; }
.cv-section--split > div:last-of-type { grid-column: 8 / span 5; }
.cv-section--split .cv-section__title { margin-bottom: 1.75rem; }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.tags li { padding: .35rem .85rem; border: 1px solid var(--line); border-radius: 999px; font-size: .9rem; background: color-mix(in srgb, var(--paper-2) 45%, transparent); }
.lang-list div { display: flex; justify-content: space-between; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.lang-list dt { font-family: var(--serif); font-size: 1.5rem; line-height: 1.1; }
.lang-list dd { color: var(--ink-soft); font-size: .95rem; text-align: right; }
.cv-download { padding-bottom: var(--section); }
.cv-download > * { max-width: 40rem; }
.cv-download { display: block; }
.cv-download__title { font-size: var(--fs-h2); }
.cv-download p { margin-top: 1rem; color: var(--ink-soft); }
@media (max-width: 860px) {
  .cv-section__title, .cv-section > :not(.cv-section__title),
  .cv-section--split > div:first-of-type, .cv-section--split > div:last-of-type { grid-column: 1 / -1; }
  .skills-grid { grid-template-columns: 1fr; }
  .timeline__item { grid-template-columns: 1fr; gap: .5rem; }
}

/* Creative gallery ------------------------------------------------------- */
.gallery-section { padding-bottom: var(--section); }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 3rem; }
.filter {
  background: transparent; border: 1px solid var(--line); border-radius: 999px;
  padding: .45rem 1rem; font-size: .9rem; cursor: pointer; color: var(--ink-soft);
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.filter:hover { border-color: var(--ink); color: var(--ink); }
.filter.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.gallery { columns: 3 18rem; column-gap: 2rem; }
.gallery__item { break-inside: avoid; margin-bottom: 2.5rem; }
.gallery__item[hidden] { display: none; }
.gallery__open { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.gallery__open img { width: 100%; object-fit: cover; background: var(--paper-2); transition: filter .5s var(--ease); }
.gallery__open:hover img { filter: saturate(1.08) contrast(1.03); }
.gallery__caption { margin-top: .75rem; font-size: var(--fs-small); display: flex; justify-content: space-between; gap: 1rem; }
.gallery__cat { color: var(--taupe); text-align: right; flex: none; max-width: 50%; }
.gallery.is-filtering .gallery__item { animation: settle .5s var(--ease) both; }
@keyframes settle { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.lightbox { border: 0; padding: 0; background: transparent; max-width: min(92vw, 1100px); max-height: 92vh; overflow: visible; }
.lightbox::backdrop { background: rgb(35 33 31 / .92); }
.lightbox figure { display: flex; flex-direction: column; align-items: center; }
.lightbox img { max-height: 80vh; width: auto; max-width: 100%; }
.lightbox figcaption { margin-top: 1rem; color: var(--paper); font-size: .95rem; }
.lightbox__close {
  position: fixed; top: 1.25rem; right: 1.25rem;
  background: var(--paper); color: var(--ink); border: 0; border-radius: 2px; padding: .55rem 1rem; cursor: pointer; font-size: .9rem;
}
.lightbox[open] { animation: settle .35s var(--ease); }

/* Contact page ----------------------------------------------------------- */
.contact-page { padding-top: clamp(3.5rem, 9vw, 7.5rem); padding-bottom: var(--section); }
.contact-page__grid { margin-top: clamp(3rem, 7vw, 5.5rem); display: grid; grid-template-columns: repeat(12, 1fr); gap: 3rem 2rem; }
.contact-form { grid-column: 1 / span 7; }
.contact-form__title { font-size: var(--fs-h3); margin-bottom: 2rem; }
.field { margin-bottom: 1.6rem; }
.field label { display: block; font-size: var(--fs-small); color: var(--ink-soft); margin-bottom: .35rem; }
.field input, .field textarea {
  width: 100%; padding: .7rem 0; background: transparent;
  border: 0; border-bottom: 1px solid var(--taupe); border-radius: 0;
  font-size: 1.1rem; transition: border-color .25s var(--ease);
}
.field textarea { resize: vertical; min-height: 9rem; }
.field input::placeholder { color: var(--taupe); }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--terra); box-shadow: 0 1px 0 var(--terra); }
.contact-form .btn { margin-top: .75rem; }
.contact-info { grid-column: 9 / span 4; }
.contact-info dl > div { padding: 1.1rem 0 1.25rem; border-top: 1px solid var(--line); }
.contact-info dt { font-size: var(--fs-small); color: var(--taupe); }
.contact-info dd { margin-top: .3rem; overflow-wrap: anywhere; }
.contact-info a { text-decoration: underline; text-decoration-color: var(--terra); text-underline-offset: .25em; }
@media (max-width: 860px) { .contact-form, .contact-info { grid-column: 1 / -1; } }

/* Case study ------------------------------------------------------------- */
.case { padding-top: clamp(2rem, 6vw, 4.5rem); }
.back-link { display: inline-block; font-size: var(--fs-small); color: var(--ink-soft); text-decoration: none; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.back-link::before { content: "\2190\00a0"; }
.back-link:hover { color: var(--ink); }
.case-hero__title { font-size: var(--fs-h1); max-width: 12ch; }
.case-hero__summary { margin-top: 1.75rem; font-size: clamp(1.25rem, 2vw, 1.6rem); line-height: 1.4; max-width: 38ch; color: var(--ink-soft); }
.case-meta { margin-top: clamp(2.5rem, 6vw, 4rem); display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem 2rem; }
.case-meta > div { padding-top: .9rem; border-top: 1px solid var(--ink); }
.case-meta dt { font-size: var(--fs-small); color: var(--taupe); }
.case-meta dd { margin-top: .25rem; }
.case-cover { margin-top: clamp(3rem, 7vw, 5rem); aspect-ratio: 16 / 9; }
.kpi-band {
  margin-top: clamp(3rem, 7vw, 5rem); background: var(--blue); color: var(--on-blue);
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 5vw, 4rem);
  display: flex; flex-wrap: wrap; gap: 2rem 5rem; align-items: flex-end;
}
.kpi { display: flex; align-items: flex-end; gap: 1.5rem; flex-wrap: wrap; }
.kpi__value { font-family: var(--serif); font-size: clamp(5rem, 15vw, 12rem); line-height: .8; letter-spacing: -0.03em; }
.kpi__label { font-size: var(--fs-lead); max-width: 18ch; line-height: 1.35; padding-bottom: .4rem; }
.kpi-band__note { width: 100%; font-size: var(--fs-small); color: rgb(238 240 238 / .7); }
.case-body { margin-top: var(--section); }
.case-block { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1rem 2rem; padding: 2rem 0 3rem; border-top: 1px solid var(--line); }
.case-block__label { grid-column: 1 / span 4; font-family: var(--sans); font-size: 1rem; font-weight: 500; letter-spacing: 0; line-height: 1.6; }
.case-block__content { grid-column: 5 / span 7; max-width: var(--measure); font-size: 1.1rem; }
.case-block__content.prose > p:first-child { font-size: clamp(1.3rem, 2vw, 1.55rem); line-height: 1.45; font-family: var(--serif); }
.case-gallery { margin-top: var(--section); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 5vw, 4rem) 2rem; }
.case-gallery__item--wide { grid-column: 1 / -1; }
.case-gallery__item .proof { aspect-ratio: 4 / 3; }
.case-gallery__item--wide .proof { aspect-ratio: 16 / 9; }
.case-gallery figcaption { margin-top: 1rem; font-size: var(--fs-small); color: var(--ink-soft); }
.next-project { margin-top: var(--section); border-top: 1px solid var(--ink); }
.next-project a { display: block; padding: 2rem 0 var(--section); text-decoration: none; }
.next-project__label { display: block; font-size: var(--fs-small); color: var(--taupe); }
.next-project__title { display: inline-block; margin-top: .5rem; font-family: var(--serif); font-size: clamp(3rem, 9vw, 7.5rem); line-height: 1; transition: color .3s var(--ease), transform .5s var(--ease); }
.next-project a:hover .next-project__title { color: var(--blue); transform: translateX(.15em); }
@media (max-width: 860px) {
  .case-meta { grid-template-columns: 1fr 1fr; }
  .case-block__label, .case-block__content { grid-column: 1 / -1; }
  .case-gallery { grid-template-columns: 1fr; }
}

/* Consent banner --------------------------------------------------------- */
.consent {
  position: fixed; left: var(--gutter); right: var(--gutter); bottom: 1.25rem; z-index: 60;
  max-width: 34rem; margin-left: auto; background: var(--paper); border: 1px solid var(--ink);
  padding: 1.25rem 1.4rem; font-size: .95rem; box-shadow: 0 18px 40px -24px rgb(35 33 31 / .5);
}
.consent__actions { margin-top: 1rem; display: flex; gap: .6rem; justify-content: flex-end; flex-wrap: wrap; }
.consent .btn { min-height: 2.5rem; padding: .5rem 1rem; }

/* Small screens: stacked section heads, lighter KPI tag on cards */
@media (max-width: 860px) {
  .section-title, .section-intro { grid-column: 1 / -1; }
  .section-more { text-align: left; }
  .work-card__kpi { padding: .7rem .9rem .8rem; }
  .work-card__kpi .kpi-value { font-size: 2.2rem; }
}

/* ==========================================================================
   Colour layer: each discipline has its tone (1 e-commerce = terracotta,
   2 marketing = blue, 3 creative = sand). Projects cycle through them.
   ========================================================================== */
.tone-1 { --tone: var(--terra);     --tone-bg: var(--terra-tint); }
.tone-2 { --tone: var(--blue);      --tone-bg: var(--blue-tint); }
.tone-3 { --tone: var(--sand-deep); --tone-bg: var(--sand); }

.chip {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .32rem .8rem .34rem; border-radius: 999px;
  background: var(--tone-bg, var(--paper-2)); color: var(--ink);
  font-family: var(--sans); font-size: .9rem; font-weight: 500; line-height: 1.3;
}
.chip::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: var(--tone, var(--taupe)); flex: none; }
.chip--sm { font-size: .78rem; padding: .2rem .6rem .22rem; font-weight: 500; }

/* Buttons: terracotta primary */
.btn { background: var(--terra); border-color: var(--terra); color: #FBF6F1; }
.btn:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn--ghost { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn--ghost:hover { background: var(--blue); border-color: var(--blue); color: var(--on-blue); }

/* Hero: tighter, portrait beside the text */
.hero { padding-top: clamp(2rem, 5vw, 4.5rem); padding-bottom: clamp(3rem, 6vw, 5rem); align-items: center; }
.hero__text { grid-column: 1 / span 7; }
.hero__title { line-height: .98; max-width: 12ch; }
.disciplines { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.6rem; }
.hero__intro { margin-top: 1.4rem; font-size: 1rem; max-width: 50ch; }
.hero__intro p + p { margin-top: .6em; }
.hero__actions { margin-top: 1.8rem; }
.hero__portrait { grid-column: 9 / span 4; margin-top: 0; position: relative; }
.hero__portrait::after {
  content: ""; position: absolute; z-index: -1; width: 55%; aspect-ratio: 1;
  right: -8%; top: -6%; border-radius: 50%; background: var(--terra-tint);
}
.hero__portrait .proof { max-width: 24rem; margin-left: auto; }
.hero__portrait figcaption { justify-content: flex-end; }

/* Two paths: tinted cards */
.paths { gap: 1.25rem; padding-bottom: var(--section); }
.path, .path--alt {
  background: var(--tone-bg); border: 0; border-radius: 4px;
  padding: 1.75rem 2rem 2rem;
}
.path:hover, .path--alt:hover { background: var(--tone-bg); padding-left: 2rem; transform: translateY(-3px); }
.path { transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.path:hover { box-shadow: 0 14px 30px -22px rgb(35 33 31 / .55); }
.path p { color: var(--ink); opacity: .8; }
.path__cta { text-decoration-color: var(--tone); }
@media (max-width: 720px) { .path, .path--alt, .path:hover, .path--alt:hover { padding: 1.5rem; } }

/* Work cards and rows */
.work-grid { row-gap: clamp(2.5rem, 5vw, 4rem); }
.work-card__title, .work-card--l .work-card__title { font-size: clamp(1.5rem, 2.4vw, 2.1rem); }
.work-card__meta, .work-row__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; color: var(--ink-soft); }
.work-card__meta .chip, .work-row__meta .chip { background: var(--tone-bg); }
.work-card__meta .chip::before, .work-row__meta .chip::before { background: var(--tone); }
.work-card__body { padding-top: 1.2rem; }
.work-card__summary { font-size: .95rem; }
.work-card__cta, .work-row .work-card__cta { color: var(--tone); }
.work-card__media::before, .work-row__media::before { --m: var(--tone); }
.kpi-value { color: var(--terra); font-size: clamp(2.2rem, 3.6vw, 3.2rem); }
.work-row__title { font-size: clamp(1.9rem, 3.4vw, 2.9rem); }
.work-row__kpi .kpi-value { font-size: 2.1rem; }
.work-list { gap: clamp(3rem, 7vw, 5.5rem); }

/* Expertise band: each column carries its colour */
.expertise h3 { font-size: clamp(1.35rem, 1.9vw, 1.65rem); }
.expertise__col h3::before {
  content: ""; display: block; width: 2.5rem; height: 4px; border-radius: 2px;
  margin-bottom: 1.1rem; background: var(--tone-bg);
}
.expertise li { font-size: .92rem; padding: .45rem 0; }

/* Contact block: warm tinted band */
.contact-cta {
  max-width: none; background: var(--terra-tint);
  padding-left: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
  padding-right: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
}
.contact-cta__title { font-size: clamp(2.1rem, 4.6vw, 4rem); }
.contact-cta__text { font-size: 1.02rem; }
.contact-cta__mail { font-size: clamp(1.4rem, 2.6vw, 2.1rem); margin-top: 1.75rem; }
.contact-cta__mail a:hover { color: var(--terra); }

/* Inner pages: calmer titles */
.page-intro { padding-top: clamp(2.5rem, 6vw, 5rem); padding-bottom: clamp(2rem, 5vw, 3.5rem); }
.page-title--long { font-size: clamp(2.2rem, 4.4vw, 4rem); }
.page-lead { margin-top: 1.25rem; }
.about-hero, .contact-page { padding-top: clamp(2.5rem, 6vw, 5rem); }
.cv-section__title { font-size: clamp(1.6rem, 2.4vw, 2.1rem); border-top-color: var(--terra); }
.timeline__what h3 { font-size: clamp(1.3rem, 1.8vw, 1.6rem); }
.skills-grid h3 { font-size: inherit; margin-bottom: .9rem; }
.tags--color li { background: var(--tone-bg); border-color: transparent; }
.cv-download { background: var(--blue-tint); max-width: calc(var(--max) - 2 * var(--gutter)); margin-bottom: var(--section); padding: clamp(2rem, 4vw, 3rem); border-radius: 4px; }
.cv-download__title { font-size: clamp(1.7rem, 2.8vw, 2.4rem); }
@media (max-width: 1440px) { .cv-download { margin-left: var(--gutter); margin-right: var(--gutter); } }

/* Creative */
.filter.is-active { background: var(--terra); border-color: var(--terra); color: #FBF6F1; }

/* Case study */
.case-hero__title { font-size: clamp(2.6rem, 5.4vw, 5rem); }
.case-hero__summary { font-size: clamp(1.1rem, 1.6vw, 1.35rem); }
.case-meta > div { border-top-color: var(--terra); }
.kpi-band { background: var(--blue); }
.kpi__value { font-size: clamp(4rem, 10vw, 8rem); color: var(--terra-tint); }
.case-block { padding: 1.6rem 0 2.2rem; }
.case-block__label { color: var(--terra); }
.case-block__content { font-size: 1rem; }
.case-block__content.prose > p:first-child { font-size: clamp(1.15rem, 1.6vw, 1.35rem); }
.prose li::before { background: var(--terra); height: 2px; }
.next-project__title { font-size: clamp(2.4rem, 6vw, 5rem); }
.next-project a:hover .next-project__title { color: var(--terra); }

/* Header details */
.site-nav ul a[aria-current="page"] { color: var(--terra); }
.lang-switch__item.is-active { background: var(--blue); color: var(--on-blue); }

@media (max-width: 860px) {
  .hero__text, .hero__portrait { grid-column: 1 / -1; }
  .hero__portrait .proof { margin-left: 0; max-width: 20rem; }
  .hero__portrait figcaption { justify-content: flex-start; }
  .hero__portrait::after { right: auto; left: 45%; }
}

.work-card--l .work-card__media { aspect-ratio: 1 / 1; }
.about-hero__portrait .proof { max-width: 20rem; margin-left: auto; }
@media (max-width: 860px) { .about-hero__portrait .proof { margin-left: 0; } }

/* Brands row */
.clients { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) var(--section); }
.clients__title { font-size: clamp(1.4rem, 2vw, 1.75rem); margin-bottom: 1.25rem; }
.clients__list { display: flex; flex-wrap: wrap; gap: .6rem; }
.clients__list .chip { font-size: 1rem; padding: .5rem 1.05rem; }

/* Video ------------------------------------------------------------------ */
.gallery__open, .video-facade { position: relative; }
.play-badge {
  position: absolute; left: 50%; top: 50%; width: 3.75rem; height: 3.75rem; margin: -1.875rem 0 0 -1.875rem;
  border-radius: 50%; background: rgb(242 237 228 / .92);
  box-shadow: 0 10px 30px -12px rgb(35 33 31 / .6);
  transition: transform .3s var(--ease), background-color .3s var(--ease);
}
.play-badge::after {
  content: ""; position: absolute; left: 54%; top: 50%; transform: translate(-50%, -50%);
  border-style: solid; border-width: .6rem 0 .6rem 1rem; border-color: transparent transparent transparent var(--terra);
}
.gallery__open:hover .play-badge, .video-facade:hover .play-badge { transform: scale(1.08); background: var(--paper); }
.video-facade { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: var(--ink); cursor: pointer; }
.video-facade img { width: 100%; height: 100%; object-fit: cover; }
.proof--video video, .video-frame { display: block; width: 100%; height: 100%; object-fit: cover; background: var(--ink); border: 0; }
.lightbox__media { display: flex; justify-content: center; }
.lightbox__media video { max-height: 80vh; max-width: 100%; background: #000; }
.lightbox__frame { width: min(92vw, 1100px); aspect-ratio: 16 / 9; max-height: 80vh; border: 0; background: #000; }

/* Availability dot ------------------------------------------------------- */
.status-dot { background: var(--green); box-shadow: 0 0 0 4px rgb(78 154 98 / .18); }

/* Selected work carousel ------------------------------------------------- */
.carousel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }
.carousel-head .section-title { grid-column: auto; }
.carousel-head .section-intro { margin-top: .9rem; max-width: 46ch; }
.carousel-controls { display: flex; gap: .6rem; flex: none; }
.carousel-controls[hidden] { display: none; }
.carousel-btn {
  width: 3rem; height: 3rem; border-radius: 50%; cursor: pointer; position: relative;
  border: 1px solid var(--ink); background: transparent; color: var(--ink);
  transition: background-color .25s var(--ease), color .25s var(--ease), opacity .25s;
}
.carousel-btn::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: .6rem; height: .6rem;
  border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor;
  transform: translate(-65%, -50%) rotate(45deg);
}
.carousel-btn--prev::before { transform: translate(-35%, -50%) rotate(-135deg); }
.carousel-btn:hover:not(:disabled) { background: var(--terra); border-color: var(--terra); color: #FBF6F1; }
.carousel-btn:disabled { opacity: .3; cursor: default; }

.carousel { position: relative; }
.carousel__track {
  --gap: 1.5rem;
  display: grid; grid-auto-flow: column; gap: var(--gap);
  grid-auto-columns: calc((100% - 2 * var(--gap)) / 3);
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 0 0 .25rem; margin: 0; list-style: none;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track:focus-visible { outline-offset: 6px; }
.carousel__slide { scroll-snap-align: start; min-width: 0; }

.project-tile {
  display: flex; flex-direction: column; height: 100%;
  background: var(--tone-bg); border-radius: 6px; overflow: hidden; text-decoration: none;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.project-tile:hover { transform: translateY(-4px); box-shadow: 0 22px 40px -28px rgb(35 33 31 / .55); }
.project-tile__media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--paper-2); }
.project-tile__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.project-tile:hover .project-tile__media img { transform: scale(1.04); }
.project-tile__kpi {
  position: absolute; left: .9rem; top: .9rem; right: .9rem; max-width: max-content;
  background: var(--paper); border-radius: 999px; padding: .35rem .85rem .4rem;
  font-size: .8rem; line-height: 1.3; color: var(--ink-soft);
}
.project-tile__kpi strong { font-family: var(--serif); font-weight: 400; font-size: 1.15rem; color: var(--terra); margin-right: .2rem; }
.project-tile__body { display: flex; flex-direction: column; align-items: flex-start; flex: 1; padding: 1.2rem 1.3rem 1.4rem; }
.project-tile__place { font-size: .8rem; color: var(--ink-soft); display: flex; align-items: center; gap: .45rem; }
.project-tile__place::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: var(--tone); }
.project-tile__name { margin-top: .5rem; font-size: clamp(1.5rem, 2.2vw, 1.95rem); }
.project-tile__role { margin-top: .35rem; font-size: .95rem; color: var(--ink-soft); }
.project-tile__cta {
  margin-top: auto; margin-bottom: 1rem;
  display: inline-flex; align-items: center; padding: .55rem 1.05rem; border-radius: 999px;
  background: var(--ink); color: var(--paper); font-size: .88rem; font-weight: 500;
  transition: background-color .25s var(--ease);
}
.project-tile__body { padding-bottom: .4rem; }
.project-tile__role { margin-bottom: 1.5rem; }
.project-tile:hover .project-tile__cta { background: var(--tone); }

.carousel__dots { display: flex; justify-content: center; gap: .5rem; margin-top: 1.75rem; }
.carousel__dots[hidden] { display: none; }
.carousel__dot {
  width: .6rem; height: .6rem; padding: 0; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--line); transition: width .35s var(--ease), background-color .35s var(--ease);
}
.carousel__dot[aria-current="true"] { width: 1.9rem; background: var(--terra); }
.work-home .section-more { margin-top: 1.25rem; }

@media (max-width: 1024px) { .carousel__track { grid-auto-columns: calc((100% - var(--gap)) / 2); } }
@media (max-width: 640px) {
  .carousel__track { --gap: 1rem; grid-auto-columns: 84%; }
  .carousel-head { align-items: flex-start; flex-direction: column; gap: 1.25rem; }
}

/* Brand logos band ------------------------------------------------------- */
.logos { padding: 0 0 var(--section); }
.logos__title {
  max-width: var(--max); margin: 0 auto 1.75rem; padding: 0 var(--gutter);
  font-size: clamp(1.4rem, 2vw, 1.75rem);
}
.logos__viewport {
  display: flex; overflow: hidden; padding: 1.6rem 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.logos__row {
  display: flex; align-items: center; gap: clamp(2.5rem, 6vw, 5rem); flex: none;
  padding-right: clamp(2.5rem, 6vw, 5rem); margin: 0; list-style: none;
  animation: logos-scroll 38s linear infinite;
}
.logos__viewport:hover .logos__row { animation-play-state: paused; }
.logos__item { flex: none; display: flex; align-items: center; }
.logos__item img {
  height: clamp(2.6rem, 4.5vw, 3.6rem); width: auto; max-width: 11rem; object-fit: contain;
  filter: grayscale(1); opacity: .62; transition: filter .35s var(--ease), opacity .35s var(--ease);
}
.logos__item:hover img { filter: none; opacity: 1; }
.logos__word { font-family: var(--serif); font-size: clamp(1.4rem, 2.2vw, 1.9rem); color: var(--ink-soft); white-space: nowrap; }
@keyframes logos-scroll { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) {
  .logos__viewport { flex-wrap: wrap; justify-content: center; -webkit-mask-image: none; mask-image: none; }
  .logos__row { animation: none; flex-wrap: wrap; justify-content: center; padding: 0 var(--gutter); row-gap: 1.5rem; }
  .logos__row[aria-hidden="true"] { display: none; }
}
.logos__item img { opacity: .72; }
.logos__word { opacity: .8; transition: color .35s var(--ease), opacity .35s var(--ease); }
.logos__item:hover .logos__word { color: var(--terra); opacity: 1; }

/* ---- Carousel cards: rounded frame, text on the photo ---- */
.carousel__track { --gap: 1.25rem; padding: .25rem 0 .75rem; }
.project-tile {
  position: relative; display: block; height: auto; aspect-ratio: 3 / 4;
  border-radius: 22px; overflow: hidden; background: var(--ink); isolation: isolate;
}
.project-tile:hover { transform: translateY(-4px); box-shadow: 0 26px 48px -30px rgb(35 33 31 / .6); }
.project-tile__media { position: absolute; inset: 0; aspect-ratio: auto; border-radius: inherit; }
.project-tile__media img { width: 100%; height: 100%; object-fit: cover; }
.project-tile__kpi {
  left: 1rem; top: 1rem; right: auto; max-width: calc(100% - 2rem);
  background: rgb(251 249 245 / .8);
  -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3);
  border: 1px solid rgb(255 255 255 / .5); color: var(--ink);
}
.project-tile__body {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  display: grid; grid-template-columns: 1fr auto; align-items: end; gap: .3rem 1rem;
  padding: 5rem 1.4rem 1.4rem;
  background: linear-gradient(to top, rgb(20 18 16 / .78), rgb(20 18 16 / .42) 55%, transparent);
}
.project-tile__name { grid-column: 1; margin: 0; color: #fff; font-size: clamp(1.7rem, 2.3vw, 2.15rem); line-height: 1.05; text-shadow: 0 1px 12px rgb(0 0 0 / .25); }
.project-tile__role { grid-column: 1; margin: 0; font-size: .9rem; line-height: 1.4; color: rgb(255 255 255 / .88); }
.project-tile__cta {
  grid-column: 2; grid-row: 1 / span 2; align-self: end; margin: 0;
  width: 2.75rem; height: 2.75rem; padding: 0; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center; background: var(--terra);
  transition: background-color .25s var(--ease), transform .3s var(--ease);
}
.project-tile__cta::before {
  content: ""; width: .55rem; height: .55rem;
  border-top: 1.5px solid #fff; border-right: 1.5px solid #fff;
  transform: translateX(-2px) rotate(45deg);
}
.project-tile:hover .project-tile__cta { background: var(--terra); transform: translateX(3px); }
.carousel-btn { background: var(--paper); border-color: var(--line); }
@media (max-width: 640px) { .project-tile { aspect-ratio: 4 / 5; } }
/* Square frames */
.project-tile { border-radius: 0; }

/* Case gallery: 4-column grid so phone screenshots sit side by side */
.case-gallery { grid-template-columns: repeat(4, 1fr); }
.case-gallery__item { grid-column: span 2; }
.case-gallery__item--wide { grid-column: 1 / -1; }
.case-gallery__item--phone { grid-column: span 1; }
.case-gallery__item--phone .proof { aspect-ratio: 472 / 1023; }
.case-gallery__item--phone .proof img { object-fit: contain; background: var(--ink); }
@media (max-width: 860px) {
  .case-gallery { grid-template-columns: 1fr 1fr; }
  .case-gallery__item, .case-gallery__item--wide { grid-column: 1 / -1; }
  .case-gallery__item--phone { grid-column: span 1; }
}

/* Brand logos: always in colour */
.logos__item img, .logos__item:hover img { filter: none; opacity: 1; }
.logos__word { color: var(--ink); opacity: 1; }

/* Brand logos: equal slots so spacing stays even */
.logos__row { gap: clamp(1.5rem, 3vw, 2.5rem); padding-right: clamp(1.5rem, 3vw, 2.5rem); }
.logos__item { width: clamp(7.5rem, 11vw, 10rem); height: clamp(3.4rem, 5vw, 4.4rem); justify-content: center; }
.logos__item img { width: 100%; height: 100%; max-width: none; object-fit: contain; }
.logos .logos__row { padding: 0 clamp(1.5rem, 3vw, 2.5rem) 0 0; }

/* Portrait without the coloured circle */
.hero__portrait::after { display: none; }

/* Location under the portrait */
.hero__portrait .hero__location {
  margin-top: 1.1rem; display: flex; align-items: center; justify-content: flex-end; gap: .45rem;
  font-size: .95rem; font-weight: 500; color: var(--ink);
}
.hero__location .pin { color: var(--terra); flex: none; }
@media (max-width: 860px) { .hero__portrait .hero__location { justify-content: flex-start; } }

.form-status { margin-top: 1rem; color: var(--terra); font-size: .95rem; }
.form-status:empty { display: none; }
.contact-form .btn:disabled { opacity: .6; cursor: progress; }
