/* =========================================================
   Studio Vincent Mary — design system
   Aesthetic: warm-paper editorial / atelier craft
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400..600;1,9..144,400..500&family=Hanken+Grotesk:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap');

:root {
  --paper:      #f6f2ea;
  --paper-2:    #efe8da;
  --paper-3:    #e9e0cf;
  --ink:        #1b1a17;
  --ink-2:      #3a372f;
  --ink-soft:   #6a655a;
  --line:       #d8cfbd;
  --line-soft:  #e4dccb;

  --accent:     #5c57db;   /* matches the CopyTuts app accent */
  --accent-ink: #423ec0;
  --accent-soft:#e7e6fb;
  --live:       #2eba73;
  --warm:       #c0603a;   /* terracotta — used sparingly */

  --shadow-sm: 0 1px 2px rgba(27,26,23,.06), 0 4px 16px rgba(27,26,23,.05);
  --shadow-md: 0 2px 6px rgba(27,26,23,.08), 0 18px 50px rgba(27,26,23,.10);

  --maxw: 1160px;
  --gut: clamp(1.25rem, 4vw, 3.5rem);
  --radius: 18px;

  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Hanken Grotesk', system-ui, sans-serif;
  --mono: 'Space Mono', ui-monospace, monospace;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; animation-timeline: auto !important; animation-iteration-count: 1 !important; }
}

body {
  font-family: var(--sans);
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(120% 90% at 12% -10%, rgba(92,87,219,.07), transparent 60%),
    radial-gradient(120% 90% at 100% 0%, rgba(192,96,58,.05), transparent 55%);
  background-attachment: fixed;
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* subtle paper grain */
body::before {
  content: "";
  position: fixed; inset: -16px;
  pointer-events: none; z-index: 0;
  opacity: .035;
  animation: grain 1.1s steps(1) infinite;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--accent); color: #fff; }

/* ---------- Product theme: CopyTuts (icon palette = teal + coral) ----------
   Applied to <body class="theme-copytuts"> on CopyTuts pages.
   Only the BODY adopts the product colours; the .nav and .foot are reset
   to the Atelier identity below so the two DAs coexist without clashing. */
body.theme-copytuts {
  --accent:     #e8654a;            /* coral — the icon's play button */
  --accent-ink: #c44d31;
  --accent-soft:#f8e3dc;
  --live:       #21a394;            /* teal — the icon's motion arrow */
  --warm:       #21a394;
  background-image:
    radial-gradient(120% 90% at 12% -10%, rgba(33,163,148,.08), transparent 60%),
    radial-gradient(120% 90% at 100% 0%, rgba(232,101,74,.06), transparent 55%);
}
/* Keep the Atelier DA in the shared chrome (header + footer). */
body.theme-copytuts .nav,
body.theme-copytuts .foot {
  --accent:     #5c57db;
  --accent-ink: #423ec0;
  --accent-soft:#e7e6fb;
}
body.theme-copytuts .band::before {
  background: radial-gradient(80% 120% at 90% 0%, rgba(33,163,148,.40), transparent 55%);
}

a { color: inherit; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut); position: relative; z-index: 1; }
.section { padding-block: clamp(3.5rem, 9vw, 7.5rem); position: relative; z-index: 1; }
.rule { height: 1px; background: var(--line); border: 0; }

/* ---------- type ---------- */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.04; letter-spacing: -.015em; font-optical-sizing: auto; }
.display {
  font-size: clamp(2.6rem, 7.2vw, 5.6rem);
  line-height: .98;
  letter-spacing: -.03em;
  font-weight: 500;
}
.display em { font-style: italic; color: var(--accent-ink); font-weight: 500; }
h2.head { font-size: clamp(2rem, 4.5vw, 3.4rem); letter-spacing: -.025em; }
.lead { font-size: clamp(1.12rem, 1.7vw, 1.4rem); color: var(--ink-2); line-height: 1.5; }

.eyebrow {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: inline-flex; align-items: center; gap: .6rem;
}
.eyebrow::before { content: ""; width: 1.6rem; height: 1px; background: var(--accent); display: inline-block; }
.eyebrow.no-tick::before { display: none; }

