/* =========================================================
   Remind Me Daily — marketing site styles
   Brand tokens pulled from the app's DesignSystem.swift (RMDColors).
   No frameworks, no runtime, no trackers.
   ========================================================= */

:root {
  /* Backgrounds — warm ivory / parchment */
  --bg:            #F7EDD5;
  --bg-raised:     #EDE0C0;
  --bg-sunken:     #DFD0A8;

  /* Accent — devotional purple */
  --accent:        #6B4A9B;
  --accent-soft:   #9B7EC8;
  --accent-light:  #EAE4F5;
  --ribbon:        #8B5DB5;

  /* Leather — warm brown */
  --leather:       #7A4E2D;
  --leather-soft:  #A0714A;

  /* Verse card */
  --verse-card:        #F2E4C0;
  --verse-card-border: #C8A87A;
  --verse-text:        #2A1A0A;
  --verse-ref:         #8A6A4A;

  /* Text */
  --text:           #2A1A0A;
  --text-secondary: #7A5A3A;
  --text-muted:     #B09070; /* large/decorative only — borderline contrast on --bg */

  /* Lines & status */
  --divider:     #D0C0A0;
  --success:     #4A7A5A;
  --destructive: #9A3A28;

  /* Shape */
  --radius-card: 12px;
  --radius-btn:  10px;
  --maxw:        72ch;
  --maxw-wide:   1080px;

  --serif:  Georgia, "Times New Roman", serif;
  --sans:   "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --script: "Caveat", Georgia, serif;
}

/* ----- Reset-ish ----- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--ribbon); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--serif); color: var(--text); line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 .4em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); margin: 2.2em 0 .6em; }
h3 { font-size: 1.2rem; margin: 0 0 .4em; }

.container { width: 100%; max-width: var(--maxw-wide); margin: 0 auto; padding: 0 20px; }
.prose     { max-width: var(--maxw); }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--accent); color: #fff; padding: 10px 16px;
  border-radius: 0 0 var(--radius-btn) 0; z-index: 100;
}
.skip-link:focus { left: 0; }

/* ----- Header / nav ----- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--divider);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 12px 20px; max-width: var(--maxw-wide); margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; color: var(--text); }
.nav-links { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; color: var(--text-secondary); font-weight: 700; }
.nav-links a:hover { color: var(--accent); }

/* ----- Buttons ----- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-weight: 800; font-size: 1rem;
  padding: 12px 22px; border-radius: var(--radius-btn);
  text-decoration: none; cursor: pointer; border: 2px solid transparent;
  transition: transform .12s ease, background .12s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--ribbon); color: #fff; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--accent); border-color: var(--accent-soft); }
.btn-ghost:hover { background: var(--accent-light); color: var(--accent); }

/* App Store badge placeholder */
.appstore-badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: #000; color: #fff; text-decoration: none;
  padding: 10px 18px; border-radius: 10px; font-weight: 700;
}
.appstore-badge small { display: block; font-size: .7rem; font-weight: 600; opacity: .8; line-height: 1; }
.appstore-badge span  { font-size: 1.15rem; line-height: 1.1; }
.appstore-note { font-size: .8rem; color: var(--text-secondary); margin-top: 8px; }

/* ----- Hero ----- */
.hero { text-align: center; padding: 64px 0 40px; }
.hero img.app-icon {
  width: 124px; height: 124px; margin: 0 auto 18px;
  filter: drop-shadow(0 8px 16px rgba(42,26,10,.22));
}
.hero h1 { margin-bottom: .2em; }
.tagline { font-size: clamp(1.15rem, 2.5vw, 1.5rem); color: var(--text-secondary); font-weight: 700; margin: 0 auto .8em; max-width: 30ch; }
.subhead { font-size: 1.1rem; color: var(--text-secondary); max-width: 52ch; margin: 0 auto 1.6em; }
.hero-verse {
  font-family: var(--script); font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: var(--accent); margin: 1.2em auto .2em; max-width: 40ch; line-height: 1.3;
}
.hero-verse + .verse-ref { color: var(--verse-ref); font-style: italic; font-family: var(--serif); }
.hero-cta { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 28px; }

/* ----- Generic sections ----- */
.section { padding: 40px 0; }
.section-tight { padding: 28px 0; }
.section h2 { text-align: center; margin-top: 0; }
.lead { text-align: center; max-width: 56ch; margin: 0 auto; color: var(--text-secondary); font-size: 1.1rem; }

