/* ============================================================
   REALIZED — Build Your Path (the Mirror → RLYZD Path flow)
   Extends styles.css tokens.
   ============================================================ */

.builder-wrap { max-width: 760px; margin: 0 auto; padding: 8rem clamp(1.2rem, 5vw, 2rem) 5rem; }

/* ---------- Progress ---------- */
.progress { margin-bottom: 2.6rem; }
.progress-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.7rem; }
.progress-step { font-size: 0.72rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gray); }
.progress-pct { font-family: var(--serif); font-style: italic; color: var(--gray-soft); }
.progress-bar { height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--bone); transition: width 0.5s var(--ease); }

/* ---------- Steps ---------- */
.step-panel { display: none; animation: stepIn 0.5s var(--ease) both; }
.step-panel.active { display: block; }
@keyframes stepIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.step-eyebrow { font-size: 0.72rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--gray); display: block; margin-bottom: 1rem; }
.step-q { font-size: clamp(1.7rem, 4.4vw, 2.6rem); font-weight: 400; line-height: 1.12; margin-bottom: 0.8rem; }
.step-q em { font-family: var(--serif); }
.step-help { color: var(--gray-soft); font-weight: 300; margin-bottom: 2rem; max-width: 520px; }

/* text inputs */
.field { margin-bottom: 2rem; }
.field > label { display: block; font-size: 0.8rem; letter-spacing: 0.06em; color: var(--gray); margin-bottom: 0.7rem; text-transform: uppercase; }
.field textarea, .field input[type="text"] {
  width: 100%; background: rgba(244, 241, 234, 0.04); border: 1px solid var(--line-strong);
  border-radius: 14px; padding: 1rem 1.1rem; color: var(--white); font-family: var(--sans); font-size: 1.05rem;
  resize: vertical; outline: none; transition: border-color 0.3s, background 0.3s;
}
.field textarea { min-height: 110px; line-height: 1.5; }
.field textarea:focus, .field input[type="text"]:focus { border-color: var(--bone); background: rgba(244, 241, 234, 0.07); }
.field textarea::placeholder, .field input::placeholder { color: var(--gray); }

/* option chips (selectable) */
.options { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.opt {
  background: none; border: 1px solid var(--line); color: var(--gray-soft);
  border-radius: 100px; padding: 0.6rem 1.1rem; font-family: var(--sans); font-size: 0.9rem;
  cursor: pointer; transition: all 0.22s;
}
.opt:hover { border-color: var(--line-strong); color: var(--white); }
.opt.selected { background: var(--bone); border-color: var(--bone); color: var(--black); font-weight: 600; }

/* segmented (time / horizon) */
.segment { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }
.seg {
  background: rgba(244, 241, 234, 0.03); border: 1px solid var(--line); color: var(--gray-soft);
  border-radius: 12px; padding: 1rem 0.6rem; text-align: center; cursor: pointer; transition: all 0.22s;
}
.seg:hover { border-color: var(--line-strong); }
.seg.selected { border-color: var(--bone); background: rgba(244, 241, 234, 0.07); color: var(--white); }
.seg b { display: block; font-family: var(--serif); font-size: 1.5rem; font-weight: 500; }
.seg span { font-size: 0.74rem; color: var(--gray); }
.segment.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 560px) { .segment, .segment.cols-3 { grid-template-columns: repeat(2, 1fr); } }

/* nav buttons */
.step-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 2.6rem; gap: 1rem; }
.btn {
  background: var(--bone); color: var(--black); border: none; border-radius: 100px;
  padding: 0.9rem 2rem; font-family: var(--sans); font-weight: 600; font-size: 0.95rem;
  cursor: pointer; transition: transform 0.2s var(--ease), box-shadow 0.3s, opacity 0.3s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 28px rgba(244, 241, 234, 0.18); }
