/* ============================================================
   WEBCRAFT STUDIO — CLIENT ONBOARDING
   Warm editorial premium. Fraunces + Outfit.
   ============================================================ */

:root {
  --paper: #F6F1E9;
  --paper-deep: #EFE8DC;
  --card: #FFFDF8;
  --ink: #191410;
  --ink-soft: #6B6055;
  --ink-faint: #9A8F83;
  --accent: #C4512A;
  --accent-deep: #9C3E1F;
  --accent-soft: #F3DDD2;
  --line: rgba(25, 20, 16, 0.12);
  --radius: 20px;
  --radius-sm: 14px;
  --shadow-card: 0 1px 2px rgba(25, 20, 16, 0.04), 0 12px 40px -12px rgba(25, 20, 16, 0.12);
  --shadow-lift: 0 2px 4px rgba(25, 20, 16, 0.05), 0 24px 60px -16px rgba(25, 20, 16, 0.2);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', 'Helvetica Neue', Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.q-open { overflow: hidden; }

img { max-width: 100%; height: auto; display: block; }

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

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px clamp(20px, 5vw, 56px);
  background: transparent;
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease), padding 0.4s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(246, 241, 233, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
}
.brand-mark {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 11px;
  background: var(--ink);
  color: var(--paper);
  transition: transform 0.6s var(--ease), background 0.4s var(--ease);
}
.brand:hover .brand-mark { transform: rotate(90deg); background: var(--accent); }
.brand-name {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-name em {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}

.header-tag {
  flex-shrink: 0;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  background: rgba(255, 253, 248, 0.6);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 120px clamp(20px, 6vw, 80px) 80px;
}
.hero-backdrop { position: absolute; inset: 0; z-index: 0; pointer-events: none; }

.hero-texture {
  position: absolute;
  top: 50%; left: 50%;
  width: 120%; height: auto;
  min-height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  opacity: 0.5;
  filter: saturate(0.85);
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
}
.orb-a {
  width: 46vw; height: 46vw; min-width: 340px; min-height: 340px;
  right: -12vw; top: -14vw;
  background: radial-gradient(circle at 35% 35%, rgba(196, 81, 42, 0.4), rgba(196, 81, 42, 0) 70%);
  animation: drift 14s ease-in-out infinite alternate;
}
.orb-b {
  width: 40vw; height: 40vw; min-width: 300px; min-height: 300px;
  left: -14vw; bottom: -16vw;
  background: radial-gradient(circle at 60% 40%, rgba(214, 168, 108, 0.45), rgba(214, 168, 108, 0) 70%);
  animation: drift 18s ease-in-out infinite alternate-reverse;
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-4%, 5%, 0) scale(1.08); }
}
.grain {
  position: absolute; inset: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: clamp(22px, 4vh, 38px);
}
.spark {
  display: inline-grid;
  place-items: center;
  color: var(--accent);
}
.spark svg { animation: sparkspin 9s linear infinite; }
@keyframes sparkspin { to { transform: rotate(360deg); } }

.hero-title {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: clamp(2.9rem, 9.2vw, 7.6rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  max-width: 14ch;
}
.hero-title .line { display: block; }
.hero-title .accent-word {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  text-transform: none;
  letter-spacing: -0.01em;
}

.hero-copy {
  margin-top: clamp(24px, 4vh, 40px);
  max-width: 34ch;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  font-weight: 300;
  color: var(--ink-soft);
}

.scroll-cue {
  margin-top: clamp(30px, 5vh, 52px);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), gap 0.3s var(--ease);
}
.scroll-cue:hover { color: var(--accent); border-color: var(--accent); gap: 16px; }
.scroll-cue svg { transition: transform 0.3s var(--ease); }
.scroll-cue:hover svg { transform: translateY(3px); }

/* ============================================================
   STEPS
   ============================================================ */
.steps-section {
  position: relative;
  padding: clamp(80px, 12vh, 150px) clamp(20px, 6vw, 80px) clamp(60px, 8vh, 100px);
  max-width: 1200px;
  margin: 0 auto;
}

