/* My Life Timeline — night-sky product surface.
   Brand voice: quiet, celestial, human. Studio cards stay interactive. */

:root {
  --bg: #070910;
  --bg-elev: rgba(14, 18, 32, 0.78);
  --text: rgba(244, 246, 252, 0.96);
  --muted: rgba(186, 196, 222, 0.68);
  --line: rgba(255, 255, 255, 0.09);
  --card: rgba(16, 20, 36, 0.72);
  --fill: rgba(255, 255, 255, 0.055);
  --gold: #ffd56a;
  --gold-soft: rgba(255, 213, 106, 0.14);
  --display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Outfit", "Segoe UI", "Helvetica Neue", sans-serif;
  --radius: 22px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

body {
  position: relative;
  overflow-x: hidden;
}

button, input { font-family: inherit; }

button {
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}

a { color: inherit; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 999px;
  background: white;
  color: #111;
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus { top: 16px; }

/* Ambient sky */
.sky {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(1000px 620px at 72% -10%, rgba(78, 104, 186, 0.22), transparent 58%),
    radial-gradient(760px 520px at 8% 110%, rgba(36, 48, 92, 0.28), transparent 55%),
    radial-gradient(500px 360px at 50% 40%, rgba(255, 213, 106, 0.04), transparent 60%),
    var(--bg);
}

.sky-glow {
  position: absolute;
  inset: 8% 20% auto;
  height: 40vh;
  background: radial-gradient(ellipse at center, rgba(120, 150, 220, 0.12), transparent 70%);
  animation: breath 10s var(--ease) infinite alternate;
}

.sky-star {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: white;
  opacity: 0.55;
  animation: twinkle 4.5s ease-in-out infinite;
}

.sky-star:nth-child(1) { top: 12%; left: 18%; animation-delay: 0s; }
.sky-star:nth-child(2) { top: 22%; left: 78%; width: 3px; height: 3px; animation-delay: 1.2s; }
.sky-star:nth-child(3) { top: 48%; left: 88%; animation-delay: 0.6s; }
.sky-star:nth-child(4) { top: 70%; left: 12%; animation-delay: 2s; }
.sky-star:nth-child(5) { top: 36%; left: 42%; width: 1.5px; height: 1.5px; animation-delay: 2.8s; }

@keyframes twinkle {
  0%, 100% { opacity: 0.25; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.35); }
}

@keyframes breath {
  from { opacity: 0.55; transform: translateY(0); }
  to { opacity: 1; transform: translateY(-12px); }
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.topnav,
.landing,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

/* Nav */
.topnav {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.brand .mark,
.footer-brand .mark {
  width: 22px;
  height: 22px;
  color: var(--gold);
}

.topnav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

.topnav-links a {
  text-decoration: none;
  transition: color 0.2s ease;
}

.topnav-links a:hover { color: white; }

.nav-cta {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  color: white !important;
}

/* Landing hero — one composition */
.landing {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(56px, 12vh, 120px) 0 clamp(48px, 8vh, 88px);
  text-align: center;
  animation: rise-in 0.9s var(--ease) both;
}

.brand-lockup {
  margin: 0 0 18px;
  font-family: var(--display);
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 650;
  letter-spacing: -0.03em;
  color: var(--gold);
}

.landing h1 {
  margin: 0 auto 16px;
  max-width: 16ch;
  font-family: var(--display);
  font-size: clamp(34px, 6.4vw, 64px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.landing .lede {
  margin: 0 auto 28px;
  max-width: 38rem;
  color: var(--muted);
  font-size: clamp(16px, 2.1vw, 18px);
  line-height: 1.65;
  animation: rise-in 1s var(--ease) 0.12s both;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  animation: rise-in 1s var(--ease) 0.22s both;
}

.primary-link,
.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 650;
  font-size: 15px;
  transition: transform 0.25s var(--ease), background 0.2s ease, border-color 0.2s ease;
}

.primary-link {
  background: white;
  color: #121212;
}

.primary-link:hover { transform: translateY(-2px); }

.ghost-link {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(236, 240, 255, 0.9);
}

.freshness {
  margin: 22px 0 0;
  color: rgba(186, 196, 222, 0.48);
  font-size: 13px;
}

/* Sections */
.studio,
.how,
.faq {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.section-head {
  max-width: 560px;
  margin-bottom: 28px;
}

.section-head .eyebrow {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-head h1,
.section-head h2 {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--text);
  text-transform: none;
}

.studio-first {
  padding-top: 18px;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.6;
}

.banner {
  margin: 0 0 22px;
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--gold-soft);
  color: rgba(255, 232, 190, 0.92);
  font-size: 13.5px;
  line-height: 1.5;
}

.shell {
  display: grid;
  grid-template-columns: minmax(320px, 460px) minmax(280px, 1fr);
  gap: 36px;
  align-items: start;
}

.card, .person {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  backdrop-filter: blur(18px);
}

.card + .card,
.people { margin-top: 14px; }

.card h3,
.person-top {
  margin: 0 0 14px;
}

.card h3 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}

label {
  display: block;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12.5px;
}

input[type="text"],
input[type="number"],
.person-top input {
  width: 100%;
  margin-top: 6px;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--fill);
  color: white;
  font-size: 15px;
  outline: none;
}

input:focus {
  border-color: rgba(255, 213, 106, 0.45);
  box-shadow: 0 0 0 3px rgba(255, 213, 106, 0.1);
}

.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.seg {
  display: flex;
  gap: 6px;
  padding: 4px;
  margin: 0 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.seg button {
  flex: 1;
  border-radius: 999px;
  padding: 8px;
  color: var(--muted);
  font-size: 13px;
}

.seg button.on {
  background: white;
  color: #141414;
  font-weight: 650;
}

.hint, .note, .err {
  margin: 0 0 10px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}

.err { color: #ffb4b4; min-height: 0; }
.err:empty { display: none; }

.linkish {
  padding: 0;
  color: rgba(255, 236, 196, 0.9);
  font-size: 12.5px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--fill);
  border: 1px solid var(--line);
  font-size: 13.5px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.chip:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 213, 106, 0.28);
}

.person-top {
  display: flex;
  gap: 8px;
  align-items: center;
}

.person-top input {
  margin-top: 0;
  font-weight: 650;
}

.icon-btns { display: flex; gap: 4px; }

.icon-btns button {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.8);
}

.icon-btns button:disabled { opacity: 0.28; }

.swatches { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }

.swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid transparent;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.swatch.on { border-color: white; }

.badge {
  justify-self: end;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold);
  font-size: 11px;
}

