/* ---------------------------------------------------------------------------
   Orbly — landing page (index.html) only. Legal pages use styles.css.
   Ported from "Landing — v2 (Orbly design system)". Light only, like the
   v1 app (userInterfaceStyle: "light"). No JS: entrance animations are CSS,
   scroll reveals use animation-timeline where the browser supports it.
--------------------------------------------------------------------------- */

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/fraunces-var.woff2") format("woff2");
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/dm-sans-var.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --ivory: #FBF7F5;
  --white: #FFFFFF;
  --ink: #3B2F3F;
  --muted: #6E5A86;
  --faint: #7B6B86;   /* 4.9:1 on white — the karaoke "unread" state */
  --border: #E7DDF0;
  --lavender: #C4A9E0;
  --lavender-deep: #8A6FA8;
  /* One step under --lavender-deep, for text. --lavender-deep is only 4.0:1 on
     ivory and 4.3:1 on white, which fails WCAG AA for body-sized text (4.5:1).
     This is the web's mirror of the app's accentDeep (#6E5490). */
  --lavender-ink: #6E5490;
  --blush: #DFA79A;
  --apricot: #F2C9A8;

  /* Tile palette. The backgrounds are the app's listen pastels
     (app/src/design/tokens.ts → methodTile); the inks are one step darker
     than the app's for blush, mint and pink, whose app values sit at 4.0–4.4:1
     and so fail WCAG AA for the small type that sits on them here. */
  --tile-lavender: #E6DAF2; --on-lavender: #6E4F94;
  --tile-peach:    #F7E1CF; --on-peach:    #7A5A3E;
  --tile-blush:    #F1D3CC; --on-blush:    #87493D;
  --tile-mint:     #DCEBDF; --on-mint:     #296B45;
  --tile-butter:   #F3E3B8; --on-butter:   #7A5C14;
  --tile-pink:     #F5D6E3; --on-pink:     #87415E;
  --tile-sky:      #D6E4F2; --on-sky:      #3F6390;

  --serif: "Fraunces", Georgia, serif;
  --sans: "DM Sans", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; overflow-x: clip; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font: 400 16px/1.5 var(--sans);
  overflow-x: clip; /* clip, not hidden: hidden still lets the page be scrolled sideways by script/anchors */
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul { margin: 0; }
a { color: var(--lavender-ink); text-decoration: none; }
a:hover { color: var(--ink); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--lavender-deep); outline-offset: 3px; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* -- Type ------------------------------------------------------------------ */

.display { font-family: var(--serif); font-weight: 600; }
.h-section { font-family: var(--serif); font-weight: 600; font-size: clamp(34px, 4.6vw, 54px); line-height: 1.06; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--lavender-ink); }
.lede { font-size: 18px; color: var(--muted); }
.center { text-align: center; }

.pill {
  display: inline-block; padding: 5px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 700;
  background: var(--tile, var(--tile-lavender)); color: var(--on, var(--on-lavender));
}

/* -- Tile palette: set --tile / --on on any element ------------------------- */

.t-lavender { --tile: var(--tile-lavender); --on: var(--on-lavender); }
.t-peach    { --tile: var(--tile-peach);    --on: var(--on-peach); }
.t-blush    { --tile: var(--tile-blush);    --on: var(--on-blush); }
.t-mint     { --tile: var(--tile-mint);     --on: var(--on-mint); }
.t-butter   { --tile: var(--tile-butter);   --on: var(--on-butter); }
.t-pink     { --tile: var(--tile-pink);     --on: var(--on-pink); }
.t-sky      { --tile: var(--tile-sky);      --on: var(--on-sky); }

/* -- Buttons ----------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 28px; border-radius: 999px;
  font: 700 16px/1.2 var(--sans);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--ink); color: var(--ivory); }
.btn--primary:hover { color: var(--ivory); box-shadow: 0 10px 24px rgba(59,47,63,.18); }
/* Secondary = white fill + ink label, with a lavender-deep border. The border
   is --lavender-deep, not --lavender, so the button edge clears the 3:1
   non-text contrast bar (WCAG 1.4.11) that a pale #C4A9E0 line would fail. */
.btn--secondary { background: var(--white); color: var(--ink); box-shadow: inset 0 0 0 1px var(--lavender-deep); }
.btn--secondary:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.btn--sm { min-height: 44px; padding: 0 22px; font-size: 15px; }

/* -- Orb ---------------------------------------------------------------------- */

