/* =========================================================
   Preserva AI — styles.css
   Edit the design tokens below to change colors, fonts, spacing.
   ========================================================= */

:root {
  /* Brand palette */
  --lavender: #B8A7E6;
  --lavender-light: #EEE9FA;
  --lavender-deep: #5B4A8A;   /* accessible accent for text on light bg */
  --warm-white: #FCFBFF;
  --plum: #2D2735;
  --plum-soft: #4A4354;       /* secondary text (passes AA on all light bgs) */
  --sage: #D7E8DC;
  --sage-deep: #2F5A3D;
  --blue: #DCEAF4;
  --line: #E4DFF0;
  --white: #FFFFFF;

  /* Type */
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Layout */
  --container: 1120px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(45, 39, 53, .04), 0 8px 24px rgba(45, 39, 53, .06);
  --section-pad: clamp(3.25rem, 7vw, 5.25rem);       /* main vertical rhythm */
  --section-pad-tight: clamp(2.75rem, 5.5vw, 4.25rem);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

/* Sticky header height; anchor targets land this far + a gap below the top */
:root { --header-h: 68px; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
[id] { scroll-margin-top: calc(var(--header-h) + 1rem); }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--plum);
  background: var(--warm-white);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 .85rem;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.25rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.85rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--lavender-deep); text-underline-offset: 3px; }
a:hover { color: var(--plum); }

:focus-visible {
  outline: 3px solid var(--lavender-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

img { max-width: 100%; height: auto; display: block; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute; left: 1rem; top: -3rem;
  background: var(--plum); color: var(--white);
  padding: .6rem 1rem; border-radius: var(--radius-sm);
  z-index: 100; text-decoration: none;
}
.skip-link:focus { top: 1rem; color: var(--white); }

.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.narrow { max-width: 760px; }
.center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px;
  padding: .8rem 1.5rem;
  border-radius: 999px;
  font-weight: 600; font-size: 1rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn-primary { background: var(--plum); color: var(--white); }
.btn-primary:hover { background: var(--lavender-deep); color: var(--white); }
.btn-secondary { border-color: var(--plum); color: var(--plum); background: transparent; }
.btn-secondary:hover { background: var(--lavender-light); color: var(--plum); }
.btn-sm { min-height: 42px; padding: .55rem 1.1rem; font-size: .95rem; }

/* ---------- Tags / labels ---------- */
.eyebrow {
  font-size: .8rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--lavender-deep);
  margin-bottom: .75rem;
}
.tag {
  display: inline-block;
  font-size: .78rem; font-weight: 700;
  letter-spacing: .04em;
  padding: .3rem .7rem;
  border-radius: 999px;
  margin-bottom: .85rem;
}
.tag-caps { text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; }
.tag-sage { background: var(--sage); color: var(--sage-deep); }
.tag-muted { background: var(--lavender-light); color: var(--plum-soft); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(252, 251, 255, .92);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 2px 12px rgba(45, 39, 53, .04); }

.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--plum); }
.brand-mark { width: 34px; height: 34px; }
.brand-name { font-family: var(--font-serif); font-size: 1.35rem; font-weight: 600; letter-spacing: -0.01em; }

.primary-nav { display: flex; align-items: center; gap: 2rem; }
.primary-nav ul { display: flex; gap: 1.75rem; list-style: none; margin: 0; padding: 0; }
.primary-nav ul a { color: var(--plum); text-decoration: none; font-weight: 500; font-size: .98rem; }
.primary-nav ul a:hover { color: var(--lavender-deep); text-decoration: underline; }

.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero { padding: clamp(2.75rem, 6vw, 5rem) 0 clamp(3rem, 6vw, 4.5rem); background: linear-gradient(180deg, var(--warm-white) 0%, var(--lavender-light) 100%); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2.5rem, 5vw, 4.5rem); align-items: center; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.25rem); color: var(--plum-soft); max-width: 36em; }
.cta-row { display: flex; flex-wrap: wrap; gap: .85rem; margin: 1.75rem 0 1.25rem; }
.fine-print { font-size: .93rem; color: var(--plum-soft); max-width: 34em; }

