/* ===========================================================
   index.css - global tokens + unsplit blocks (TO BE SPLIT LATER)
   This file holds:
     - fonts, design tokens, reset, .page container, eyebrow utility (TOP)
     - divider, steps, faq, form, full-reviews (BOTTOM - to be split)
   =========================================================== */

/* ===== FONTS ===== */
@font-face {
  font-family: 'Inter Tight';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/css/fonts/InterTight-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url('/css/fonts/Newsreader-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/css/fonts/Newsreader-italic-latin.woff2') format('woff2');
}

/* ===== TOKENS — light theme (default) ===== */
:root {
  --bg: #F2EDE4;
  --bg-cool: #ECE6DB;
  --bg-warm: #F6F0E5;
  --bg-paper: #FAF6EE;
  --bg-deep: #E7E0D2;
  --paper: #FAF6EE;
  --ink: #1A1714;
  --ink-soft: #5d544a;
  --ink-muted: #8a8074;
  --orange: #E87B1E;
  --rule: rgba(26, 23, 20, 0.13);
}

/* ===== TOKENS — dark theme (toggled via .theme-toggle button in header,
   persisted in localStorage as 'theme') ===== */
html[data-theme="dark"] {
  --bg: #1A1714;
  --bg-cool: #1F1A14;
  --bg-warm: #221E1A;
  --bg-paper: #2A2521;
  --bg-deep: #15110E;
  --paper: #2A2521;
  --ink: #F2EDE4;
  --ink-soft: #B5AB9D;
  --ink-muted: #7C7367;
  --orange: #FF9A4A;
  --rule: rgba(242, 237, 228, 0.14);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
/* Clip horizontal overflow on BOTH html and body. Use `clip` (not `hidden`)
   so we don't establish a scroll container — `overflow-x: hidden` would break
   `position: sticky` on the header. `clip` is supported in all modern browsers
   and clips overflow without creating a scrollable area. */
html, body { overflow-x: clip; }
body {
  background: var(--bg-warm);                       /* match the light palette of the section bgs so no body color leaks through */
  color: var(--ink);
  font-family: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; }
button { font: inherit; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
em { font-style: italic; }

/* ===== LAYOUT ===== */
.page {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg-warm);  /* matches .main bg so the narrow 80vw of .main doesn't leak a darker .page bg on its right gutter (768-1199px viewports where .main < .page) */
  position: relative;
}
@media (min-width: 768px) { .page { max-width: 720px; } }
@media (min-width: 1100px) { .page { max-width: 960px; } }

/* ===== EYEBROW SHARED ===== */
.eyebrow {
  display: block;                      /* avoid inheriting body's line-height in inline line-box */
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--ink-soft);
  text-transform: uppercase;
  line-height: 1;                      /* trim invisible line-box space so visual gap from section
                                          top matches the reviews block (where .reviews__meta is also line-height: 1) */
}


/* =================================================================
   ========== UNSPLIT BELOW - TO BE EXTRACTED INTO OWN FILES =======
   ================================================================= */


/* ===== DIVIDER (steps intro) ===== */
.divider {
  padding: 80px 24px 60px;
  text-align: center;
  position: relative;
  background: var(--bg-warm);
}
.divider__raccoon {
  display: block;
  margin: 0 auto 24px;
}
.divider__title {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 40px;
  font-weight: 300;
  margin: 0 0 14px;
  line-height: 1;
  letter-spacing: -0.025em;
}
.divider__title em { color: var(--orange); font-weight: 400; }
.divider__sub {
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0 auto;
  max-width: 260px;
  line-height: 1.65;
}

/* ===== STEPS ===== */
.steps { padding: 0 24px 60px; background: var(--bg-warm); }
.step {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 18px;
  padding: 24px 0;
  border-top: 1px solid var(--rule);
}
.step__num {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 22px;
  color: var(--orange);
  font-style: italic;
  font-weight: 400;
}
.step__title {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 22px;
  font-weight: 400;
  margin-bottom: 6px;
}
.step__desc { font-size: 13px; color: var(--ink-soft); line-height: 1.6; }

