/* =========================================================
   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; }
}

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: 0;
  pointer-events: none; z-index: 0;
  opacity: .035;
  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;
}
.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); }
.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; }

/* ---------- 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; }

/* ---------- responsive ---------- */
@media (max-width: 880px) {
  .hero__grid { grid-template-columns: 1fr; align-items: start; }
  .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; }
}
