/* =========================================================================
   Coven: base tokens and landing page styles.
   Palette mirrors the app (Assets.xcassets/Colors): dark purple page,
   off-white ink, salmon for calls to action, beige and lavender accents.
   Display font is the app's Berkshire Swash, body font the app's Nunito.
   ========================================================================= */

@font-face {
  font-family: "Berkshire Swash";
  src: url("/assets/fonts/BerkshireSwash-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("/assets/fonts/Nunito-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("/assets/fonts/Nunito-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("/assets/fonts/Nunito-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("/assets/fonts/Nunito-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* The app is dark mode only, so the site has one theme. */
:root {
  color-scheme: dark;
  --bg: #190923;                          /* WiccaDarkPurple */
  --surface: rgba(25, 9, 35, 0.86);
  --surface-strong: #12061A;
  --card: rgba(237, 235, 247, 0.06);
  --ink: #EDEBF7;                         /* WiccaOffWhite */
  --ink-70: rgba(237, 235, 247, 0.78);
  --ink-50: rgba(237, 235, 247, 0.6);
  --ink-35: rgba(237, 235, 247, 0.46);
  --accent: #FF9472;                      /* WiccaSalmon */
  --beige: #E2CDB9;                       /* WiccaBeige */
  --lavender: #C4BEE7;                    /* WiccaLightPurple */
  --line: rgba(226, 205, 185, 0.14);
  --line-strong: rgba(226, 205, 185, 0.26);
  --frost: rgba(237, 235, 247, 0.07);
  --frost-strong: rgba(237, 235, 247, 0.13);
  --display: "Berkshire Swash", Georgia, "Times New Roman", serif;
  --body: "Nunito", -apple-system, BlinkMacSystemFont, "Avenir Next", Avenir, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(0.25, 0.8, 0.35, 1);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
}

a { color: var(--accent); }

/* ------------------------------ Landing ------------------------------- */
/* landing main: fill viewport height so the footer pins to the bottom */
.page-main { flex: 1 0 auto; }

/* Fireflies (js/fireflies.js) float on a fixed canvas between the page
   backgrounds and the content, like the dots behind the cards on the app's
   Today tab. The hero image is a plain background (no position), so the canvas
   paints over it; the content blocks sit above the canvas. */
#fireflies {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.hero,
.screens,
.altar,
.features,
.honest-note,
.legal-footer {
  position: relative;
  z-index: 1;
}

/* Hero: the night forest fills the first screen and fades into the page colour,
   so the screenshots below seem to sit on the forest floor. */
.hero-wrap {
  display: flex;
  align-items: center;
  margin-top: -1px;
  background-color: var(--bg);
  background-image:
    linear-gradient(180deg, rgba(25, 9, 35, 0.30) 0%, rgba(25, 9, 35, 0.50) 45%, rgba(25, 9, 35, 0.72) 82%, var(--bg) 100%),
    image-set(url("/assets/art/hero-forest-2560.jpg?v=1") 1x, url("/assets/art/hero-forest-3840.jpg?v=1") 2x);
  background-size: cover;
  background-position: center 30%;
}
@media (max-width: 760px) {
  .hero-wrap {
    min-height: auto;
    background-image:
      linear-gradient(180deg, rgba(25, 9, 35, 0.36) 0%, rgba(25, 9, 35, 0.58) 45%, rgba(25, 9, 35, 0.9) 80%, var(--bg) 100%),
      image-set(url("/assets/art/hero-forest-1280.jpg?v=1") 1x, url("/assets/art/hero-forest-2560.jpg?v=1") 2x);
  }
}
@media (min-width: 2200px) {
  .hero-wrap {
    background-image:
      linear-gradient(180deg, rgba(25, 9, 35, 0.30) 0%, rgba(25, 9, 35, 0.50) 45%, rgba(25, 9, 35, 0.72) 82%, var(--bg) 100%),
      url("/assets/art/hero-forest-3840.jpg?v=1");
  }
}

.hero {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: 150px 24px 230px;
  text-align: center;
  text-shadow: 0 2px 24px rgba(25, 9, 35, 0.8);
}
@media (max-width: 760px) {
  .hero { padding: 72px 20px 48px; }
}
.hero-icon {
  width: 108px;
  height: 108px;
  border-radius: 24px;
  box-shadow: 0 0 0 1px var(--line-strong), 0 16px 48px rgba(196, 190, 231, 0.22);
}
.hero h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(40px, 6.4vw, 64px);
  line-height: 1.08;
  margin: 28px 0 16px;
  color: var(--ink);
  text-wrap: balance;
}
.hero .tagline {
  max-width: 580px;
  text-wrap: pretty;
  margin: 0 auto 32px;
  color: var(--ink-70);
  font-size: 18px;
}
/* Apple's official black badge (toolbox.marketingtools.apple.com), unaltered.
   Apple asks for at least 40px height on screen and clear space of a quarter of the
   badge height around it. */
.store-badge {
  display: inline-block;
  margin: 15px;
  line-height: 0;
  transition: transform 0.2s var(--ease);
}
.store-badge img {
  display: block;
  width: 180px;
  height: 60px;
}
.store-badge:hover {
  transform: translateY(-2px);
}

/* Screenshot strip: scrolls sideways on narrow screens, centers when it fits. */
.screens {
  display: flex;
  justify-content: flex-start;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 12px 24px 28px;
  -webkit-overflow-scrolling: touch;
}
.screen {
  flex: 0 0 auto;
  margin: 0;
  scroll-snap-align: center;
}
.screen img {
  display: block;
  width: 220px;
  height: auto;
  border-radius: 24px;
  border: 1px solid var(--line-strong);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
}
@media (min-width: 1000px) {
  .screens {
    justify-content: center;
    overflow: visible;
    margin-top: -190px;
  }
}

/* Altar band: soft edges blend the illustration's own background into the page. */
.altar {
  max-width: 980px;
  margin: 40px auto 0;
  padding: 0 24px;
}
.altar img {
  display: block;
  width: 100%;
  height: auto;
  -webkit-mask-image:
    linear-gradient(90deg, transparent 0%, #000 14%, #000 86%, transparent 100%),
    linear-gradient(180deg, transparent 0%, #000 16%, #000 80%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(90deg, transparent 0%, #000 14%, #000 86%, transparent 100%),
    linear-gradient(180deg, transparent 0%, #000 16%, #000 80%, transparent 100%);
  mask-composite: intersect;
}

.features {
  max-width: 980px;
  margin: 0 auto;
  padding: 40px 24px 56px;
  display: grid;
  gap: 18px;
}
@media (min-width: 760px) {
  .features { grid-template-columns: repeat(3, 1fr); }
}
.feature {
  padding: 24px 22px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  text-align: left;
}
.feature h3 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.25;
  color: var(--beige);
  text-wrap: balance;
}
.feature p {
  margin: 0;
  text-wrap: pretty;
  font-size: 15px;
  color: var(--ink-70);
}

.honest-note {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 24px 72px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-50);
}

/* Large desktop screens: scale the hero text and screenshots up with the room. */
@media (min-width: 1800px) {
  .hero { max-width: 900px; }
  .hero h1 { font-size: 76px; }
  .hero .tagline { max-width: 640px; font-size: 20px; }
  .screen img { width: 270px; }
  .features { max-width: 1120px; }
}
