/* Basics of a Quadrotor (high-school physics): self-contained.
   Inherit the site's "Sage Biophilic" root tokens, define the rest. */
@import url("../styles.css");

:root { --accent: #3f5e8c; }
.mark { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 7px; color: #fff; background: linear-gradient(135deg, #2f8a5e, #3f5e8c); }
button { cursor: pointer; font: inherit; }
.hl { color: var(--accent); }
.nowrap { white-space: nowrap; }
.eyebrow { margin: 0 0 12px; color: var(--rose); font-size: .78rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(24px, 5vw, 56px); align-items: center; padding: clamp(44px, 7vw, 84px) clamp(18px, 4vw, 56px); min-height: 540px; background: radial-gradient(900px 460px at 88% -10%, #d8e2ee, transparent 60%), var(--paper); }
.hero h1 { margin: 0; font-size: clamp(2rem, 4.4vw, 3.6rem); line-height: 1.06; }
.lead { color: var(--muted); line-height: 1.7; font-size: clamp(1rem, 1.55vw, 1.14rem); max-width: 65ch; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.hero-badges span { border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; background: #fff; font-weight: 800; font-size: .85rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.button { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font-weight: 850; transition: transform .15s ease, box-shadow .15s ease; }
.button:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.hero-stage { border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(180deg, #eef3fb, #dfe7f2); box-shadow: var(--shadow); overflow: hidden; }
.hero-stage canvas { display: block; width: 100%; height: auto; }

/* bands */
.howto, .band, .study, .next { padding: clamp(36px, 6vw, 76px) clamp(18px, 4vw, 56px); border-top: 1px solid var(--line); }
.band { background: #e7eddc; } .band.alt { background: #e9eef6; }
.section-title { max-width: 820px; margin: 0 auto 24px; text-align: center; }
.section-title h2 { margin: 6px 0 10px; font-size: clamp(1.6rem, 3.2vw, 2.6rem); }
.section-title .lead { margin-inline: auto; }
.howto { background: #fff; }
.howlist { max-width: 900px; margin: 0 auto; color: var(--ink); line-height: 1.7; padding-left: 20px; }
.howlist li { margin-bottom: 6px; } .howlist strong { color: var(--accent); }

/* study view */
.idea code, .legend code, .cite code { background: #e7eddc; padding: 1px 5px; border-radius: 5px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .9em; }
.lbl { margin: 22px 0 8px; font-size: .74rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* ============================================================
   Interactive labs (high-school hands-on widgets). The generic
   .lab classes mirror the probability room so the look is shared.
   ============================================================ */
.lab { border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 12px; padding: 16px 18px; background: var(--panel); margin: 0 0 16px; box-shadow: var(--shadow); }
.lab-title { margin: 0 0 4px; font-weight: 900; color: var(--ink); font-size: 1.05rem; }
.lab-blurb { margin: 0 0 10px; color: var(--muted); line-height: 1.55; font-size: .92rem; }
.lab canvas { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 10px; background: linear-gradient(180deg, #eef3fb, #f7faf3); }
.lab-ctrls { display: grid; gap: 8px; margin: 12px 0 4px; }
.lab-row { display: grid; grid-template-columns: minmax(120px, 40%) 1fr auto; align-items: center; gap: 10px; }
.lab-name { font-weight: 700; color: var(--ink); font-size: .9rem; }
.lab-slider { width: 100%; min-height: 28px; accent-color: var(--accent); }
.lab-val { font-variant-numeric: tabular-nums; font-weight: 800; color: var(--accent); min-width: 3.4em; text-align: right; }
.lab-out { margin-top: 10px; padding: 10px 12px; border-top: 1px dashed var(--line); color: var(--ink); line-height: 1.7; font-size: .92rem; overflow-x: auto; }
.lab-out b { font-variant-numeric: tabular-nums; }
.lab-btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 0; }
.lab-btn { min-height: 38px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-weight: 800; color: var(--ink); }
.lab-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.lab-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(31,42,34,.10); }
.verdict { display: inline-block; padding: 3px 12px; border-radius: 999px; font-weight: 900; font-size: .85rem; }
.verdict.ok { color: #1d6b46; background: #d8efe1; }
.verdict.no { color: #9a4a32; background: #f5ddd2; }
.lab-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }

/* ---- QLab: the "visualize the math" interactive widget ---- */
.qlab { border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 12px; padding: 16px 18px; background: var(--panel); margin: 0 0 16px; box-shadow: var(--shadow); }
.qlab-stage { margin: 0 0 4px; }
.qlab canvas { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 10px; }
.qlab-mathbox { margin: 12px 0 0; padding: 10px 14px; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 10px; background: linear-gradient(180deg, #eef3fb, #fbfcff); }
.qlab-mathlbl { margin: 0 0 4px; font-size: .72rem; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); }
.qlab-mathrows { display: grid; gap: 2px; }
.qlab-mathrow { overflow-x: auto; overflow-y: hidden; }
.qlab-mathrow .katex-display { margin: 6px 0; }
.qlab-why { display: flex; gap: 9px; align-items: flex-start; margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: #fbfcf5; border: 1px dashed var(--line); color: var(--ink); line-height: 1.65; font-size: .92rem; }
.qlab-why-i { flex: none; font-size: 1.05rem; line-height: 1.4; }
.qlab-why b { color: var(--accent); }

/* colour legend tying equation colours to on-screen arrows */
.lab-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 12px auto 0; }
.lk { padding: 3px 11px 3px 22px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-weight: 800; font-size: .8rem; position: relative; }
.lk::before { content: ""; position: absolute; left: 8px; top: 50%; transform: translateY(-50%); width: 9px; height: 9px; border-radius: 50%; }
.lk-th::before { background: #15856f; } .lk-th { color: #15856f; }
.lk-wt::before { background: #b0533f; } .lk-wt { color: #b0533f; }
.lk-net::before { background: #26405f; } .lk-net { color: #26405f; }
.lk-vt::before { background: #466f96; } .lk-vt { color: #466f96; }
.lk-hz::before { background: #9a7d2e; } .lk-hz { color: #9a7d2e; }

/* ---- concept roadmap (animated journey above the deck) ---- */
.roadmap-wrap { max-width: 1080px; margin: 0 auto 22px; padding: 14px 16px 12px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(180deg, #eef3fb, var(--panel)); box-shadow: var(--shadow); }
.roadmap-head { margin: 0 0 6px; color: var(--ink); font-weight: 700; line-height: 1.5; font-size: .92rem; }
#roadmapCanvas { display: block; width: 100%; height: auto; cursor: pointer; }
.roadmap-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 6px 0 0; }
.rl { padding: 3px 11px 3px 22px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-weight: 800; font-size: .8rem; position: relative; }
.rl::before { content: ""; position: absolute; left: 8px; top: 50%; transform: translateY(-50%); width: 9px; height: 9px; border-radius: 50%; }
.rl-a::before { background: #2f7d5b; } .rl-a { color: #2f7d5b; }
.rl-b::before { background: #466f96; } .rl-b { color: #466f96; }
.rl-c::before { background: #3f5e8c; } .rl-c { color: #3f5e8c; }
@media (max-width: 720px) { .lab-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .lab-row { grid-template-columns: 1fr auto; } .lab-name { grid-column: 1 / -1; } }

/* fun "what happens" status chips for the labs */
.statechips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; }
.statechip { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-weight: 800; font-size: .84rem; color: var(--muted); }
.statechip.on { color: #fff; background: var(--accent); border-color: var(--accent); }

/* references */
.ref-list { max-width: 1000px; margin: 0 auto; color: var(--ink); line-height: 1.7; padding-left: 22px; }
.ref-list li { margin-bottom: 8px; } .ref-list a { color: var(--accent); font-weight: 800; }
.note { max-width: 1000px; margin: 14px auto 0; color: var(--muted); font-size: .9rem; }
.next { text-align: center; background: linear-gradient(180deg, #e2ebdb, var(--paper)); } .next .actions { justify-content: center; }

/* ✦ beautiful-idea highlight callouts (concept deck intro) */
.beauty-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 14px; max-width: 1080px; margin: 4px auto 26px; }
.beauty-note { border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 12px; padding: 14px 16px 16px; background: linear-gradient(180deg, var(--panel), #fff); box-shadow: var(--shadow); }
.bn-lbl { margin: 0 0 6px; font-size: .72rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.bn-name { margin: 0 0 8px; font-size: 1.04rem; line-height: 1.3; color: var(--ink); font-weight: 900; }
.bn-eq { margin: 4px 0 10px; overflow-x: auto; overflow-y: hidden; }
.bn-eq .katex-display { margin: 0; }
.bn-why { margin: 0; color: var(--ink); line-height: 1.7; font-size: .92rem; }
.bn-why em { font-style: normal; font-weight: 800; color: var(--accent); }

/* reveal */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 920px) {
  .topbar { flex-direction: column; align-items: flex-start; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
}
@media (max-width: 560px) { .actions .button { flex: 1 1 100%; justify-content: center; } }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } html { scroll-behavior: auto; } .lab-btn:hover { transform: none; } }

/* focus rings */
.button:focus-visible, .lab-btn:focus-visible, .lab-slider:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, #fff); outline-offset: 2px; border-radius: 6px; }
.ref-list a:focus-visible { outline: 2px solid color-mix(in srgb, var(--accent) 60%, #fff); outline-offset: 3px; border-radius: 4px; }

/* typography niceties */
.lead { text-wrap: pretty; }
.section-title h2 { text-wrap: balance; }