.badge:empty { display: none; }

.role-tag {
  flex: none;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(220, 226, 245, 0.78);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.chapter-box {
  margin: 0 0 12px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.people-note { margin: 8px 2px 0; }

.lifespan-span {
  color: rgba(255, 213, 106, 0.82) !important;
  font-weight: 600;
}

.preview-col { position: sticky; top: 22px; }

.stage {
  position: relative;
  height: min(74vh, 760px);
  aspect-ratio: 9 / 16;
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 213, 106, 0.04);
  background: #070910;
}

canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.play-fab {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #111;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.stage:hover .play-fab,
.play-fab:focus-visible {
  opacity: 1;
  pointer-events: auto;
}

.play-fab svg { width: 22px; height: 22px; margin-left: 3px; }

.readout {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 6px;
  color: var(--muted);
  font-size: 13px;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 2px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.22);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
  cursor: pointer;
}

.jump {
  display: flex;
  gap: 14px;
  margin: 8px 0 12px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 12px;
}

.primary, .ghost {
  border-radius: 999px;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 650;
}

.primary { background: white; color: #121212; }
.primary:disabled, .ghost:disabled { opacity: 0.45; cursor: default; }

.ghost {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}

.progress { margin-top: 8px; }

.progress-bar {
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: white;
}

.studio-foot {
  margin-top: 20px;
  color: rgba(214, 220, 238, 0.42);
  font-size: 12px;
}

/* How it works — not cards for decoration; simple columns */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  counter-reset: none;
}

.steps li {
  padding-top: 8px;
  border-top: 1px solid rgba(255, 213, 106, 0.22);
}

.step-num {
  display: block;
  margin-bottom: 14px;
  color: var(--gold);
  font-family: var(--display);
  font-size: 20px;
  letter-spacing: 0.04em;
}

.steps h3 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.steps p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 10px;
  max-width: 760px;
}

.faq-list details {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  padding: 4px 18px;
}

