/* Pegasus Coders: shared styles for every page. Token names match
   mappu.app and michi-app.com so the three sites stay related. */
:root {
  --accent: #2b3a8c;
  --accent-deep: #1e2a6b;
  --accent-soft: rgba(43, 58, 140, 0.08);
  --mappu: #d8232a;
  --michi: #086f4c;
  --ink: #0f1419;
  --wordmark: #1e2a6b;
  --ink-2: #4a525c;
  --ink-3: #8a929c;
  --line: #e6e8ec;
  --bg: #ffffff;
  --bg-soft: #f7f8fc;
  --card: #ffffff;
  --shadow-sm: 0 1px 2px rgba(15, 20, 25, 0.04), 0 2px 8px rgba(15, 20, 25, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 20, 25, 0.06), 0 16px 40px rgba(15, 20, 25, 0.08);
  --radius: 16px;
  --radius-lg: 22px;
  --maxw: 1080px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --accent: #8fa2ff;
    --accent-deep: #b4c1ff;
    --accent-soft: rgba(143, 162, 255, 0.10);
    --mappu: #ff5a60;
    --michi: #4cc293;
    --ink: #f4f6f8;
    --wordmark: #f4f6f8;
    --ink-2: #b3bac3;
    --ink-3: #7a828c;
    --line: #20262e;
    --bg: #0b0e12;
    --bg-soft: #11151c;
    --card: #141921;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.3), 0 2px 8px rgba(0,0,0,.25);
    --shadow-md: 0 4px 12px rgba(0,0,0,.4), 0 16px 40px rgba(0,0,0,.45);
  }
}

/* Montserrat (variable, latin subset), self-hosted for the wordmark */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/montserrat-latin.woff2") format("woff2");
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap { padding: 0 24px; } }

/* Header */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; color: var(--ink); font-weight: 700; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand svg { width: 34px; height: 34px; flex: none; }
/* Wordmark: PEGASUS over CODERS, as in the logo lockup */
.brand-name { display: inline-flex; flex-direction: column; font-family: "Montserrat", sans-serif; color: var(--wordmark); line-height: 1; }
.wm-1 { font-weight: 800; font-size: 17px; letter-spacing: .03em; }
.wm-2 { font-weight: 500; font-size: 10.5px; letter-spacing: .3em; margin-top: 3px; }
.nav-links { display: flex; gap: 4px; }
.nav-links a { color: var(--ink-2); font-size: 15px; font-weight: 500; padding: 6px 10px; border-radius: 8px; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); background: var(--bg-soft); text-decoration: none; }
@media (max-width: 420px) {
  .nav-inner { gap: 8px; }
  .brand { gap: 8px; }
  .wm-1 { font-size: 15px; }
  .wm-2 { font-size: 9.5px; }
  .nav-links { gap: 0; }
  .nav-links a { padding: 6px 6px; font-size: 14px; }
}
@media (max-width: 359px) {
  .brand-name { display: none; }
}

