/* ============================================================================
   Chrome for the signed-out pages: landing, about, contact, privacy, terms.

   The header and footer markup is produced by public.js, so there is exactly
   one copy of each. Page-specific styling stays in the page's own <style>.

   Palette and type deliberately match the signed-in app (nav.css / style.css)
   so that logging in does not feel like arriving at a different product.
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Display face for headings only. Body copy stays on the system stack so the
   signed-out pages still read like the signed-in app. Outfit is SIL OFL,
   self-hosted from /fonts (licence in frontend/fonts). */
@font-face {
  font-family: "Outfit";
  src: url("/fonts/outfit.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  --bg: #0a0a16;
  --panel: #12122a;
  --line: #22224a;
  --text: #ecebf7;
  --muted: #9d9dc4;
  --purple: #a855f7;
  --pink: #ec4899;
  --grad: linear-gradient(135deg, #a855f7, #ec4899);
  --radius: 16px;
  --nav-h: 68px;
  /* One design pixel. The landing design is drawn 1829px wide; on a wide
     screen the header and hero scale with the window, so every screen shows
     the same proportions. Capped so very wide screens do not balloon. */
  --u: min(calc(100vw / 1829), 1.25px);
  --font-display: "Outfit", "Segoe UI", system-ui, sans-serif;
  --ease-out: cubic-bezier(.23, 1, .32, 1);      /* entering, responding */
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);  /* moving or drawing on screen */
  --accent-soft: #dcb0fb;                         /* emphasis inside headings */
}

html { scroll-behavior: smooth; scrollbar-color: #34346a var(--bg); accent-color: var(--purple); }
::selection { background: rgba(168, 85, 247, .42); color: #fff; }
input, textarea { caret-color: var(--pink); }
a, button { -webkit-tap-highlight-color: transparent; }
button, .btn { touch-action: manipulation; }

h1, h2, h3, .brand-name { font-family: var(--font-display); text-wrap: balance; }
p { text-wrap: pretty; }

/* keyboard focus: visible everywhere, invisible for mouse clicks */
:focus-visible { outline: 2px solid #c4b5fd; outline-offset: 3px; border-radius: 6px; }
.btn:focus-visible { outline-offset: 4px; border-radius: 13px; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 60;
  padding: 10px 16px; border-radius: 10px; background: var(--panel);
  border: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: 14px;
  transition: top .2s var(--ease-out);
}
.skip-link:focus { top: 12px; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: min(1140px, 100% - 40px); margin-inline: auto; }
.wrap-narrow { width: min(760px, 100% - 40px); margin-inline: auto; }

/* ── atmosphere ─────────────────────────────────────────────────────────── */
.orbs { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5;
       animation: drift 22s ease-in-out infinite; }
.orb-1 { width: 520px; height: 520px; top: -160px; left: -120px;
         background: radial-gradient(circle, #7c3aed, transparent 70%); }
.orb-2 { width: 460px; height: 460px; top: 240px; right: -140px;
         background: radial-gradient(circle, #ec4899, transparent 70%); animation-delay: -7s; }
.orb-3 { width: 400px; height: 400px; bottom: -120px; left: 40%;
         background: radial-gradient(circle, #4c1d95, transparent 70%); animation-delay: -14s; }
@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33%      { transform: translate3d(40px, -30px, 0) scale(1.08); }
  66%      { transform: translate3d(-30px, 25px, 0) scale(.95); }
}

.stars {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .5;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 18%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 78% 12%, #d8c8ff, transparent),
    radial-gradient(1.6px 1.6px at 33% 62%, #fff, transparent),
    radial-gradient(1.1px 1.1px at 62% 78%, #ffd7ef, transparent),
    radial-gradient(1.3px 1.3px at 88% 54%, #fff, transparent),
    radial-gradient(1.1px 1.1px at 24% 88%, #cfc4ff, transparent),
    radial-gradient(1.5px 1.5px at 52% 32%, #fff, transparent);
  animation: twinkle 6s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .32; } to { opacity: .62; } }

/* a jump to #section stops under the sticky header, not behind it */
html { scroll-padding-top: var(--nav-h); }

/* ── header ─────────────────────────────────────────────────────────────── */
header.nav {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(10, 10, 22, .72); backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, background .25s;
}
header.nav.scrolled { border-bottom-color: var(--line); background: rgba(10, 10, 22, .92); }
/* No width here on purpose. This element also carries .wrap, which sets the
   1140px cap and the 20px gutter; a `width: 100%` alongside it has the same
   specificity, wins by being later, and pins the logo and the Log in button
   against the two edges of the screen. */
.nav-inner { display: flex; align-items: center; gap: 28px; }
/* the header runs a little wider than the page text, as the design has it */
header.nav .wrap { width: min(1400px, 100% - 48px); }

.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--text); }
.brand-mark {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; flex-shrink: 0;
  box-shadow: 0 0 16px rgba(232, 178, 74, .3);
}
.brand-mark img { display: block; width: 100%; height: 100%; border-radius: 50%; }
.brand-name { font-size: 17px; font-weight: 700; letter-spacing: .2px; }

.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: 14.5px;
  transition: color .16s; position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -5px; height: 1.5px;
  background: var(--grad); transform: scaleX(0); transform-origin: left center;
  transition: transform .22s var(--ease-out);
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { transform: none; }

/* ── buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 24px; border-radius: 11px; border: 1px solid transparent;
  font-size: 15px; font-weight: 600; font-family: inherit;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform 160ms var(--ease-out), box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 6px 18px rgba(124, 58, 237, .24); }

.btn-ghost { background: rgba(255,255,255,.04); color: var(--text); border-color: var(--line); }
.btn:active { transform: scale(.97); }
.btn-sm { padding: 9px 18px; font-size: 14px; }
/* the header's two buttons: Learn, then Log in */
.nav-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.btn-learn { gap: 8px; }
.btn-learn svg { width: 17px; height: 17px; flex: none; color: #f0abfc; }
.btn-learn[aria-current="page"] { border-color: rgba(168, 85, 247, .55); background: rgba(168, 85, 247, .16); }
@media (hover: hover) and (pointer: fine) {
  .btn-learn:hover { border-color: rgba(168, 85, 247, .5); background: rgba(168, 85, 247, .12); }
}
.btn .arr { width: 16px; height: 16px; flex: none; transition: transform .2s var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(190, 60, 180, .3); }
  .btn-ghost:hover { background: rgba(255,255,255,.08); border-color: #34346a; transform: translateY(-2px); }
  .btn:hover .arr { transform: translateX(3px); }
  .btn:active { transform: scale(.97); }
}

main { position: relative; z-index: 1; }
.grad-text {
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ── document pages (about / contact / privacy / terms) ────────────────── */
.doc-head { padding: 62px 0 34px; text-align: center; }
.doc-head h1 {
  font-size: clamp(2rem, 4.4vw, 3rem); font-weight: 800;
  letter-spacing: -1px; line-height: 1.1; margin-bottom: 12px;
}
.doc-head .sub { color: var(--muted); font-size: 16.5px; max-width: 62ch; margin-inline: auto; }
.doc-head .stamp {
  display: inline-block; margin-top: 16px; padding: 5px 13px; border-radius: 999px;
  background: rgba(168, 85, 247, .1); border: 1px solid rgba(168, 85, 247, .26);
  font-size: 12.5px; color: #d9c6ff;
}

.doc { padding-bottom: 76px; }
.doc section { padding: 0; margin-bottom: 34px; scroll-margin-top: 18px; }   /* on top of the header offset */
.doc h2 {
  font-size: 1.32rem; font-weight: 700; letter-spacing: -.3px;
  margin-bottom: 12px; padding-bottom: 9px; border-bottom: 1px solid var(--line);
}
.doc h3 { font-size: 1.02rem; font-weight: 700; margin: 20px 0 7px; color: #dcd8f5; }
.doc p { color: #c3c1de; margin-bottom: 13px; }
.doc ul, .doc ol { color: #c3c1de; margin: 0 0 13px 21px; }
.doc li { margin-bottom: 7px; }
.doc a { color: #c4b5fd; }
.doc a:hover { color: #e9d5ff; }
.doc strong { color: var(--text); font-weight: 650; }

/* a boxed aside — used for the "this needs your input" and caveat notes */
.callout {
  padding: 16px 18px; border-radius: 12px; margin: 18px 0;
  background: rgba(168, 85, 247, .08); border: 1px solid rgba(168, 85, 247, .24);
  border-left: 3px solid var(--purple);
}
.callout p:last-child { margin-bottom: 0; }
.callout.warn { background: rgba(234, 179, 8, .08); border-color: rgba(234, 179, 8, .26);
                border-left-color: #eab308; }

/* the in-page contents list on the long legal pages */
.toc {
  padding: 18px 20px; border-radius: var(--radius); margin-bottom: 38px;
  background: rgba(18, 18, 42, .6); border: 1px solid var(--line);
}
.toc p { font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em;
         color: #7d7da6; font-weight: 600; margin-bottom: 10px; }
.toc ol { margin: 0; padding-left: 19px; columns: 2; column-gap: 26px; }
.toc li { margin-bottom: 5px; font-size: 14px; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--text); }

/* key/value rows — the data table on the privacy page */
.rows { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 16px 0; }
.rows div { display: grid; grid-template-columns: 200px 1fr; gap: 16px; padding: 13px 17px;
            border-bottom: 1px solid var(--line); }
.rows div:last-child { border-bottom: none; }
.rows dt { font-weight: 650; font-size: 14px; }
.rows dd { color: var(--muted); font-size: 14px; }

/* contact tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.tile {
  padding: 26px 24px; border-radius: var(--radius); text-decoration: none; color: inherit;
  background: rgba(18, 18, 42, .66); border: 1px solid var(--line);
  transition: transform .24s ease, border-color .24s, background .24s;
}
@media (hover: hover) and (pointer: fine) {
  .tile:hover { transform: translateY(-4px); border-color: #34346a; background: rgba(24, 24, 56, .8); }
}
.tile .ico {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  font-size: 19px; margin-bottom: 14px;
  background: rgba(168, 85, 247, .14); border: 1px solid rgba(168, 85, 247, .26);
}
.tile h3 { font-size: 16.5px; margin-bottom: 6px; }
.tile p { font-size: 14px; color: var(--muted); margin: 0; }
.tile .val { display: block; margin-top: 9px; font-size: 14.5px; color: #c4b5fd; font-weight: 600; }

/* ── footer ─────────────────────────────────────────────────────────────── */
footer.site {
  border-top: 1px solid var(--line); padding: 40px 0 34px; margin-top: 60px;
  position: relative; z-index: 1;
}
.foot-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 26px; flex-wrap: wrap; margin-bottom: 26px; }
.foot-links { display: flex; gap: 22px; flex-wrap: wrap; }
/* Company and Legal, side by side; the legal list in two columns */
.foot-cols { display: flex; gap: 48px; flex-wrap: wrap; }
.foot-h { margin: 0 0 10px; font-size: 12px; font-weight: 650; letter-spacing: .1em;
  text-transform: uppercase; color: #8a8ab0; }
.foot-col .foot-links { display: grid; gap: 9px; }
.foot-col .foot-legal { grid-template-columns: repeat(2, max-content); column-gap: 30px; }
.foot-links a[aria-current="page"] { color: var(--text); }
@media (max-width: 560px) {
  .foot-cols { gap: 28px; }
  .foot-col .foot-legal { grid-template-columns: 1fr; }
  /* finger-sized: each link a full row tall, so neighbours are not hit by mistake */
  .foot-col .foot-links { gap: 0; }
  .foot-links a { display: flex; align-items: center; min-height: 40px; font-size: 15px; }
}
.foot-links a { color: var(--muted); text-decoration: none; font-size: 14px; transition: color .16s; }
.foot-links a:hover { color: var(--text); }
.foot-note { font-size: 12.5px; color: #8a8ab0; max-width: 74ch; }
/* the belief every page ends on: astrology shows possibilities, actions shape outcomes */
.foot-motto { font-size: 13.5px; line-height: 1.6; color: #c9c3e6; max-width: 80ch; margin-bottom: 10px; }
.foot-motto strong { color: #fff; font-weight: 600; }
/* the same belief inside a document page */
.callout.motto { border-color: rgba(240, 171, 252, .35); background: linear-gradient(135deg, rgba(168, 85, 247, .12), rgba(236, 72, 153, .08)); }
.callout.motto strong { color: #fff; }
.foot-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
               padding-top: 20px; border-top: 1px solid var(--line); font-size: 12.5px; color: #8a8ab0; }

/* ── scroll reveal ──────────────────────────────────────────────────────── */
.js .reveal { opacity: 0; transform: translateY(14px);
              transition: opacity .56s var(--ease-out), transform .56s var(--ease-out), filter .56s var(--ease-out); }
.js .reveal.in { opacity: 1; transform: none; }
@media print { .js .reveal, .js .reveal * { opacity: 1 !important; transform: none !important; filter: none !important; clip-path: none !important; } }

/* the phone menu: a button in the header and a panel that drops below it */
.nav-menu-btn { display: none; }
.nav-sheet { position: absolute; left: 0; right: 0; top: 100%; padding: 10px 16px 18px;
  background: #0b0a19; border-bottom: 1px solid var(--line); box-shadow: 0 18px 40px rgba(0, 0, 0, .5); }
.nav-sheet[hidden] { display: none; }
.nav-sheet-links { display: grid; max-width: 560px; margin: 0 auto; }
.nav-sheet-links a { display: flex; align-items: center; min-height: 48px; padding: 0 6px; border-bottom: 1px solid rgba(255, 255, 255, .06);
  font-size: 16px; font-weight: 500; color: var(--text); text-decoration: none; }
.nav-sheet-links a:first-child { color: #f0abfc; }
.nav-sheet-links a:last-child { border-bottom: 0; }
.nav-sheet-links a[aria-current="page"] { color: #f0abfc; }
@media (prefers-reduced-motion: no-preference) {
  .nav-sheet:not([hidden]) { animation: sheet-in .22s var(--ease-out); }
  @keyframes sheet-in { from { opacity: 0; transform: translateY(-6px); } }
}
@media (max-width: 900px) {
  .nav-menu-btn { display: grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; border-radius: 12px; cursor: pointer;
    background: rgba(255, 255, 255, .04); border: 1px solid var(--line); color: var(--text); }
  .nav-menu-btn span, .nav-menu-btn span::before, .nav-menu-btn span::after {
    display: block; width: 18px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .2s var(--ease-out), opacity .2s ease; }
  .nav-menu-btn span { position: relative; }
  .nav-menu-btn span::before, .nav-menu-btn span::after { content: ""; position: absolute; left: 0; }
  .nav-menu-btn span::before { top: -6px; }
  .nav-menu-btn span::after { top: 6px; }
  .nav-menu-btn[aria-expanded="true"] span { background: transparent; }
  .nav-menu-btn[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
  .nav-menu-btn[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }
  .nav-menu-btn:focus-visible { outline: 2px solid #f0abfc; outline-offset: 2px; }
  /* Learn moves into the menu, where it leads the list */
  .nav-actions .btn-learn { display: none; }
  .nav-actions .btn-sm { min-height: 44px; }
  .nav-links { display: none; }
  /* .nav-links carried the margin-left:auto that pushed everything right.
     With it hidden the Log in button has to take that job over, or it
     collapses back against the logo. */
  .nav-inner .nav-actions { margin-left: auto; }
}
/* a small laptop or tablet: the menu kept on one line beside the buttons */
.nav-links a { white-space: nowrap; }
@media (min-width: 901px) and (max-width: 1099px) {
  .nav-inner { gap: 18px; }
  .nav-links { gap: 14px; }
  .nav-links a { font-size: 13.5px; }
  .btn-learn span { display: none; }
  .btn-learn { padding-inline: 12px; }
}
/* the narrowest phones: logo, Log in and the menu button on one line */
@media (max-width: 400px) {
  .nav-inner { gap: 10px; }
  .nav-actions { gap: 8px; }
  .brand { gap: 8px; }
  .brand-name { font-size: 16px; }
  .nav-actions .btn-primary { padding-inline: 14px; }
}
/* a 320px phone: the heart alone; the name stays for screen readers */
@media (max-width: 350px) {
  .nav-inner .brand-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-width: 440px) {
  /* the book alone on a phone; its label stays for screen readers */
  .btn-learn span { display: none; }
  .btn-learn { padding-inline: 12px; }
}
@media (max-width: 620px) {
  .toc ol { columns: 1; }
  .toc li { margin: 0; }
  .toc a { display: flex; align-items: center; min-height: 40px; font-size: 15px; }
  .rows div { grid-template-columns: 1fr; gap: 4px; }
}

/* Decoration only — nothing here should move for a visitor who has asked
   their system to stop animations. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1; transform: none; filter: none; clip-path: none; }
}

/* desktop: the header in proportion to the window, as the landing design has it */
@media (min-width: 1180px) {
  :root { --nav-h: max(64px, calc(80 * var(--u))); }
  header.nav .wrap { width: min(100% - 48px, calc(1391 * var(--u))); }
  .nav-inner { gap: max(24px, calc(38 * var(--u))); }
  .brand { gap: max(10px, calc(14 * var(--u))); }
  .brand-mark { width: max(38px, calc(48 * var(--u))); height: max(38px, calc(48 * var(--u))); }
  .brand-name { font-size: max(16px, calc(21.7 * var(--u))); }
  .nav-links { gap: max(20px, calc(33.2 * var(--u))); }
  .nav-links a { font-size: max(12.5px, calc(17.4 * var(--u))); }
  .nav-actions { gap: max(10px, calc(18 * var(--u))); }
  .nav-actions .btn-sm { height: max(40px, calc(54 * var(--u))); padding: 0 max(14px, calc(23 * var(--u))); font-size: max(13px, calc(18.5 * var(--u))); border-radius: max(10px, calc(14 * var(--u))); gap: max(8px, calc(13 * var(--u))); }
  .btn-learn.btn-ghost { border-color: rgba(190, 170, 255, .26); }
  .nav-actions .btn-primary { padding: 0 max(15px, calc(25.5 * var(--u))); }
  .btn-learn { gap: max(7px, calc(11 * var(--u))); }
  .btn-learn svg { width: max(16px, calc(22 * var(--u))); height: max(16px, calc(22 * var(--u))); }
  .nav-actions .btn .arr { width: max(15px, calc(20 * var(--u))); height: max(15px, calc(20 * var(--u))); }
}
}
