/* PageDusk — twilight reading theme
   Deep indigo & purple night, warm dusk-horizon accent used sparingly.
   Pure CSS, mobile-first, self-contained. */

:root {
  /* Night palette */
  --night:        #14122B;  /* deep indigo base */
  --night-2:      #1E1B3A;  /* raised surfaces */
  --night-3:      #272348;  /* hover / borders */
  --hairline:     rgba(236, 232, 255, 0.10);
  --hairline-2:   rgba(236, 232, 255, 0.16);

  /* Dusk horizon accent (used sparingly) */
  --dusk-orange:  #F6A86A;
  --dusk-pink:    #E98AB0;
  --dusk-grad:    linear-gradient(100deg, #F6A86A 0%, #EE96A0 45%, #E98AB0 100%);

  /* Text */
  --ink:          #ECE8FF;  /* primary */
  --ink-soft:     #C9C4E8;
  --muted:        #A39FC4;  /* secondary */
  --muted-2:      #837FA6;

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

  /* Scale */
  --maxw: 1080px;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
  --radius: 18px;
  --radius-sm: 12px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background-color: var(--night);
  /* layered ambient dusk glows + faint starfield */
  background-image:
    radial-gradient(1px 1px at 18% 22%, rgba(255,255,255,0.35), transparent),
    radial-gradient(1px 1px at 74% 14%, rgba(255,255,255,0.25), transparent),
    radial-gradient(1.5px 1.5px at 42% 36%, rgba(255,255,255,0.20), transparent),
    radial-gradient(1px 1px at 88% 44%, rgba(255,255,255,0.18), transparent),
    radial-gradient(900px 520px at 50% -8%, rgba(233,138,176,0.16), transparent 70%),
    radial-gradient(1100px 640px at 84% 4%, rgba(246,168,106,0.10), transparent 70%);
  background-attachment: fixed;
  line-height: 1.6;
  font-size: 17px;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

/* ---------- Layout primitives ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

a { color: var(--dusk-orange); text-decoration: none; }
a:hover { color: var(--dusk-pink); }

:focus-visible {
  outline: 2px solid var(--dusk-orange);
  outline-offset: 3px;
  border-radius: 4px;
}

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

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(20, 18, 43, 0.72);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--hairline);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
}
.wordmark {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.32rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}
.wordmark:hover { color: var(--ink); }
.wordmark .glyph {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--dusk-grad);
  box-shadow: 0 0 16px rgba(233,138,176,0.55);
  flex: none;
}
.site-nav {
  display: flex;
  gap: clamp(1rem, 4vw, 2rem);
  font-size: 0.95rem;
}
.site-nav a {
  color: var(--muted);
  font-weight: 500;
}
.site-nav a:hover { color: var(--ink); }

/* ---------- Eyebrow / labels ---------- */
.eyebrow {
  font-family: var(--body);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dusk-orange);
  margin: 0 0 0.9rem;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding-top: clamp(3.5rem, 10vw, 6.5rem);
  padding-bottom: clamp(3rem, 8vw, 5.5rem);
}
.hero .wrap { position: relative; z-index: 1; }

/* The signature: a dusk horizon the wordmark sits on.
   In-flow element so it always lands under the tagline, whatever the font metrics. */
.horizon {
  position: relative;
  height: 1px;
  margin: clamp(1.6rem, 4vw, 2.4rem) 0 0;
}
.horizon .line {
  position: absolute;
  left: 50%;
  top: 0;
  width: min(640px, 92vw);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg,
      transparent,
      rgba(246,168,106,0.55) 22%,
      rgba(233,138,176,0.70) 50%,
      rgba(246,168,106,0.55) 78%,
      transparent);
}
/* the sun glowing up from behind the horizon line */
.horizon .sun {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(560px, 84vw);
  aspect-ratio: 1;
  transform: translateX(-50%);
  background: radial-gradient(circle at 50% 100%,
      rgba(246,168,106,0.50) 0%,
      rgba(233,138,176,0.26) 26%,
      rgba(233,138,176,0.06) 48%,
      transparent 62%);
  filter: blur(6px);
  pointer-events: none;
}

