/* ============== Woolknot Halı Stilim — Brand Tokens ============== */
:root {
  --bg-0: #07060a;
  --bg-1: #0b0907;
  --bg-2: #15110d;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --bg-card-active: rgba(201, 161, 90, 0.13);
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(201, 161, 90, 0.45);
  --text-0: #f4ece1;
  --text-1: #c9bfb1;
  --text-2: #8a8275;
  --gold: #c9a961;
  --gold-soft: #b8965a;
  --gold-deep: #7c5d2a;

  --serif: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  --radius: 14px;
  --shadow-soft: 0 30px 80px -20px rgba(0, 0, 0, 0.6);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  font-weight: 300;
  color: var(--text-0);
  background:
    radial-gradient(ellipse at top, rgba(124, 93, 42, 0.18), transparent 50%),
    radial-gradient(ellipse at bottom, rgba(48, 26, 10, 0.30), transparent 60%),
    var(--bg-0);
  background-attachment: fixed;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: 0.01em;
}

/* Subtle pattern overlay — knot/weave texture feel */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(201, 161, 90, 0.06) 1px, transparent 1.5px);
  background-size: 24px 24px;
  opacity: 0.4;
}

/* ============== App / Screens ============== */
.app {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 18px;
  z-index: 1;
}

.screen {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px 18px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.screen.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  z-index: 2;
}

.screen-inner {
  width: 100%;
  max-width: 420px;
  min-height: min(680px, calc(100dvh - 36px));
  background:
    linear-gradient(180deg, rgba(20, 16, 12, 0.92), rgba(11, 9, 7, 0.94)),
    radial-gradient(ellipse at top, rgba(201, 161, 90, 0.10), transparent 70%);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 36px 28px 32px;
  box-shadow: var(--shadow-soft);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow: hidden;
}

/* Inner top glow */
.screen-inner::before {
  content: "";
  position: absolute;
  top: -30%;
  left: -10%;
  right: -10%;
  height: 60%;
  background: radial-gradient(ellipse at center, rgba(201, 161, 90, 0.10), transparent 65%);
  pointer-events: none;
}

/* Subtle bottom rug-pattern hint */
.screen-inner::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 38%;
  background:
    radial-gradient(ellipse at bottom, rgba(124, 30, 22, 0.18), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.screen-inner > * { position: relative; z-index: 1; }

/* ============== Brand ============== */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  letter-spacing: 0.42em;
  font-size: 11px;
  color: var(--text-1);
}

.brand.small { font-size: 10px; margin-bottom: 22px; }

.brand-mark {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: 0;
  color: var(--gold);
  line-height: 1;
  border: 1px solid var(--gold-deep);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
}

.brand.small .brand-mark { width: 28px; height: 28px; font-size: 17px; }

.brand-name { font-weight: 400; }

/* ============== Splash ============== */
.splash-inner { justify-content: space-between; }

.splash-headline {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  width: 100%;
}

.splash-headline h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(40px, 11vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.01em;
  color: var(--text-0);
}

.splash-sub {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 300;
  font-style: italic;
  color: var(--gold);
  letter-spacing: 0.02em;
}

.splash-foot {
  margin-top: 20px;
  font-size: 11px;
  letter-spacing: 0.32em;
  color: var(--text-2);
  text-transform: uppercase;
}

/* ============== Teaser ============== */
.teaser-lead {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--text-1);
  margin-top: 30px;
  margin-bottom: 14px;
  font-style: italic;
}

.teaser-result {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(42px, 12vw, 58px);
  color: var(--gold);
  line-height: 1;
  margin-bottom: 28px;
}

.teaser-result.blur {
  filter: blur(10px);
  opacity: 0.85;
  user-select: none;
}

.lock {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--gold);
  margin: 6px auto 22px;
  background: rgba(0, 0, 0, 0.25);
}

.teaser-note {
  font-size: 14px;
  color: var(--text-1);
  line-height: 1.6;
  letter-spacing: 0.02em;
  margin-bottom: auto;
  padding-bottom: 28px;
}

/* ============== Questions ============== */
.back {
  position: absolute;
  top: 26px;
  left: 22px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-1);
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
  z-index: 5;
}

.back:hover { background: var(--bg-card-hover); color: var(--gold); }

.step-indicator {
  font-size: 13px;
  letter-spacing: 0.3em;
  color: var(--text-2);
  margin-top: 10px;
  margin-bottom: 28px;
}

.step-indicator span { color: var(--gold); }

.q-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(26px, 7vw, 32px);
  line-height: 1.25;
  letter-spacing: -0.005em;
  color: var(--text-0);
  margin-bottom: 32px;
  padding: 0 6px;
  min-height: 80px;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-bottom: 28px;
}

.option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-0);
  cursor: pointer;
  text-align: left;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.01em;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), transform 0.15s var(--ease);
}

.option:hover {
  background: var(--bg-card-hover);
  border-color: rgba(201, 161, 90, 0.25);
}

.option:active { transform: scale(0.99); }

