/* IMarin Labs · web studio in Heraklion (imarinlabs.gr)
   "The thread": Minoan fresco blue, Knossos red, one variable typeface, and a red line
   (Ariadne's thread) that runs through every page and ends at the contact section. */

/* ---------- Font: Commissioner, variable (wght, FLAR = flair, VOLM, slant) ---------- */
@font-face {
  font-family: "Commissioner";
  src: url("../fonts/commissioner-vf-greek.woff2") format("woff2");
  font-weight: 100 900; font-style: oblique 0deg 12deg; font-display: swap;
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: "Commissioner";
  src: url("../fonts/commissioner-vf-latin.woff2") format("woff2");
  font-weight: 100 900; font-style: oblique 0deg 12deg; 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;
}

/* ---------- Tokens ---------- */
:root {
  --brand: #1b9edb;       /* IMarin Labs cyan, from the logo */
  --brand-deep: #1587bf;
  --brand-tint: #e8f6fd;
  --brand-ink: #0b6f9e;   /* the cyan darkened for small text on white */
  --red: #b3261e;         /* Knossos column red: the thread */
  --ochre: #e8a824;       /* fresco ochre: tiny signals only */
  --white: #ffffff;
  --black: #000000;
  --gray: #4f5461;
  --line: rgba(0, 0, 0, 0.12);
  /* White on the brand cyan is only 3:1, so text on it is black (about 7:1). */
  --on-brand: #000000;
  --on-brand-2: rgba(0, 0, 0, 0.76);

  --font: "Commissioner", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --wrap: 1320px;
  --pad: clamp(1.25rem, 5vw, 4.5rem);
  --section: clamp(5rem, 10vw, 9rem);
  --radius: 6px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --labyrinth: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 620 620'%3E%3Cpath d='M13 13H607V607H73V73H547V547H133V133H487V487H193V193H427V427H253V253H367V367H310' fill='none' stroke='%23fff' stroke-opacity='.1' stroke-width='26'/%3E%3C/svg%3E");
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 6rem; }
body {
  margin: 0; position: relative;
  background: var(--white); color: var(--black);
  font-family: var(--font); font-size: clamp(1rem, 0.96rem + 0.2vw, 1.125rem); line-height: 1.6;
  font-variation-settings: "FLAR" 0, "VOLM" 0;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; text-wrap: pretty; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
h2 {
  font-size: clamp(2.25rem, 4.6vw, 4.25rem); font-weight: 760; line-height: 1;
  letter-spacing: -0.035em; font-variation-settings: "FLAR" 70, "VOLM" 0;
}
h3 { font-weight: 700; line-height: 1.2; }
::selection { background: var(--brand); color: var(--black); }
:focus-visible { outline: 3px solid var(--brand-ink); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }
.skip-link { position: absolute; left: 1rem; top: -5rem; z-index: 200; background: var(--black); color: var(--white); padding: 0.75rem 1.1rem; text-decoration: none; }
.skip-link:focus { top: 1rem; }

/* ---------- Buttons and links (no arrows, no pills) ---------- */
.button {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; min-height: 3.3rem; padding: 0 1.6rem;
  border-radius: var(--radius); background: var(--black); color: var(--white);
  font-weight: 650; text-decoration: none; transition: color 0.3s;
}
.button::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--red);
  transform: scaleY(0); transform-origin: bottom; transition: transform 0.45s var(--ease-out);
}
.button:hover::before, .button:focus-visible::before { transform: scaleY(1); }
.button--light { background: var(--white); color: var(--black); }
.button--light:hover, .button--light:focus-visible { color: var(--white); }

.text-link {
  font-weight: 650; text-decoration: underline; text-decoration-color: var(--red);
  text-decoration-thickness: 2px; text-underline-offset: 0.3em; transition: color 0.2s, text-underline-offset 0.3s var(--ease);
}
.text-link:hover { color: var(--red); text-underline-offset: 0.45em; }
/* On the brand cyan: black text, the red underline stays. */
.text-link--light { color: var(--black); }
.text-link--light:hover { color: var(--black); text-decoration-color: var(--black); }


/* Screenshots */
.window { border-radius: var(--radius); overflow: hidden; background: var(--white); box-shadow: 0 0 0 1px var(--line); }
.window img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.window--phone { border-radius: 1.2rem; }
.window--phone img { aspect-ratio: 390 / 780; }
.figure { margin: 0; }
.figure figcaption { margin-top: 0.8rem; font-size: 0.88rem; color: var(--gray); }

/* ---------- Masthead ---------- */
.masthead { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, 0.93); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.masthead-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 4.6rem; }
.brand { display: block; flex: none; }
.brand img { width: clamp(8.5rem, 11vw, 10rem); }
/* no `display` here: author styles beat the UA rule that hides a closed popover */
.site-nav { align-items: center; gap: clamp(1.1rem, 2.2vw, 2.2rem); }
.site-nav a { text-decoration: none; font-weight: 560; font-size: 0.98rem; }
.site-nav a:hover { color: var(--red); }
.site-nav a[aria-current="page"] { text-decoration: underline 2px var(--red); text-underline-offset: 0.45em; }
.site-nav .lang-switch { font-size: 0.82rem; font-weight: 650; border: 1px solid var(--line); border-radius: var(--radius); padding: 0.3rem 0.6rem; }
.menu-open, .menu-close, .site-nav .menu-email { display: none; }