.hero h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(3rem, 11vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
  text-shadow: 0 2px 40px rgba(20,18,43,0.6);
}
.hero .tagline {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.2rem, 3.6vw, 1.7rem);
  color: var(--dusk-pink);
  margin: 1rem 0 0;
  letter-spacing: 0.005em;
}
.hero .pitch {
  max-width: 40ch;
  margin: 1.5rem auto 0;
  color: var(--ink-soft);
  font-size: clamp(1.02rem, 2.4vw, 1.18rem);
}

/* ---------- App Store button ---------- */
.cta-row {
  margin-top: 2.25rem;
  display: flex;
  justify-content: center;
}
.appstore-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.8rem 1.35rem;
  border-radius: 14px;
  background: var(--ink);
  color: var(--night);
  border: 1px solid rgba(255,255,255,0.9);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.appstore-btn:hover {
  color: var(--night);
  transform: translateY(-2px);
  box-shadow: 0 16px 38px rgba(233,138,176,0.30);
  background: #fff;
}
.appstore-btn .apple { width: 26px; height: 26px; flex: none; fill: var(--night); }
.appstore-btn .labels { text-align: left; line-height: 1.1; }
.appstore-btn .labels small {
  display: block;
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  opacity: 0.78;
  font-weight: 500;
}
.appstore-btn .labels b {
  display: block;
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ---------- Section scaffolding ---------- */
.section {
  padding-block: clamp(3rem, 8vw, 5rem);
}
.section-head {
  max-width: 46ch;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}
.section-head h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--ink);
}
.section-head p {
  color: var(--muted);
  margin: 0.85rem 0 0;
  font-size: 1.05rem;
}

/* ---------- Feature cards (dimmed book pages) ---------- */
.features {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: 1fr;
}
.feature {
  position: relative;
  background:
    linear-gradient(180deg, rgba(39,35,72,0.55), rgba(30,27,58,0.75));
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem 1.7rem;
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.feature:hover {
  border-color: var(--hairline-2);
  transform: translateY(-3px);
}
/* faint page-edge highlight on the left, like an open book */
.feature::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--dusk-grad);
  opacity: 0.0;
  transition: opacity 0.2s ease;
}
.feature:hover::before { opacity: 0.85; }

.feature .ic {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: rgba(246,168,106,0.12);
  border: 1px solid rgba(246,168,106,0.22);
  margin-bottom: 1.05rem;
}
.feature .ic svg { width: 22px; height: 22px; stroke: var(--dusk-orange); fill: none; }
.feature h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.24rem;
  letter-spacing: -0.01em;
  margin: 0 0 0.45rem;
  color: var(--ink);
}
.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 0.985rem;
  line-height: 1.58;
}

/* highlight the Premium card */
.feature.is-premium {
  background:
    linear-gradient(180deg, rgba(246,168,106,0.10), rgba(233,138,176,0.07)),
    var(--night-2);
  border-color: rgba(233,138,176,0.30);
}
.feature.is-premium .ic {
  background: rgba(233,138,176,0.16);
  border-color: rgba(233,138,176,0.32);
}
.feature.is-premium .ic svg { stroke: var(--dusk-pink); }
.feature .tag {
  display: inline-block;
  margin-top: 0.85rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--night);
  background: var(--dusk-grad);
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
}

/* ---------- Closing band ---------- */
.band {
  text-align: center;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding-block: clamp(3rem, 8vw, 4.5rem);
}
.band h2 {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.5rem, 5vw, 2.3rem);
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 auto;
  max-width: 22ch;
}
.band .cta-row { margin-top: 1.8rem; }

/* ---------- Article (privacy / support) ---------- */
.page-hero {
  padding-top: clamp(2.75rem, 7vw, 4.25rem);
  padding-bottom: clamp(0.5rem, 2vw, 1rem);
}
.page-hero h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.2rem, 7vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}
.page-hero .lede {
  color: var(--muted);
  margin: 0.85rem 0 0;
  font-size: 1.08rem;
  max-width: 56ch;
}