.num {
  font-family: var(--mono);
  font-size: .8rem;
  color: var(--accent-ink);
  letter-spacing: .05em;
}

.muted { color: var(--ink-soft); }
.balance { text-wrap: balance; }

/* ---------- links ---------- */
.link {
  font-weight: 600;
  text-decoration: none;
  position: relative;
  display: inline-flex; align-items: center; gap: .4em;
  color: var(--ink);
}
.link::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 1.5px; width: 100%;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .35s cubic-bezier(.2,.7,.2,1);
}
.link:hover::after { transform: scaleX(1); }
.link .arr { transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.link:hover .arr { transform: translate(2px,-2px); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  font-weight: 600; text-decoration: none;
  padding: .85rem 1.4rem; border-radius: 999px;
  border: 1px solid transparent; line-height: 1;
  transition: transform .25s, box-shadow .25s, background .25s, border-color .25s, translate .4s cubic-bezier(.2,.7,.2,1);
}
.btn--primary { background: var(--ink); color: var(--paper); box-shadow: var(--shadow-sm); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); background: #000; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
.btn--accent { background: var(--accent); color: #fff; box-shadow: 0 8px 24px rgba(92,87,219,.3); }
.btn--accent:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(92,87,219,.4); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(140%) blur(10px);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.nav.is-stuck { border-color: var(--line-soft); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--ink); }
.brand__mark {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  background: linear-gradient(150deg, var(--accent), #7b77e8);
  display: grid; place-items: center; color: #fff;
  box-shadow: 0 4px 12px rgba(92,87,219,.35);
}
.brand__mark svg { width: 16px; height: 16px; }
.brand__name { font-family: var(--serif); font-weight: 600; font-size: 1.18rem; letter-spacing: -.01em; }
.brand__name small { font-family: var(--mono); font-size: .58rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-soft); display: block; margin-top: -3px; }
.nav__links { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2rem); }
.nav__links a { text-decoration: none; font-weight: 500; font-size: .96rem; color: var(--ink-2); transition: color .2s; }
.nav__links a:hover { color: var(--accent-ink); }
.nav__menu-btn { display: none; background: none; border: 0; padding: .4rem; }

/* ---------- hero ---------- */
.hero { padding-top: clamp(2.5rem, 6vw, 5rem); padding-bottom: clamp(2.5rem, 6vw, 4rem); }