/* ===== FAQ ===== */
.faq {
  padding: 50px 24px 56px;                  /* matches the rest of the section blocks */
  background: var(--bg-cool);
}
@media (min-width: 768px) {
  /* Break out of .page so the cool bg reaches the viewport edges. Inner items
     stay constrained so the questions don't sprawl across a 1100px screen. */
  .faq {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
  }
  .faq > .eyebrow,
  .faq__head,
  .faq__intro,
  .faq__item { max-width: 720px; margin-left: auto; margin-right: auto; }
}
@media (min-width: 1100px) {
  .faq > .eyebrow,
  .faq__head,
  .faq__intro,
  .faq__item { max-width: 880px; }
}
.faq > .eyebrow { text-align: center; margin-bottom: 12px; }
.faq__head {
  text-align: center;
  margin-bottom: 0;
}
.faq__title {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 32px;
  font-weight: 400;
  margin: 0;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-align: center;
}
.faq__title em { color: var(--orange); font-style: italic; }
.faq__intro {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 12px auto 28px;
  max-width: 320px;
  text-align: center;
  line-height: 1.55;
}
.faq__item { padding: 22px 0; border-top: 1px solid var(--rule); }
.faq__item:last-child { padding-bottom: 0; }                  /* trim the doubled bottom gap (item padding + section padding) */
.faq__q {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 17px;
  font-weight: 400;
  margin-bottom: 8px;
}
.faq__a { font-size: 13px; color: var(--ink-soft); line-height: 1.65; }

/* ===== FORM ===== */
.form-section {
  padding: 50px 24px 56px;
  background: var(--bg-cool);              /* alternating palette v2 — dark */
}
@media (min-width: 768px) {
  .form-section {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
  }
}
.form-section form { padding: 0 16px; }
@media (min-width: 768px) {
  .form-section form { padding: 0; }
}
.form-section > * {
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
.form-section > .eyebrow,
.form-section > .form-section__title,
.form-section > .form-section__sub,
.form-section > .form-section__subtitle {
  text-align: center;
}
.form-section__title {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 32px;
  font-weight: 400;
  margin: 10px auto 8px;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.form-section__title em { color: var(--orange); font-style: italic; }
.form-section__sub { font-size: 14px; color: var(--ink-soft); margin: 0 auto 36px; line-height: 1.55; }
.form-section__sub em {
  font-family: 'Newsreader', Georgia, serif;
  font-style: italic;
  color: var(--orange);
  font-size: 16px;
}

/* 3-step preamble inside the form section. Vertical stack on mobile,
   3 columns on tablet/desktop. Icon → title → desc. */
.form-steps {
  list-style: none;
  padding: 0;
  margin: 0 auto 40px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.form-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-top: 1px solid var(--rule);
  padding-top: 18px;
}
.form-step:first-child { border-top: 0; padding-top: 0; }
.form-step__icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--orange);
  margin-bottom: 8px;
}
.form-step__icon svg { width: 26px; height: 26px; }

/* Clickable "You call" icon — same line-art look as the other step icons,
   but with the FAB's pulse + bounce + glow-pulse animations. The glow uses
   drop-shadow so it follows the SVG strokes (no rectangular box-shadow). */
.form-step__icon--call {
  text-decoration: none;
  cursor: pointer;
  animation: phoneButton-scale       2s ease-in-out infinite,
             phoneButton-bounce      1s linear      infinite,
             form-step-icon-glow     1s ease-in-out infinite;
  transition: filter 0.25s ease-out;
}
.form-step__icon--call:hover {
  filter: drop-shadow(0 0 12px rgba(232, 123, 30, 1)) brightness(1.2);
}
@keyframes form-step-icon-glow {
  0%, 100% { filter: drop-shadow(0 0 10px rgba(232, 123, 30, 0.95)); }
  50%      { filter: drop-shadow(0 0 4px  rgba(232, 123, 30, 0.40)); }
}
.form-step__title {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 6px;
}
.form-step__desc {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.55;
}
@media (min-width: 768px) {
  .form-steps {
    flex-direction: row;
    gap: 24px;
    max-width: 720px;
  }
  .form-step {
    flex: 1;
    border-top: 0;
    border-left: 1px solid var(--rule);
    padding: 0 16px;
  }
  .form-step:first-child { border-left: 0; padding-left: 0; }
  .form-step:last-child { padding-right: 0; }
}

