/* =========================================================================
   Third Eye — getthirdeye.app
   Single stylesheet. Dark-native. Editorial. Zero frameworks.
   ========================================================================= */

/* ---- Fonts: display=swap avoids FOIT; system stacks cover the swap ------ */
@import url("https://fonts.googleapis.com/css2?family=Bungee&family=Inter:wght@400;500;600;700&display=swap");

/* ---- Tokens ------------------------------------------------------------- */
:root {
  /* brand */
  --indigo:      #2A2F4F;
  --gold:        #E6B325;
  --purple:      #917FB3;
  --teal:        #3A98B9;

  /* canvas — darker derivations of indigo for depth */
  --ink:         #14162B;   /* page floor */
  --ink-2:       #1B1E38;   /* raised panels */
  --ink-3:       #232744;   /* deeper panel / P1 bubble */
  --line:        rgba(230, 179, 37, 0.22);  /* gold hairline */
  --line-soft:   rgba(255, 255, 255, 0.08);

  /* type */
  --paper:       #EDEBFF;   /* warm off-white on indigo */
  --paper-dim:   #A7A6C8;   /* muted */
  --paper-faint: #6E6D93;

  /* fonts */
  --display: "Bungee", "Arial Black", system-ui, sans-serif;
  --body:    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono:    ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  /* scale */
  --shell: 1200px;
  --read:  680px;
}

/* ---- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
  line-height: 1.65;
  font-weight: 400;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;

  /* atmospheric field: two soft brand hazes over ink, plus a faint grid */
  background-image:
    radial-gradient(60% 55% at 78% -8%, rgba(145, 127, 179, 0.18), transparent 60%),
    radial-gradient(48% 45% at 12% 8%, rgba(58, 152, 185, 0.14), transparent 62%),
    linear-gradient(var(--ink), var(--ink));
  background-attachment: fixed;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--gold); color: var(--ink); }

/* ---- Layout primitives -------------------------------------------------- */
.shell { width: min(100% - 2.5rem, var(--shell)); margin-inline: auto; }
.read  { width: min(100% - 2.5rem, var(--read)); margin-inline: auto; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
}
.eyebrow::before {
  content: "";
  width: 1.8rem; height: 1px;
  background: var(--gold);
  opacity: 0.7;
}

/* ---- Top bar ------------------------------------------------------------ */
.topbar {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px);
  background: linear-gradient(var(--ink), rgba(20, 22, 43, 0.65));
  border-bottom: 1px solid var(--line-soft);
}
.topbar__in {
  display: flex; align-items: center; justify-content: space-between;
  padding-block: 0.85rem;
}
.brand { display: flex; align-items: center; gap: 0.6rem; }
.brand svg { width: 30px; height: 30px; }
.brand__word {
  font-family: var(--display);
  font-size: 1.02rem;
  letter-spacing: 0.02em;
  color: var(--paper);
}
.topbar .status {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--paper-dim);
  display: inline-flex; align-items: center; gap: 0.5em;
}
.status .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 0 rgba(230, 179, 37, 0.6);
  animation: beacon 3.6s ease-out infinite;
}

/* ---- Hero --------------------------------------------------------------- */
.hero { position: relative; padding-block: clamp(3.5rem, 9vw, 7.5rem) clamp(3rem, 7vw, 6rem); }
.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}
@media (min-width: 900px) {
  .hero__grid { grid-template-columns: 1.15fr 0.85fr; }
}

.hero__mark {
  width: clamp(200px, 34vw, 340px);
  margin-inline: auto;
  filter: drop-shadow(0 24px 60px rgba(230, 179, 37, 0.12));
}
@media (min-width: 900px) { .hero__mark { order: 2; margin-inline: 0 auto; } }

.hero h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.9rem, 8.5vw, 5.6rem);
  line-height: 0.95;
  letter-spacing: -0.005em;
  color: var(--paper);
  margin-block: 1.1rem 0.1rem;
  text-wrap: balance;
}
.hero h1 .glow { color: var(--gold); }
.hero__sub {
  color: var(--paper-dim);
  font-size: clamp(1.05rem, 0.98rem + 0.5vw, 1.3rem);
  max-width: 34ch;
  margin-top: 1.4rem;
}
.hero__sub b { color: var(--paper); font-weight: 600; }

/* ---- CTA ---------------------------------------------------------------- */
.cta { margin-top: 2.2rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.4rem; }

/* App Store badge placeholder — hand-built, not a stock asset */
.badge {
  display: inline-flex; align-items: center; gap: 0.75rem;
  padding: 0.7rem 1.15rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 13px;
  background:
    linear-gradient(180deg, rgba(230,179,37,0.10), rgba(230,179,37,0.02));
  color: var(--paper);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.badge:hover { transform: translateY(-2px); border-color: var(--gold); }
.badge svg { width: 26px; height: 26px; }
.badge__txt { display: flex; flex-direction: column; line-height: 1.05; text-align: left; }
.badge__sm { font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--paper-dim); }
.badge__lg { font-family: var(--display); font-size: 1.02rem; }