/* apple-like hero — dark ink canvas, drifting aurora, floating shot */
.hero--apple {
  margin-inline: clamp(.5rem, 1.5vw, 1.2rem);
  border-radius: clamp(20px, 3vw, 36px);
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
  padding-top: clamp(3.5rem, 8vw, 6.5rem);
  padding-bottom: 0;
}
.hero--apple::before {
  content: ""; position: absolute; inset: -25%; z-index: 0;
  background:
    radial-gradient(38% 32% at 25% 28%, rgba(123,119,232,.5), transparent 70%),
    radial-gradient(30% 28% at 75% 20%, rgba(192,96,58,.38), transparent 70%),
    radial-gradient(36% 30% at 60% 78%, rgba(46,186,115,.22), transparent 70%);
  filter: blur(52px);
  animation: aurora 16s ease-in-out infinite alternate;
}
@keyframes aurora {
  to { transform: rotate(9deg) scale(1.18) translate(4%, -3%); }
}
.hero--apple::after {
  content: ""; position: absolute; inset: 0; z-index: 0;
  pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hero--apple .hero__center {
  display: grid; justify-items: center; text-align: center;
  gap: 1.3rem; max-width: 56rem; margin-inline: auto;
}
.hero--apple .eyebrow { color: #b8b3a4; }
.hero--apple .display em { color: #a5a1ff; }
.hero--apple .lead { color: #cfc9bb; }
.hero--apple .btn--primary { background: var(--paper); color: var(--ink); }
.hero--apple .btn--primary:hover { background: #fff; }
.hero--apple .btn--ghost { color: var(--paper); border-color: rgba(246,242,234,.32); }
.hero--apple .btn--ghost:hover { border-color: var(--paper); }
.hero__cta { display: flex; gap: .8rem; flex-wrap: wrap; justify-content: center; margin-top: .4rem; }
.hero__shot {
  margin-top: clamp(2.6rem, 6vw, 4.5rem);
  display: grid; justify-items: center; gap: 1.1rem;
  padding-bottom: clamp(2.5rem, 6vw, 4.5rem);
}
.hero__shot img {
  width: min(880px, 100%); height: auto;
  filter: drop-shadow(0 28px 50px rgba(0,0,0,.5)) drop-shadow(0 0 90px rgba(123,119,232,.22));
}
.hero__shot-cap {
  font-family: var(--mono); font-size: .7rem;
  letter-spacing: .2em; text-transform: uppercase;
  color: #b8b3a4;
}
@supports (animation-timeline: view()) {
  .hero__shot img {
    animation: shotIn linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 70%;
  }
}
@keyframes shotIn {
  from { transform: perspective(1100px) rotateX(16deg) scale(.94); opacity: .55; }
}
.hero__grid { display: grid; grid-template-columns: 1.55fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: end; }
.hero__index { border-top: 1px solid var(--line); padding-top: 1rem; }
.hero__index h3 { font-family: var(--mono); font-weight: 700; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 1rem; }
.idx-item { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line-soft); text-decoration: none; color: var(--ink); transition: padding-left .3s, color .2s; }
.idx-item:hover { padding-left: .5rem; color: var(--accent-ink); }
.idx-item b { font-weight: 600; font-size: 1.02rem; }
.idx-item span { font-family: var(--mono); font-size: .72rem; color: var(--ink-soft); }

/* reveal animation */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.stagger > * { opacity: 0; transform: translateY(14px); animation: rise .9s cubic-bezier(.2,.7,.2,1) forwards; }
.stagger > *:nth-child(1) { animation-delay: .05s; }
.stagger > *:nth-child(2) { animation-delay: .15s; }
.stagger > *:nth-child(3) { animation-delay: .25s; }
.stagger > *:nth-child(4) { animation-delay: .35s; }
.stagger > *:nth-child(5) { animation-delay: .45s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- app cards ---------- */
.apps { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1.25rem; }
.app-card {
  position: relative; display: flex; flex-direction: column; gap: 1rem;
  padding: 1.6rem; border-radius: var(--radius);
  background: var(--paper); border: 1px solid var(--line);
  text-decoration: none; color: var(--ink);
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s, border-color .35s;
  overflow: hidden;
}
.app-card::after {
  content: ""; position: absolute; left: 0; top: 0; height: 100%; width: 3px;
  background: var(--accent); transform: scaleY(0); transform-origin: top; transition: transform .4s cubic-bezier(.2,.7,.2,1);
}
.app-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line-soft); }
.app-card:hover::after { transform: scaleY(1); }
.app-card__top { display: flex; align-items: center; justify-content: space-between; }
.app-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; color: #fff; box-shadow: var(--shadow-sm); }
.app-icon svg { width: 26px; height: 26px; }
.tag {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .04em;
  padding: .3rem .6rem; border-radius: 999px; border: 1px solid var(--line);
  color: var(--ink-soft); white-space: nowrap;
}
.tag--free { color: var(--live); border-color: color-mix(in srgb, var(--live) 40%, var(--line)); background: color-mix(in srgb, var(--live) 9%, transparent); }
.tag--accent { color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.app-card h3 { font-size: 1.55rem; }
.app-card p { color: var(--ink-soft); font-size: .98rem; }
.app-card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; font-family: var(--mono); font-size: .72rem; color: var(--ink-soft); letter-spacing: .04em; }
.app-card__foot .go { font-weight: 700; color: var(--accent-ink); display: inline-flex; gap: .3rem; }

/* ---------- works — editorial showcase rows ---------- */
.works { display: grid; gap: clamp(1.2rem, 3vw, 2rem); }
.work {
  display: grid; grid-template-columns: 1fr 1.15fr;
  gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center;
  padding: clamp(1.4rem, 3vw, 2.4rem);
  border: 1px solid var(--line); border-radius: clamp(18px, 2.5vw, 28px);
  background: var(--paper);
  text-decoration: none; color: var(--ink);
  position: relative; overflow: hidden;
  transition: border-color .35s, box-shadow .35s;
}
.work:hover { border-color: color-mix(in srgb, var(--wa) 45%, var(--line)); box-shadow: var(--shadow-md); }
.work:nth-child(even) { grid-template-columns: 1.15fr 1fr; }
.work:nth-child(even) .work__info { order: 2; }
.work:nth-child(even) .work__visual { order: 1; }

.work__num { font-family: var(--mono); font-size: .78rem; color: var(--wa, var(--accent-ink)); letter-spacing: .12em; display: block; margin-bottom: 1rem; }
.work__title {
  font-size: clamp(2rem, 4.6vw, 3.4rem); letter-spacing: -.025em;
  display: flex; align-items: baseline; gap: .35em; flex-wrap: wrap;
  margin-bottom: 1rem;
}
.work__arrow {
  font-size: .55em; color: var(--wa, var(--accent-ink));
  transition: transform .35s cubic-bezier(.2,.7,.2,1);
}
.work:hover .work__arrow { transform: translateX(.35em); }
.work__pitch { color: var(--ink-2); max-width: 42ch; margin-bottom: 1.4rem; }
.work__meta { display: flex; gap: .5rem; flex-wrap: wrap; }

.work__visual {
  position: relative; border-radius: clamp(14px, 2vw, 22px);
  background: linear-gradient(150deg, var(--wa), var(--wb));
  min-height: clamp(240px, 34vw, 400px);
  overflow: hidden; display: grid; place-items: center;
}
.work__visual::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 100% at 80% 0%, rgba(255,255,255,.18), transparent 55%);
}
.work__visual img {
  position: relative; z-index: 1;
  border-radius: 10px; box-shadow: 0 24px 60px rgba(27,26,23,.35);
  transition: transform .6s cubic-bezier(.2,.7,.2,1);
  height: auto;
}
/* wide = Mac window peeking from the bottom-right */
.work__visual--wide img {
  width: 88%; align-self: end; justify-self: end;
  margin: 14% -4% -6% 0;
  transform: rotate(-1.5deg);
}
.work:hover .work__visual--wide img { transform: rotate(0deg) translateY(-6px); }
/* phone = portrait screenshot rising from the bottom, twin behind */
.work__visual--phone img, .work__visual--card img {
  width: min(46%, 230px); align-self: end;
  margin-bottom: -12%;
  border-radius: 22px;
  transform: translateX(16%) rotate(2.5deg);
}
.work__visual--card img { border-radius: 14px; width: min(54%, 260px); }
.work__visual--phone .work__visual-back, .work__visual--card .work__visual-back {
  position: absolute; bottom: -16%; z-index: 0;
  transform: translateX(-42%) rotate(-5deg) scale(.92);
  opacity: .85; filter: saturate(.92);
}
.work:hover .work__visual--phone img:first-child,
.work:hover .work__visual--card img:first-child { transform: translateX(16%) rotate(0deg) translateY(-10px); }
.work:hover .work__visual-back { transform: translateX(-46%) rotate(-7deg) scale(.92) translateY(-6px); }

.works__foot {
  margin-top: 2rem; display: flex; justify-content: space-between;
  align-items: center; gap: 1rem; flex-wrap: wrap;
  padding-top: 1.4rem; border-top: 1px solid var(--line);
}
.works__foot .muted { max-width: 52ch; }

/* ---------- manifesto / approach ---------- */
.split { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(1.5rem, 4vw, 3.5rem); }
.steps { display: grid; gap: 1.1rem; counter-reset: s; }
.step { display: grid; grid-template-columns: auto 1fr; gap: 1.1rem; padding: 1.2rem 0; border-top: 1px solid var(--line); }
.step__n { font-family: var(--mono); color: var(--accent-ink); font-size: .82rem; padding-top: .25rem; }
.step h4 { font-size: 1.35rem; margin-bottom: .25rem; }
.step p { color: var(--ink-soft); font-size: .98rem; }

.pull { font-family: var(--serif); font-size: clamp(1.5rem, 3vw, 2.3rem); line-height: 1.18; letter-spacing: -.015em; }
.pull em { font-style: italic; color: var(--accent-ink); }

/* ---------- value badges ---------- */
.badges { display: flex; flex-wrap: wrap; gap: .6rem; }
.badge {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .86rem; font-weight: 500;
  padding: .5rem .9rem; border-radius: 999px;
  background: var(--paper); border: 1px solid var(--line); color: var(--ink-2);
}
.badge svg { width: 15px; height: 15px; color: var(--accent-ink); }

/* ---------- dark band ---------- */
.band {
  background: var(--ink); color: var(--paper);
  border-radius: clamp(20px, 3vw, 34px);
  padding: clamp(2.2rem, 6vw, 4.5rem);
  position: relative; overflow: hidden;
}
.band::before {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background: radial-gradient(80% 120% at 90% 0%, rgba(92,87,219,.35), transparent 55%);
}
.band > * { position: relative; }
.band .eyebrow { color: #b8b3a4; }
.band .eyebrow::before { background: #7b77e8; }
.band a.link { color: var(--paper); }

/* ---------- contact ---------- */
.contact-mail {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.8rem, 5vw, 3.4rem); letter-spacing: -.02em;
  text-decoration: none; color: var(--ink); display: inline-block; position: relative;
}
.contact-mail::after { content: ""; position: absolute; left: 0; bottom: 4px; height: 2px; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .4s cubic-bezier(.2,.7,.2,1); }
.contact-mail:hover::after { transform: scaleX(1); }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); padding-block: 3rem 2.5rem; }
.foot__grid { display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; align-items: flex-start; }
.foot__cols { display: flex; flex-wrap: wrap; gap: clamp(2rem, 6vw, 5rem); }
.foot h5 { font-family: var(--mono); font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: .9rem; font-weight: 700; }
.foot ul { list-style: none; padding: 0; display: grid; gap: .55rem; }
.foot a { text-decoration: none; color: var(--ink-2); font-size: .95rem; transition: color .2s; }
.foot a:hover { color: var(--accent-ink); }
.foot__bottom { margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; font-size: .85rem; color: var(--ink-soft); }

