/* MentalMath Flash — site styles (teal + math motif, matches app) */

:root {
  /* App palette */
  --color-teal: #2C7DA0;
  --color-teal-dark: #1F5A75;
  --color-teal-darker: #163F52;
  --color-teal-soft: #5294B1;     /* lighter shade visible in app tiles/motif */
  --color-white: #ffffff;
  --color-ink: #163F52;           /* dark teal text on white surfaces */
  --color-ink-soft: #355E72;
  --color-muted: rgba(255, 255, 255, 0.78);
  --color-faint: rgba(255, 255, 255, 0.55);
  --color-border: rgba(255, 255, 255, 0.18);
  --color-border-strong: rgba(255, 255, 255, 0.35);

  --radius: 16px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --max-width: 1080px;
  --content-width: 720px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.10), 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.18);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.25);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--color-white);
  background-color: var(--color-teal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  position: relative;
}

/* Floating math motif behind everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url('/math-bg.svg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 0;
}

/* Subtle vertical gradient so deeper sections feel cohesive */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(22, 63, 82, 0) 0%, rgba(22, 63, 82, 0.25) 100%);
  pointer-events: none;
  z-index: 0;
}

body > * { position: relative; z-index: 1; }

a {
  color: var(--color-white);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.4);
  text-underline-offset: 3px;
}
a:hover {
  text-decoration-color: var(--color-white);
}

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

h1, h2, h3 {
  color: var(--color-white);
  line-height: 1.2;
  margin: 0 0 0.5em;
  letter-spacing: -0.015em;
}
h1 { font-size: clamp(2.25rem, 5vw, 3.25rem); font-weight: 700; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; }
h3 { font-size: 1.125rem; font-weight: 600; }

p { margin: 0 0 1em; color: var(--color-muted); }

/* Layout */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.container--narrow { max-width: var(--content-width); }

/* Header */
.site-header {
  background: transparent;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: saturate(160%) blur(8px);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
  background-color: rgba(44, 125, 160, 0.65);
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}
.site-logo {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-white);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.site-logo:hover { text-decoration: none; }
.site-logo__mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--color-white);
  color: var(--color-teal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1;
}
.site-nav {
  display: flex;
  gap: 24px;
  font-size: 0.95rem;
}
.site-nav a {
  color: var(--color-muted);
  text-decoration: none;
}
.site-nav a:hover { color: var(--color-white); }

/* Hero */
.hero {
  padding: 80px 0 56px;
  text-align: center;
}
.hero__eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid var(--color-border-strong);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 24px;
  backdrop-filter: blur(4px);
}
.hero__title {
  margin: 0 auto 16px;
  max-width: 760px;
  color: var(--color-white);
}
.hero__subtitle {
  font-size: 1.2rem;
  color: var(--color-muted);
  max-width: 560px;
  margin: 0 auto 36px;
}

/* Store badges */
.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  background: var(--color-white);
  color: var(--color-ink);
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  min-width: 200px;
  box-shadow: var(--shadow-md);
}
.store-badge:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  color: var(--color-ink);
}
.store-badge__icon {
  font-size: 1.4rem;
  line-height: 1;
  color: var(--color-teal);
}
.store-badge__sub {
  display: block;
  font-size: 0.7rem;
  opacity: 0.7;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.store-badge__main {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
}

/* Sections */
.section { padding: 80px 0; }
.section__title { text-align: center; margin-bottom: 12px; }
.section__lead {
  text-align: center;
  color: var(--color-muted);
  max-width: 580px;
  margin: 0 auto 48px;
  font-size: 1.1rem;
}

/* Feature tiles — app's translucent-tile aesthetic */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.feature {
  padding: 28px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: background 0.15s ease, transform 0.15s ease;
}
.feature:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}
.feature__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-teal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1;
}
.feature h3 {
  margin-bottom: 6px;
  color: var(--color-white);
}
.feature p {
  margin: 0;
  font-size: 0.97rem;
  color: var(--color-muted);
}
.feature a { color: var(--color-white); }

/* Screenshots */
.screenshots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  max-width: 920px;
  margin: 0 auto;
}
.screenshot {
  aspect-ratio: 9 / 19;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid var(--color-border);
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-weight: 600;
  text-align: center;
  padding: 16px;
  box-shadow: var(--shadow-md);
}
.screenshot-img {
  width: 100%;
  height: auto;
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.20);
}

/* Pricing callout — white pill like the app's CTA */
.callout {
  text-align: center;
  padding: 48px 32px;
  background: var(--color-white);
  color: var(--color-ink);
  border-radius: 24px;
  max-width: 720px;
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
}
.callout h2 { color: var(--color-ink); }
.callout p { color: var(--color-ink-soft); max-width: 480px; margin: 0 auto; }
.callout__price {
  display: block;
  font-size: 2.75rem;
  font-weight: 800;
  margin: 16px 0 8px;
  letter-spacing: -0.025em;
  color: var(--color-teal);
}
.callout__price small {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-ink-soft);
}

