/* Brainspill — shared styles
   Light mode by default; dark mode via prefers-color-scheme.
   No build step. No framework. */

:root {
  --bg: #FAF8F4;
  --surface: #FFFFFF;
  --text: #000000;
  --text-muted: rgba(0, 0, 0, 0.55);
  --text-soft: rgba(0, 0, 0, 0.45);
  --border: rgba(0, 0, 0, 0.10);
  --border-soft: rgba(0, 0, 0, 0.06);
  --accent: #38B6E3;
  --accent-2: #B347FF;
  --save: #FF7A00;
  --shadow: 0 1px 24px rgba(13, 20, 38, 0.06);
  --shadow-card: 0 1px 3px rgba(13, 20, 38, 0.05), 0 8px 32px rgba(13, 20, 38, 0.06);
  --radius: 16px;
  --radius-sm: 12px;
  --maxw-prose: 64ch;
  --maxw-page: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #08122A;
    --surface: #0F1B36;
    --text: #FFFFFF;
    --text-muted: rgba(255, 255, 255, 0.55);
    --text-soft: rgba(255, 255, 255, 0.45);
    --border: rgba(255, 255, 255, 0.10);
    --border-soft: rgba(255, 255, 255, 0.06);
    --accent: #38B6E3;
    --accent-2: #B347FF;
    --save: #FF7A00;
    --shadow: 0 1px 24px rgba(0, 0, 0, 0.40);
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.40), 0 8px 32px rgba(0, 0, 0, 0.30);
  }
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}
a:hover { border-bottom-color: var(--accent); }
@media (prefers-color-scheme: dark) { a { color: var(--accent-2); } a:hover { border-bottom-color: var(--accent-2); } }

h1, h2, h3, h4 {
  font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin: 0;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.2rem); }
h2 { font-size: clamp(2rem, 4.5vw, 3rem); letter-spacing: -0.015em; }
h3 { font-size: clamp(1.4rem, 2.6vw, 1.75rem); }

p { margin: 0 0 1em; max-width: var(--maxw-prose); }

em, .italic { font-style: italic; }

/* layout */
.page {
  max-width: var(--maxw-page);
  margin: 0 auto;
  padding: 32px 24px 64px;
}
.section {
  padding: 96px 0;
  border-top: 1px solid var(--border-soft);
}
.section:first-of-type { border-top: 0; }
.section--tight { padding: 64px 0; }
.section__inner { max-width: 720px; margin: 0 auto; }
.section__inner--narrow { max-width: 600px; margin: 0 auto; }
.section__head { text-align: center; margin-bottom: 48px; }
.section__eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
  font-weight: 500;
}

@media (max-width: 640px) {
  .page { padding: 24px 20px 48px; }
  .section { padding: 64px 0; }
  body { font-size: 16px; }
}

/* nav */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 0;
  font-family: "Instrument Serif", serif;
  font-size: 22px;
  color: var(--text);
}
.nav__brand:hover { border: 0; }
.nav__brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}
.nav__links {
  display: flex;
  gap: 24px;
  font-size: 14px;
}
.nav__links a {
  color: var(--text-muted);
  border: 0;
}
.nav__links a:hover { color: var(--text); border: 0; }

@media (max-width: 480px) {
  .nav__links { gap: 16px; font-size: 13px; }
}