/* Concept queue card */
.hero-visual { margin: 0; }
.queue-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}
.queue-head { display: flex; justify-content: space-between; align-items: center; padding: 0 .25rem .9rem; border-bottom: 1px solid var(--line); }
.queue-head .tag { margin: 0; }
.queue-title { font-weight: 700; font-size: .95rem; }
.queue-list { list-style: none; margin: 0; padding: 0; }
.queue-item {
  display: grid; grid-template-columns: auto 1fr auto; gap: .85rem; align-items: start;
  padding: 1rem .25rem;
  border-bottom: 1px solid var(--line);
}
.queue-item:last-child { border-bottom: 0; padding-bottom: .25rem; }
.qi-name { font-weight: 600; font-size: .95rem; margin: 0; }
.qi-why { font-size: .85rem; color: var(--plum-soft); margin: .15rem 0 0; line-height: 1.45; }
.qi-action {
  font-size: .78rem; font-weight: 700;
  color: var(--lavender-deep); background: var(--lavender-light);
  padding: .25rem .6rem; border-radius: 999px;
}
.dot { width: 10px; height: 10px; border-radius: 50%; margin-top: .45rem; }
.dot-high { background: var(--plum); }
.dot-med { background: var(--lavender); }
.dot-low { background: #9CC5A8; }
.visual-caption { font-size: .8rem; color: var(--plum-soft); margin-top: .75rem; text-align: center; }

/* ---------- Sections ---------- */
.section { padding: var(--section-pad) 0; }
.section-tight { padding: var(--section-pad-tight) 0; }
.section-tint { background: var(--lavender-light); }
.section-blue { background: var(--blue); }
.section-head { max-width: 760px; margin-bottom: 2.25rem; }
.section-intro { font-size: 1.125rem; color: var(--plum-soft); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.card p { color: var(--plum-soft); }
.card-num { display: block; font-family: var(--font-serif); font-size: 1rem; color: var(--lavender-deep); margin-bottom: .9rem; }

/* ---------- Coverage Readiness timeline ---------- */
.timeline {
  list-style: none; margin: 0; padding: 1.75rem 1.5rem 1.5rem;
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
}
.timeline li { position: relative; display: flex; flex-direction: column; gap: .2rem; }
/* connecting line between numbered nodes */
.timeline li:not(:last-child)::after {
  content: "";
  position: absolute; top: 15px; left: 38px; right: -1rem;
  height: 2px; background: var(--lavender);
}
.tl-num {
  position: relative; z-index: 1;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--lavender); color: var(--plum);
  font-weight: 700; font-size: .88rem;
  margin-bottom: .6rem;
}
.timeline li:first-child .tl-num { background: var(--plum); color: var(--white); }
.tl-label { font-weight: 700; line-height: 1.3; font-size: .98rem; }
.tl-desc { font-size: .85rem; color: var(--plum-soft); line-height: 1.4; }
.note { margin-top: 1.25rem; font-size: .98rem; color: var(--plum-soft); }
.note strong { color: var(--plum); }

/* ---------- Existing systems ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.split .section-intro { margin-bottom: 1.75rem; }
.split .section-intro:last-child { margin-bottom: 0; }

.statement {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 500;
  color: var(--lavender-deep);
  margin: .25rem 0 .9rem;
  padding-left: .9rem;
  border-left: 4px solid var(--lavender);
  line-height: 1.2;
}

.feature-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.feature-list li { background: var(--white); border-radius: var(--radius-sm); padding: 1.2rem 1.5rem; border: 1px solid rgba(45, 39, 53, .06); }
.feature-list h3 { font-size: 1.1rem; margin-bottom: .3rem; }
.feature-list p { color: var(--plum-soft); font-size: .96rem; }

/* ---------- Vision ---------- */
.vision-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  grid-template-rows: auto auto;
  gap: 1rem;
}
.vision-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  background: var(--warm-white);
}
.vision-card h3 { margin-bottom: .35rem; }
.vision-card .tag { margin-bottom: .7rem; }
.vision-q { font-family: var(--font-serif); font-style: italic; color: var(--plum-soft); font-size: 1.08rem; }
.vision-card:not(.is-current) h3 { font-size: 1.15rem; color: var(--plum-soft); }
.vision-card.is-current {
  grid-row: span 2;
  padding: 2rem;
  border: 2px solid var(--lavender);
  background: linear-gradient(180deg, var(--white) 0%, var(--lavender-light) 100%);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
}
.vision-card.is-current h3 { font-size: clamp(1.6rem, 2.6vw, 2rem); }
.vision-card.is-current .vision-q { color: var(--plum); font-size: 1.3rem; margin-bottom: 1rem; }
.vision-note { font-size: .95rem; color: var(--plum-soft); }