.steps-head { margin-bottom: clamp(48px, 8vh, 80px); }
.kicker {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.steps-title {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: clamp(2rem, 4.6vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
}
.steps-title em { font-style: italic; font-weight: 400; color: var(--accent); }

/* connecting rail */
.steps-rail {
  position: relative;
  height: 1px;
  background: var(--line);
  margin: 0 clamp(8px, 3vw, 40px) clamp(36px, 5vh, 56px);
}
.rail-progress {
  position: absolute; left: 0; top: -1px;
  height: 3px; width: 0;
  background: var(--accent);
  border-radius: 3px;
  transition: width 1.4s var(--ease);
}
.steps.rail-done + .steps-footnote .rail-progress { width: 100%; }
.steps-rail.rail-done .rail-progress { width: 100%; }

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px, 2.4vw, 28px);
  counter-reset: step;
}

.step-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(28px, 3vw, 40px) clamp(24px, 2.6vw, 36px) clamp(28px, 3vw, 36px);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), border-color 0.5s var(--ease);
}
.step-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lift);
  border-color: rgba(196, 81, 42, 0.35);
}

.step-number {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(3rem, 4.4vw, 4.4rem);
  font-weight: 300;
  line-height: 1;
  color: var(--paper-deep);
  -webkit-text-stroke: 1px rgba(25, 20, 16, 0.28);
  margin-bottom: 26px;
  transition: color 0.5s var(--ease);
}
.step-card:hover .step-number { color: var(--accent-soft); -webkit-text-stroke: 1px var(--accent); }

.step-check {
  position: absolute;
  top: 26px; right: 26px;
  width: 30px; height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #FFF6EF;
  opacity: 0;
  transform: scale(0.4) rotate(-30deg);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}
.step-card.is-done .step-check { opacity: 1; transform: none; }

.step-card h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: clamp(1.35rem, 1.9vw, 1.6rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}
.step-card p {
  color: var(--ink-soft);
  font-weight: 300;
  font-size: 0.98rem;
  margin-bottom: 28px;
  flex-grow: 1;
}

.step-card-accent {
  background: linear-gradient(160deg, #201812 0%, #2B1D13 100%);
  border-color: transparent;
  color: var(--paper);
}
.step-card-accent h3 { color: var(--paper); }
.step-card-accent p { color: rgba(246, 241, 233, 0.72); }
.step-card-accent .step-number {
  color: transparent;
  -webkit-text-stroke: 1px rgba(246, 241, 233, 0.4);
}

.steps-footnote {
  margin-top: clamp(40px, 6vh, 60px);
  text-align: center;
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  color: var(--ink-soft);
  max-width: 30ch;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: none;
  border-radius: 999px;
  padding: 14px 26px;
  cursor: pointer;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease),
              background 0.35s var(--ease), color 0.35s var(--ease),
              border-color 0.35s var(--ease);
}
.btn .arrow { transition: transform 0.35s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn:focus-visible, a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn-solid {
  background: var(--accent);
  color: #FFF6EF;
  box-shadow: 0 10px 26px -10px rgba(196, 81, 42, 0.55);
}
.btn-solid:hover { background: var(--accent-deep); transform: translateY(-2px); }
.btn-solid:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(25, 20, 16, 0.25);
  align-self: flex-start;
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
}
.btn-ghost:hover { color: var(--ink); background: rgba(25, 20, 16, 0.05); }

.btn-lg { padding: 17px 34px; font-size: 1rem; }

/* ============================================================
   COMPLETION
   ============================================================ */
.completion {
  text-align: center;
  padding: clamp(70px, 12vh, 140px) clamp(20px, 6vw, 80px);
  max-width: 760px;
  margin: 0 auto;
  animation: compIn 1s var(--ease) both;
}
@keyframes compIn {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: none; }
}
.spark-lg { margin-bottom: 28px; }
.completion-title {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: clamp(2.4rem, 6.5vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.completion-title em {
  display: block;
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  text-transform: none;
}
.completion-copy {
  margin: 26px auto 36px;
  max-width: 44ch;
  color: var(--ink-soft);
  font-weight: 300;
  font-size: clamp(1rem, 1.5vw, 1.15rem);
}
.completion-footnote {
  margin-top: 22px;
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  color: var(--ink-faint);
}

/* ============================================================
   QUESTIONNAIRE OVERLAY
   ============================================================ */
.q-overlay { position: fixed; inset: 0; z-index: 60; }
.q-backdrop {
  position: absolute; inset: 0;
  background: rgba(25, 20, 16, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.q-overlay.is-open .q-backdrop { opacity: 1; }

.q-panel {
  position: absolute;
  inset: 0;
  margin: auto;
  width: min(680px, calc(100% - 24px));
  height: min(860px, calc(100% - 24px));
  background: var(--card);
  border-radius: calc(var(--radius) + 6px);
  box-shadow: 0 40px 90px -20px rgba(25, 20, 16, 0.45);
  display: flex;
  flex-direction: column;
  padding: clamp(22px, 4vw, 40px);
  opacity: 0;
  transform: translateY(36px) scale(0.98);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
  overflow: hidden;
}
.q-overlay.is-open .q-panel { opacity: 1; transform: none; }

.q-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
  flex-shrink: 0;
}
.q-heading h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: clamp(1.35rem, 3vw, 1.7rem);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 12px;
}
.q-logo {
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--paper);
  flex-shrink: 0;
}
.q-sub {
  margin-top: 8px;
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--ink-soft);
}
.q-close {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease), color 0.3s var(--ease);
}
.q-close:hover { background: var(--ink); color: var(--paper); transform: rotate(90deg); }