/* ---------- article (legal / support) ---------- */
.article { max-width: 760px; }
.article .eyebrow { margin-bottom: 1rem; }
.article h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: 1rem; letter-spacing: -.025em; }
.article h2 { font-size: 1.5rem; margin: 2.4rem 0 .7rem; letter-spacing: -.015em; }
.article h3 { font-size: 1.15rem; margin: 1.6rem 0 .4rem; font-family: var(--sans); font-weight: 700; }
.article p, .article li { color: var(--ink-2); margin-bottom: .9rem; }
.article ul { padding-left: 1.1rem; }
.article li { margin-bottom: .5rem; }
.article a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.article .meta { font-family: var(--mono); font-size: .8rem; color: var(--ink-soft); margin-bottom: 2rem; }
.callout {
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  background: var(--paper); border-radius: 12px; padding: 1.1rem 1.3rem; margin: 1.4rem 0;
}
.callout strong { color: var(--ink); }

/* ---------- faq ---------- */
.faq { display: grid; gap: .6rem; }
.faq details {
  border: 1px solid var(--line); border-radius: 14px; background: var(--paper);
  padding: .3rem 1.2rem; transition: border-color .25s;
}
.faq details[open] { border-color: var(--line-soft); box-shadow: var(--shadow-sm); }
.faq summary { cursor: pointer; list-style: none; padding: 1rem 0; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--accent-ink); font-size: 1.3rem; transition: transform .25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { color: var(--ink-soft); padding-bottom: 1.1rem; margin: 0; }