/* ---------- Why now ---------- */
.disclaimer {
  margin-top: 1.5rem;
  padding: .85rem 1.1rem;
  border-left: 3px solid var(--lavender-deep);
  background: rgba(255, 255, 255, .7);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: .95rem;
  color: var(--plum);
}
#why-now .card h3 { font-size: 1.15rem; line-height: 1.35; margin-bottom: 1.1rem; }
.card-link { margin-top: 1.25rem; font-weight: 600; font-size: .95rem; }

/* Check list (shared) */
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.check-list li { position: relative; padding-left: 2rem; color: var(--plum); }
.check-list li::before {
  content: "";
  position: absolute; left: 0; top: .2rem;
  width: 1.2rem; height: 1.2rem; border-radius: 50%;
  background: var(--sage) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%232F5A3D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 70% no-repeat;
}

/* ---------- Design partners ---------- */
.dp-panel {
  background: var(--white);
  border: 2px solid var(--lavender);
  border-radius: calc(var(--radius) + 4px);
  padding: clamp(1.75rem, 4vw, 3rem);
  box-shadow: var(--shadow);
  align-items: center;
}
.fit-title { font-size: 1.15rem; margin-bottom: 1rem; }

/* ---------- Founder ---------- */
.founder-section { border-top: 1px solid var(--line); }
.founder {
  display: grid;
  grid-template-columns: 112px 1fr;
  grid-template-areas: "photo head" "photo bio";
  column-gap: 1.75rem;
  align-items: start;
}
.founder .headshot { grid-area: photo; }
.founder-head { grid-area: head; }
.founder-bio { grid-area: bio; color: var(--plum-soft); }
.founder-name { font-size: clamp(1.5rem, 2.6vw, 1.9rem); margin-bottom: .15rem; }
.founder-role { color: var(--lavender-deep); font-weight: 600; margin-bottom: .75rem; }
.headshot {
  display: block;
  width: 112px; height: 112px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--lavender-light);
  box-shadow: 0 0 0 4px var(--lavender-light);
}
/* Crop: fill the circle, zoom slightly toward the face */
.headshot img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 57% 30%;
  transform: scale(1.35);
  transform-origin: 57% 32%;
}

/* ---------- FAQ ---------- */
.faq { margin-top: 1.5rem; border-top: 1px solid rgba(45, 39, 53, .12); }
.faq details { border-bottom: 1px solid rgba(45, 39, 53, .12); }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.15rem .25rem;
  font-weight: 600; font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 1.5rem; height: 1.5rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5v14M5 12h14' stroke='%232D2735' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--lavender-deep); }
.faq-body { padding: 0 .25rem 1.35rem; color: var(--plum-soft); max-width: 46em; }
.faq-body p { margin-bottom: .75rem; }
.faq-body p:last-child { margin-bottom: 0; }
.faq-body ul { margin: 0 0 .9rem; padding-left: 1.2rem; display: grid; gap: .3rem; }
.faq-body li::marker { color: var(--lavender-deep); }
.faq-body strong { color: var(--plum); }
.faq-body .cols-2 { grid-template-columns: 1fr 1fr; column-gap: 2rem; }
.learn-more { font-weight: 600; font-size: .95rem; }