.orb {
  display: block; border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, #FBF7F5 0%, #F2C9A8 28%, #DFA79A 56%, #8A6FA8 100%);
}
.orbglow {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(242,201,168,.55) 0%, rgba(223,167,154,.28) 38%, rgba(196,169,224,.18) 58%, rgba(251,247,245,0) 72%);
}

/* -- Nav ------------------------------------------------------------------------ */

.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 80px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand .orb { width: 30px; height: 30px; }
.brand__name { font: 600 26px/1 var(--serif); }
.nav__links { display: flex; gap: 32px; font-size: 15px; font-weight: 500; }
.nav__links a { color: var(--muted); }
.nav__links a:hover { color: var(--ink); }
@media (max-width: 760px) { .nav__links { display: none; } }

/* -- Hero ------------------------------------------------------------------------ */

.hero { position: relative; padding: 56px 0 104px; overflow-x: clip; } /* the glow overflows right */
.hero .orbglow { width: 980px; height: 980px; right: -260px; top: -240px; }
.hero__grid { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 64px; }
.hero__copy { flex: 1 1 500px; min-width: 0; }
.hero__badge {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: var(--tile-lavender); color: var(--on-lavender);
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.hero h1 { margin-top: 22px; font-size: clamp(46px, 6.6vw, 84px); line-height: 1.02; letter-spacing: -.02em; }
.hero__lede { margin-top: 24px; max-width: 520px; font-size: 19px; line-height: 1.55; color: var(--muted); }
.hero__proof { margin-top: 16px; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--lavender-ink); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero__note { margin-top: 18px; font-size: 13px; font-weight: 500; color: var(--muted); }
.hero__shot { flex: 0 1 380px; display: flex; justify-content: center; margin: 0 auto; }

/* Phone frame drawn in CSS around a raw simulator screenshot (1206×2622).
   Island size/position follow iPhone Pro proportions (126×37pt at y=11 on 402×874). */
.phone {
  position: relative; width: 100%; max-width: 340px;
  padding: 11px; border-radius: 58px;
  background: linear-gradient(145deg, #4A3D4F, #241C27 40%, #1B151D);
  box-shadow:
    inset 0 0 0 1.5px rgba(255,255,255,.14),
    0 0 0 1px rgba(59,47,63,.35),
    0 30px 80px rgba(110,90,134,.28);
}
.phone::before, .phone::after {           /* side buttons */
  content: ""; position: absolute; width: 3px; border-radius: 2px; background: #2E2532;
}
.phone::before { left: -3px; top: 21%; height: 11%; box-shadow: 0 -60px 0 0 #2E2532; }
.phone::after  { right: -3px; top: 27%; height: 15%; }
.phone__screen {
  position: relative; overflow: hidden; border-radius: 47px;
  aspect-ratio: 1206 / 2622; background: var(--ivory);
}
/* The img sits inside a <picture> so the hero can serve WebP with the JPEG as
   a fallback; the picture element is what fills the frame. */
.phone__screen picture { display: block; width: 100%; height: 100%; }
.phone__screen img { width: 100%; height: 100%; object-fit: cover; }
.phone__island {
  position: absolute; top: 1.3%; left: 50%; transform: translateX(-50%);
  width: 31%; height: 4.2%; border-radius: 999px; background: #0B080C;
}

/* -- Sections ---------------------------------------------------------------------- */

.section { padding: 0 0 96px; }
.section--feature { padding-bottom: 120px; }

.fields-head h2 { font-size: clamp(32px, 4vw, 44px); line-height: 1.1; }
.fields-head p { margin: 14px auto 0; max-width: 560px; font-size: 17px; color: var(--muted); }
.fields {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px; margin-top: 40px; padding: 0; list-style: none;
}
.fields li {
  min-height: 110px; padding: 20px; border-radius: 24px;
  background: var(--tile); color: var(--on); font-weight: 700;
  display: flex; flex-direction: column; justify-content: space-between;
}

/* Ritual — the one ink card */
.ritual {
  position: relative; overflow: hidden; border-radius: 28px;
  background: var(--ink); color: var(--ivory); padding: clamp(32px, 5vw, 64px);
}
.ritual .orbglow { width: 560px; height: 560px; right: -200px; top: -240px; opacity: .6; }
.ritual__inner { position: relative; }
.ritual .eyebrow { color: var(--apricot); }
.ritual h2 { margin-top: 12px; max-width: 640px; color: var(--ivory); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 40px; }
.step { border-radius: 24px; background: rgba(251,247,245,.07); border: 1px solid rgba(251,247,245,.14); padding: 24px; }
.step__n { font: 400 32px/1 var(--serif); color: var(--apricot); }
.step h3 { margin: 16px 0 6px; font-size: 18px; font-weight: 700; }
.step p { color: rgba(251,247,245,.82); }

.intro h2 { margin: 12px auto 0; max-width: 760px; }
.intro .lede { margin: 16px auto 0; max-width: 580px; }

/* Feature rows */
.feature { display: flex; flex-wrap: wrap; align-items: center; gap: 64px; }
.feature__copy { flex: 1 1 440px; min-width: 0; }
.feature__copy h2 { margin-top: 16px; }
.feature__copy .lede { margin-top: 18px; max-width: 520px; }
.checks { margin-top: 28px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; }
.checks svg { flex: none; margin-top: 2px; stroke: var(--on); }
.panel {
  flex: 1 1 420px; min-width: 0; min-height: 440px; padding: 40px;
  border-radius: 28px; background: var(--tile); color: var(--ink);
  display: flex; flex-direction: column; justify-content: center; gap: 12px;
}
@media (min-width: 941px) { .feature--flip .panel { order: -1; } }
@media (max-width: 520px) { .panel { padding: 24px; min-height: 0; } .feature { gap: 40px; } }

.card { border-radius: 24px; background: var(--white); padding: 22px 24px; }
.card--sm { border-radius: 18px; padding: 18px 20px; }
.card__label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--on); }
.card__title { margin-top: 6px; font: 600 24px/1.2 var(--serif); }
.card__meta { margin-top: 8px; font-size: 13px; font-weight: 500; color: var(--on); }

/* Visualize */
.panel--visual { align-items: center; gap: 32px; text-align: center; color: var(--on); }
.panel--visual .orb { width: 180px; height: 180px; }
.panel--visual .display { font-size: 32px; line-height: 1.1; }
.panel--visual p + p { margin-top: 8px; font-size: 15px; font-weight: 500; }

/* Affirmations */
.affirm { display: flex; align-items: center; gap: 16px; }
.affirm p, .affirm-line { font: 400 21px/1.3 var(--serif); }
.play {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  background: var(--tile); color: var(--on);
  display: flex; align-items: center; justify-content: center;
}
.card--fade1 { background: rgba(255,255,255,.7); margin-left: 24px; }
.card--fade2 { background: rgba(255,255,255,.5); margin-left: 48px; }

/* 369 */
.quote369 { margin-bottom: 4px; font: 400 24px/1.3 var(--serif); }
.count { display: flex; justify-content: space-between; font-size: 15px; font-weight: 700; }
.count span:last-child { color: var(--on); }
.dots { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.dots i { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--on); }
.dots i.on { background: var(--on); }

/* Vision board */
.board-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.board-head span { font-size: 13px; font-weight: 700; color: var(--on); }
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 4px; }
.board div {
  aspect-ratio: 1; border-radius: 18px; padding: 14px;
  background: var(--tile); color: var(--on); font-size: 13px; font-weight: 700;
  display: flex; flex-direction: column; justify-content: space-between;
}
.board div.white { background: var(--white); }