/* Hero */
.hero {
  position: relative; overflow: hidden;
  padding: 88px 0 72px;
  background:
    radial-gradient(900px 400px at 85% -10%, var(--accent-soft), transparent 70%),
    radial-gradient(700px 360px at -10% 110%, var(--accent-soft), transparent 70%);
}
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
}
.hero h1 { font-size: clamp(36px, 6.4vw, 64px); font-weight: 800; max-width: 14ch; margin-bottom: 20px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p.lede { font-size: clamp(18px, 2.2vw, 21px); color: var(--ink-2); max-width: 36em; margin: 0 0 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.05fr .95fr; gap: 32px; } }
.hero-art { width: 100%; max-width: 520px; justify-self: center; color: var(--accent); }
@media (max-width: 899px) { .hero-grid { gap: 24px; } .hero-art { max-width: 280px; } }
.hero-art .soft { fill: var(--accent-soft); }
.hero-art .road, .hero-art .snow { fill: var(--bg); }
.hero-art .sun { fill: var(--mappu); opacity: .9; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font: inherit; font-weight: 600; font-size: 15px;
  background: var(--accent); color: #fff;
  border: 1px solid var(--accent);
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { background: var(--accent-deep); border-color: var(--accent-deep); transform: translateY(-1px); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--bg-soft); }
@media (prefers-color-scheme: dark) {
  .btn { color: #0b0e12; }
  .btn.ghost { color: var(--ink); }
}

/* Sections */
section { padding: 72px 0; }
section.alt { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { margin-bottom: 36px; max-width: 40em; }
.section-head h2 { font-size: clamp(28px, 4vw, 38px); font-weight: 800; }
.section-head p { color: var(--ink-2); margin: 0; }

/* App cards */
.apps { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 820px) { .apps { grid-template-columns: 1fr 1fr; } }
.app-card {
  --brand: var(--accent);
  position: relative; display: flex; flex-direction: column;
  padding: 28px; border-radius: var(--radius-lg);
  background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), border-color .35s;
  overflow: hidden;
}
.app-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--brand);
}
.app-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); text-decoration: none; }
.app-card.mappu { --brand: var(--mappu); }
.app-card.michi { --brand: var(--michi); }
.app-top { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.app-top img { width: 64px; height: 64px; border-radius: 15px; box-shadow: var(--shadow-sm); flex: none; }
.app-top h3 { font-size: 26px; margin: 0; }
.app-top .tagline { margin: 2px 0 0; color: var(--brand); font-weight: 600; font-size: 15px; line-height: 1.35; }
.app-card p.desc { color: var(--ink-2); margin: 0 0 20px; }
.app-meta { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.status.soon::before { background: transparent; border: 2px solid var(--brand); width: 6px; height: 6px; }
.visit { font-weight: 600; font-size: 15px; color: var(--brand); white-space: nowrap; }
.visit span { display: inline-block; transition: transform .25s var(--ease-out); }
.app-card:hover .visit span { transform: translateX(4px); }

/* Principles */
.principles { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .principles { grid-template-columns: repeat(3, 1fr); } }
.principle { padding: 24px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.principle .icon {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 14px;
}
.principle .icon svg { width: 22px; height: 22px; }
.principle h3 { font-size: 19px; margin-bottom: 6px; }
.principle p { margin: 0; color: var(--ink-2); font-size: 16px; }
.langs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; padding: 0; list-style: none; }
.langs li { font-size: 13px; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); }

/* Contact call-out */
.cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
  padding: 32px; border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #1e2a6b, #2b3a8c 60%, #3a4bb0);
  color: #fff;
}
.cta h2 { font-size: clamp(24px, 3.4vw, 30px); margin: 0 0 6px; }
.cta p { margin: 0; color: rgba(255,255,255,.8); }
.cta .btn { background: #fff; color: #1e2a6b; border-color: #fff; }
.cta .btn:hover { background: #e8ecff; border-color: #e8ecff; }

/* Text pages (contact, privacy) */
.page { padding-top: 56px; padding-bottom: 80px; }
.page article { max-width: 680px; }
.page h1 { font-size: clamp(32px, 5vw, 44px); font-weight: 800; }
.page h2 { font-size: 22px; margin-top: 36px; }
.page .lede { font-size: 19px; color: var(--ink-2); margin-bottom: 32px; }
.page p, .page li { color: var(--ink-2); }
.page .updated { font-size: 14px; color: var(--ink-3); }

/* Contact form */
form label { display: block; margin-bottom: 18px; }
.label-text { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; color: var(--ink); }
input[type="text"], input[type="email"], select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  padding: 11px 14px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--line);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { resize: vertical; min-height: 140px; }
.hp {
  position: absolute !important; left: -9999px !important;
  width: 1px !important; height: 1px !important;
  opacity: 0 !important; pointer-events: none !important;
}
.h-captcha { margin: 4px 0 18px; }
.form-status { min-height: 1.5em; margin: 14px 0 0; font-size: 15px; color: var(--ink-2); }
.form-status.error { color: #c2262d; }
@media (prefers-color-scheme: dark) { .form-status.error { color: #ff7a7f; } }
.privacy-note { font-size: 14px; color: var(--ink-3) !important; }
.thanks { padding: 28px; border-radius: var(--radius); background: var(--accent-soft); border: 1px solid var(--line); }
.thanks h2 { margin: 0 0 6px; font-size: 22px; }
.thanks p { margin: 0; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 32px 0 40px; font-size: 14px; color: var(--ink-3); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; }
.footer-brand svg { width: 22px; height: 22px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { color: var(--ink-2); }

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