.cta__note {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper-faint);
}

/* ---- Section chrome ----------------------------------------------------- */
.section { position: relative; padding-block: clamp(3.5rem, 8vw, 6.5rem); border-top: 1px solid var(--line-soft); }
.section__head { display: flex; align-items: baseline; gap: 1.25rem; flex-wrap: wrap; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section__num {
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: transparent;
  -webkit-text-stroke: 1.4px var(--gold);
  line-height: 1;
}
.section__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  line-height: 1;
  color: var(--paper);
  text-wrap: balance;
}
.section__lede { color: var(--paper-dim); max-width: 52ch; margin-top: 0.9rem; }

/* ---- 01 The Reveal — staged 7-beat vertical narrative ------------------- */
.reveal { position: relative; margin-inline: auto; max-width: 900px; }
.reveal::before {
  content: ""; position: absolute; left: 22px; top: 8px; bottom: 8px; width: 1px;
  background: linear-gradient(var(--gold), transparent);
  opacity: 0.35;
}
@media (min-width: 720px) { .reveal::before { left: 50%; } }

.beat {
  position: relative;
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 1.2rem;
  padding-block: 1.15rem;
}
@media (min-width: 720px) {
  .beat { grid-template-columns: 1fr 92px 1fr; align-items: center; gap: 0; }
  .beat > .beat__body { grid-column: 3; padding-left: 2.2rem; }
  .beat:nth-child(even) > .beat__body { grid-column: 1; grid-row: 1; text-align: right; padding-left: 0; padding-right: 2.2rem; }
  .beat > .beat__node { grid-column: 2; grid-row: 1; }
}

.beat__node {
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; margin-inline: auto;
  border: 1px solid var(--line);
  background: var(--ink-2);
  font-family: var(--mono); font-size: 0.82rem; color: var(--gold);
  position: relative; z-index: 2;
}
.beat__k {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--teal); display: block; margin-bottom: 0.3rem;
}
.beat__t { font-size: 1.28rem; font-weight: 600; color: var(--paper); line-height: 1.2; }
.beat__d { color: var(--paper-dim); margin-top: 0.35rem; font-size: 0.98rem; }

/* ---- 02 The Receipts — insight ↔ message linkage ----------------------- */
.receipts { display: grid; gap: 1.1rem; }
@media (min-width: 780px) { .receipts { grid-template-columns: 1.05fr 0.95fr; align-items: start; gap: 1.1rem 2rem; } }

.insight {
  border: 1px solid var(--line-soft);
  border-left: 2px solid var(--gold);
  border-radius: 0 14px 14px 0;
  background: linear-gradient(180deg, var(--ink-2), var(--ink));
  padding: 1.25rem 1.4rem;
}
.insight__label { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--purple); }
.insight__claim { font-size: 1.18rem; font-weight: 600; margin-top: 0.45rem; color: var(--paper); }
.insight__tap {
  margin-top: 0.9rem; display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.06em; color: var(--gold);
}
.insight__tap svg { width: 14px; height: 14px; }

/* faux chat proof */
.proof {
  border: 1px solid var(--line-soft); border-radius: 16px;
  background: var(--ink-2); padding: 1.1rem; display: grid; gap: 0.55rem;
}
.proof__head {
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--paper-faint); display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 0.4rem; border-bottom: 1px dashed var(--line-soft); margin-bottom: 0.3rem;
}
.bubble { max-width: 78%; padding: 0.55rem 0.8rem; border-radius: 14px; font-size: 0.92rem; line-height: 1.4; }
.bubble .who { display: block; font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.12em; color: var(--paper-faint); margin-bottom: 0.2rem; }
.bubble.p1 { background: var(--ink-3); border: 1px solid var(--line-soft); justify-self: start; border-bottom-left-radius: 4px; }
.bubble.p2 { background: rgba(230, 179, 37, 0.12); border: 1px solid var(--line); justify-self: end; border-bottom-right-radius: 4px; text-align: left; }
.proof__meta { font-family: var(--mono); font-size: 0.68rem; color: var(--paper-faint); text-align: center; margin-top: 0.2rem; }

/* ---- 03 Private by architecture — data flow ---------------------------- */
.flow { display: grid; gap: 1rem; margin-top: 0.5rem; }
@media (min-width: 820px) { .flow { grid-template-columns: repeat(3, 1fr); gap: 1.1rem; } }

