/* Ovila — landing page. Tokens follow the app (Assets.xcassets):
   OvilaBlack #0D0D0D, OvilaCard #0F0F0F, OvilaWhite #F9F9F9,
   highlights Blue #AFD4FF, Green #C6FFCF, Orange #FFB984. */

.landing {
  --white: #f9f9f9;
  --card: #0f0f0f;
  --muted: rgba(249, 249, 249, 0.6);
  --faint: rgba(249, 249, 249, 0.15);
  --border: rgba(249, 249, 249, 0.1);
  --blue: #afd4ff;
  --green: #c6ffcf;
  --orange: #ffb984;
  --radius: 22px;
  --max: 1160px;
  color: var(--white);
  line-height: 1.45;
  overflow-x: hidden;
}

.landing ::selection { background: var(--white); color: #0d0d0d; }

.hl-blue { color: var(--blue); }
.hl-green { color: var(--green); }
.hl-orange { color: var(--orange); }

.nav, main, .footer { position: relative; z-index: 1; }

/* ---------- Day symbols ---------- */
.ds { display: block; width: 24px; height: 24px; color: var(--white); }
.ds.hl-blue { color: var(--blue); }
.ds.hl-green { color: var(--green); }
.ds.hl-orange { color: var(--orange); }

/* ---------- Nav ---------- */
.nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px var(--gutter);
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav__links {
  display: flex;
  gap: 28px;
  margin-left: auto;
  font-size: 14px;
}
.nav__links a,
.footer__links a {
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s ease;
}
.nav__links a:hover,
.footer__links a:hover { color: var(--white); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font);
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.btn:active { transform: scale(0.98); }

/* The outlined button from the app (Save / Continue) */
.btn--outline {
  border: 1px solid var(--white);
  color: var(--white);
  padding: 8px 28px;
  font-size: 15px;
}
.btn--outline:hover { background: var(--white); color: #0d0d0d; }
.btn--small { padding: 7px 18px; font-size: 14px; }

/* White App Store button, like "Continue with Apple" in onboarding */
.btn--appstore {
  background: var(--white);
  color: #0d0d0d;
  border-radius: 12px;
  padding: 11px 22px 11px 18px;
  min-height: 56px;
}
.btn--appstore:hover { background: #fff; transform: translateY(-1px); }
.btn--appstore span {
  display: flex;
  flex-direction: column;
  text-align: left;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.btn--appstore small { font-size: 11px; font-weight: 400; letter-spacing: 0; }
.btn__apple { width: 20px; height: 24px; flex: none; }

.cta { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.cta--center { align-items: center; }
.cta__note { margin: 0; font-size: 14px; color: var(--muted); }

/* ---------- Shared bits ---------- */
.label,
.eyebrow {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--muted);
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* The app's glass box around today's symbol */
.glass {
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: rgba(249, 249, 249, 0.04);
  border: 1px solid rgba(249, 249, 249, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 4px 18px rgba(0, 0, 0, 0.4);
}

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(80px, 12vw, 150px) var(--gutter) 0;
}

/* Centred section heading (How it works) */
.section-title { text-align: center; margin-bottom: clamp(36px, 5vw, 64px); }

h1, h2, h3 { font-weight: 400; margin: 0; letter-spacing: -0.01em; }

h2 {
  font-size: clamp(30px, 4.4vw, 48px);
  line-height: 1.15;
}

/* ---------- Hero ---------- */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(40px, 8vw, 96px) var(--gutter) 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}
.hero__title {
  font-size: clamp(38px, 5.2vw, 66px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.hero__lede {
  margin: 28px 0 36px;
  max-width: 34em;
  font-size: clamp(16px, 1.5vw, 18px);
  color: var(--muted);
}

/* The galaxy (same video as the old homepage), rotated and faded at the edges */
.hero__galaxy {
  position: relative;
  width: 100%;
  max-width: 620px;
  justify-self: center;
  aspect-ratio: 1;
  transform: rotate(30deg) scale(1.15);
  -webkit-mask-image: radial-gradient(closest-side, #000 45%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 45%, transparent 100%);
  pointer-events: none;
}
/* Desktop: 20% bigger. Only the transform grows, so the layout and the gap
   to "How it works" stay the same; the text sits above the video. */
@media (min-width: 961px) {
  .hero__galaxy { transform: rotate(30deg) scale(1.38); }
}
.hero__copy { position: relative; z-index: 1; }
/* Keep the enlarged galaxy from causing sideways scroll */
main { overflow-x: clip; }
.hero__galaxy video { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Steps ---------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
}
.step h3 { font-size: 20px; margin: 28px 0 10px; }
.step__n { color: var(--muted); }
.step p { margin: 0; color: var(--muted); font-size: 15px; max-width: 30em; }

.mock {
  aspect-ratio: 4 / 5;
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}
.mock__date { margin: 0 0 20px; font-size: 13px; }

.symbol-strip {
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.symbol-strip .ds { width: 26px; height: 26px; }
.symbol-strip .glass { width: 48px; height: 48px; }
.symbol-strip .glass .ds { width: 30px; height: 30px; }
.ds--near { opacity: 0.3; }
.ds--far { opacity: 0.1; }
.ds--future { transform: scale(0.6) rotate(24deg); }

/* The note card over the photos. Positions match the app (DayEntryView + CardPhotos),
   measured on the photo layer image (905 x 958). */
.mock--day { background: #0e0e0e; }
.entry-stage {
  position: relative;
  width: 100%;
  max-width: 300px;
  margin-top: auto;
  container-type: inline-size;
}
.entry-stage__photos { display: block; width: 100%; height: auto; }
.entry {
  position: absolute;
  left: 10.6%;
  top: 15.9%;
  width: 78.3%;
  bottom: 0;
  background: #121212;
  border: 1px solid #323232;
  border-radius: 1.7cqw;
  padding: 5.4cqw 5.4cqw;
}
.entry__text {
  margin: 0;
  font-size: 13px;
  font-size: 4.55cqw;
  line-height: 1.28;
  color: var(--white);
}
.entry__button {
  position: absolute;
  right: 3.2cqw;
  bottom: 3.2cqw;
  width: 11.8cqw;
  height: 11.8cqw;
}
.caret {
  display: inline-block;
  width: 1px;
  height: 1.1em;
  margin-left: 1px;
  vertical-align: -0.2em;
  background: var(--white);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* Quote screen: share and close circles, day count, symbol, thought, author */
.mock--quote { text-align: center; padding: 16px 16px 30px; }
.mock--quote p { color: var(--white); max-width: none; }
.quote__bar { width: 100%; display: flex; justify-content: space-between; }
.circle-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(249, 249, 249, 0.02);
  border: 1px solid rgba(249, 249, 249, 0.2);
}
.circle-icon img { width: 16px; height: 16px; }
.mock--quote .quote__day { margin: 6px 0 0; font-size: 14px; }
.quote__body {
  margin: auto 0;
  padding: 24px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.ds--big { width: 52px; height: 52px; margin-bottom: 14px; }
.mock--quote .quote__kicker { margin: 0 0 8px; font-size: 12px; color: rgba(249, 249, 249, 0.4); }
.mock--quote .quote__text { margin: 0; font-size: clamp(18px, 1.7vw, 21px); line-height: 1.3; }
.mock--quote .quote__by { margin: 0; font-size: 14px; color: var(--blue); }

/* Step 3: the year, 20 symbols to a row like the large widget */
.year-grid {
  width: 100%;
  margin: auto 0;
  display: grid;
  grid-template-columns: repeat(20, minmax(0, 1fr));
  gap: 3px 1px;
}
.year-grid .ds { width: 100%; height: auto; aspect-ratio: 1; }
.year-grid .ds--star { opacity: 0.15; transform: scale(0.55) rotate(var(--r, 0deg)); }
.year-grid .ds--day { opacity: 0; transform: scale(0.4); transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.2, 1.6, 0.4, 1); }
.year-grid .ds--day.on { opacity: 1; transform: none; }
.year-grid .ds--today.on { filter: drop-shadow(0 0 4px rgba(249, 249, 249, 0.8)); }
.year-caption { width: 100%; margin: 18px 0 0; display: flex; justify-content: space-between; font-size: 13px; }
.mock--year .year-caption { color: var(--white); }

/* ---------- Features: four cards, the fifth full width under them ---------- */
.features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 20px);
}
.feature {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: clamp(22px, 2.4vw, 30px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.feature__icon {
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(249, 249, 249, 0.02);
}
.feature--wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 52px 1fr;
  grid-template-rows: auto auto;
  column-gap: 22px;
  row-gap: 6px;
  align-items: center;
}
.feature--wide .feature__icon { grid-row: 1 / 3; margin-bottom: 0; }
.feature--wide h3 { align-self: end; }
.feature--wide p { align-self: start; }
.feature__icon img { width: 26px; height: 26px; }
.feature__icon .ds { width: 28px; height: 28px; }
.feature__icon .ds--star { width: 26px; height: 26px; }
.feature__icon--trio { display: flex; gap: 2px; justify-content: center; align-items: center; }
.feature__icon--trio .ds { width: 15px; height: 15px; }
.feature h3 { font-size: 18px; margin: 0; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }
.feature p .hl-blue { color: var(--blue); }
.feature p .hl-green { color: var(--green); }
.feature p .hl-orange { color: var(--orange); }

/* ---------- Privacy ---------- */
.privacy { text-align: center; display: flex; flex-direction: column; align-items: center; }
.privacy__icon { margin-bottom: 26px; }
.privacy h2 { max-width: 14em; margin-bottom: 28px; }
.privacy__body { max-width: 36em; margin: 0; color: var(--muted); font-size: clamp(15px, 1.4vw, 17px); }

/* ---------- FAQ ---------- */
.faq__label { text-align: center; }
.faq__list { border-top: 1px solid var(--border); max-width: 820px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 24px 40px 24px 0;
  position: relative;
  font-size: 18px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  color: var(--muted);
  transition: transform 0.25s ease;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { margin: 0 0 24px; color: var(--muted); max-width: 40em; }
.faq summary:focus-visible { outline: 1px solid var(--white); outline-offset: 4px; }

/* ---------- Final CTA ---------- */
.final {
  position: relative;
  margin-top: clamp(80px, 12vw, 150px);
  min-height: clamp(560px, 82vh, 780px);
  display: grid;
  place-items: start center;
  padding-top: clamp(40px, 6vw, 80px);
  overflow: hidden;
  text-align: center;
}
.final__galaxy {
  position: absolute;
  left: 50%;
  top: calc(66% - 50px);
  width: min(700px, 112vw);
  aspect-ratio: 1;
  transform: translate(-50%, -50%) rotate(30deg);
  -webkit-mask-image: radial-gradient(closest-side, #000 40%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 40%, transparent 100%);
  opacity: 0.9;
}
.final__galaxy video { width: 100%; height: 100%; object-fit: cover; display: block; }
.final__content { position: relative; padding: 0 var(--gutter); }
.final h2 { margin-bottom: 36px; font-size: clamp(32px, 5vw, 56px); }

/* ---------- Footer ---------- */
.footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px var(--gutter) max(40px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 24px 40px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  font-size: 14px;
}
.footer__links { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.footer__copy { margin: 0 0 0 auto; color: var(--muted); }

/* ---------- Scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.js .steps .reveal:nth-child(2) { transition-delay: 0.1s; }
.js .steps .reveal:nth-child(3) { transition-delay: 0.2s; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; }
  .hero__galaxy { max-width: 520px; margin-top: -40px; }
  .steps { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mock { aspect-ratio: auto; min-height: 320px; }
}

@media (max-width: 700px) {
  .nav { padding-top: 20px; padding-bottom: 20px; }
  .nav__links { display: none; }
  .nav .btn--small { margin-left: auto; }
  .steps { row-gap: 50px; }
  .features { grid-template-columns: 1fr; }
  .feature--wide { display: flex; align-items: stretch; }
  .feature--wide h3, .feature--wide p { align-self: auto; }
  .feature--wide .feature__icon { margin-bottom: 18px; }
  .footer { flex-direction: column; align-items: flex-start; }
  .footer__copy { margin: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .caret { animation: none; }
  .year-grid .ds--day { opacity: 1; transform: none; transition: none; }
}