.prose {
  max-width: 70ch;
  padding-bottom: clamp(3rem, 8vw, 5rem);
  color: var(--ink-soft);
}
.prose h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.4rem, 4vw, 1.85rem);
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 2.5rem 0 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hairline);
}
.prose h2:first-of-type { border-top: none; padding-top: 0; margin-top: 1.5rem; }
.prose h3 {
  font-family: var(--body);
  font-weight: 600;
  font-size: 1.06rem;
  color: var(--ink);
  margin: 1.6rem 0 0.4rem;
}
.prose p { margin: 0 0 1rem; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose ul {
  margin: 0 0 1.2rem;
  padding-left: 0;
  list-style: none;
}
.prose li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.55rem;
}
.prose li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.62em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--dusk-grad);
}
.prose .updated {
  display: inline-block;
  font-size: 0.86rem;
  color: var(--muted-2);
  letter-spacing: 0.02em;
  margin-bottom: 0.5rem;
}

/* contact / FAQ blocks on support page */
.contact-card {
  background: linear-gradient(180deg, rgba(246,168,106,0.10), rgba(233,138,176,0.06)), var(--night-2);
  border: 1px solid rgba(233,138,176,0.26);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
  margin: 0 0 2.5rem;
  max-width: 70ch;
}
.contact-card .eyebrow { margin-bottom: 0.5rem; }
.contact-card .email {
  font-family: var(--display);
  font-size: clamp(1.3rem, 4vw, 1.7rem);
  font-weight: 500;
  letter-spacing: -0.01em;
}
.contact-card p { margin: 0.4rem 0 0; color: var(--muted); }

.faq {
  max-width: 70ch;
  display: grid;
  gap: 0.85rem;
}
details.qa {
  background: linear-gradient(180deg, rgba(39,35,72,0.45), rgba(30,27,58,0.7));
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 0 1.3rem;
  transition: border-color 0.2s ease;
}
details.qa[open] { border-color: var(--hairline-2); }
details.qa summary {
  list-style: none;
  cursor: pointer;
  font-family: var(--body);
  font-weight: 600;
  font-size: 1.04rem;
  color: var(--ink);
  padding: 1.05rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary .plus {
  flex: none;
  width: 20px; height: 20px;
  position: relative;
  transition: transform 0.25s ease;
}
details.qa summary .plus::before,
details.qa summary .plus::after {
  content: "";
  position: absolute;
  inset: 50% 0 auto 0;
  height: 1.5px;
  background: var(--dusk-orange);
  transform: translateY(-50%);
}
details.qa summary .plus::after { transform: translateY(-50%) rotate(90deg); transition: transform 0.25s ease; }
details.qa[open] summary .plus::after { transform: translateY(-50%) rotate(0deg); }
details.qa .answer {
  color: var(--muted);
  padding: 0 0 1.15rem;
  margin-top: -0.2rem;
  font-size: 0.99rem;
  max-width: 60ch;
}
details.qa .answer a { font-weight: 500; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding-block: 2.5rem 3rem;
  margin-top: clamp(2rem, 6vw, 4rem);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}
.site-footer .brand {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.site-footer .brand .glyph {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--dusk-grad);
  flex: none;
}
.footer-links {
  display: flex;
  gap: 1.5rem;
  font-size: 0.95rem;
}
.footer-links a { color: var(--muted); font-weight: 500; }
.footer-links a:hover { color: var(--ink); }
.site-footer .copy {
  width: 100%;
  color: var(--muted-2);
  font-size: 0.85rem;
  letter-spacing: 0.01em;
  margin-top: 0.25rem;
}

/* ---------- Responsive ---------- */
@media (min-width: 680px) {
  .features { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 980px) {
  .features { grid-template-columns: repeat(3, 1fr); }
  .feature.is-premium { grid-column: span 1; }
}

/* ---------- Motion / a11y ---------- */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
