/* Ostinato website. Same brand as the app (lib/core/theme.dart): manuscript
   paper, ink outlines, melody purple, sunshine, coral, sky, mint; Bricolage
   Grotesque for headings, Lexend for text. No JavaScript. */

@font-face {
  font-family: "Bricolage";
  src: url("/fonts/BricolageGrotesque.woff2") format("woff2");
  font-weight: 500 800;
  font-display: swap;
}
@font-face {
  font-family: "Lexend";
  src: url("/fonts/Lexend.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --ink: #1E2240;
  --ink-soft: #4F5675;
  --paper: #FFF9F0;
  --paper-deep: #F5F2EA;
  --surface: #FFFFFF;
  --stave: #E4E1EE;
  --melody: #5B3FD6;
  --melody-soft: #ECE7FF;
  --sunshine: #FFC53D;
  --sunshine-soft: #FFF3D1;
  --coral: #FF7A59;
  --coral-deep: #D9482B;
  --sky: #57B4FF;
  --mint: #1FA38A;
  --radius: 22px;
  --shadow: 0 6px 0 var(--ink);
  --display: "Bricolage", ui-rounded, "Avenir Next", system-ui, sans-serif;
  --text: "Lexend", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--melody); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--melody); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { max-width: 680px; margin-inline: auto; }
.center { text-align: center; }
.small { font-size: .9rem; color: var(--ink-soft); }

