/* ================================================================
   Confidant landing page
   Aesthetic: warm editorial minimalism, lifted from the app itself.
   Type: Inter for UI, Lora for display.
   ================================================================ */

:root {
  /* Colors, sampled from the screenshots */
  --bg:          #f4f2ee;        /* warm off-white background */
  --bg-card:     #ffffff;         /* memory cards, accordion panels */
  --bg-dark:     #15171f;         /* dream cards, dark dreaming section */
  --ink:         #1a1a1a;         /* primary text */
  --ink-soft:    #4a4a4a;         /* body text */
  --ink-muted:   #8a8780;         /* eyebrows, captions */
  --rule:        #e3dfd6;         /* subtle dividers and borders */
  --rule-strong: #1a1a1a;         /* the focused accordion outline */
  --light-on-dark:      #f4f2ee;
  --light-on-dark-soft: #c9c5bd;

  /* Type */
  --font-display: "Lora", Georgia, "Times New Roman", serif;
  --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 8rem;
  --space-section: clamp(7rem, 14vw, 11rem);

  /* Layout */
  --container: 1100px;
  --container-narrow: 720px;
  --radius: 12px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: opacity 0.2s ease;
}
a:hover { opacity: 0.6; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.narrow { max-width: var(--container-narrow); }

/* ----------------------------------------------------------------
   Typography
   ---------------------------------------------------------------- */

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.005em;
  margin: 0 0 var(--space-md) 0;
}

h1 {
  font-size: clamp(2.6rem, 6vw, 5rem);
  font-weight: 500;
  line-height: 1.05;
}
h1 em {
  font-style: italic;
  font-weight: 500;
}

h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 500;
}

h3 {
  font-size: 1.2rem;
  font-weight: 500;
  font-family: var(--font-body);
  letter-spacing: -0.005em;
}

.section-title { margin-bottom: var(--space-md); }
.section-title.centered {
  text-align: center;
  margin-bottom: var(--space-lg);
}

p { margin: 0 0 1.2em 0; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 var(--space-md) 0;
}
.eyebrow.centered { text-align: center; }
.eyebrow.light { color: var(--light-on-dark-soft); }

.lede {
  font-size: 1.18rem;
  line-height: 1.6;
  color: var(--ink-soft);
  margin-top: var(--space-md);
  max-width: 32em;
}

.tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ink);
  margin-top: var(--space-sm);
}

em { font-style: italic; }

code {
  font-family: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
  font-size: 0.9em;
  background: rgba(0,0,0,0.04);
  padding: 0.12em 0.4em;
  border-radius: 4px;
}

/* ----------------------------------------------------------------
   Header
   ---------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.6rem;
  padding-bottom: 1.6rem;
}

.brand {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
  line-height: 1;
}

/* ----------------------------------------------------------------
   Hero
   ---------------------------------------------------------------- */

.hero {
  padding: clamp(6rem, 14vw, 12rem) 0 clamp(5rem, 12vw, 10rem);
  background: var(--bg-card);
  border-bottom: 1px solid var(--rule);
}

.hero .hero-text {
  max-width: 720px;
  margin: 0 auto;
  text-align: left;
}

.hero-text h1 {
  margin-top: 0.5rem;
  margin-bottom: 1.4rem;
}

.hero-text .lede {
  margin-top: 1.4rem;
  margin-bottom: 0.4rem;
  max-width: 34em;
}

.hero-text .tagline {
  margin-top: 1.2rem;
  margin-bottom: 0;
}

.hero-ctas {
  display: flex;
  gap: var(--space-sm);
  margin-top: clamp(2rem, 4vw, 3rem);
  flex-wrap: wrap;
}

/* ----------------------------------------------------------------
   Buttons
   ---------------------------------------------------------------- */

.btn {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.btn-primary:hover {
  opacity: 1;
  background: #2a2a2a;
}

.btn-lg {
  padding: 1.1rem 2.4rem;
  font-size: 1.05rem;
  font-weight: 500;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--ink);
  border-color: var(--ink);
}
.btn-secondary:hover {
  opacity: 1;
  background: var(--ink);
  color: var(--bg);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule);
}
.btn-ghost:hover {
  opacity: 1;
  border-color: var(--ink);
}

.btn-disabled {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 999px;
  border: 1px dashed var(--rule);
  background: transparent;
  color: var(--ink-muted);
  cursor: not-allowed;
  user-select: none;
}

/* ----------------------------------------------------------------
   "Why" section
   ---------------------------------------------------------------- */

.why { padding: var(--space-lg) 0; }
.why p {
  font-size: 1.08rem;
  line-height: 1.7;
}

/* ----------------------------------------------------------------
   Featured sections (Memory Vault, Dreaming)
   ---------------------------------------------------------------- */

.feature {
  padding: var(--space-section) 0;
}

.feature-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
}

.feature-inner.reverse {
  /* image goes on the left for visual variety */
  direction: rtl;
}
.feature-inner.reverse > * {
  direction: ltr;
}

@media (max-width: 900px) {
  .feature-inner,
  .feature-inner.reverse {
    grid-template-columns: 1fr;
    direction: ltr;
    gap: var(--space-md);
  }
}

.feature-text h2 {
  margin-bottom: var(--space-sm);
}

.feature-text p {
  font-size: 1.05rem;
  line-height: 1.7;
}

