/* Moonshift website. Inter (same as the app), moon yellow on night navy, light and dark themes. */

:root {
  color-scheme: light;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --raised: #eef0f7;
  --line: #dfe2ee;
  --text: #14183a;
  --muted: #4d5378;
  --soft: #6a7096;
  --moon: #f5c242;
  --moon-ink: #14183a;
  --accent-text: #7a5200;
  --focus: #2f5bd8;
  --ok: #0f7a4a;
  --err: #b42318;
  --night: #14183a;
  --shadow: 0 1px 2px rgba(20, 24, 58, 0.06), 0 12px 32px rgba(20, 24, 58, 0.08);
  --radius: 14px;
  --radius-sm: 10px;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Menlo, Consolas, monospace;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1126;
  --surface: #161a35;
  --raised: #1e2344;
  --line: #2b315a;
  --text: #eef0fa;
  --muted: #b3b8d6;
  --soft: #9298bd;
  --accent-text: #f5c242;
  --focus: #8fb0ff;
  --ok: #5fd39a;
  --err: #ff8a80;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 40px rgba(0, 0, 0, 0.35);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0e1126;
    --surface: #161a35;
    --raised: #1e2344;
    --line: #2b315a;
    --text: #eef0fa;
    --muted: #b3b8d6;
    --soft: #9298bd;
    --accent-text: #f5c242;
    --focus: #8fb0ff;
    --ok: #5fd39a;
    --err: #ff8a80;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 40px rgba(0, 0, 0, 0.35);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: inherit; }
p a, li a, .legal a, .fine a, summary + p a { color: var(--accent-text); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.025em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.4rem, 5.6vw, 4.2rem); font-weight: 700; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
code { font-family: var(--mono); font-size: 0.9em; background: var(--raised); padding: 1px 6px; border-radius: 6px; }

.skip-link { position: absolute; left: 12px; top: -60px; background: var(--moon); color: var(--moon-ink); padding: 10px 16px; border-radius: 8px; font-weight: 600; z-index: 100; text-decoration: none; }
.skip-link:focus { top: 12px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section.tight { padding: 36px 0; }
.section.alt { background: var(--surface); border-block: 1px solid var(--line); }
.eyebrow { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 14px; }
.lede { font-size: clamp(1.08rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 640px; }
.muted { color: var(--muted); }
.fine { font-size: 0.92rem; color: var(--soft); }
.section-head { max-width: 720px; margin-bottom: 40px; }
.center { text-align: center; margin-inline: auto; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: 999px;
  font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.6; cursor: wait; transform: none; }
.btn-primary { background: var(--moon); color: var(--moon-ink); }
.btn-primary:hover { background: #ffd062; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--soft); }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: 0.95rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 1.2rem; letter-spacing: -0.03em; }
.brand img { width: 36px; height: 36px; display: block; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a:not(.btn) { text-decoration: none; color: var(--muted); font-weight: 500; font-size: 0.97rem; padding: 10px 12px; border-radius: 8px; }
.nav a:not(.btn):hover, .nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"] { background: var(--raised); }
.nav .btn { margin-left: 8px; }
.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer; flex: none; }
.icon-btn:hover { border-color: var(--soft); }
.icon-btn svg { width: 20px; height: 20px; }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: none; }
}
.nav-toggle { display: none; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-grid; }
  .site-header .theme-toggle { margin-left: auto; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 12px 20px 20px; display: none;
  }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 12px; font-size: 1.05rem; }
  .nav .btn { margin: 10px 0 0; }
}