@media (min-width: 761px) {
  .site-nav, .site-nav[popover] {
    display: flex; position: static; inset: auto; width: auto; height: auto;
    margin: 0; padding: 0; border: 0; overflow: visible; background: none; color: inherit;
  }
}
@supports not selector(:popover-open) {
  @media (max-width: 760px) { .site-nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; } }
}
@supports selector(:popover-open) {
  @media (max-width: 760px) {
    .menu-open, .menu-close {
      display: inline-flex; align-items: center; font: 650 0.95rem var(--font); cursor: pointer;
      color: var(--black); background: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 0.5rem 0.95rem;
    }
    .site-nav[popover] {
      inset: 0; width: 100%; height: 100dvh; max-width: none; max-height: none; margin: 0; border: 0;
      padding: 1.3rem var(--pad) 2rem; background: var(--brand) var(--labyrinth) no-repeat right -20vw top 10vh / 110vw; color: var(--black);
      flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 0;
    }
    .site-nav[popover]:popover-open { display: flex; }
    .site-nav .menu-close { position: absolute; top: 1.2rem; right: var(--pad); color: var(--black); border-color: rgba(0, 0, 0, 0.35); }
    .site-nav a { font-size: clamp(2.4rem, 11vw, 3.4rem); font-weight: 800; line-height: 1.15; letter-spacing: -0.03em; font-variation-settings: "FLAR" 100, "VOLM" 0; padding: 0.15rem 0; }
    .site-nav a:hover { color: var(--white); }
    .site-nav .lang-switch { font-size: 1rem; margin-top: 1.5rem; border-color: rgba(0, 0, 0, 0.35); letter-spacing: 0; }
    .site-nav .menu-email { display: block; order: -1; margin: 0 0 auto; padding-top: 5rem; font-size: 1.2rem; font-weight: 600; letter-spacing: 0; text-decoration: underline 2px var(--red); text-underline-offset: 0.3em; }
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: var(--on-brand);
  background: var(--labyrinth) no-repeat right -8vw center / min(72vw, 58rem), var(--brand);
  padding: clamp(3.5rem, 9vw, 8rem) 0 clamp(4rem, 9vw, 8rem);
}
.hero-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(1rem, 2vw, 2rem); align-items: center; }
.hero-copy { grid-column: 1 / span 8; position: relative; z-index: 3; }
.hero-logo { display: block; width: clamp(11rem, 7rem + 10vw, 16rem); margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.hero-mark { grid-column: 10 / span 3; position: relative; z-index: 3; }
.hero-title {
  font-size: clamp(2.6rem, 5.4vw, 5.6rem); font-weight: 820; line-height: 0.96; letter-spacing: -0.04em;
  font-variation-settings: "FLAR" 100, "VOLM" 0; margin-bottom: clamp(1.6rem, 3vw, 2.4rem); max-width: 14ch;
}
.hero-title .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0.08em 0 0.16em; margin: -0.08em 0 -0.16em; }
.hero-title .w > span { display: inline-block; }
.hero-lead { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.4rem); line-height: 1.5; color: var(--on-brand-2); max-width: 36rem; }
.hero-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; margin: 2.2rem 0 0; }
.hero-proof { margin: clamp(3rem, 6vw, 4.5rem) 0 0; padding-top: 1.2rem; border-top: 1px solid rgba(0, 0, 0, 0.2); color: var(--on-brand-2); max-width: 40rem; font-size: 0.98rem; }
.hero :focus-visible { outline-color: var(--black); }

.mark { display: block; width: 100%; max-width: 22rem; margin-left: auto; overflow: visible; }
/* The logo mark in black on the brand cyan, its cyan block turned white. */
.mark rect { fill: var(--black); transform-box: fill-box; transform-origin: center; }
.mark .mark-c { fill: var(--white); }

/* ---------- Numbers band under the hero: the figures count up ---------- */
/* z-index above the thread: the red line passes behind the band instead of cutting through the names */
.numbers { position: relative; z-index: 3; background: var(--black); color: var(--white); }
.stats {
  list-style: none; margin: 0; padding: clamp(2.5rem, 5vw, 3.75rem) 0;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2rem clamp(1rem, 2vw, 2rem);
}
.stats li { display: flex; flex-direction: column; gap: 0.6rem; padding-left: 1.1rem; border-left: 1px solid rgba(255, 255, 255, 0.2); }
.stat-num {
  font-size: clamp(2.6rem, 4.4vw, 4.3rem); font-weight: 820; line-height: 1; letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums; font-variation-settings: "FLAR" 100, "VOLM" 0; white-space: nowrap;
}
.stat-suffix { color: var(--red); margin-left: 0.04em; }
.stat-label { color: #b9bdc6; font-size: 0.95rem; line-height: 1.4; max-width: 15rem; }

@media (max-width: 1080px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2.2rem; }
  .stats li:last-child { grid-column: 1 / -1; }
}