/* Challenges */
.today { border-radius: 24px; background: var(--ink); color: var(--ivory); padding: 22px 24px; }
.today .card__label { color: var(--apricot); }
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-top: 16px; }
.days i { height: 8px; border-radius: 999px; background: rgba(251,247,245,.2); }
.days i.done { background: var(--lavender); }
.days i.now { background: var(--apricot); }
.row { border-radius: 18px; background: var(--white); padding: 16px 20px; font-size: 15px; font-weight: 600; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.stack--12 { gap: 12px; }

/* Learn */
.bar { margin-top: 14px; height: 6px; border-radius: 999px; background: var(--tile); }
.bar i { display: block; width: 40%; height: 6px; border-radius: 999px; background: var(--on); }

/* Subliminals */
.listen-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.soon {
  display: inline-block; white-space: nowrap;
  padding: 4px 12px; border-radius: 999px;
  background: var(--apricot); color: var(--ink);
  font-family: var(--sans); font-size: 12px; font-weight: 700;
}
.player { position: relative; border-radius: 24px; background: var(--white); border: 1px solid var(--border); padding: 28px; }
.player__tag {
  position: absolute; top: 20px; right: 20px; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--muted); font-size: 12px; font-weight: 700;
}
.player__head { display: flex; align-items: center; gap: 16px; padding-right: 72px; }
.player__head .orb { flex: none; width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; color: var(--ink); }
.player__kind { font-size: 12px; font-weight: 700; color: var(--lavender-ink); }
.player__title { margin-top: 4px; font: 600 22px/1.2 var(--serif); }
.line { font: 400 19px/1.45 var(--serif); color: var(--faint); }
.line--a { margin-top: 24px; }
.line--b { margin-top: 8px; color: var(--ink); }
.track { margin-top: 24px; height: 4px; border-radius: 999px; background: var(--border); }
.track i { display: block; width: 46%; height: 4px; border-radius: 999px; background: var(--lavender-deep); }
.times { display: flex; justify-content: space-between; margin-top: 8px; font-size: 13px; font-weight: 500; color: var(--muted); }
.lists { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; font-size: 14px; font-weight: 700; text-align: center; }
.lists span { padding: 14px 4px; border-radius: 18px; background: var(--tile); color: var(--on); }

