/* ───────────────────────────────────────────────────────────
   New Client Questionnaire — EricOlsen.Studio
   Editorial. Orange + black. DM Sans + Fraunces.
   ─────────────────────────────────────────────────────────── */

:root {
  --bg: #FAF7F2;
  --bg-warm: #F3EDE3;
  --paper: #ffffff;
  --ink: #0A0A0A;
  --ink-soft: #1c1c1c;
  --muted: #7a7670;
  --muted-soft: #b8b3ab;
  --rule: #1c1c1c;
  --rule-soft: #ddd5c7;
  --accent: #E84F1B;
  --accent-hot: #FF6A2E;
  --accent-deep: #B73B0C;
  --font-display: "Fraunces", "Times New Roman", serif;
  --font-body: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
}

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

/* Ensure [hidden] beats display:flex on .overlay / .thank-you / .welcome */
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  background-image:
    radial-gradient(circle at 20% 10%, rgba(232, 79, 27, 0.04), transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(232, 79, 27, 0.03), transparent 50%);
}

/* paper grain — subtle */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 0.04 0 0 0 0 0.03 0 0 0 0 0.02 0 0 0 0.08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.55;
  mix-blend-mode: multiply;
}

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

/* ────────── TOP BAR ────────── */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 36px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: rgba(250, 247, 242, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule-soft);
}

.top-bar .brand {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 15px;
  letter-spacing: -0.01em;
  text-transform: none;
}

.top-bar .brand .dot {
  color: var(--accent);
}

.top-bar .meta-right {
  display: flex;
  gap: 14px;
  align-items: center;
  color: var(--muted);
}

.top-bar .dash {
  opacity: 0.5;
}

/* ────────── PAGE LAYOUT ────────── */
.page {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  margin: 0 auto;
  padding: 50px 60px 60px;
}

@media (max-width: 768px) {
  .top-bar { padding: 10px 22px; font-size: 9px; }
  .page { padding: 46px 24px 60px; }
}

/* ────────── HERO ────────── */
.hero {
  position: relative;
  padding: 0;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 80px;
  align-items: start;
}

.hero-main {
  display: flex;
  flex-direction: column;
  gap: 60px;
  min-width: 0;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 10px 0 40px;
    min-height: auto;
  }
  .hero-main { gap: 30px; }
}

.hero-side {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-top: 14px;
}

.kicker-block {
  border-top: 1px solid var(--ink);
  padding-top: 10px;
}

.kicker {
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 4px;
}

.kicker-value {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(56px, 10.5vw, 160px);
  line-height: 0.86;
  letter-spacing: -0.045em;
  font-variation-settings: "opsz" 144;
  margin: 0;
}

.hero-line {
  display: block;
}

.hero-line .orange {
  color: var(--accent);
  font-style: italic;
  font-weight: 500;
}

.period {
  color: var(--accent);
}

.hero-actions {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
  margin: 0;
}

@media (max-width: 900px) {
  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
  }
}

.hero-intro {
  max-width: 480px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-soft);
  font-weight: 400;
  margin: 0;
}

/* (.hero-cta wrapper removed — button is now a direct flex child of .hero-actions) */

/* Start Here button */
.start-btn {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  background: var(--ink);
  color: var(--bg);
  border: none;
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 24px 52px;
  margin-bottom: 4px; /* matches the orange shadow extent so visible bottom aligns with intro */
  cursor: pointer;
  border-radius: 0;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 0 var(--accent-deep), 0 12px 30px rgba(232, 79, 27, 0.18);
}

.start-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: translateX(-101%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.1, 1);
  z-index: 0;
}

.start-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--accent-deep), 0 18px 40px rgba(232, 79, 27, 0.28);
}

.start-btn:hover::before { transform: translateX(0); }

.start-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 0 var(--accent-deep);
}

.start-btn .btn-label,
.start-btn .btn-arrow {
  position: relative;
  z-index: 1;
}

.start-btn .btn-arrow {
  font-family: var(--font-display);
  font-size: 20px;
  transition: transform 0.3s ease;
}