/* ---------- Sections ---------- */
.section-head { max-width: 50rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head > p, .split-head > p { margin: 1.3rem 0 0; color: var(--gray); font-size: clamp(1.05rem, 1rem + 0.25vw, 1.2rem); max-width: 34rem; }

/* Work: a stack of project cards. Each card sticks a little lower than the one before it,
   so the next card slides over it and the earlier ones stay visible as a deck. */
.work { position: relative; z-index: 3; padding: var(--section) 0; }
.stack { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); }
.card {
  position: sticky; top: 6.5rem;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1.5rem clamp(1rem, 2vw, 2rem); align-items: center;
  min-height: min(36rem, calc(100vh - 10rem));
  padding: clamp(1.25rem, 2.5vw, 2.25rem);
  border-radius: 12px; background: var(--white); transform-origin: 50% 0;
  box-shadow: 0 0 0 1px var(--line), 0 -1.25rem 2.5rem -1.75rem rgba(0, 0, 0, 0.35);
}
.card:nth-child(2) { top: 7.6rem; }
.card:nth-child(3) { top: 8.7rem; }
.card:nth-child(4) { top: 9.8rem; }
.card:nth-child(5) { top: 10.9rem; }
.card:nth-child(6) { top: 12rem; }
.card--tint { background: var(--brand-tint); }
.card--brand { background: var(--brand); color: var(--on-brand); }
.card--black { background: var(--black); color: var(--white); }
.card-media { grid-column: 1 / span 7; display: block; perspective: 1200px; text-decoration: none; }
.tilt { transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 0.6s var(--ease-out); will-change: transform; }
.card-text { grid-column: 9 / span 4; }
/* A client's logo on a white plate (projects without screenshots), same proportions as a screenshot. */
.logo-plate {
  display: grid; place-items: center; aspect-ratio: 16 / 10; padding: 10%;
  border-radius: var(--radius); background: var(--white); box-shadow: 0 0 0 1px var(--line);
}
.logo-plate img { width: min(100%, 36rem); height: auto; }
.logo-plate--wide { aspect-ratio: 16 / 6; }
.card-poster {
  display: grid; place-items: center; aspect-ratio: 16 / 10; padding: 1.5rem; border-radius: var(--radius);
  background: var(--brand) var(--labyrinth) no-repeat right -14% center / 72%;
  font-size: clamp(2.2rem, 5.2vw, 4.8rem); font-weight: 830; letter-spacing: -0.045em; line-height: 1; color: var(--black);
  font-variation-settings: "FLAR" 100, "VOLM" 0; text-align: center; overflow-wrap: anywhere;
}
.card-title { font-size: clamp(1.8rem, 3vw, 2.8rem); font-weight: 780; letter-spacing: -0.03em; line-height: 1.05; font-variation-settings: "FLAR" 60, "VOLM" 0; transition: font-variation-settings 0.5s var(--ease); }
.card-title a { text-decoration: none; }
.card:hover .card-title, .card-title a:focus-visible { font-variation-settings: "FLAR" 100, "VOLM" 100; }
.card-meta { color: var(--gray); margin: 0.6rem 0 1rem; }
.card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem 2rem; margin: 1.4rem 0 0; }
.card--brand :is(.card-meta, .card-summary) { color: var(--on-brand-2); }
.card--black :is(.card-meta, .card-summary) { color: #c9ccd3; }
.card--black .text-link { color: var(--white); text-decoration-color: rgba(255, 255, 255, 0.55); }
.card--black .text-link:hover { text-decoration-color: var(--white); }
.card--black .window { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16); }
.card--black :focus-visible { outline-color: var(--ochre); }
.card--brand .window { box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.14); }
.card--brand :focus-visible { outline-color: var(--black); }
.work-more { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.6rem; margin: clamp(2.5rem, 5vw, 4rem) 0 0; }
.work-more span { color: var(--gray); }

/* No stacking where a card could be taller than the screen: its bottom would never show. */
@media (max-width: 760px), (max-height: 680px) {
  /* :nth-child(n) matches the specificity of the per-card `top` rules above */
  .card:nth-child(n) { position: relative; top: auto; }
}
@media (max-width: 900px) {
  .card-media, .card-text { grid-column: 1 / -1; }
}

/* Services */
.services-section { padding: var(--section) 0; }
.split { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3rem clamp(1rem, 2vw, 2rem); align-items: start; }
.split-head { grid-column: 1 / span 5; position: sticky; top: 7.5rem; }
.services { grid-column: 7 / span 6; list-style: none; margin: 0; padding: 0; }
.services li { padding: 1.8rem 0 2rem; border-top: 1px solid var(--line); }
.services li:last-child { border-bottom: 1px solid var(--line); }
.services h3 { font-size: clamp(1.35rem, 2vw, 1.8rem); font-weight: 720; letter-spacing: -0.02em; font-variation-settings: "FLAR" 60, "VOLM" 0; margin-bottom: 0.6rem; }
.services p { margin: 0; color: var(--gray); max-width: 34rem; }