/* ----- Feature cards ----- */
.cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 28px; }
.card {
  background: var(--bg-raised); border: 1px solid var(--divider);
  border-radius: var(--radius-card); padding: 22px;
  box-shadow: 0 2px 10px rgba(42,26,10,.05);
}
.card .ico { font-size: 1.6rem; margin-bottom: 8px; display: block; }
.card h3 { font-family: var(--sans); font-weight: 800; font-size: 1.05rem; color: var(--accent); }
.card p { margin: 0; color: var(--text-secondary); font-size: .98rem; }

/* ----- Privacy strip ----- */
.strip {
  background: var(--accent-light); border: 1px solid var(--accent-soft);
  border-radius: var(--radius-card); padding: 28px; text-align: center; margin: 8px 0;
}
.strip p { margin: 0 auto; max-width: 56ch; color: var(--text); font-size: 1.05rem; }

/* ----- Screenshots ----- */
.shots { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-top: 32px; }
.shot { margin: 0; text-align: center; }
.shot .device {
  max-width: 260px; margin: 0 auto; padding: 8px;
  background: var(--leather); border-radius: 34px;
  box-shadow: 0 12px 30px rgba(42,26,10,.20);
}
.shot .device img {
  width: 100%; height: auto; display: block;
  border-radius: 26px; border: 1px solid rgba(42,26,10,.15);
}
.shot figcaption {
  margin-top: 14px; color: var(--text-secondary);
  font-size: .95rem; max-width: 30ch; margin-left: auto; margin-right: auto;
}

/* ----- Verse card (used on privacy/support headers) ----- */
.verse-card {
  background: var(--verse-card); border: 1px solid var(--verse-card-border);
  border-radius: var(--radius-card); padding: 24px 28px; margin: 20px 0;
}
.verse-card .v { font-family: var(--serif); font-size: 1.3rem; color: var(--verse-text); }
.verse-card .r { color: var(--verse-ref); font-style: italic; margin-top: 6px; }

/* ----- Long-form (privacy / support / terms) ----- */
.doc { padding: 48px 0 24px; }
.doc h1 { text-align: left; }
.doc .updated { color: var(--text-secondary); font-style: italic; margin-top: -.4em; }
.doc h2 { margin-top: 1.8em; font-size: 1.4rem; }
.doc p, .doc li { color: var(--text); }
.doc ul { padding-left: 1.2em; }
.doc li { margin: .3em 0; }
.doc .placeholder {
  background: #fff6d8; border: 1px dashed var(--leather-soft);
  padding: 1px 6px; border-radius: 4px; font-style: italic; color: var(--leather);
}
.toc {
  background: var(--bg-raised); border: 1px solid var(--divider);
  border-radius: var(--radius-card); padding: 18px 22px; margin: 24px 0;
}
.toc strong { display: block; margin-bottom: 8px; font-family: var(--serif); }
.toc ol { margin: 0; padding-left: 1.2em; columns: 2; column-gap: 28px; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* FAQ */
.faq { margin-top: 20px; }
.faq details {
  background: var(--bg-raised); border: 1px solid var(--divider);
  border-radius: var(--radius-card); padding: 4px 20px; margin-bottom: 12px;
}
.faq summary {
  cursor: pointer; font-weight: 800; padding: 14px 0; list-style: none;
  font-family: var(--sans); color: var(--text);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--accent); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "\2013"; }
.faq details p { margin: 0 0 16px; color: var(--text-secondary); }

/* ----- Footer ----- */
.site-footer {
  border-top: 1px solid var(--divider); margin-top: 48px;
  padding: 32px 0; background: var(--bg-raised);
}
.footer-inner { text-align: center; color: var(--text-secondary); font-size: .92rem; }
.footer-links { list-style: none; display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; padding: 0; margin: 0 0 12px; }
.footer-links a { text-decoration: none; font-weight: 700; color: var(--text-secondary); }
.footer-links a:hover { color: var(--accent); }
.footer-made { margin-top: 6px; }

/* ----- 404 ----- */
.notfound { text-align: center; padding: 80px 0; }

/* ----- Mobile nav ----- */
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; }
@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 100%; right: 0; left: 0;
    flex-direction: column; gap: 0; background: var(--bg);
    border-bottom: 1px solid var(--divider); padding: 8px 20px 16px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; border-bottom: 1px solid var(--divider); }
  .toc ol { columns: 1; }
}