.q-progress { margin-bottom: 20px; flex-shrink: 0; }
.q-progress-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 10px;
}
.q-progress-label strong { color: var(--accent); font-weight: 600; }
.q-progress-label span:last-child { text-align: right; }
.q-bar {
  height: 4px;
  background: var(--paper-deep);
  border-radius: 4px;
  overflow: hidden;
}
.q-bar-fill {
  display: block;
  height: 100%;
  width: 20%;
  background: var(--accent);
  border-radius: 4px;
  transition: width 0.6s var(--ease);
}

#contactForm {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.q-step {
  border: none;
  display: none;
  animation: stepIn 0.55s var(--ease) both;
  padding-bottom: 12px;
}
.q-step.is-active { display: block; }
@keyframes stepIn {
  from { opacity: 0; transform: translateX(28px); }
  to   { opacity: 1; transform: none; }
}
.q-step.is-back { animation-name: stepInBack; }
@keyframes stepInBack {
  from { opacity: 0; transform: translateX(-28px); }
  to   { opacity: 1; transform: none; }
}

.q-field { margin-bottom: 22px; }
.q-field:last-child { margin-bottom: 6px; }
.q-field label, .q-field-label {
  display: block;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.12rem;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 10px;
}
.q-field label em { color: var(--accent); font-style: italic; }
.optional {
  font-family: 'Outfit', sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-left: 8px;
}

input[type="text"], input[type="url"], textarea {
  width: 100%;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 300;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 15px 18px;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease), box-shadow 0.3s var(--ease);
  resize: vertical;
}
input::placeholder, textarea::placeholder { color: var(--ink-faint); }
input:focus, textarea:focus {
  outline: none;
  background: #FFFDF8;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(196, 81, 42, 0.12);
}

/* choice chips */
.chip-group { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; }
.chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.chip span {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid rgba(25, 20, 16, 0.2);
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.3s var(--ease);
}
.chip:hover span { border-color: var(--accent); color: var(--accent); }
.chip input:checked + span {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }

.q-field-final label { font-size: clamp(1.3rem, 2.6vw, 1.6rem); line-height: 1.25; }
.q-reassurance {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  color: var(--ink-faint);
  margin-top: 6px;
}

.q-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  flex-shrink: 0;
  background: var(--card);
}
.q-nav #qBack { margin-right: auto; }

#formStatus p { font-size: 0.92rem; }
#formStatus .err { color: #A3341C; }
#formStatus .ok { color: #2E6B3E; }

/* ============================================================
   TOAST
   ============================================================ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%) translateY(20px);
  z-index: 80;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.9rem;
  font-weight: 300;
  padding: 14px 24px;
  border-radius: 999px;
  box-shadow: 0 18px 40px -10px rgba(25, 20, 16, 0.5);
  opacity: 0;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
  max-width: calc(100% - 40px);
  text-align: center;
}
.toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 34px clamp(20px, 6vw, 80px) 40px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--ink-faint);
}
.footer-credit { margin-top: 10px; }
.footer-credit a {
  color: inherit;
  text-decoration: none;
  opacity: 0.5;
  font-weight: 300;
  transition: opacity 0.3s var(--ease);
}
.footer-credit a:hover { opacity: 1; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; gap: 16px; }
  .steps-rail { display: none; }
  .step-card { flex-direction: column; }
  .hero { padding-top: 130px; }
}

@media (max-width: 560px) {
  .header-tag { display: none; }
  .hero-title { font-size: clamp(2.6rem, 13vw, 4rem); }
  .q-panel {
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0;
  }
  .q-nav { flex-wrap: wrap; }
  .q-nav .btn { flex: 1 1 auto; }
  .btn-outline { align-self: stretch; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