/* Founder */
.founder { background: var(--brand); color: var(--on-brand); padding: var(--section) 0; }
.founder-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3rem clamp(1rem, 2vw, 2rem); align-items: center; }
.founder-portrait { grid-column: 1 / span 5; margin: 0; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; display: grid; place-items: center; background: var(--brand-deep) var(--labyrinth) no-repeat center / 140%; }
.founder-portrait img { width: 100%; height: 100%; object-fit: cover; }
.founder-portrait .mark { width: 46%; margin: 0; }
/* A real photo fills the 4:5 frame (cover); its own dark background replaces the labyrinth. */
.founder-portrait--photo { background: var(--black); }
.founder-text { grid-column: 7 / span 6; }
.founder-text h2 { margin-bottom: 2rem; }
.founder-name { display: flex; flex-direction: column; gap: 0.2rem; margin-bottom: 1.6rem; }
.founder-name strong { font-size: 1.35rem; font-weight: 720; }
.founder-name span { color: var(--on-brand-2); }
.founder-text p { color: var(--on-brand-2); max-width: 36rem; }
.founder :focus-visible { outline-color: var(--black); }
.founder-links { display: flex; flex-wrap: wrap; gap: 0.8rem 2rem; }

/* Process: the thread runs through the four steps */
.process { padding: var(--section) 0; }
.steps { list-style: none; margin: 0; padding: 3.2rem 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2.5rem clamp(1.5rem, 3vw, 3rem); position: relative; }
.steps::before { content: ""; position: absolute; left: 0; right: 0; top: 0.55rem; height: 3px; background: var(--red); transform-origin: left; }
.steps li { position: relative; }
.steps li::before { content: ""; position: absolute; left: 0; top: -3.2rem; width: 1.2rem; height: 1.2rem; border-radius: 2px; background: var(--red); }
.step-num { display: block; font-size: clamp(2.6rem, 4vw, 3.6rem); font-weight: 820; line-height: 1; letter-spacing: -0.03em; color: var(--brand); font-variation-settings: "FLAR" 100, "VOLM" 0; margin-bottom: 1rem; }
.steps h3 { font-size: 1.35rem; margin-bottom: 0.6rem; }
.steps p { color: var(--gray); margin: 0; }

/* FAQ */
.faq { background: var(--brand-tint); padding: var(--section) 0; }
.faq-list { grid-column: 7 / span 6; }
.faq-list details { border-top: 1px solid var(--line); }
.faq-list details:last-child { border-bottom: 1px solid var(--line); }
.faq-list summary {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 1.5rem; padding: 1.35rem 0; cursor: pointer; list-style: none;
  font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem); font-weight: 650; letter-spacing: -0.01em;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary:hover, .faq-list details[open] summary { color: var(--brand-ink); }
.plus { position: relative; flex: none; width: 1rem; height: 1rem; margin-top: 0.35em; }
.plus::before, .plus::after { content: ""; position: absolute; left: 0; right: 0; top: calc(50% - 1px); height: 2px; background: currentColor; transition: transform 0.35s var(--ease); }
.plus::after { transform: rotate(90deg); }
details[open] .plus::after { transform: rotate(0deg); }
.answer p { color: var(--gray); max-width: 40rem; margin: 0 0 1.6rem; }

/* Contact: the end of the thread */
.contact { background: var(--brand); color: var(--on-brand); padding: var(--section) 0; position: relative; }
.contact-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2.5rem clamp(1rem, 2vw, 2rem); align-items: start; }
.contact-intro { grid-column: 1 / span 5; position: sticky; top: 7rem; }
.contact-title { font-size: clamp(2.6rem, 4.8vw, 4.8rem); font-weight: 820; line-height: 0.95; letter-spacing: -0.045em; font-variation-settings: "FLAR" 100, "VOLM" 0; margin-bottom: 1.6rem; }
.contact-lead { color: var(--on-brand-2); font-size: 1.12rem; }
.contact-or { color: var(--on-brand-2); margin: 2rem 0 0; font-size: 0.95rem; }
.contact-email { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem 1.2rem; margin: 0.6rem 0 1rem; }
.email { font-size: clamp(1.2rem, 1.8vw, 1.5rem); font-weight: 700; letter-spacing: -0.02em; text-decoration: underline 3px var(--red); text-underline-offset: 0.25em; overflow-wrap: anywhere; }
.email:hover { text-decoration-color: var(--black); }
.copy-email { font: 650 0.85rem var(--font); color: var(--black); background: none; border: 1px solid rgba(0, 0, 0, 0.4); border-radius: var(--radius); padding: 0.45rem 0.9rem; cursor: pointer; }
.copy-email:hover { background: var(--black); color: var(--white); }
.contact-location { color: var(--on-brand-2); margin: 0; }
.contact :focus-visible { outline-color: var(--black); }