.btn.ghost { background: transparent; color: var(--gray-soft); border: 1px solid var(--line-strong); }
.btn.ghost:hover { color: var(--white); border-color: var(--bone); box-shadow: none; }
.btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; box-shadow: none; }
.field-err { color: #e9c46a; font-size: 0.82rem; margin-top: 0.7rem; min-height: 1.1em; }

/* ---------- Generating overlay ---------- */
.generating { display: none; text-align: center; padding: 4rem 0; }
.generating.active { display: block; animation: stepIn 0.4s var(--ease) both; }
.gen-sigil { width: 120px; height: 120px; margin: 0 auto 2rem; }
.gen-sigil circle, .gen-sigil path { fill: none; stroke: var(--bone); }
.gen-ring { stroke-width: 1; opacity: 0.4; animation: spin 8s linear infinite; transform-origin: 60px 60px; }
.gen-ring2 { stroke-width: 1; opacity: 0.25; animation: spin 5s linear infinite reverse; transform-origin: 60px 60px; }
.gen-z { stroke-width: 4; stroke-dasharray: 120; stroke-dashoffset: 120; animation: draw 2s var(--ease) infinite alternate; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.gen-text { font-family: var(--serif); font-style: italic; font-size: 1.4rem; color: var(--gray-soft); }

/* ============================================================
   RESULT — the RLYZD Path
   ============================================================ */
.result { display: none; }
.result.active { display: block; animation: stepIn 0.6s var(--ease) both; }

.result-hero { text-align: center; max-width: 760px; margin: 0 auto 1rem; padding: 8rem clamp(1.2rem,5vw,2rem) 1rem; }
.result-hero .eyebrow { display: block; margin-bottom: 1.2rem; }
.result-hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 400; line-height: 1.08; }
.result-hero h1 em { font-family: var(--serif); }

/* reflection */
.reflect { max-width: 820px; margin: 2rem auto 0; padding: 0 clamp(1.2rem,5vw,2rem); }
.reflect-card {
  border: 1px solid var(--line-strong); border-radius: 20px; padding: clamp(1.6rem, 4vw, 2.6rem);
  background: radial-gradient(120% 120% at 50% 0%, rgba(244,241,234,0.05), transparent 60%);
}
.reflect-card .label { font-size: 0.72rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gray); }
.reflect-row { padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.reflect-row:last-child { border-bottom: none; padding-bottom: 0; }
.reflect-row .label { display: block; margin-bottom: 0.45rem; }
.reflect-row p { font-size: 1.15rem; font-weight: 300; color: var(--bone); }
.reflect-row.identity p { font-family: var(--serif); font-style: italic; font-size: 1.45rem; color: var(--white); }
.reflect-mantra { font-family: var(--serif); font-style: italic; font-size: 1.5rem; color: var(--white); border-left: 2px solid var(--bone); padding-left: 1.2rem; }

/* generic result section */
.r-section { max-width: 980px; margin: 0 auto; padding: clamp(4rem,9vw,7rem) clamp(1.2rem,5vw,2rem) 0; }
.r-head { text-align: center; margin-bottom: 2.6rem; }
.r-head .section-tag { display: block; margin-bottom: 0.9rem; }
.r-head h2 { font-size: clamp(1.7rem,4vw,2.6rem); font-weight: 400; line-height: 1.1; }
.r-head p { color: var(--gray-soft); font-weight: 300; max-width: 540px; margin: 0.9rem auto 0; }

/* ---------- The Five-Gate timeline ---------- */
.timeline { position: relative; max-width: 760px; margin: 0 auto; padding-left: 2.6rem; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 1px; background: var(--line-strong); }
.gate-row { position: relative; padding: 0 0 2.4rem; }
.gate-row:last-child { padding-bottom: 0; }
.gate-node {
  position: absolute; left: -2.6rem; top: 0; width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid var(--bone); background: var(--black); display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 0.95rem; color: var(--white);
}
.gate-days { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gray); }
.gate-row h3 { font-size: 1.3rem; font-weight: 500; margin: 0.3rem 0 0.5rem; }
.gate-row h3 span { color: var(--gray); font-family: var(--serif); font-style: italic; font-weight: 400; }
.gate-row p { color: var(--gray-soft); font-weight: 300; max-width: 560px; }
.gate-row .gate-mantra { font-family: var(--serif); font-style: italic; color: var(--gray); margin-top: 0.6rem; display: block; }