/* hero */
.hero { text-align: center; padding: 64px 0 96px; }
.hero__orb {
  width: 180px;
  height: 180px;
  margin: 0 auto 48px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, #ffffff 0%, transparent 28%),
    radial-gradient(circle at 65% 35%, #38B6E3 0%, transparent 55%),
    radial-gradient(circle at 50% 70%, #B347FF 0%, transparent 60%),
    linear-gradient(135deg, #08122A, #1A2348);
  box-shadow:
    0 30px 80px rgba(56, 182, 227, 0.18),
    0 12px 40px rgba(179, 71, 255, 0.18),
    inset 0 -10px 30px rgba(8, 18, 42, 0.5);
  position: relative;
  animation: orbDrift 14s ease-in-out infinite alternate;
}
@keyframes orbDrift {
  0%   { transform: translateY(0) scale(1); }
  100% { transform: translateY(-6px) scale(1.02); }
}

.hero__title {
  font-style: italic;
  margin-bottom: 24px;
}
.hero__sub {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 30ch;
  margin: 0 auto 40px;
  line-height: 1.5;
}
.hero__sub span { display: block; }

@media (max-width: 640px) {
  .hero { padding: 32px 0 64px; }
  .hero__orb { width: 140px; height: 140px; margin-bottom: 36px; }
}

/* App Store badge */
.appstore-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  background: var(--text);
  color: var(--bg);
  border-radius: 12px;
  font-weight: 500;
  font-size: 15px;
  border: 0;
}
.appstore-badge:hover { border: 0; opacity: 0.9; }
.appstore-badge svg { width: 22px; height: 22px; flex-shrink: 0; }
.appstore-badge__caption { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.appstore-badge__caption small { font-size: 10px; opacity: 0.7; letter-spacing: 0.1em; text-transform: uppercase; }

/* generic button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn:hover { border: 0; opacity: 0.9; }
.btn:active { transform: scale(0.98); }
.btn--primary { background: var(--accent); color: #FFFFFF; }
@media (prefers-color-scheme: dark) { .btn--primary { background: var(--accent-2); } }

/* Demo steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 24px;
}
.step {
  text-align: center;
}
.step__shot {
  aspect-ratio: 9 / 16;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.step__shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.step__num {
  font-family: "Instrument Serif", serif;
  font-style: italic;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.step__label {
  font-family: "Instrument Serif", serif;
  font-size: 22px;
  color: var(--text);
  margin-bottom: 6px;
}
.step__copy {
  color: var(--text-muted);
  font-size: 14px;
  max-width: 22ch;
  margin: 0 auto;
}

@media (max-width: 720px) {
  .steps { grid-template-columns: 1fr; gap: 40px; max-width: 320px; margin: 0 auto; }
}

/* Reminders integration */
.integration {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin-top: 16px;
}
.integration__icon {
  width: 88px;
  height: 88px;
  border-radius: 20px;
  box-shadow: var(--shadow-card);
}
.integration__arrow {
  width: 40px;
  height: 2px;
  background: var(--text-muted);
  position: relative;
}
.integration__arrow::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-top: 2px solid var(--text-muted);
  border-right: 2px solid var(--text-muted);
  transform: translateY(-50%) rotate(45deg);
}
@media (max-width: 480px) {
  .integration { gap: 16px; }
  .integration__icon { width: 72px; height: 72px; }
  .integration__arrow { width: 24px; }
}

/* Two-up feature pair ("Made for the way you think") */
.feature-pair {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  margin-top: 24px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.feature {
  text-align: center;
}
.feature__shot {
  aspect-ratio: 9 / 16;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
  margin-bottom: 18px;
}
.feature__shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.feature__label {
  font-family: "Instrument Serif", serif;
  font-size: 22px;
  color: var(--text);
  margin-bottom: 6px;
}
.feature__copy {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.55;
}
@media (max-width: 600px) {
  .feature-pair { grid-template-columns: 1fr; gap: 48px; max-width: 320px; }
}

/* Pricing */
.pricing {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 24px;
}
.tier {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
}
.tier--pro { border-color: rgba(56, 182, 227, 0.4); }
.tier--max { border-color: rgba(179, 71, 255, 0.4); }
.tier__name {
  font-family: "Instrument Serif", serif;
  font-size: 26px;
  margin-bottom: 4px;
}
.tier__slogan {
  font-family: "Instrument Serif", serif;
  font-style: italic;
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 24px;
}
.tier__price {
  font-family: "Instrument Serif", serif;
  font-size: 34px;
  margin-bottom: 4px;
}
.tier__price small {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 400;
}
.tier__alt {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.tier__list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
}
.tier__list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.tier__list li::before {
  content: "";
  flex-shrink: 0;
  margin-top: 7px;
  width: 14px;
  height: 8px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
  opacity: 0.7;
}
@media (prefers-color-scheme: dark) {
  .tier__list li::before { border-color: var(--accent-2); }
}
.tier__foot {
  margin-top: auto;
  font-size: 12px;
  color: var(--text-soft);
}

@media (max-width: 860px) {
  .pricing { grid-template-columns: 1fr; }
}

/* problem block */
.problem {
  text-align: center;
  max-width: 30ch;
  margin: 0 auto;
  font-family: "Instrument Serif", serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-style: italic;
  line-height: 1.3;
  color: var(--text);
}
.problem em { color: var(--text-muted); font-style: italic; }

/* footer */
.footer {
  border-top: 1px solid var(--border-soft);
  padding: 56px 0 0;
  margin-top: 64px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: flex-start;
  color: var(--text-muted);
  font-size: 14px;
}
.footer__brand {
  font-family: "Instrument Serif", serif;
  font-size: 20px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer__brand img { width: 28px; height: 28px; border-radius: 6px; }
.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.footer__links a { color: var(--text-muted); border: 0; }
.footer__links a:hover { color: var(--text); border: 0; }
.footer__small { width: 100%; font-size: 12px; color: var(--text-soft); margin-top: 16px; }

/* legal pages */
.legal {
  max-width: var(--maxw-prose);
  margin: 0 auto;
  padding: 32px 0 64px;
}
.legal h1 {
  font-size: clamp(2.2rem, 4.5vw, 3rem);
  margin-bottom: 8px;
}
.legal__updated {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 48px;
  display: block;
}
.legal h2 {
  margin-top: 48px;
  margin-bottom: 16px;
  font-size: clamp(1.4rem, 2.6vw, 1.75rem);
}
.legal h3 {
  margin-top: 32px;
  margin-bottom: 8px;
  font-size: 1.1rem;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 600;
  letter-spacing: 0;
}
.legal p, .legal ul, .legal ol { color: var(--text); }
.legal ul, .legal ol { padding-left: 22px; margin: 0 0 1em; }
.legal li { margin-bottom: 6px; }
.legal table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 14px;
}
.legal th, .legal td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
}
.legal th {
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

/* support FAQ */
.faq {
  max-width: 720px;
  margin: 0 auto;
}
.faq__item {
  border-top: 1px solid var(--border-soft);
  padding: 24px 0;
}
.faq__item:last-child { border-bottom: 1px solid var(--border-soft); }
.faq__q {
  font-family: "Instrument Serif", serif;
  font-size: 22px;
  margin-bottom: 8px;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 32px;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 0;
  color: var(--text-muted);
  font-size: 22px;
  font-weight: 300;
}
details[open] .faq__q::after { content: "\2013"; }
.faq__a {
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  margin-top: 8px;
}
.faq__a p { margin: 0 0 0.8em; max-width: none; }
.faq__a p:last-child { margin-bottom: 0; }

/* contact card */
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  box-shadow: var(--shadow-card);
  max-width: 520px;
  margin: 0 auto 48px;
}
.contact-card h3 {
  margin-bottom: 8px;
  font-family: "Instrument Serif", serif;
}
.contact-card p { margin: 0 auto 16px; color: var(--text-muted); }
.contact-card a { font-weight: 600; }

/* fade-in on scroll */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__orb { animation: none; }
}