.start-btn:hover .btn-arrow { transform: translateX(6px); }

/* .hero-foot removed — info lives in the sidebar kicker (Time: ~15 minutes). */

/* Form reveal animation when Start is clicked */
form.is-revealed {
  animation: revealForm 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes revealForm {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ────────── SECTIONS ────────── */
.section {
  position: relative;
  padding: 90px 0;
  border-top: 1px solid var(--rule);
}

.section:first-of-type {
  border-top: 2px solid var(--ink);
}

.section-head {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 80px;
  align-items: start;
  margin-bottom: 70px;
}

@media (max-width: 900px) {
  .section { padding: 60px 0; }
  .section-head {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 40px;
  }
}

.section-num {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(140px, 18vw, 260px);
  line-height: 0.85;
  letter-spacing: -0.06em;
  color: var(--ink);
  font-variation-settings: "opsz" 144;
  position: relative;
  display: inline-block;
}


@media (max-width: 900px) {
  .section-num { font-size: clamp(90px, 22vw, 140px); }
}

.section-meta {
  padding-top: 18px;
}

.section-label {
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(34px, 5.2vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--ink);
  font-variation-settings: "opsz" 80;
}

.section-title em {
  font-style: italic;
  font-weight: 500;
  color: var(--accent);
}

/* ────────── QUESTIONS / FIELDS ────────── */
.questions {
  display: grid;
  gap: 56px;
  max-width: 760px;
  margin-left: auto;
  margin-right: 0;
}

@media (max-width: 900px) {
  .questions {
    gap: 44px;
    max-width: none;
    margin: 0;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-label {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.field-label em {
  font-style: italic;
  color: var(--accent);
  font-weight: 500;
}

.field-help,
.field-help-inline {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  font-weight: 400;
  margin-bottom: 6px;
}

.field-help-inline {
  margin-bottom: 0;
  font-style: italic;
}

.optional {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
  font-style: italic;
  font-family: var(--font-display);
}

/* Inputs */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1.5px solid var(--ink);
  padding: 14px 0 12px;
  outline: none;
  transition: border-color 0.2s ease, padding 0.2s ease;
  font-weight: 400;
  resize: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus {
  border-color: var(--accent);
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="tel"]::placeholder,
textarea::placeholder {
  color: var(--muted-soft);
  font-style: italic;
  font-family: var(--font-display);
  font-weight: 400;
}

textarea {
  min-height: 90px;
  padding: 14px 0;
}

/* Required indicator inside fields if empty + dirty */
input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown) {
  border-color: var(--accent);
}

/* ────────── CHECKBOXES ────────── */
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 32px;
  margin-top: 14px;
}

@media (max-width: 600px) {
  .checkbox-grid { grid-template-columns: 1fr; gap: 12px; }
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  user-select: none;
  padding: 4px 0;
}

.checkbox input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.checkbox .box {
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--ink);
  background: transparent;
  flex-shrink: 0;
  position: relative;
  transition: all 0.18s ease;
}

.checkbox:hover .box {
  background: rgba(232, 79, 27, 0.08);
}

.checkbox input:checked + .box {
  background: var(--ink);
  border-color: var(--ink);
}

.checkbox input:checked + .box::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 8px;
  height: 14px;
  border-right: 2.5px solid var(--accent);
  border-bottom: 2.5px solid var(--accent);
  transform: rotate(45deg);
}

.checkbox input:focus-visible + .box {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.cb-label {
  font-size: 16px;
  font-weight: 400;
  color: var(--ink-soft);
  line-height: 1.3;
}

.other-field {
  margin-top: 20px;
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.other-field .field-help-inline {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  font-family: var(--font-display);
  font-style: italic;
  white-space: nowrap;
}

.other-field input {
  flex: 1;
}

/* ────────── SUBMIT ZONE ────────── */
.submit-zone {
  padding: 100px 0 40px;
  text-align: center;
  position: relative;
  border-top: 2px solid var(--ink);
  margin-top: 40px;
}

.submit-line {
  display: none;
}

.submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  background: var(--ink);
  color: var(--bg);
  border: none;
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 26px 56px;
  cursor: pointer;
  border-radius: 0;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 0 var(--accent-deep), 0 12px 30px rgba(232, 79, 27, 0.18);
}

.submit-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: translateX(-101%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.1, 1);
  z-index: 0;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--accent-deep), 0 18px 40px rgba(232, 79, 27, 0.28);
}

