/* Brainote website. Colors and type mirror the app's design system (Brainote/DesignSystem/BNTheme.swift). */

:root {
  --bg-top: #FFF4EE;
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --surface-alt: #FFF1EA;
  --border: rgba(30, 39, 71, 0.08);
  --text: #1E2747;
  --text-muted: rgba(30, 39, 71, 0.68);
  --text-faint: rgba(30, 39, 71, 0.45);
  --accent: #EF6B58;
  --accent-strong: #D9533F;
  --accent-soft: rgba(239, 107, 88, 0.12);
  --brand: #2E3A5C;
  --shadow: 0 10px 30px rgba(46, 58, 92, 0.10);
  --notes: #5B8CFF;
  --quiz: #F27C6B;
  --flashcards: #FFB547;
  --mindmap: #3CC8A0;
  --podcast: #A979FF;
  --radius: 24px;
  --display: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-top: #2E3A5C;
    --bg: #161D36;
    --surface: #26315A;
    --surface-alt: #1F2849;
    --border: rgba(255, 255, 255, 0.08);
    --text: #FFFFFF;
    --text-muted: rgba(255, 255, 255, 0.72);
    --text-faint: rgba(255, 255, 255, 0.48);
    --accent: #F27C6B;
    --accent-strong: #F58F80;
    --accent-soft: rgba(242, 124, 107, 0.18);
    --brand: #8EA2FF;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg-top) 0, var(--bg) 640px) no-repeat, var(--bg);
  min-height: 100vh;
}

a { color: var(--accent-strong); }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; height: auto; display: block; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

/* Header */
.site-header { padding: 18px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-family: var(--display); font-weight: 800; font-size: 21px; }
.brand img { width: 40px; height: 40px; border-radius: 11px; }
.nav { display: flex; gap: 20px; flex-wrap: wrap; }
.nav a { color: var(--text-muted); text-decoration: none; font-weight: 600; font-size: 15px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px; border-radius: 999px;
  background: var(--accent); color: #fff; text-decoration: none;
  font-family: var(--display); font-weight: 800; font-size: 17px;
  box-shadow: 0 8px 20px rgba(239, 107, 88, 0.35);
}
.btn:hover { background: var(--accent-strong); }
.btn svg { width: 20px; height: 20px; fill: currentColor; }

/* Home */
.hero { padding: 40px 0 56px; text-align: center; }
.hero .mascot { width: 168px; height: 168px; margin: 0 auto 24px; border-radius: 40px; box-shadow: var(--shadow); }
.overline { font-family: var(--display); font-weight: 900; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; }
h1, h2, h3 { font-family: var(--display); font-weight: 900; line-height: 1.15; margin: 0 0 14px; }
.hero h1 { font-size: clamp(34px, 6vw, 56px); max-width: 820px; margin-left: auto; margin-right: auto; }
.hero p.lead { font-size: 19px; color: var(--text-muted); max-width: 620px; margin: 0 auto 28px; }
.hero .note { margin-top: 14px; color: var(--text-faint); font-size: 14px; }

.section { padding: 48px 0; }
.section h2 { font-size: clamp(26px, 4vw, 36px); text-align: center; }
.section > .wrap > p.sub { text-align: center; color: var(--text-muted); max-width: 600px; margin: 0 auto 32px; }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid.five { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card h3 { font-size: 20px; margin-bottom: 6px; }
.card p { margin: 0; color: var(--text-muted); font-size: 16px; }
.dot { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 14px; font-size: 22px; }

.steps { counter-reset: step; }
.steps .card h3::before { counter-increment: step; content: counter(step); display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-strong); font-size: 16px; margin-right: 10px; vertical-align: 2px; }

.cta { text-align: center; padding: 56px 0 72px; }

/* Legal and support pages */
.doc { padding: 24px 0 64px; }
.doc h1 { font-size: clamp(32px, 5vw, 44px); margin-bottom: 6px; }
.doc .meta { color: var(--text-faint); font-size: 15px; margin: 0 0 28px; }
.doc h2 { font-size: 23px; margin: 40px 0 10px; }
.doc h3 { font-size: 18px; margin: 24px 0 6px; }
.doc p, .doc li { color: var(--text); }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc .summary { background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px; margin: 0 0 8px; }
.doc .summary ul { margin: 8px 0 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 15px; display: block; overflow-x: auto; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.doc th { font-family: var(--display); font-weight: 800; }
.doc .toc { columns: 2 240px; padding-left: 22px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 28px 0 40px; color: var(--text-faint); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: var(--text-muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .nav { gap: 14px; }
  .nav .hide-sm { display: none; }
  .hero { padding-top: 24px; }
  .hero .mascot { width: 132px; height: 132px; border-radius: 32px; }
}