.stage {
  position: relative;
  border: 1px solid var(--line-soft); border-radius: 16px;
  background: var(--ink-2); padding: 1.5rem 1.35rem;
}
.stage__i { width: 34px; height: 34px; color: var(--gold); margin-bottom: 0.9rem; }
.stage__n { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--paper-faint); }
.stage__t { font-family: var(--display); font-weight: 400; font-size: 1.15rem; margin-top: 0.35rem; color: var(--paper); }
.stage__d { color: var(--paper-dim); font-size: 0.95rem; margin-top: 0.6rem; }
@media (min-width: 820px) {
  .stage:not(:last-child)::after {
    content: "→"; position: absolute; right: -1.05rem; top: 50%; transform: translateY(-50%);
    color: var(--gold); font-size: 1.1rem; z-index: 3;
  }
}
.privacy-note {
  margin-top: 1.5rem; padding: 1.1rem 1.3rem;
  border: 1px solid var(--line); border-radius: 14px;
  background: linear-gradient(180deg, rgba(230,179,37,0.06), transparent);
  color: var(--paper-dim); font-size: 0.98rem;
}
.privacy-note b { color: var(--paper); }
.linkline { margin-top: 1.4rem; }
.linkline a { color: var(--gold); border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.linkline a:hover { border-color: var(--gold); }

/* ---- Footer ------------------------------------------------------------- */
.footer { border-top: 1px solid var(--line-soft); padding-block: 2.5rem 3rem; margin-top: 1rem; }
.footer__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.footer__brand { display: flex; align-items: center; gap: 0.6rem; }
.footer__brand svg { width: 24px; height: 24px; }
.footer__brand span { font-family: var(--display); font-size: 0.92rem; }
.footer nav { display: flex; gap: 1.4rem; font-size: 0.9rem; color: var(--paper-dim); }
.footer nav a:hover { color: var(--gold); }
.footer__legal { font-size: 0.82rem; color: var(--paper-faint); width: 100%; margin-top: 0.4rem; }

/* ---- Prose (privacy.html) ---------------------------------------------- */
.prose { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.prose h1 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(2.2rem, 6vw, 3.4rem); line-height: 1; color: var(--paper);
  margin-bottom: 0.5rem;
}
.prose__meta { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.12em; color: var(--paper-faint); margin-bottom: 2.4rem; }
.prose h2 {
  font-family: var(--display); font-weight: 400; font-size: 1.35rem; color: var(--gold);
  margin-top: 2.6rem; margin-bottom: 0.7rem; scroll-margin-top: 5rem;
}
.prose h2 .n { color: var(--paper-faint); font-size: 0.85em; margin-right: 0.5rem; }
.prose p { color: var(--paper-dim); margin-bottom: 1rem; }
.prose p b, .prose li b { color: var(--paper); font-weight: 600; }
.prose ul { color: var(--paper-dim); margin: 0 0 1rem 1.2rem; }
.prose li { margin-bottom: 0.5rem; }
.prose a { color: var(--gold); border-bottom: 1px solid var(--line); }
.prose a:hover { border-color: var(--gold); }
.prose hr { border: 0; border-top: 1px solid var(--line-soft); margin: 2.4rem 0; }
.prose__toc {
  border: 1px solid var(--line-soft); border-radius: 14px; background: var(--ink-2);
  padding: 1.1rem 1.3rem; margin-bottom: 2.4rem;
}
.prose__toc p { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--paper-faint); margin-bottom: 0.6rem; }
.prose__toc ol { columns: 2; column-gap: 2rem; margin-left: 1.1rem; color: var(--paper-dim); font-size: 0.9rem; }
.prose__toc a { border: 0; }
.prose__toc a:hover { color: var(--gold); }

/* ---- 404 ---------------------------------------------------------------- */
.oops { min-height: 72vh; display: grid; place-items: center; text-align: center; padding-block: 4rem; }
.oops__mark { width: 130px; margin-inline: auto; margin-bottom: 1.6rem; }
.oops h1 { font-family: var(--display); font-weight: 400; font-size: clamp(3rem, 12vw, 6rem); color: var(--gold); line-height: 0.9; }
.oops p { color: var(--paper-dim); margin-top: 0.6rem; }
.oops a { display: inline-block; margin-top: 1.6rem; font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); border-bottom: 1px solid var(--line); padding-bottom: 3px; }

/* =========================================================================
   Motion — the slow gold "third eye" pulse + supporting beats
   ========================================================================= */
@keyframes irisPulse {
  0%, 100% { opacity: 0.35; transform: scale(1); }
  50%      { opacity: 0.9;  transform: scale(1.14); }
}
@keyframes ringPulse {
  0%   { opacity: 0.55; transform: scale(0.9); }
  70%  { opacity: 0;    transform: scale(1.5); }
  100% { opacity: 0;    transform: scale(1.5); }
}
@keyframes beacon {
  0%   { box-shadow: 0 0 0 0 rgba(230, 179, 37, 0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(230, 179, 37, 0); }
  100% { box-shadow: 0 0 0 0 rgba(230, 179, 37, 0); }
}

/* The eye mark: animated parts are targeted by class inside the SVG */
.eye-glow  { transform-box: fill-box; transform-origin: center; animation: irisPulse 5.2s ease-in-out infinite; }
.eye-ring  { transform-box: fill-box; transform-origin: center; animation: ringPulse 5.2s ease-out infinite; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .eye-glow, .eye-ring, .status .dot { animation: none; }
  .eye-glow { opacity: 0.7; }
}