/* Contact form: a white card on the brand cyan, so fields, errors and focus rings all read clearly. */
.contact-form {
  grid-column: 7 / span 6; position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem 1rem;
  padding: clamp(1.4rem, 3vw, 2.4rem); border-radius: 12px; background: var(--white); color: var(--black);
  box-shadow: 0 1.5rem 3rem -1.5rem rgba(0, 0, 0, 0.4);
}
.contact-form :focus-visible { outline-color: var(--brand-ink); }
.field { display: grid; gap: 0.4rem; align-content: start; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label, .field legend { font-size: 0.95rem; font-weight: 650; }
.field .optional { font-weight: 400; color: var(--gray); }
.field input, .field select, .field textarea {
  width: 100%; min-width: 0; padding: 0.75rem 0.85rem; font: inherit; font-size: 1rem; color: var(--black);
  background: var(--white); border: 1px solid rgba(0, 0, 0, 0.35); border-radius: var(--radius);
}
.field textarea { min-height: 9rem; resize: vertical; line-height: 1.5; }
.field :is(input, select, textarea):focus-visible { outline: 3px solid var(--brand-ink); outline-offset: 1px; border-color: var(--black); }
.field [aria-invalid="true"] { border: 2px solid var(--red); }
.field-hint { margin: 0; font-size: 0.88rem; color: var(--gray); }
.field-error { margin: 0; font-size: 0.9rem; font-weight: 650; color: var(--red); }
.choices { margin: 0; padding: 0; border: 0; }
.choices legend { padding: 0; margin-bottom: 0.6rem; }
.choice-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.choice { position: relative; }
.choice input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.choice span {
  display: inline-block; padding: 0.5rem 1rem; font-size: 0.95rem; border: 1px solid rgba(0, 0, 0, 0.35);
  border-radius: 999px; transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.choice:hover span { border-color: var(--black); }
.choice input:checked + span { background: var(--black); color: var(--white); border-color: var(--black); }
.choice input:focus-visible + span { outline: 3px solid var(--brand-ink); outline-offset: 2px; }
.choice input[aria-invalid="true"] + span { border-color: var(--red); }
.form-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 1.5rem; }
.form-note { margin: 0; max-width: 24rem; font-size: 0.88rem; color: var(--gray); }
.form-note a { color: var(--black); }
.form-foot .button:disabled { opacity: 0.55; cursor: progress; }
.form-status { grid-column: 1 / -1; margin: 0; font-weight: 650; }
.form-status:empty { display: none; }
.form-status.is-error { color: var(--red); }
.form-noscript { grid-column: 1 / -1; margin: 0; font-weight: 650; }
.form-done { grid-column: 1 / -1; padding: 1rem 0; }
.form-done:focus { outline: none; }
.form-done-title { font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 0.6rem; }
.form-done-ref { color: var(--gray); font-size: 0.95rem; margin: 0; }
/* The honeypot: off-screen for people, still in the form for bots. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Footer */
.footer { padding: 4rem 0 2rem; font-size: 0.95rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1.4fr; gap: 2.5rem; }
.footer-brand img { width: 10rem; margin-bottom: 1rem; }
.footer-brand p { color: var(--gray); }
.footer-social { font-weight: 560; text-decoration: none; color: var(--black); }
.footer-social:hover { color: var(--red); text-decoration: underline; }
.footer-links { display: flex; flex-direction: column; align-items: flex-start; gap: 0.45rem; }
.footer-links a { text-decoration: none; font-weight: 560; }
.footer-links a:hover { color: var(--red); text-decoration: underline; }
.footer-links span { color: var(--gray); }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--gray); font-size: 0.85rem; }

.floating-cta {
  position: fixed; right: clamp(1rem, 3vw, 2rem); bottom: clamp(1rem, 3vw, 2rem); z-index: 40;
  background: var(--black); color: var(--white); border-radius: var(--radius); padding: 0.85rem 1.3rem;
  font-weight: 650; text-decoration: none; box-shadow: 0 0.8rem 2rem -0.8rem rgba(0, 0, 0, 0.5);
  transform: translateY(160%); opacity: 0; transition: transform 0.5s var(--ease-out), opacity 0.3s, background 0.2s;
}
.floating-cta.is-on { transform: none; opacity: 1; }
.floating-cta:hover { background: var(--red); }

/* ---------- Work index ---------- */
.page-hero { padding: clamp(3rem, 8vw, 7rem) 0 clamp(2.5rem, 5vw, 4rem); }
.page-title { font-size: clamp(3.2rem, 10.5vw, 10rem); font-weight: 830; line-height: 0.9; letter-spacing: -0.05em; font-variation-settings: "FLAR" 100, "VOLM" 0; margin-bottom: 1.6rem; }
.page-lead { font-size: clamp(1.1rem, 1rem + 0.45vw, 1.35rem); color: var(--gray); max-width: 40rem; }
.index-section { position: relative; padding-bottom: var(--section); }
.index-head, .index-row { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(0, 1.4fr); gap: 1.5rem; align-items: baseline; }
.index-head { padding-bottom: 0.9rem; font-size: 0.88rem; font-weight: 600; color: var(--gray); border-bottom: 1px solid var(--black); }
.index { list-style: none; margin: 0; padding: 0; }
.index-item { border-bottom: 1px solid var(--line); }
.index-row { position: relative; isolation: isolate; padding: clamp(1.4rem, 2.6vw, 2.2rem) 0; text-decoration: none; }
.index-row::before { content: ""; position: absolute; inset: 0 calc(var(--pad) * -0.4); z-index: -1; background: var(--brand-tint); transform: scaleY(0); transform-origin: bottom; transition: transform 0.5s var(--ease-out); }
.index-row:hover::before, .index-row:focus-visible::before { transform: scaleY(1); }
.index-name { font-size: clamp(1.8rem, 3.6vw, 3.3rem); font-weight: 760; line-height: 1.05; letter-spacing: -0.035em; font-variation-settings: "FLAR" 30, "VOLM" 0; transition: font-variation-settings 0.5s var(--ease), color 0.3s; }
.index-row:hover .index-name { color: var(--brand); font-variation-settings: "FLAR" 100, "VOLM" 100; }
.index-type { color: var(--gray); font-size: 0.98rem; }
.index-thumb { display: none; }
.cursor-preview { position: fixed; left: 0; top: 0; z-index: 40; width: 22rem; pointer-events: none; opacity: 0; transform: translate(-50%, -50%) rotate(-3deg) scale(0.9); transition: opacity 0.3s, scale 0.3s; }
.cursor-preview img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: var(--radius); box-shadow: 0 0 0 1px var(--line), 0 2rem 4rem -1.5rem rgba(0, 0, 0, 0.45); }
.cursor-preview.is-on { opacity: 1; scale: 1; }