.faq-list summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 0;
  font-weight: 600;
  font-size: 15.5px;
}

.faq-list summary::-webkit-details-marker { display: none; }

.faq-list summary::after {
  content: "+";
  float: right;
  color: var(--gold);
  font-weight: 500;
}

.faq-list details[open] summary::after { content: "–"; }

.faq-list details p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.65;
}

.faq-list code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  color: rgba(255, 232, 190, 0.92);
}

/* Footer */
.site-footer {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 18px;
}

.footer-brand {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.footer-brand strong {
  display: block;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 550;
}

.footer-brand p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13.5px;
}

.site-footer nav {
  display: flex;
  gap: 16px;
  color: var(--muted);
  font-size: 13.5px;
}

.site-footer nav a { text-decoration: none; }
.site-footer nav a:hover { color: white; }

.copy {
  margin: 0;
  color: rgba(186, 196, 222, 0.42);
  font-size: 12.5px;
}

.copy a {
  color: rgba(255, 236, 196, 0.75);
  text-decoration: none;
}

.copy a:hover { color: var(--gold); }

/* Subpages: About / Contact / Privacy / Terms */
.subpage .doc {
  position: relative;
  z-index: 1;
  width: min(720px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 72px;
  animation: rise-in 0.7s var(--ease) both;
}

.doc .eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.doc h1 {
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.doc-lede {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.doc-body h2 {
  margin: 28px 0 10px;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
  text-transform: none;
}

.doc-body p,
.doc-body li {
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.7;
}

.doc-body p { margin: 0 0 12px; }

.doc-body ul {
  margin: 0 0 12px;
  padding-left: 1.2em;
}

.doc-body a {
  color: rgba(255, 236, 196, 0.95);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.doc-cta { margin-top: 36px; }

.contact-card {
  margin: 0 0 36px;
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  backdrop-filter: blur(18px);
}

.contact-label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.contact-email {
  display: inline-block;
  margin-bottom: 18px;
  font-family: var(--display);
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 550;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.contact-email:hover { text-decoration: underline; text-underline-offset: 4px; }

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.contact-actions .ghost-link {
  cursor: pointer;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.topnav-links a[aria-current="page"] {
  color: white;
}

/* Blog */
.doc-meta {
  margin: -6px 0 18px;
  color: rgba(186, 196, 222, 0.5);
  font-size: 13px;
}

.doc-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.blog-list {
  display: grid;
  gap: 14px;
  margin-top: 8px;
}

.blog-card {
  display: block;
  padding: 20px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.25s var(--ease), background 0.2s ease;
}

.blog-card:hover {
  border-color: rgba(255, 213, 106, 0.35);
  transform: translateY(-2px);
  background: rgba(20, 24, 42, 0.88);
}

.blog-meta {
  display: block;
  margin-bottom: 8px;
  color: rgba(186, 196, 222, 0.5);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.blog-card h2 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
  text-transform: none;
}

.blog-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.55;
}

.blog-teaser {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0 56px;
  position: relative;
  z-index: 1;
}

.blog-teaser .blog-list {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 860px) {
  .blog-teaser .blog-list { grid-template-columns: 1fr; }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 50;
  transform: translateX(-50%);
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #151515;
  font-size: 13px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

@media (max-width: 960px) {
  .steps { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .topnav { width: min(100% - 24px, 640px); }
  .topnav-links a { display: none; }
  .topnav-links a[href*="contact.html"],
  .topnav-links a[href*="about.html"],
  .topnav-links a[href*="blog"],
  .topnav-links a[href*="studio"],
  .subpage .topnav-links a { display: inline-flex; }
  .landing,
  .studio,
  .how,
  .faq,
  .site-footer {
    width: min(100% - 24px, 640px);
  }
  .landing { padding-top: 40px; text-align: left; }
  .landing h1 { max-width: none; }
  .landing .lede { margin-left: 0; margin-right: 0; }
  .cta-row { justify-content: flex-start; }
  .shell { grid-template-columns: 1fr; }
  .preview-col { position: static; order: -1; }
  .stage { height: min(62vh, 560px); }
  .steps { grid-template-columns: 1fr; gap: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .landing,
  .landing .lede,
  .cta-row,
  .sky-glow,
  .sky-star {
    animation: none !important;
  }
}