.feature-image img {
  border-radius: var(--radius);
  box-shadow:
    0 1px 2px rgba(0,0,0,0.04),
    0 8px 24px rgba(0,0,0,0.06),
    0 32px 60px rgba(0,0,0,0.07);
}

/* Memory Vault specific */
.feature-vault {
  background: linear-gradient(180deg, var(--bg) 0%, #efece6 100%);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.memory-card-mock {
  margin: var(--space-md) 0 0 0;
  padding: 1.6rem 1.6rem 1.8rem;
  background: var(--bg-card);
  border-radius: 4px;
  max-width: 360px;
  box-shadow:
    0 1px 2px rgba(0,0,0,0.04),
    0 4px 12px rgba(0,0,0,0.06);
}
.memory-card-mock .memory-card-date {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 1.2rem 0;
}
.memory-card-mock .memory-card-title {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 1rem 0;
}
.memory-card-mock .memory-card-body {
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
}

/* Dreaming specific (dark) */
.feature-dreaming {
  background: var(--bg-dark);
  position: relative;
  overflow: hidden;
}
.feature-dreaming::before {
  /* subtle ethereal glow, set off-center */
  content: "";
  position: absolute;
  width: 700px;
  height: 700px;
  top: -200px;
  right: -200px;
  background: radial-gradient(circle, rgba(96, 110, 150, 0.18) 0%, transparent 65%);
  pointer-events: none;
}
.feature-dreaming .feature-inner { position: relative; }

.feature-dreaming h2.light,
.feature-dreaming .light {
  color: var(--light-on-dark);
}
.feature-dreaming .light-soft {
  color: var(--light-on-dark-soft);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* The dream card mock-up shown next to the Dreaming text */
.dream-card {
  background: #1d2030;
  color: var(--light-on-dark);
  padding: 2.5rem 2.2rem;
  border-radius: var(--radius);
  margin: 0;
  max-width: 380px;
  margin-left: auto;
  box-shadow:
    0 4px 12px rgba(0,0,0,0.3),
    0 24px 48px rgba(0,0,0,0.35);
  position: relative;
}
.dream-card .dream-date {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--light-on-dark-soft);
  opacity: 0.7;
  margin: 0 0 1.5rem 0;
}
.dream-card .dream-title {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--light-on-dark);
  margin: 0 0 1rem 0;
}
.dream-card .dream-body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--light-on-dark-soft);
  margin: 0;
}

/* ----------------------------------------------------------------
   Lists
   ---------------------------------------------------------------- */

.dot-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1em 0;
}
.dot-list li {
  position: relative;
  padding-left: 1.4em;
  margin-bottom: 0.7em;
  line-height: 1.6;
}
.dot-list li::before {
  content: "·";
  position: absolute;
  left: 0.4em;
  top: -0.1em;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.4em;
}
.dot-list strong {
  color: var(--ink);
  font-weight: 600;
}

/* ----------------------------------------------------------------
   How it works (accordion)
   ---------------------------------------------------------------- */

.how { padding: var(--space-section) 0; }

.accordion {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-width: var(--container-narrow);
  margin: 0 auto;
}

.accordion details {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.accordion details[open] {
  border-color: var(--rule-strong);
}

.accordion summary {
  list-style: none;
  cursor: pointer;
  padding: 1.1rem 1.4rem;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  font-family: var(--font-body);
}

.accordion summary::-webkit-details-marker { display: none; }

.accordion summary::after {
  content: "";
  width: 12px;
  height: 12px;
  border-right: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  transform: rotate(45deg);
  margin-right: 4px;
  margin-top: -4px;
  transition: transform 0.25s ease;
}

.accordion details[open] summary::after {
  transform: rotate(-135deg);
  margin-top: 4px;
}

.panel-body {
  padding: 0 1.4rem 1.4rem 1.4rem;
  color: var(--ink-soft);
}

.panel-body p {
  margin-bottom: 1em;
  line-height: 1.65;
}

/* ----------------------------------------------------------------
   Install section
   ---------------------------------------------------------------- */

.install {
  padding: var(--space-section) 0;
  background: var(--bg-card);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
}

.steps > li {
  position: relative;
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--rule);
}
.steps > li:last-child { border-bottom: none; }

.step-num {
  display: inline-block;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--ink-muted);
  margin-bottom: 0.5em;
  letter-spacing: 0.04em;
}
.step-num::before { content: "Step "; }

.steps h3 {
  margin-bottom: 0.6em;
  color: var(--ink);
}

.steps p { color: var(--ink-soft); }

.download-buttons {
  display: flex;
  gap: var(--space-sm);
  margin: var(--space-sm) 0;
  flex-wrap: wrap;
}

.small-note {
  font-size: 0.9rem;
  color: var(--ink-muted);
  font-style: italic;
}

/* ----------------------------------------------------------------
   About
   ---------------------------------------------------------------- */

.about {
  padding: var(--space-section) 0;
  text-align: center;
}

.about-text {
  font-size: 1rem;
  color: var(--ink-soft);
  margin-bottom: 0.8em;
}
.about-text.small {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--ink-muted);
  margin-top: var(--space-md);
}
.about-text strong { color: var(--ink); }

/* ----------------------------------------------------------------
   Footer
   ---------------------------------------------------------------- */

.site-footer {
  padding: var(--space-md) 0;
  border-top: 1px solid var(--rule);
  background: var(--bg);
}

.footer-inner {
  text-align: center;
  font-size: 0.88rem;
  color: var(--ink-muted);
}
.footer-inner a { color: var(--ink-muted); }