/* ---------- Project page ---------- */
.project-hero { padding: clamp(2rem, 5vw, 4rem) 0 clamp(2.5rem, 5vw, 4rem); }
.crumb { margin: 0 0 clamp(2rem, 5vw, 4rem); }
.crumb a { font-weight: 600; font-size: 0.95rem; text-decoration: underline 2px var(--red); text-underline-offset: 0.3em; }
.crumb a:hover { color: var(--red); }
.project-title { font-size: clamp(2.8rem, 7.2vw, 7rem); font-weight: 830; line-height: 0.93; letter-spacing: -0.05em; font-variation-settings: "FLAR" 100, "VOLM" 0; max-width: 15ch; }
.project-meta { margin: 1.2rem 0 clamp(2rem, 4vw, 3rem); color: var(--gray); font-size: 1.1rem; }
.project-intro { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2rem clamp(1rem, 2vw, 2rem); align-items: start; }
.project-lead { grid-column: 1 / span 7; margin: 0; font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.65rem); line-height: 1.4; letter-spacing: -0.01em; }
.project-visit { grid-column: 9 / span 4; align-self: end; justify-self: start; margin: 0; }
.project-shot { margin-bottom: var(--section); }
.project-body { padding-bottom: var(--section); }
.article-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3rem clamp(1rem, 2vw, 2rem); align-items: start; }
.facts { grid-column: 1 / span 4; position: sticky; top: 7.5rem; }
.facts h2 { font-size: 1.15rem; letter-spacing: 0; font-variation-settings: "FLAR" 0, "VOLM" 0; margin-bottom: 1rem; }
.facts dl { margin: 0; }
.facts dl div { padding: 0.85rem 0; border-top: 1px solid var(--line); }
.facts dt { font-size: 0.85rem; font-weight: 600; color: var(--gray); }
.facts dd { margin: 0.2rem 0 0; }
.article { grid-column: 6 / span 7; }
.article h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); margin-bottom: 1.3rem; }
.article h2:not(:first-child) { margin-top: clamp(3rem, 6vw, 4.5rem); }
.article p { font-size: 1.15rem; max-width: 40rem; }
.built { list-style: none; margin: 0; padding: 0; }
.built li { position: relative; padding: 0.95rem 0 0.95rem 1.8rem; border-top: 1px solid var(--line); }
.built li::before { content: ""; position: absolute; left: 0; top: 1.55rem; width: 0.6rem; height: 0.6rem; border-radius: 2px; background: var(--red); }

.project-gallery { background: var(--brand-tint); padding: var(--section) 0; }
.salon { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(2rem, 4vw, 3.5rem) clamp(1rem, 2vw, 2rem); align-items: end; }
.salon .figure { grid-column: span 6; }
.salon--2 .figure--phone { grid-column: 1 / span 3; }
.salon--2 .figure:not(.figure--phone) { grid-column: 5 / span 8; }
.salon--3 .figure--phone { grid-column: span 3; }
.salon--3 .figure:nth-child(2) { grid-column: span 5; }
.salon--3 .figure:nth-child(3) { grid-column: span 4; align-self: start; margin-top: 4rem; }

.deployments-section { padding: var(--section) 0; }
.deployments { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(2.5rem, 5vw, 4rem) clamp(1rem, 2vw, 2rem); }
.deployments h3 { font-size: 1.25rem; margin: 1rem 0 0.2rem; }
.deployments h3 a { text-decoration: underline 2px var(--red); text-underline-offset: 0.25em; }
.deployments h3 a:hover { color: var(--red); }
.deployments p { margin: 0 0 0.6rem; color: var(--gray); }

.next-project { background: var(--black); color: var(--white); }
.next-link { display: grid; gap: 0.4rem; padding-top: clamp(3.5rem, 8vw, 7rem); padding-bottom: clamp(3.5rem, 8vw, 7rem); text-decoration: none; }
.next-label { color: rgba(255, 255, 255, 0.65); font-weight: 600; }
.next-title { font-size: clamp(2.4rem, 7vw, 6.6rem); font-weight: 820; line-height: 1; letter-spacing: -0.045em; font-variation-settings: "FLAR" 40, "VOLM" 0; transition: font-variation-settings 0.6s var(--ease), color 0.3s; }
.next-link:hover .next-title { font-variation-settings: "FLAR" 100, "VOLM" 100; color: var(--ochre); }
.next-type { color: rgba(255, 255, 255, 0.65); }
.next-project :focus-visible { outline-color: var(--ochre); }