/* ---------- device mock (copytuts hero) ---------- */
.mock {
  border-radius: 16px; border: 1px solid var(--line); background: #fff;
  box-shadow: var(--shadow-md); overflow: hidden;
}
.mock__bar { display: flex; gap: .4rem; padding: .7rem .9rem; border-bottom: 1px solid var(--line-soft); background: var(--paper-2); }
.mock__bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--line); display: block; }
.mock__bar i:nth-child(1){ background:#e06c5f; } .mock__bar i:nth-child(2){ background:#e0b34f; } .mock__bar i:nth-child(3){ background:#69b87a; }
.mock__body { padding: 1.1rem; display: grid; gap: .55rem; }
.mock-row { display: flex; align-items: center; gap: .8rem; padding: .7rem .8rem; border-radius: 10px; border: 1px solid var(--line-soft); background: var(--paper); font-size: .92rem; color: var(--ink-2); }
.mock-row .n { font-family: var(--mono); font-size: .78rem; color: var(--ink-soft); width: 1.2rem; }
.mock-row.is-next { border-color: color-mix(in srgb, var(--live) 45%, transparent); background: color-mix(in srgb, var(--live) 8%, var(--paper)); color: var(--ink); }
.mock-row.is-next .n { color: var(--live); font-weight: 700; }
.mock-row.is-done { color: var(--ink-soft); }
.mock-row .pill { margin-left: auto; font-family: var(--mono); font-size: .62rem; color: var(--live); border: 1px solid color-mix(in srgb, var(--live) 40%, transparent); padding: .15rem .45rem; border-radius: 999px; }

/* ---------- contact / lead-gen ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.process { display: grid; gap: 0; counter-reset: p; }
.process__item { display: grid; grid-template-columns: auto 1fr; gap: 1rem; padding: 1.1rem 0; border-top: 1px solid var(--line); }
.process__item:last-child { border-bottom: 1px solid var(--line); }
.process__dot { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; font-family: var(--mono); font-size: .82rem; font-weight: 700; }
.process__item h4 { font-size: 1.15rem; font-family: var(--sans); font-weight: 700; margin-bottom: .15rem; }
.process__item p { color: var(--ink-soft); font-size: .95rem; }

.form { display: grid; gap: 1rem; }
.field { display: grid; gap: .4rem; }
.field label { font-size: .85rem; font-weight: 600; color: var(--ink-2); }
.field label .opt { font-weight: 400; color: var(--ink-soft); font-family: var(--mono); font-size: .72rem; }
.field input, .field textarea, .field select {
  font-family: var(--sans); font-size: 1rem; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  padding: .8rem .95rem; width: 100%; transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-soft); opacity: .7; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form__submit { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: .3rem; }
.form__note { font-size: .82rem; color: var(--ink-soft); }
.form__status { font-size: .9rem; color: var(--accent-ink); font-weight: 600; min-height: 1.2em; }

.contact-aside { display: grid; gap: 1.1rem; align-content: start; }
.contact-line { display: flex; align-items: center; gap: .8rem; text-decoration: none; color: var(--ink); }
.contact-line:hover .contact-line__v { color: var(--accent-ink); }
.contact-line__i { width: 40px; height: 40px; border-radius: 11px; background: var(--paper); border: 1px solid var(--line); display: grid; place-items: center; color: var(--accent-ink); flex: none; }
.contact-line__i svg { width: 18px; height: 18px; }
.contact-line__k { font-family: var(--mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.contact-line__v { font-weight: 600; }

/* =========================================================
   Craft FX — typo vivante, marquee, curseur, tilt, scroll
   ========================================================= */

/* film grain drift (discrete jumps ≈ argentique) */
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-8px, 6px); }
  40% { transform: translate(6px, -9px); }
  60% { transform: translate(-7px, -6px); }
  80% { transform: translate(8px, 7px); }
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- hero word rotor ---------- */
.rotor { display: inline-block; }
.rotor__word { display: inline-block; white-space: nowrap; }
.rotor__word .ch { display: inline-block; animation: chIn .55s cubic-bezier(.2,.7,.2,1) both; }
.rotor__word.out .ch { animation: chOut .3s cubic-bezier(.6,0,.8,.3) both; }
@keyframes chIn { from { opacity: 0; transform: translateY(.38em) rotate(5deg); } }
@keyframes chOut { to { opacity: 0; transform: translateY(-.3em) rotate(-3deg); } }