/* FAQ */
.faq { max-width: 820px; }
.faq h2 { margin-bottom: 28px; font-size: 40px; line-height: 1.1; }
.faq details { border-radius: 18px; background: var(--white); border: 1px solid var(--border); padding: 20px 24px; }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; font-weight: 700; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--lavender-ink); font-weight: 500; font-size: 20px; line-height: 1; transition: transform .2s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin-top: 8px; color: var(--muted); }

/* Footer */
.foot { border-top: 1px solid var(--border); background: var(--white); padding: 40px 0; }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; font-size: 14px; font-weight: 500; color: var(--muted); }
.foot .brand .orb { width: 22px; height: 22px; }
.foot .brand__name { font-size: 20px; }
.foot .brand small { margin-left: 6px; font-size: 14px; color: var(--muted); }
.foot nav { display: flex; flex-wrap: wrap; gap: 22px; }
.foot nav a { color: var(--muted); }
.foot nav a:hover { color: var(--ink); }
.foot nav[aria-label="Download"] a { color: var(--lavender-ink); font-weight: 600; }

/* -- The five methods ------------------------------------------------------------ */
/* Shared with the blog (blog.css layers on top of this file). The tiles use the
   app's methodTile pastels with the darker --on-* inks, so the labels clear
   WCAG AA on every tile colour. */

.methodgrid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px; margin: 40px 0 0; padding: 0; list-style: none;
}
.methodcard {
  display: flex; flex-direction: column; gap: 8px;
  padding: 24px; border-radius: 22px;
  background: var(--tile); color: var(--on);
}
.methodcard__name { font: 600 21px/1.35 var(--serif); }
.methodcard__body { font-size: 15px; line-height: 1.5; color: var(--on); opacity: .92; }
.methodcard__link { margin-top: auto; font-size: 14px; font-weight: 700; color: var(--on); text-decoration: underline; text-underline-offset: 3px; }
.methodcard__link:hover { color: var(--ink); }

/* -- Motion ------------------------------------------------------------------------ */

@keyframes breathe { 0%,100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(223,167,154,0); } 50% { transform: scale(1.08); box-shadow: 0 0 26px 4px rgba(223,167,154,.45); } }
@keyframes drift { from { transform: translate(0,0) scale(1); } to { transform: translate(-50px,40px) scale(1.07); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes float { from { transform: translateY(0); } to { transform: translateY(-12px); } }
@keyframes playbar { from { width: 6%; } to { width: 94%; } }
@keyframes lineA { 0%,44% { color: #3B2F3F; } 50%,94% { color: #7B6B86; } 100% { color: #3B2F3F; } }
@keyframes lineB { 0%,44% { color: #7B6B86; } 50%,94% { color: #3B2F3F; } 100% { color: #7B6B86; } }

.breathe { animation: breathe 4.5s ease-in-out infinite; }
.breathe--slow { animation-duration: 8s; }
.drift { animation: drift 14s ease-in-out infinite alternate; }
.rise { animation: rise .9s var(--ease) both; }
.d1 { animation-delay: .12s; } .d2 { animation-delay: .24s; } .d3 { animation-delay: .36s; } .d4 { animation-delay: .5s; }
.float { animation: rise 1s var(--ease) .3s both, float 6s ease-in-out 1.3s infinite alternate; }
.track i { animation: playbar 12s linear infinite; }
.line--a { animation: lineA 12s linear infinite; }
.line--b { animation: lineB 12s linear infinite; }

/* Scroll reveal. The inline script at the end of index.html adds .sa to each
   element and .sa-in when it scrolls into view (staggered via --sa-d).
   Without JS, or with reduced motion, nothing gets .sa and all is visible. */
.sa {
  opacity: 0;
  transform: translateY(36px) scale(.98);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: var(--sa-d, 0s);
}
.sa.sa-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