/* Secondary header below the 3-step preamble, leading into the actual form.
   Horizontal rule above visually separates the steps preview from the form. */
.form-section__subtitle {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 32px;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-align: center;
  margin: 0 auto 8px;
  border-top: 1px solid var(--rule);
  padding-top: 36px;
}
.form-section__subtitle em { color: var(--orange); font-style: italic; }
.form-field { margin-bottom: 12px; }
.form-field--last { margin-bottom: 18px; }
.form-field__label {
  display: block;
  font-family: 'Newsreader', Georgia, serif;
  font-size: 17.5px;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin-bottom: -2px;
}
.form-field__label em { color: var(--orange); font-style: italic; }
.form-field__input,
.form-field__textarea {
  display: block;
  width: 100%;
  background: var(--bg-warm);                 /* match the light palette of the section bgs */
  border: 1px solid var(--ink);
  color: var(--ink);
  font-size: 16px;
  padding: 12px 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease;
}
.form-field__input:focus,
.form-field__textarea:focus {
  border-color: var(--ink);
}
.form-field__textarea { resize: none; height: 96px; font-size: 16px; line-height: 1.5; }
.form-section__submit {
  background: var(--orange);
  color: var(--ink);
  border: 0;
  padding: 16px 28px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.4s ease, color 0.4s ease, transform 0.4s ease;
}
.form-section__submit:hover {
  background: var(--ink);
  color: var(--paper);
  transform: scale(1.05);
}
.form-section__submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; background: var(--orange); }
.form-section__message {
  margin-top: 18px;
  font-size: 14px;
  letter-spacing: 0.04em;
  min-height: 18px;
  display: none;
}
.form-section__submit-row {
  display: flex;
  align-items: center;            /* vertically center button to text height */
  gap: 16px;
  margin-top: 4px;
}
.form-section__submit-row .form-section__submit {
  flex-shrink: 0;
}
.form-section__legal {
  margin: 0;
  font-size: 9px;
  line-height: 1.55;
  color: var(--ink-muted);
  flex: 1;                        /* take remaining horizontal space inside the submit-row */
  text-align: center;
}
.form-section__legal a { color: var(--ink-soft); text-decoration: underline; }
.form-section__legal a:hover { color: var(--orange); }

/* Required label suffix + per-field error states */
.form-field__req {
  color: var(--ink-muted);
  font-size: 12px;
  letter-spacing: 0.06em;
  margin-left: 4px;
  text-transform: lowercase;
}
.form-field__error {
  margin-top: 6px;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: #c0392b;
  min-height: 14px;
  display: none;
}
.form-field.is-invalid .form-field__input,
.form-field.is-invalid .form-field__textarea {
  border-color: #c0392b;
}
.form-field.is-invalid .form-field__error { display: block; }
.form-field.is-invalid .form-field__label,
.form-field.is-invalid .form-field__req { color: #c0392b; }
.form-section__message.is-visible { display: block; }
.form-section__message.is-success { color: var(--ink); }
.form-section__message.is-error   { color: var(--orange); }

/* ===== FULL REVIEWS ===== */
.full-reviews { padding: 60px 24px 40px; background: var(--bg-warm); }
.full-reviews__title {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 36px;
  font-weight: 400;
  margin: 8px 0 36px;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.full-reviews__title em { color: var(--orange); }
.full-review {
  margin-bottom: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}
.full-review__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
}
.full-review__name { font-size: 14px; font-weight: 500; }
.full-review__proj { font-size: 11px; color: var(--ink-soft); margin-top: 2px; }
.full-review__date {
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 0.1em;
}
.full-review__text {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 19px;
  line-height: 1.45;
  margin: 0;
  font-weight: 300;
  font-style: italic;
  color: var(--ink);
}
.full-review__stars {
  color: var(--orange);
  font-size: 11px;
  letter-spacing: 2px;
  margin-top: 14px;
}