/* ---------- marquee strip ---------- */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  padding-block: .85rem;
  position: relative; z-index: 1;
}
.marquee__track { display: flex; width: max-content; animation: marquee 36s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__half {
  font-family: var(--mono); font-size: .72rem;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink-soft); white-space: nowrap;
}
.marquee__half i { font-style: normal; color: var(--accent-ink); padding-inline: 1.6rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- custom cursor (pointer: fine only, added by JS) ---------- */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 200;
  width: 10px; height: 10px; margin: -5px 0 0 -5px;
  border-radius: 50%; background: var(--ink);
  pointer-events: none; opacity: 0;
  display: grid; place-items: center;
  transition: opacity .3s, width .3s cubic-bezier(.2,.7,.2,1), height .3s cubic-bezier(.2,.7,.2,1), margin .3s cubic-bezier(.2,.7,.2,1), background .3s, border-color .3s;
}
.cursor.is-on { opacity: .9; }
.cursor.is-link {
  width: 36px; height: 36px; margin: -18px 0 0 -18px;
  background: transparent; border: 1.5px solid var(--accent-ink);
}
.cursor.is-view { width: 66px; height: 66px; margin: -33px 0 0 -33px; background: var(--ink); border: 0; }
.cursor__label {
  font-family: var(--mono); font-size: .58rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--paper);
  opacity: 0; transition: opacity .2s;
}
.cursor.is-view .cursor__label { opacity: 1; }
.has-fx .app-card, .has-fx .idx-item, .has-fx .work { cursor: none; }

