/* Fortune Fold — landing, privacy, and support pages.
   Layout follows the AmpWidgets product page (ampwidgets.northboundhouse.com);
   colors are the app's Classic Gold theme, with Midnight for dark mode. */

:root {
  /* BRAND (Theme.swift: Classic Gold) */
  --bg:         #FFF8EE; /* tablecloth */
  --bg-soft:    #F5EADB;
  --card:       #FFFFFF; /* fortune slip */
  --text:       #32251E; /* ink */
  --text-muted: #6B5547;
  --primary:    #C0302A; /* slip red */
  --border:     rgba(50, 37, 30, 0.12);
  --shadow:     0 1px 2px rgba(43, 22, 10, 0.18), 0 10px 28px rgba(43, 22, 10, 0.12);

  --serif: 'Source Serif 4', 'New York', Georgia, serif;
  --sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;

  /* LAYOUT */
  --header-h:      64px;
  --max-w:       1100px;
  --pad:           24px;
  --appstore-h:    54px;
  --video-radius:  22px;
  --video-tall-reserve: 230px; /* portrait: height kept for headline + App Store button */
  --video-wide-reserve: 120px; /* landscape: height kept free around the reel */
  --video-min-width:    220px;
  --ease: 0.2s ease;
}

/* Midnight theme */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:         #161321;
    --bg-soft:    #1F1A2E;
    --card:       #241E33;
    --text:       #F4ECDF;
    --text-muted: #BDB2CF;
    --primary:    #E58B6B;
    --border:     rgba(244, 236, 223, 0.12);
    --shadow:     0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 28px rgba(0, 0, 0, 0.35);
  }
}

@media (max-width: 640px) {
  :root { --header-h: 56px; --pad: 16px; --video-radius: 18px; --video-tall-reserve: 320px; }
  .nav-back-long { display: none; }
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { color-scheme: light dark; }
body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }

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

/* =============================================
   HEADER
   ============================================= */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--header-h);
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.15rem;
  transition: opacity var(--ease);
}
.nav-brand span { white-space: nowrap; }
.nav-brand:hover { opacity: 0.7; }
.nav-brand img { width: 36px; height: 36px; border-radius: 22%; }
.nav-back { white-space: nowrap; font-size: 0.875rem; font-weight: 500; color: var(--text-muted); transition: color var(--ease); }
.nav-back:hover { color: var(--primary); }

/* =============================================
   HERO — copy + launch video
   Stacked by default (headline → video → button); side by side on wide landscape screens.
   ============================================= */
.hero { padding: 24px 0 48px; }
.hero-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.hero-copy { display: contents; }
.hero-icon { display: none; }

.hero h1 {
  order: 1;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(32px, 7vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.hero h1 em { color: var(--primary); font-style: italic; }
.hero-tagline {
  order: 2;
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  color: var(--text-muted);
  margin-bottom: 18px;
}
.hero-media    { order: 3; }
.hero-actions  { order: 4; margin-top: 20px; }
.platforms     { order: 5; margin-top: 16px; }
.hero-description { order: 6; max-width: 440px; margin: 18px auto 0; font-size: 17px; color: var(--text-muted); }

.btn-appstore { display: inline-block; transition: transform var(--ease), opacity var(--ease); }
.btn-appstore:hover { transform: translateY(-1px); opacity: 0.9; }
.btn-appstore img { height: var(--appstore-h); width: auto; }

.platforms {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ---- The video (9:16 cut) ---- */
.hero-media {
  position: relative;
  flex: none;
  aspect-ratio: 9 / 16;
  width: min(100%, max(var(--video-min-width), calc((100vh - var(--header-h) - var(--video-tall-reserve)) * 9 / 16)));
  width: min(100%, max(var(--video-min-width), calc((100svh - var(--header-h) - var(--video-tall-reserve)) * 9 / 16)));
  border-radius: var(--video-radius);
  overflow: hidden;
  background: #EFE4D4;
  box-shadow: var(--shadow);
}
.hero-video { display: block; width: 100%; height: 100%; object-fit: cover; }

.video-sound {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 0;
  border-radius: 100px;
  background: rgba(50, 37, 30, 0.72);
  color: #fff;
  font: 600 14px var(--sans);
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background var(--ease);
}
.video-sound[hidden] { display: none; }
.video-sound:hover { background: rgba(50, 37, 30, 0.88); }
.video-sound:focus-visible { outline-color: #fff; }
.video-sound-icon { width: 18px; height: 18px; }
.video-sound .wave { display: none; }
.video-sound.is-on .wave { display: inline; }
.video-sound.is-on .mute { display: none; }

@media (min-width: 760px) and (orientation: landscape) {
  .hero {
    padding: 32px 0;
    min-height: calc(100vh - var(--header-h));
    min-height: calc(100svh - var(--header-h));
    display: flex;
    align-items: center;
  }
  .hero-grid {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 64px;
    align-items: center;
    text-align: left;
  }
  .hero-copy { display: flex; flex-direction: column; align-items: flex-start; }
  .hero-icon {
    display: block;
    width: 76px;
    height: 76px;
    border-radius: 22%;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
  }
  .hero h1 { font-size: clamp(36px, 4.6vw, 60px); margin-bottom: 10px; }
  .hero-tagline { margin-bottom: 14px; }
  .hero-description { order: 3; margin: 0 0 28px; }
  .hero-actions { order: 4; margin: 0; }
  .platforms { order: 5; }
  .hero-media {
    width: max(var(--video-min-width), calc((100vh - var(--header-h) - var(--video-wide-reserve)) * 9 / 16));
    width: max(var(--video-min-width), calc((100svh - var(--header-h) - var(--video-wide-reserve)) * 9 / 16));
  }
}

/* =============================================
   FEATURES — three fortune slips
   ============================================= */
.features { padding: 56px 0; background: var(--bg-soft); border-top: 1px solid var(--border); }
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.feature-card {
  background: var(--card);
  border-radius: 6px;
  padding: 22px 24px;
  box-shadow: var(--shadow);
}
.feature-card h3 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 6px;
}
.feature-card p { font-size: 15px; color: var(--text-muted); }
.disclaimer { margin-top: 28px; text-align: center; font-size: 13px; color: var(--text-muted); }

@media (max-width: 760px) {
  .features-grid { grid-template-columns: 1fr; }
}

/* =============================================
   CTA
   ============================================= */
.cta-section { padding: 56px 0; text-align: center; }
.cta-section h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(26px, 4vw, 34px); margin-bottom: 20px; }

/* =============================================
   DOCUMENT PAGES — privacy, support
   ============================================= */
.doc { max-width: 680px; margin: 0 auto; padding: 48px var(--pad) 72px; }
.doc h1 { font-family: var(--serif); font-size: 36px; line-height: 1.2; font-weight: 600; margin-bottom: 6px; }
.doc h2 { font-family: var(--serif); font-size: 22px; font-weight: 600; margin: 36px 0 8px; }
.doc p { margin-bottom: 12px; }
.doc a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.doc .meta { color: var(--text-muted); margin-bottom: 32px; }
.slip {
  background: var(--card);
  color: var(--primary);
  border-radius: 4px;
  padding: 16px 20px;
  box-shadow: var(--shadow);
}

/* =============================================
   FOOTER
   ============================================= */
.footer { border-top: 1px solid var(--border); padding: 32px var(--pad) 40px; text-align: center; font-size: 14px; color: var(--text-muted); }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; margin: 10px 0; }
.footer a { color: var(--text); font-weight: 500; transition: color var(--ease); }
.footer a:hover { color: var(--primary); }