/* Hero */
.hero { padding: clamp(48px, 8vw, 104px) 0 clamp(48px, 7vw, 88px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 .moonlit { color: var(--text); background: linear-gradient(transparent 62%, var(--moon) 62%, var(--moon) 92%, transparent 92%); padding: 0 0.04em; }
:root[data-theme="dark"] .hero h1 .moonlit { color: var(--moon); background: none; padding: 0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero h1 .moonlit { color: var(--moon); background: none; padding: 0; } }
.hero-note { margin-top: 18px; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

/* Run card (illustration of a run in the app) */
.run-card { margin: 0; background: var(--night); color: #eef0fa; border-radius: 20px; padding: 24px; box-shadow: var(--shadow); border: 1px solid #2b315a; position: relative; overflow: hidden; }
.run-card::before { content: ""; position: absolute; width: 150px; height: 150px; right: -48px; top: -62px; border-radius: 50%; background: #f5c242; opacity: 0.95; }
.run-card > * { position: relative; }
.run-head { padding-right: 84px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.run-head strong { font-size: 1.05rem; }
.run-head span { font-size: 0.85rem; color: #b3b8d6; }
.run-meter { height: 8px; border-radius: 99px; background: #2b315a; overflow: hidden; margin-bottom: 18px; }
.run-meter i { display: block; height: 100%; width: 68%; background: #f5c242; border-radius: inherit; }
.run-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.run-list li { min-width: 0; display: flex; align-items: center; gap: 12px; background: #1e2344; border: 1px solid #2b315a; border-radius: 12px; padding: 12px 14px; font-size: 0.95rem; }
.run-list .job { flex: 1; min-width: 0; }
.run-list .job b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.run-list .job small { color: #b3b8d6; font-size: 0.82rem; }
.tag { font-size: 0.75rem; font-weight: 600; padding: 4px 10px; border-radius: 99px; white-space: nowrap; }
.tag.sent { background: rgba(95, 211, 154, 0.16); color: #7fe0b0; }
.tag.wait { background: rgba(245, 194, 66, 0.16); color: #f5c242; }
.run-foot { margin: 16px 0 0; font-size: 0.85rem; color: #b3b8d6; }

/* Logos row (text only) */
.boards-row { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; margin-top: 8px; }
.board-chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 8px 14px; font-weight: 600; font-size: 0.95rem; }
.board-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.board-chip.soon { color: var(--soft); font-weight: 500; }
.board-chip.soon .dot { background: var(--soft); }

/* Cards and grids */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.section.alt .card { background: var(--bg); }
.card p:last-child { margin-bottom: 0; }
.card .icon { width: 44px; height: 44px; border-radius: 12px; background: var(--raised); display: grid; place-items: center; margin-bottom: 16px; color: var(--accent-text); }
.card .icon svg { width: 22px; height: 22px; }

.split { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 44px 1fr; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; counter-increment: step; }
.section.alt .steps li { background: var(--bg); }
.steps li::before { content: counter(step); width: 44px; height: 44px; border-radius: 50%; background: var(--moon); color: var(--moon-ink); display: grid; place-items: center; font-weight: 700; }
.steps h3 { margin-bottom: 4px; }
.steps p { margin: 0; color: var(--muted); }

/* Boards table */
.board-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.board { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.section.alt .board { background: var(--bg); }
.board-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.board-top strong { font-size: 1.1rem; }
.badge { font-size: 0.75rem; font-weight: 600; padding: 4px 10px; border-radius: 99px; background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); white-space: nowrap; }
.badge.soon { background: var(--raised); color: var(--soft); }
.board p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.board .region { display: block; font-size: 0.8rem; color: var(--soft); margin-top: 10px; }

/* Pricing */
.price-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; max-width: 880px; margin-inline: auto; }
@media (max-width: 720px) { .price-grid { grid-template-columns: 1fr; } }
.price { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 32px; display: flex; flex-direction: column; }
.price.featured { border: 2px solid var(--moon); box-shadow: var(--shadow); }
.price h2 { font-size: 1.5rem; margin-bottom: 6px; }
.amount { font-size: 3rem; font-weight: 700; letter-spacing: -0.04em; margin: 10px 0 4px; line-height: 1; }
.amount small { font-size: 1rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.price ul { list-style: none; padding: 0; margin: 20px 0 28px; display: grid; gap: 10px; flex: 1; }
.price li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; color: var(--muted); }
.price li::before { content: ""; width: 18px; height: 18px; margin-top: 4px; border-radius: 50%; background: var(--moon) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%2314183a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }
.price .btn { width: 100%; }
.ribbon { align-self: flex-start; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; background: var(--moon); color: var(--moon-ink); padding: 5px 10px; border-radius: 99px; margin-bottom: 14px; }
.price .ribbon.quiet { background: var(--raised); color: var(--muted); }

/* FAQ */
.faq { display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 22px; }
.section.alt .faq details { background: var(--bg); }
.faq summary { cursor: pointer; list-style: none; font-weight: 600; padding: 20px 32px 20px 0; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 1.4rem; font-weight: 400; color: var(--soft); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--muted); margin: 0 0 20px; }

/* CTA band */
.cta-band { background: var(--night); color: #eef0fa; border-radius: 24px; padding: clamp(32px, 5vw, 56px); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: center; position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; width: 220px; height: 220px; right: -70px; bottom: -120px; border-radius: 50%; background: #f5c242; }
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { margin-bottom: 8px; }
.cta-band p { color: #b3b8d6; margin: 0; }
@media (max-width: 720px) { .cta-band { grid-template-columns: 1fr; } }

/* Panels and forms */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: clamp(22px, 3vw, 32px); box-shadow: var(--shadow); }
.stack { display: grid; gap: 18px; }
label { display: grid; gap: 6px; font-weight: 500; font-size: 0.95rem; }
input, select, textarea {
  width: 100%; font: 400 1rem/1.4 var(--sans); color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px; min-height: 48px;
}
textarea { resize: vertical; min-height: 96px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: transparent; }
input::placeholder, textarea::placeholder { color: var(--soft); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }
.optional { font-weight: 400; color: var(--soft); font-size: 0.85rem; margin-left: 4px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 500; font-size: 0.95rem; margin-bottom: 8px; padding: 0; }
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-group legend { width: 100%; }
.chip { display: inline-flex; position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; min-height: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); font-weight: 500; font-size: 0.93rem; cursor: pointer; }
.chip span em { font-style: normal; font-size: 0.75rem; color: var(--soft); }
.chip input:checked + span { background: var(--moon); border-color: var(--moon); color: var(--moon-ink); }
.chip input:checked + span em { color: var(--moon-ink); }
.chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.consent { grid-template-columns: 22px 1fr; align-items: start; gap: 12px; font-weight: 400; color: var(--muted); }
.consent input { width: 20px; height: 20px; min-height: 0; margin-top: 3px; accent-color: #d9a520; }
.invalid input, input.invalid, .invalid select, select.invalid { border-color: var(--err); }
.chip-group.invalid legend, .consent.invalid span { color: var(--err); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { margin: 0; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--raised); font-size: 0.95rem; }
.notice.err { background: color-mix(in srgb, var(--err) 12%, transparent); color: var(--err); }
.notice.ok { background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok); }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.access-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 64px); align-items: start; }
@media (max-width: 960px) { .access-grid { grid-template-columns: 1fr; } }
.access-done { text-align: center; padding: 24px 8px; }
.access-done img { width: 88px; height: 88px; margin: 0 auto 16px; display: block; }
.access-done .actions { justify-content: center; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 28px; }
.facts div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.facts strong { display: block; font-size: 1.6rem; letter-spacing: -0.03em; }
.facts span { font-size: 0.88rem; color: var(--muted); }
@media (max-width: 520px) { .facts { grid-template-columns: 1fr; } .facts div { display: flex; align-items: baseline; gap: 12px; } }

/* Download */
.os-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.release-notes { margin-top: 24px; white-space: pre-line; }
.help-list { margin: 0; padding-left: 20px; color: var(--muted); }
.help-list li { margin-bottom: 6px; }

/* Legal */
.legal { max-width: 760px; }
.legal h2 { font-size: 1.35rem; margin-top: 2em; }
.legal p, .legal li { color: var(--muted); }
.legal ul { padding-left: 20px; }

/* Contact */
.contact-card { display: grid; gap: 6px; }
.contact-card a.big { font-size: clamp(1.3rem, 3vw, 1.8rem); font-weight: 700; letter-spacing: -0.02em; color: var(--text); text-decoration: none; word-break: break-word; }
.contact-card a.big:hover { color: var(--accent-text); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 40px; margin-top: 0; font-size: 0.95rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.site-footer h2 { font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--soft); margin-bottom: 12px; font-weight: 600; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.site-footer .brand { color: var(--text); margin-bottom: 12px; }
.footer-legal { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--soft); font-size: 0.85rem; }
.footer-legal p { margin: 0; max-width: 720px; }

/* 404 */
.not-found { text-align: center; padding: clamp(72px, 12vw, 140px) 0; }
.not-found img { width: 140px; height: 140px; margin-bottom: 24px; }
.not-found .actions { justify-content: center; }

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