.prose-section { padding-bottom: var(--section); }
.prose { max-width: 44rem; }
.prose p { font-size: 1.12rem; color: var(--gray); }

.page-404 { background: var(--brand) var(--labyrinth) no-repeat right -10vw center / min(80vw, 60rem); color: var(--on-brand); }
.notfound { min-height: 100vh; display: grid; align-content: center; padding: 3rem 0; }
.notfound .brand img { width: 10rem; margin-bottom: clamp(3rem, 8vw, 6rem); }
.notfound .page-lead { color: var(--on-brand-2); }

/* ---------- The thread (drawn by site.js) ---------- */
.thread { position: absolute; top: 0; left: 0; width: 100%; height: 0; pointer-events: none; z-index: 2; overflow: visible; }
.thread-path { fill: none; stroke: var(--red); stroke-width: 3; stroke-linejoin: miter; stroke-linecap: square; }
.thread-end { fill: var(--red); opacity: 0; transition: opacity 0.4s; }
.thread.is-done .thread-end { opacity: 1; }
@media (max-width: 899px) { .thread { display: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .index-head, .index-row { grid-template-columns: minmax(0, 2fr) minmax(0, 1.3fr); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps::before { display: none; }
  .deployments { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .hero-copy { grid-column: 1 / -1; }
  /* Stacked layout: the big mark already sits right above, so the logo would repeat it. */
  .hero-logo { display: none; }
  .hero-mark { grid-column: 1 / -1; grid-row: 1; justify-self: end; width: 7rem; margin-bottom: 2.5rem; }
  .split-head, .services, .faq-list { grid-column: 1 / -1; position: static; }
  .founder-portrait, .founder-text { grid-column: 1 / -1; }
  .founder-portrait { max-width: 22rem; }
  .contact-intro, .contact-form { grid-column: 1 / -1; position: static; }
  .project-lead, .project-visit { grid-column: 1 / -1; }
  .facts, .article { grid-column: 1 / -1; position: static; }
  .salon .figure, .salon--2 .figure:not(.figure--phone), .salon--3 .figure:nth-child(n) { grid-column: 1 / -1; margin-top: 0; }
  .salon .figure--phone, .salon--2 .figure--phone, .salon--3 .figure.figure--phone { grid-column: span 6; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .index-head { display: none; }
  .index-row { grid-template-columns: minmax(0, 1fr); gap: 0.4rem; }
  .index-thumb { display: block; margin-top: 1rem; }
  .cursor-preview { display: none; }
  .steps, .deployments { grid-template-columns: minmax(0, 1fr); }
  .salon .figure--phone, .salon--2 .figure--phone, .salon--3 .figure.figure--phone { grid-column: 1 / -1; max-width: 16rem; }
  .contact-form { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Motion ---------- */
/* One orchestrated moment: the hero assembles itself on load. */
@media (prefers-reduced-motion: no-preference) {
  .hero-title { animation: flare 1.8s 0.25s var(--ease) both; }
  .hero-title .w > span { animation: rise 0.95s var(--ease-out) both; }
  .hero-title .w:nth-child(1) > span { animation-delay: 0.10s; }
  .hero-title .w:nth-child(2) > span { animation-delay: 0.16s; }
  .hero-title .w:nth-child(3) > span { animation-delay: 0.22s; }
  .hero-title .w:nth-child(4) > span { animation-delay: 0.28s; }
  .hero-title .w:nth-child(5) > span { animation-delay: 0.34s; }
  .hero-title .w:nth-child(6) > span { animation-delay: 0.40s; }
  .hero-title .w:nth-child(7) > span { animation-delay: 0.46s; }
  .hero-title .w:nth-child(8) > span { animation-delay: 0.52s; }
  .hero-title .w:nth-child(9) > span { animation-delay: 0.58s; }
  .hero-title .w:nth-child(10) > span { animation-delay: 0.64s; }
  .hero-logo, .hero-lead, .hero-ctas, .hero-proof { animation: appear 0.8s var(--ease-out) both; }
  .hero-lead { animation-delay: 0.7s; }
  .hero-ctas { animation-delay: 0.82s; }
  .hero-proof { animation-delay: 0.95s; }
  .mark rect { animation: block 1s var(--ease-out) both; }
  .mark .mark-a { --from: translate(-40%, -60%); animation-delay: 0.15s; }
  .mark .mark-b { --from: translate(60%, -20%); animation-delay: 0.3s; }
  .mark .mark-c { --from: translate(-80%, 0); animation-delay: 0.45s; }
  .mark .mark-d { --from: translate(-30%, 90%); animation-delay: 0.6s; }
  @keyframes rise { from { transform: translateY(110%); } }
  @keyframes flare { from { font-variation-settings: "FLAR" 0, "VOLM" 0; } }
  @keyframes appear { from { opacity: 0; transform: translateY(1rem); } }
  @keyframes block { from { opacity: 0; transform: var(--from) scale(0.6); } }

  /* Numbers band: digits sharpen while they count. */
  .stats li.is-counting .stat-num { animation: flare 1.8s var(--ease) both; }

  /* The FAQ opens smoothly where the browser can animate to height: auto. */
  @supports (interpolate-size: allow-keywords) and selector(::details-content) {
    :root { interpolate-size: allow-keywords; }
    .faq-list details::details-content { height: 0; overflow: clip; transition: height 0.45s var(--ease), content-visibility 0.45s allow-discrete; }
    .faq-list details[open]::details-content { height: auto; }
  }

  /* Work stack: each card sinks back as the next one slides over it.
     timeline-scope lets a card follow its sibling's view timeline. */
  @supports (timeline-scope: --a) and (animation-timeline: view()) {
    @media (min-width: 761px) and (min-height: 681px) {
      .stack { timeline-scope: --card-2, --card-3, --card-4, --card-5, --card-6; }
      .card:nth-child(2) { view-timeline: --card-2; }
      .card:nth-child(3) { view-timeline: --card-3; }
      .card:nth-child(4) { view-timeline: --card-4; }
      .card:nth-child(5) { view-timeline: --card-5; }
      .card:nth-child(6) { view-timeline: --card-6; }
      .card { animation: sink linear both; animation-range: entry 0% entry 100%; }
      .card:nth-child(1) { animation-timeline: --card-2; }
      .card:nth-child(2) { animation-timeline: --card-3; }
      .card:nth-child(3) { animation-timeline: --card-4; }
      .card:nth-child(4) { animation-timeline: --card-5; }
      .card:nth-child(5) { animation-timeline: --card-6; }
      .card:last-child { animation: none; }
      @keyframes sink { to { transform: scale(0.94); filter: brightness(0.9); } }
    }
  }

  /* The process line draws itself as it scrolls into view. */
  @supports (animation-timeline: view()) {
    .steps::before { animation: draw linear both; animation-timeline: view(); animation-range: entry 30% cover 45%; }
    .steps li::before { animation: node linear both; animation-timeline: view(); animation-range: entry 35% cover 40%; }
    .steps li:nth-child(2)::before { animation-range: entry 45% cover 43%; }
    .steps li:nth-child(3)::before { animation-range: entry 55% cover 46%; }
    .steps li:nth-child(4)::before { animation-range: entry 65% cover 49%; }
    @keyframes draw { from { transform: scaleX(0); } }
    @keyframes node { from { transform: scale(0); } }
  }
}

/* Privacy controls use equal-size, equal-contrast choices and remain usable on phones. */
.cookie-settings { font: inherit; color: inherit; text-align: left; padding: 0; border: 0; background: none; text-decoration: underline; cursor: pointer; min-height: 44px; }
.consent-banner { position: fixed; z-index: 500; inset: auto 1rem 1rem; max-width: 1080px; margin-inline: auto; background: #fff; color: #111; border: 2px solid #111; border-radius: 6px; box-shadow: 0 6px 32px #0003; padding: 1.25rem; display: flex; gap: 1.5rem; align-items: center; max-height: calc(100dvh - 2rem); overflow-y: auto; }
.consent-banner[hidden], .cookie-settings[hidden] { display: none; }
.consent-copy { flex: 1; min-width: 0; }
.consent-copy h2 { font: 750 1.15rem/1.3 var(--font); letter-spacing: 0; margin-bottom: .5rem; }
.consent-copy p { font-size: .95rem; line-height: 1.5; margin: 0; }
.consent-actions { display: grid; gap: .65rem; min-width: 225px; }
.consent-choice { font: 650 1rem/1.3 var(--font); background: #111; color: #fff; border: 2px solid #111; border-radius: 4px; padding: .8rem 1rem; min-height: 48px; cursor: pointer; }
.consent-choice:hover { background: #343434; }
.consent-choice:focus-visible { outline-offset: 3px; }
.business-details { margin-block: 2rem; }
.business-details dt { font-weight: 700; margin-top: 1rem; }
.business-details dd { margin: .25rem 0 0; overflow-wrap: anywhere; }
.prose h2 { font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.2; margin: 2rem 0 1rem; letter-spacing: -.02em; }
.prose a { overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .consent-banner { inset: auto .65rem .65rem; flex-direction: column; align-items: stretch; gap: 1rem; padding: 1rem; }
  .consent-actions { min-width: 0; grid-template-columns: 1fr 1fr; align-items: stretch; }
  .consent-choice { padding: .7rem .5rem; font-size: .9rem; }
}

/* Page-to-page transitions: the clicked screenshot and title travel to the project page. */
@view-transition { navigation: auto; }
::view-transition-group(*) { animation-duration: 0.6s; animation-timing-function: var(--ease-out); }
::view-transition-old(root) { animation: 0.25s ease both vt-out; }
::view-transition-new(root) { animation: 0.45s var(--ease-out) both vt-in; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; } }
.project-shot .vt-shot { view-transition-name: project-shot; }
.project-hero .vt-title { view-transition-name: project-title; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  @view-transition { navigation: none; }
}