/* ---------- Final CTA ---------- */
.closing { background: var(--plum); color: var(--white); }
.closing h2 { font-size: clamp(2rem, 4vw, 3rem); }
.closing .section-intro { color: #DCD6E6; margin-bottom: 1.75rem; }
.closing .btn-primary { background: var(--lavender); color: var(--plum); }
.closing .btn-primary:hover { background: var(--white); color: var(--plum); }
.closing :focus-visible { outline-color: var(--lavender); }

/* ---------- Footer ---------- */
.site-footer { background: var(--warm-white); padding: 2.5rem 0 1.75rem; border-top: 1px solid var(--line); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1.5rem; }
.footer-brand { margin: 0; }
.footer-tag { color: var(--plum-soft); margin: .25rem 0 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 1.5rem; list-style: none; margin: 0; padding: 0; }
.footer-links a { color: var(--plum); display: inline-block; padding: .5rem 0; }
.footer-pending { display: inline-block; padding: .5rem 0; color: var(--plum-soft); cursor: default; }
.footer-legal { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: .85rem; color: var(--plum-soft); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1024px) {
  .timeline { grid-template-columns: repeat(3, 1fr); row-gap: 1.5rem; }
  .timeline li:nth-child(3)::after { display: none; }
}

@media (max-width: 860px) {
  .hero-grid, .split { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; gap: .9rem; }
  .hero-visual { max-width: 480px; }

  .vision-grid { grid-template-columns: 1fr; }
  .vision-card.is-current { grid-row: auto; }

  /* Mobile header: slightly shorter and fully opaque so content never shows through */
  :root { --header-h: 60px; }
  .site-header { background: var(--warm-white); border-bottom-color: var(--line); }
  .brand-mark { width: 30px; height: 30px; }
  .brand .brand-name { font-size: 1.25rem; }

  /* Mobile nav */
  .nav-toggle {
    display: inline-grid; place-items: center;
    width: 44px; height: 44px;
    background: transparent; border: 1px solid var(--line); border-radius: var(--radius-sm);
    cursor: pointer;
  }
  .nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
    display: block; width: 18px; height: 2px; background: var(--plum); border-radius: 2px;
    position: relative; transition: transform .2s ease, background-color .2s ease;
  }
  .nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bar::before { top: -6px; }
  .nav-toggle-bar::after { top: 6px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-6px) rotate(-45deg); }

  .primary-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 1rem;
    padding: 1rem 1.25rem 1.5rem;
    background: var(--warm-white);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(45, 39, 53, .06);
  }
  .primary-nav.is-open { display: flex; }
  .primary-nav ul { flex-direction: column; gap: 0; }
  .primary-nav ul a { display: block; padding: .85rem 0; border-bottom: 1px solid var(--line); }
  .primary-nav .btn { width: 100%; }
}

@media (max-width: 640px) {
  /* Vertical timeline */
  .timeline { grid-template-columns: 1fr; gap: 0; padding: 1.25rem 1.25rem .5rem; }
  .timeline li {
    display: grid; grid-template-columns: 32px 1fr; column-gap: .9rem;
    padding-bottom: 1rem;
  }
  .timeline li .tl-num { grid-row: span 2; margin-bottom: 0; }
  .timeline li:not(:last-child)::after,
  .timeline li:nth-child(3)::after {
    display: block;
    top: 34px; bottom: 0; left: 15px; right: auto;
    width: 2px; height: auto;
  }
  .tl-label { padding-top: .3rem; }

  .card { padding: 1.4rem; }
  .cta-row .btn { width: 100%; }
  .dp-panel .btn { width: 100%; }
  .faq-body .cols-2 { grid-template-columns: 1fr; }
  /* Founder: small photo beside name; bio uses full width below */
  .founder {
    grid-template-columns: 80px 1fr;
    grid-template-areas: "photo head" "bio bio";
    column-gap: 1rem;
    align-items: center;
  }
  .founder-role { margin-bottom: 0; }
  .founder-bio { margin-top: 1rem; }
  .headshot { width: 80px; height: 80px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