h1, h2, h3 { font-family: var(--display); line-height: 1.08; letter-spacing: -0.015em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.1rem); font-weight: 800; }
h2 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); font-weight: 800; }
h3 { font-size: 1.35rem; font-weight: 700; }
p { margin: 0 0 1em; }
.lead { font-size: clamp(1.08rem, 1.6vw, 1.22rem); color: var(--ink-soft); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: rgba(255, 249, 240, .92); backdrop-filter: blur(8px); border-bottom: 2px solid var(--ink); }
.header-row { display: flex; align-items: center; gap: 20px; padding: 12px 0; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.mark { width: 40px; height: 40px; }
.wordmark { font-family: var(--display); font-weight: 800; font-size: 1.7rem; letter-spacing: -0.02em; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.nav a:hover { color: var(--melody); }
.nav a[aria-current="page"] { color: var(--melody); text-decoration: underline; text-decoration-thickness: 2px; }
.header-cta { display: flex; align-items: center; gap: 14px; }
.header-cta .btn { white-space: nowrap; }
.link-quiet { color: var(--ink); font-weight: 600; text-decoration: none; }
@media (max-width: 1000px) { .nav { gap: 16px; font-size: 1rem; } }
@media (max-width: 900px) { .nav { display: none; } .header-cta { margin-left: auto; } }
/* Phones: the sticky header keeps "Join the beta" full size, so it's always in reach. */
@media (max-width: 560px) {
  .header-row { gap: 12px; padding: 10px 0; }
  .mark { width: 34px; height: 34px; }
  .wordmark { font-size: 1.45rem; }
  .header-cta .btn-small { font-size: 1.02rem; padding: 10px 16px; }
  .cta-row .btn { flex: 1 1 100%; text-align: center; }
}
@media (max-width: 420px) { .link-quiet { display: none; } }
@media (max-width: 350px) { .wordmark { font-size: 1.25rem; } .header-cta .btn-small { padding: 9px 12px; } }

/* Buttons and chips */
.btn {
  display: inline-block;
  background: var(--coral-deep);
  color: #fff;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.12rem;
  padding: 14px 24px;
  border-radius: 18px;
  border: 2px solid var(--ink);
  box-shadow: 0 5px 0 var(--ink);
  text-decoration: none;
  transition: transform .12s, box-shadow .12s;
}
.btn:hover { transform: translateY(2px); box-shadow: 0 3px 0 var(--ink); }
.btn:active { transform: translateY(5px); box-shadow: 0 0 0 var(--ink); }
.btn-small { font-size: .95rem; padding: 9px 16px; border-radius: 14px; box-shadow: 0 4px 0 var(--ink); }
.btn-ghost { background: var(--surface); color: var(--ink); }
.btn-sun { background: var(--sunshine); color: var(--ink); }
.chip { display: inline-block; font-weight: 600; font-size: .92rem; padding: 6px 14px; border-radius: 999px; border: 2px solid var(--ink); margin-bottom: 18px; }
.chip-sun { background: var(--sunshine); }

/* Hero, on manuscript paper */
.stave {
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 26px, var(--stave) 26px, var(--stave) 28px);
  background-size: 100% 140px;
  background-position: 0 40px;
}
.hero { padding: clamp(40px, 7vw, 90px) 0 clamp(50px, 8vw, 100px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.hero-copy { background: rgba(255, 249, 240, .85); border-radius: 24px; }
.marker { background: linear-gradient(transparent 58%, var(--sunshine) 58%, var(--sunshine) 92%, transparent 92%); padding: 0 .1em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin: 26px 0 16px; }
.hero-art { position: relative; justify-self: center; width: min(320px, 80vw); }
.float-note { position: absolute; width: 46px; }
.n1 { right: -40px; top: 40px; transform: rotate(10deg); }
.n2 { left: -34px; top: 120px; width: 38px; transform: rotate(-12deg); }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .n1 { right: -8px; } .n2 { left: -6px; }
}

/* Phone and screen frames */
.phone {
  margin: 0; border: 3px solid var(--ink); border-radius: 36px; overflow: hidden;
  background: var(--paper); box-shadow: 0 10px 0 var(--ink); max-width: 320px;
}
.phone.small { max-width: 270px; }
.tilt-right { transform: rotate(3deg); }
.tilt-left { transform: rotate(-3deg); }
.screen {
  margin: 34px auto; border: 3px solid var(--ink); border-radius: 20px; overflow: hidden;
  box-shadow: 0 10px 0 var(--ink); background: #fff; max-width: 1000px;
}
.screen-narrow { margin: 0; max-width: 560px; }

/* Sections */
.section { padding: clamp(56px, 8vw, 100px) 0; }
.section-paper { background: var(--paper-deep); border-block: 2px solid var(--ink); }
.section-sun { background: var(--sunshine-soft); border-block: 2px solid var(--ink); }
.section-ink { background: var(--ink); color: #fff; }
.section-ink .lead { color: #D6D8E6; }
.section-melody { background: var(--melody); color: #fff; border-top: 2px solid var(--ink); }
.section-melody .lead { color: #E7E2FF; }

/* Sound familiar: plain boxes */
.boxes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin: 34px 0 36px; }
.box {
  margin: 0; background: var(--surface); border: 2px solid var(--ink);
  border-radius: var(--radius); padding: 22px 22px; box-shadow: var(--shadow);
  font-family: var(--display); font-weight: 700; font-size: 1.3rem; line-height: 1.25;
}
.box span { color: var(--ink-soft); }
.box-coral { background: #FFE6DE; }
.box-sky { background: #E1F1FF; }
@media (max-width: 860px) { .boxes { grid-template-columns: 1fr; } }

/* Steps */
.step-row { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin-top: 34px; }
.step-copy { background: var(--surface); border: 2px solid var(--ink); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.step-num {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  border: 2px solid var(--ink); font-family: var(--display); font-weight: 800; font-size: 1.2rem; margin-bottom: 12px;
}
.s1 { background: var(--sunshine); } .s2 { background: var(--coral); } .s3 { background: var(--sky); } .s4 { background: var(--mint); color: #fff; }
.duo { display: flex; gap: 36px; align-items: center; justify-content: center; margin-top: 40px; flex-wrap: wrap; }
@media (max-width: 760px) { .step-row { grid-template-columns: 1fr; } }

/* Two columns */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.two-col.reverse > figure { justify-self: center; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.card-list { display: grid; gap: 14px; }
.card { background: var(--surface); border: 2px solid var(--ink); border-radius: 16px; padding: 14px 18px 14px 54px; position: relative; font-weight: 500; box-shadow: 0 4px 0 var(--ink); }
.tick::before {
  content: "✓"; position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 50%; background: var(--mint); color: #fff;
  display: grid; place-items: center; font-weight: 800; border: 2px solid var(--ink); font-size: .9rem;
}
.checks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; }
.checks li { padding-left: 36px; position: relative; }
.checks li::before { content: "♪"; position: absolute; left: 6px; top: -2px; font-size: 1.3rem; color: var(--melody); }

/* Makers */
.maker-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin-top: 30px; }
.maker { margin: 0; background: var(--surface); border: 2px solid var(--ink); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.maker blockquote { margin: 14px 0 14px; font-size: 1.12rem; }
.avatar { width: 112px; height: 112px; border-radius: 50%; border: 2px solid var(--ink); object-fit: cover; }
.more { margin: 28px 0 0; font-weight: 600; }
@media (max-width: 760px) { .maker-grid { grid-template-columns: 1fr; } .avatar { width: 96px; height: 96px; } }

/* Schools */
.safe-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 34px 0 28px; }
.safe { background: #2A2F55; border: 2px solid #3B4170; border-radius: 18px; padding: 22px; }
.safe h3 { color: var(--sunshine); font-size: 1.2rem; }
.safe h3 a { color: inherit; }
.safe p { margin: 0; color: #D6D8E6; }
.link-light { color: var(--sunshine); font-weight: 600; }
@media (max-width: 860px) { .safe-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .safe-grid { grid-template-columns: 1fr; } }

/* FAQ */
details { background: var(--surface); border: 2px solid var(--ink); border-radius: 16px; margin: 12px 0; box-shadow: 0 4px 0 var(--ink); }
summary { cursor: pointer; padding: 16px 20px; font-family: var(--display); font-weight: 700; font-size: 1.15rem; list-style: none; position: relative; padding-right: 48px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 1.5rem; color: var(--melody); }
details[open] summary::after { content: "–"; }
details p { padding: 0 20px 16px; margin: 0; color: var(--ink-soft); }

/* Footer */
.site-footer { background: var(--paper); border-top: 2px solid var(--ink); padding: 26px 0; font-size: .95rem; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
.footer-row p { margin: 0; }

/* Plain pages (privacy) */
.page { padding: clamp(40px, 6vw, 80px) 0; }
.page h2 { font-size: 1.6rem; margin-top: 1.6em; }
.page ul { padding-left: 1.2em; }
.page li { margin-bottom: .4em; }

/* About us */
.people { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin: 40px auto; max-width: 880px; }
.person { margin: 0; background: var(--surface); border: 2px solid var(--ink); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.person h2 { margin: 18px 0 .15em; font-size: 1.6rem; }
.person .role { color: var(--ink-soft); font-weight: 600; }
.person img { width: 100%; aspect-ratio: 1 / 1; border: 2px solid var(--ink); border-radius: 18px; object-fit: cover; }
.story { margin-bottom: 56px; }
.story h3 { margin-top: 1.5em; }
@media (max-width: 760px) { .people { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

/* Small helpers (no inline styles: the CSP forbids them) */
.push { margin-left: auto; }
.full { min-height: 100vh; }