.submit-btn:hover::before {
  transform: translateX(0);
}

.submit-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 0 var(--accent-deep);
}

.submit-btn .btn-label,
.submit-btn .btn-arrow {
  position: relative;
  z-index: 1;
}

.submit-btn .btn-arrow {
  font-family: var(--font-display);
  font-size: 22px;
  transition: transform 0.3s ease;
}

.submit-btn:hover .btn-arrow {
  transform: translateX(6px);
}

.submit-btn:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none;
}

.submit-note {
  margin-top: 28px;
  font-size: 14px;
  color: var(--muted);
  font-style: italic;
  font-family: var(--font-display);
  font-weight: 400;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

.submit-note em {
  color: var(--ink);
  font-style: italic;
  font-weight: 500;
}

.error-message {
  margin-top: 24px;
  padding: 16px 24px;
  background: rgba(232, 79, 27, 0.08);
  border: 1.5px solid var(--accent);
  color: var(--accent-deep);
  font-size: 15px;
  font-weight: 500;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* ────────── SIGNOFF FOOTER ────────── */
.signoff {
  padding: 60px 0 30px;
  margin-top: 40px;
  border-top: 1px solid var(--rule-soft);
}

.signoff-grid {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 30px;
  flex-wrap: wrap;
}

.signoff-name {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  font-style: italic;
}

.signoff-meta {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  display: flex;
  gap: 12px;
  align-items: center;
}

.signoff-meta a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule-soft);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}

.signoff-meta a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.signoff-meta .dash {
  opacity: 0.4;
}

/* ────────── OVERLAY (submitting) ────────── */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(250, 247, 242, 0.94);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.overlay-inner {
  text-align: center;
}

.spinner {
  width: 56px;
  height: 56px;
  margin: 0 auto 32px;
  border: 2px solid var(--rule-soft);
  border-top: 2px solid var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.overlay-text {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.overlay-sub {
  margin-top: 10px;
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.dots span {
  animation: dot 1.4s ease-in-out infinite;
  display: inline-block;
}
.dots span:nth-child(2) { animation-delay: 0.2s; }
.dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dot {
  0%, 80%, 100% { opacity: 0.25; }
  40% { opacity: 1; }
}

/* ────────── THANK YOU SCREEN ────────── */
.thank-you {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  animation: rise 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.ty-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: var(--accent);
}

.ty-inner {
  max-width: 720px;
  width: 100%;
  text-align: left;
}

.ty-num {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(80px, 14vw, 180px);
  line-height: 1;
  color: var(--accent);
  margin-bottom: 14px;
  font-variation-settings: "opsz" 144;
}

.ty-label {
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 30px;
}

.ty-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(72px, 14vw, 200px);
  line-height: 0.86;
  letter-spacing: -0.045em;
  font-variation-settings: "opsz" 144;
  margin-bottom: 40px;
}

.ty-title .orange {
  color: var(--accent);
  font-style: italic;
  font-weight: 500;
}

.ty-message {
  max-width: 520px;
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin-bottom: 50px;
}

.ty-sig {
  border-top: 1px solid var(--ink);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 16px;
}

.ty-sig-name {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 22px;
  font-weight: 500;
}

.ty-sig-meta {
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

/* ────────── REVEAL ANIMATIONS ────────── */
.section,
.hero-side,
.hero-title,
.hero-intro,
.start-btn {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.is-visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

.hero-side.is-visible { transition-delay: 0.05s; }
.hero-title.is-visible { transition-delay: 0.15s; }
.hero-intro.is-visible { transition-delay: 0.35s; }
.start-btn.is-visible { transition-delay: 0.5s; }

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