/* ---------- app-card tilt (vars set by JS) ---------- */
.has-fx .app-card {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0px));
}
.has-fx .app-card:hover { --ty: -4px; }
.app-card .app-icon { transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s; }
.app-card:hover .app-icon { transform: translateY(-4px) rotate(-3deg); box-shadow: 0 10px 24px rgba(27,26,23,.18); }

/* ---------- scroll storytelling (CSS scroll-driven, progressive) ---------- */
@supports (animation-timeline: view()) {
  .step { position: relative; border-top-color: transparent; }
  .step::before {
    content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, var(--accent), var(--line) 70%);
    transform-origin: left;
    animation: drawLine linear both;
    animation-timeline: view();
    animation-range: entry 10% entry 55%;
  }
  .step__n, .step > div {
    animation: stepRise linear both;
    animation-timeline: view();
    animation-range: entry 15% entry 65%;
  }

  /* dark band opens like a curtain */
  .band {
    animation: bandOpen linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 85%;
  }
}
@keyframes drawLine { from { transform: scaleX(0); } }
@keyframes stepRise { from { opacity: 0; transform: translateY(16px); } }
@keyframes bandOpen { from { transform: scale(.92) translateY(28px); border-radius: 52px; } }

/* ---------- view transitions between pages ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vtOut .22s ease both; }
::view-transition-new(root) { animation: vtIn .34s ease both; }
@keyframes vtOut { to { opacity: 0; transform: translateY(-8px); } }
@keyframes vtIn { from { opacity: 0; transform: translateY(10px); } }

/* ---------- responsive ---------- */
@media (max-width: 880px) {
  .hero__grid { grid-template-columns: 1fr; align-items: start; }
  .work, .work:nth-child(even) { grid-template-columns: 1fr; }
  .work:nth-child(even) .work__info { order: 1; }
  .work:nth-child(even) .work__visual { order: 2; }
  .work__visual { min-height: 260px; }
  .hero__index { margin-top: 1rem; }
  .split { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
  .nav__links { display: none; }
  .nav__links.open {
    display: flex; flex-direction: column; align-items: flex-start; gap: 1rem;
    position: absolute; top: 68px; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: 1.2rem var(--gut);
  }
  .nav__menu-btn { display: inline-flex; }
}