/* Footer */
.site-footer {
  padding: 32px 0;
  margin-top: 64px;
  background: rgba(22, 63, 82, 0.35);
  border-top: 1px solid rgba(255, 255, 255, 0.10);
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--color-faint);
}
.site-footer nav { display: flex; gap: 20px; }
.site-footer nav a {
  color: var(--color-faint);
  text-decoration: none;
}
.site-footer nav a:hover { color: var(--color-white); }

/* ---------- Forms (contact page) ---------- */
.card {
  background: var(--color-white);
  color: var(--color-ink);
  border-radius: 20px;
  padding: 36px;
  box-shadow: var(--shadow-lg);
  max-width: 560px;
  margin: 0 auto;
}

.form {
  display: grid;
  gap: 20px;
}
.form__field { display: grid; gap: 6px; }
.form label {
  font-weight: 600;
  color: var(--color-ink);
  font-size: 0.95rem;
}
.form input,
.form textarea {
  font: inherit;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: var(--color-ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form input:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--color-teal);
  box-shadow: 0 0 0 3px rgba(44, 125, 160, 0.20);
}
.form textarea { min-height: 160px; resize: vertical; }
.form__hint {
  font-size: 0.85rem;
  color: var(--color-ink-soft);
}

.btn {
  display: inline-block;
  font: inherit;
  font-weight: 700;
  padding: 14px 24px;
  background: var(--color-teal);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
  text-align: center;
}
.btn:hover {
  background: var(--color-teal-dark);
  color: var(--color-white);
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }

.form-status {
  padding: 14px 16px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 0.95rem;
  display: none;
}
.form-status.is-visible { display: block; }
.form-status--success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}
.form-status--error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

/* ---------- Page header (contact / privacy) ---------- */
.page-header {
  padding: 80px 0 32px;
  text-align: center;
}
.page-header h1 { margin-bottom: 8px; color: var(--color-white); }
.page-header p { color: var(--color-muted); }

/* ---------- Long-form prose (privacy) on white card ---------- */
.prose {
  max-width: var(--content-width);
  margin: 24px auto 64px;
  padding: 48px;
  background: var(--color-white);
  color: var(--color-ink);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
}
.prose h2,
.prose h3 { color: var(--color-ink); }
.prose h2 {
  font-size: 1.35rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}
.prose h3 {
  font-size: 1.05rem;
  margin-top: 1.5rem;
}
.prose p,
.prose li {
  color: var(--color-ink-soft);
  font-size: 1rem;
}
.prose a { color: var(--color-teal); text-decoration: underline; text-decoration-color: rgba(44, 125, 160, 0.4); }
.prose a:hover { text-decoration-color: var(--color-teal); color: var(--color-teal-dark); }
.prose ul {
  padding-left: 1.25rem;
  margin: 0.5rem 0 1.25rem;
}
.prose li { margin-bottom: 0.4rem; }
.prose .meta {
  color: var(--color-ink-soft);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}
.prose .toc {
  background: #f0f6f9;
  border: 1px solid #d6e6ed;
  border-radius: 12px;
  padding: 20px 24px;
  margin: 24px 0 32px;
}
.prose .toc h2 {
  margin: 0 0 12px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-ink-soft);
}
.prose .toc ol {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.95rem;
}
.prose .toc li { margin-bottom: 4px; }
.prose .summary {
  background: #e8f2f6;
  border-left: 3px solid var(--color-teal);
  padding: 12px 16px;
  border-radius: 6px;
  margin: 12px 0 16px;
  font-size: 0.95rem;
  color: var(--color-ink);
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 0.95rem;
}
.prose th,
.prose td {
  border: 1px solid #d6e6ed;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  color: var(--color-ink-soft);
}
.prose th {
  background: #f0f6f9;
  color: var(--color-ink);
  font-weight: 700;
}

/* Page-context paragraph beneath card */
.below-card {
  text-align: center;
  margin: 24px auto 0;
  font-size: 0.95rem;
  color: var(--color-muted);
}
.below-card a { color: var(--color-white); }

/* Responsive tweaks */
@media (max-width: 640px) {
  .hero { padding: 56px 0 40px; }
  .section { padding: 56px 0; }
  .site-nav { gap: 16px; }
  .store-badge { min-width: 0; flex: 1 1 auto; padding: 12px 18px; }
  .prose { padding: 32px 24px; border-radius: 20px; }
  .card { padding: 28px 24px; }
}

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