/* ---------- Daily ritual ---------- */
.ritual { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; max-width: 980px; margin: 0 auto; }
.ritual-card { border: 1px solid var(--line); border-radius: 14px; padding: 1.5rem 1.2rem; background: rgba(244,241,234,0.015); }
.ritual-when { font-family: var(--serif); font-style: italic; font-size: 1.2rem; color: var(--white); margin-bottom: 0.2rem; }
.ritual-dur { font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gray); display: block; margin-bottom: 0.9rem; }
.ritual-card p { font-size: 0.9rem; color: var(--gray-soft); font-weight: 300; }
@media (max-width: 820px) { .ritual { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 460px) { .ritual { grid-template-columns: 1fr; } }

/* ---------- 7-day starter ---------- */
.week { max-width: 760px; margin: 0 auto; }
.day { display: flex; gap: 1.2rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.day:last-child { border-bottom: none; }
.day-num { font-family: var(--serif); font-size: 1.5rem; color: var(--gray); min-width: 64px; }
.day-num span { font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; display: block; color: var(--gray); }
.day h4 { font-size: 1.05rem; font-weight: 500; margin-bottom: 0.25rem; }
.day p { font-size: 0.9rem; color: var(--gray-soft); font-weight: 300; }

/* ---------- Audio pack ---------- */
.pack-audio { display: grid; grid-template-columns: repeat(2,1fr); gap: 1rem; max-width: 760px; margin: 0 auto; }
.audio-item { display: flex; align-items: center; gap: 1rem; border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem 1.3rem; background: rgba(244,241,234,0.015); }
.audio-play { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-strong); display: flex; align-items: center; justify-content: center; flex: none; color: var(--bone); }
.audio-play svg { width: 14px; height: 14px; }
.audio-item h4 { font-size: 0.98rem; font-weight: 500; }
.audio-item span { font-size: 0.78rem; color: var(--gray); }
@media (max-width: 560px) { .pack-audio { grid-template-columns: 1fr; } }

/* ---------- Realized card + book tie-in + actions ---------- */
.final { max-width: 980px; margin: 0 auto; padding: clamp(4rem,9vw,7rem) clamp(1.2rem,5vw,2rem); display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem,5vw,4rem); align-items: center; }
@media (max-width: 820px) { .final { grid-template-columns: 1fr; } }
.final-card {
  background: linear-gradient(155deg, #161616, #050505); border: 1px solid var(--line-strong);
  border-radius: 20px; padding: 1.8rem; box-shadow: 0 30px 70px rgba(0,0,0,0.55); transform: rotate(-2deg);
  transition: transform 0.5s var(--ease); max-width: 360px; justify-self: center;
}
.final-card:hover { transform: rotate(0) translateY(-4px); }
.fc-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.6rem; }
.fc-brand { font-weight: 700; letter-spacing: 0.3em; }
.fc-no { font-size: 0.66rem; letter-spacing: 0.2em; color: var(--gray); }
.fc-label { font-size: 0.7rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--gray); margin-bottom: 0.5rem; }
.fc-goal { font-family: var(--serif); font-size: 1.7rem; line-height: 1.15; color: var(--white); margin-bottom: 1.2rem; }
.fc-wave svg { width: 100%; height: 34px; }
.fc-wave path { fill: none; stroke: var(--bone); stroke-width: 1.4; opacity: 0.6; }
.fc-mantra { font-family: var(--serif); font-style: italic; color: var(--gray-soft); margin: 1rem 0 1.4rem; }
.fc-foot { display: flex; align-items: center; gap: 0.8rem; border-top: 1px solid var(--line); padding-top: 1rem; font-size: 0.76rem; color: var(--gray); }

.final-copy h2 { font-size: clamp(1.8rem,4vw,2.8rem); font-weight: 400; line-height: 1.08; margin-bottom: 1rem; }
.final-copy p { color: var(--gray-soft); font-weight: 300; margin-bottom: 1.8rem; }
.final-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.book-tie { margin-top: 1.8rem; font-size: 0.9rem; color: var(--gray-soft); }
.book-tie a { color: var(--bone); }

@media print {
  .builder-wrap, .step-nav, .nav, #field, .grain { display: none !important; }
  .result { display: block !important; }
  html, body { background: #0a0a0a !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