.option.is-selected {
  background: var(--bg-card-active);
  border-color: var(--border-strong);
  color: var(--text-0);
}

.option-letter {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 16px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--gold);
  flex-shrink: 0;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.option.is-selected .option-letter {
  border-color: var(--gold);
  background: rgba(201, 161, 90, 0.15);
}

.option-text { flex: 1; }

/* ============== Buttons / CTAs ============== */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 16px 22px;
  background: transparent;
  border: 1px solid var(--gold);
  border-radius: 999px;
  color: var(--gold);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.15s var(--ease), opacity 0.2s var(--ease);
  margin-top: auto;
}

.cta:hover { background: rgba(201, 161, 90, 0.10); }
.cta:active { transform: scale(0.99); }

.cta:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.cta-gold {
  background: linear-gradient(180deg, var(--gold), var(--gold-soft));
  color: #1a1410;
  border-color: var(--gold);
  font-weight: 600;
}

.cta-gold:hover {
  background: linear-gradient(180deg, #d6b56e, var(--gold));
  color: #1a1410;
}

.cta-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-1);
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.cta-ghost:hover { color: var(--gold); border-color: var(--border-strong); }

.cta-link {
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 4px;
  transition: border-color 0.2s var(--ease);
}

.cta-link:hover { border-color: var(--gold); }

/* ============== Email ============== */
.email-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 9vw, 40px);
  color: var(--text-0);
  margin-top: 36px;
  margin-bottom: 14px;
}

.email-sub {
  font-size: 14px;
  color: var(--text-1);
  line-height: 1.55;
  letter-spacing: 0.02em;
  margin-bottom: 36px;
}

.email-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 28px;
}

.email-form input[type="email"] {
  width: 100%;
  padding: 16px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-0);
  font-family: var(--sans);
  font-size: 15px;
  letter-spacing: 0.02em;
  outline: none;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.email-form input[type="email"]::placeholder { color: var(--text-2); }

.email-form input[type="email"]:focus {
  border-color: var(--gold);
  background: rgba(201, 161, 90, 0.06);
}

.email-form .cta { margin-top: 0; }

.form-error {
  color: #d97a6a;
  font-size: 13px;
  text-align: center;
  margin-top: 4px;
}

.email-trust {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-2);
  letter-spacing: 0.04em;
  margin-top: auto;
}

.email-trust svg { color: var(--gold); }

/* ============== Result ============== */
.result-lead {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: var(--text-1);
  margin-top: 24px;
  margin-bottom: 10px;
}

.result-name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(38px, 11vw, 52px);
  color: var(--gold);
  line-height: 1;
  margin-bottom: 26px;
  letter-spacing: -0.005em;
}

.result-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #2a2218, #15110d);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.result-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 1;
  transition: opacity 0.4s var(--ease);
}

/* Per-style interior photos (cropped from Woolknot brand mockup) */
.result-image[data-style="modern-minimal"]::before  { background-image: url("/results/modern-minimal.jpg"); }
.result-image[data-style="warm-luxury"]::before     { background-image: url("/results/warm-luxury.jpg"); }
.result-image[data-style="soft-contrast"]::before   { background-image: url("/results/soft-contrast.jpg"); }
.result-image[data-style="quiet-statement"]::before { background-image: url("/results/quiet-statement.jpg"); }
.result-image[data-style="modern-depth"]::before    { background-image: url("/results/modern-depth.jpg"); }
.result-image[data-style="balanced-warmth"]::before { background-image: url("/results/balanced-warmth.jpg"); }

/* Soft vignette + warm glow overlay to match brand mood */
.result-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 110%, rgba(124, 60, 22, 0.18), transparent 55%),
    radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.35) 100%);
  pointer-events: none;
}

.result-tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  line-height: 1.5;
  color: var(--text-0);
  padding: 0 12px;
  margin-bottom: 22px;
}

.result-divider {
  width: 40px;
  height: 1px;
  background: var(--gold);
  opacity: 0.5;
  margin: 0 auto 14px;
}

.result-foot {
  font-size: 11px;
  letter-spacing: 0.5em;
  color: var(--text-2);
  margin-bottom: 24px;
}

.result-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: auto;
}

/* ============== Small screens ============== */
@media (max-height: 720px) {
  .screen-inner { padding: 28px 24px 24px; min-height: calc(100dvh - 28px); }
  .splash-headline h1 { font-size: clamp(36px, 10vw, 48px); }
  .q-title { min-height: 64px; margin-bottom: 22px; }
  .options { gap: 10px; margin-bottom: 22px; }
  .option { padding: 14px 16px; }
  .result-image { aspect-ratio: 16 / 11; }
}

@media (max-width: 360px) {
  .screen-inner { padding: 28px 20px 22px; }
  .brand-mark { width: 30px; height: 30px; font-size: 19px; }
}

/* Hide scrollbars but keep scroll */
* { scrollbar-width: none; }
*::-webkit-scrollbar { display: none; }

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .screen { transition: opacity 0.2s linear; transform: none !important; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
