/* servermage.app. The palette matches the iPhone app (ios/ServerMage/Views/Brand.swift). */
:root {
  color-scheme: dark;
  --bg: #091426;
  --bg-2: #0c192c;
  --panel: #101f34;
  --line: #25354a;
  --text: #f4f6fb;
  --muted: #a4b3c8;
  --gold: #e9c47f;
  --blue: #83ceff;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; border-radius: 6px; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; font-weight: 650; }
.wrap { width: min(1160px, calc(100% - 64px)); margin-inline: auto; }
.gold { color: var(--gold); }

.skip { position: absolute; top: -100px; left: 16px; background: var(--gold); color: var(--bg); padding: 10px 14px; border-radius: 8px; z-index: 20; }
.skip:focus { top: 12px; }

/* Header */
.header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(9, 20, 38, 0.82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; letter-spacing: -0.5px; }
.brand img { border-radius: 22%; }
.brand.small { font-size: 16px; }
.header nav { display: flex; gap: 26px; margin-left: auto; font-size: 14px; font-weight: 550; color: var(--muted); }
.header nav a:hover { color: var(--text); }
.pill { font-size: 12px; font-weight: 650; color: var(--gold); border: 1px solid #5b4c35; padding: 6px 14px; border-radius: 99px; white-space: nowrap; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; padding-block: 72px 64px; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; font-size: 12px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; color: var(--blue); }
.eyebrow.gold { color: var(--gold); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 12px #83ceffaa; }
h1 { font-size: clamp(40px, 5.2vw, 66px); line-height: 1.05; letter-spacing: -2.4px; margin-bottom: 22px; }
h1 em { font-style: normal; color: var(--gold); }
.lead { font-size: 19px; line-height: 1.55; color: #d7deea; max-width: 34em; margin: 0 0 22px; }
.hero-points { list-style: none; padding: 0; margin: 0 0 30px; display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 14px; color: var(--muted); }
.hero-points li::before { content: "✦"; color: var(--gold); margin-right: 8px; font-size: 11px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button { display: inline-flex; align-items: center; justify-content: center; padding: 13px 22px; border-radius: 10px; font-size: 15px; font-weight: 650; background: var(--gold); color: var(--bg); transition: background 0.2s, border-color 0.2s; }
.button:hover { background: #f6d9a2; }
.button.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.button.ghost:hover { border-color: var(--muted); }

.hero-visual { position: relative; min-height: 520px; }
.mage {
  position: absolute; left: -6%; top: 2%; width: 92%;
  -webkit-mask-image: radial-gradient(ellipse 58% 56% at 50% 50%, #000 55%, transparent 100%);
  mask-image: radial-gradient(ellipse 58% 56% at 50% 50%, #000 55%, transparent 100%);
}

/* The phone: an illustration of the app's dashboard in its real colors. */
.phone {
  position: absolute; right: 0; bottom: 0; width: 250px;
  border-radius: 40px; padding: 9px;
  background: linear-gradient(145deg, #3a4a63, #151f30);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px #4a5b75 inset;
}
.phone-screen { border-radius: 32px; background: var(--bg); padding: 12px 12px 18px; font-size: 10px; overflow: hidden; }
.ph-status { display: flex; justify-content: space-between; align-items: center; font-size: 10px; font-weight: 650; padding: 2px 10px 10px; }
.ph-island { width: 64px; height: 18px; border-radius: 12px; background: #000; }
.ph-title { font-size: 20px; font-weight: 750; letter-spacing: -0.5px; margin: 4px 4px 10px; }
.ph-label { font-size: 10px; font-weight: 650; color: var(--muted); margin: 10px 6px 5px; }
.ph-label.gold { color: var(--gold); }
.ph-card { background: var(--panel); border-radius: 12px; padding: 2px 10px; }
.ph-row { display: flex; align-items: center; gap: 9px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.ph-row:last-child { border-bottom: 0; }
.ph-row strong, .ph-health strong { display: block; font-size: 10.5px; font-weight: 600; }
.ph-row small, .ph-health small { display: block; font-size: 9px; color: var(--muted); }
.ph-health { display: flex; align-items: center; gap: 9px; padding: 9px 10px; margin-top: 8px; }
.ph-dot { width: 9px; height: 9px; border-radius: 50%; }
.ph-dot.ok { background: #34c759; }
.ph-icon { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: var(--bg); }
.ph-icon.up { background: var(--blue); }
.ph-app { width: 22px; height: 22px; border-radius: 6px; flex: none; }
.ph-app.a1 { background: linear-gradient(135deg, #aa5cc3, #00a4dc); }
.ph-app.a2 { background: conic-gradient(#fa2921, #ed79b5, #ffb400, #1e83f7, #18c249, #fa2921); }
.ph-app.a3 { background: linear-gradient(135deg, #96060c, #f60d1a); }
.ph-app.a4 { background: radial-gradient(circle, #5cdd8b 40%, #e6f7ec 42%); }
.ph-app.a5 { background: linear-gradient(135deg, #0082c9, #1cafff); }

/* Supported systems */
.strip { border-block: 1px solid var(--line); background: var(--bg-2); }
.strip-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 18px; }
.strip-label { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.strip p { margin: 0; font-size: 14px; font-weight: 600; }
.strip i { font-style: normal; color: #536984; margin-inline: 8px; }
.strip p span { white-space: nowrap; }
.strip-note { font-size: 13px; color: var(--muted); }

/* Sections */
.section { padding-block: 96px; }
.heading { max-width: 680px; margin-bottom: 44px; }
h2 { font-size: clamp(30px, 3.4vw, 44px); line-height: 1.12; letter-spacing: -1.4px; }
.heading > p:not(.eyebrow) { color: var(--muted); font-size: 16px; margin: 16px 0 0; }
h3 { font-size: 19px; letter-spacing: -0.3px; margin-bottom: 8px; }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: none; }
.steps li { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.steps p { color: var(--muted); font-size: 14.5px; margin: 0; }
.step-n { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--gold); color: var(--bg); font-weight: 800; margin-bottom: 18px; }

/* Apps */
.apps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.app { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.app-cat { display: inline-block; font-size: 11px; font-weight: 650; color: var(--blue); background: #83ceff1a; padding: 3px 9px; border-radius: 99px; margin-bottom: 14px; }
.app p { color: var(--muted); font-size: 14px; margin: 0; }
.soon { margin-top: 26px; padding: 22px 24px; border: 1px dashed var(--line); border-radius: var(--radius); }
.soon-label { margin: 0 0 12px; font-size: 13px; font-weight: 650; color: var(--gold); }
.soon ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.soon li { font-size: 13.5px; padding: 5px 12px; border-radius: 99px; background: var(--bg-2); border: 1px solid var(--line); }
.fine { font-size: 12px; color: #7d8ea8; margin: 18px 0 0; }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.88em; color: var(--blue); background: #83ceff14; padding: 1px 5px; border-radius: 5px; overflow-wrap: anywhere; }

/* Upkeep */
.upkeep-wrap { background: linear-gradient(180deg, var(--bg) 0%, #0b1a30 50%, var(--bg) 100%); border-block: 1px solid var(--line); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card { background: var(--bg); padding: 30px; }
.card p { color: var(--muted); font-size: 14.5px; margin: 0; }
.card-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: #83ceff1a; color: var(--blue); font-size: 19px; font-weight: 700; margin-bottom: 18px; }

/* Safety */
.safety { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: start; }
.safety-copy > p:not(.eyebrow) { color: var(--muted); font-size: 16px; margin-top: 16px; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.checks li { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px 16px 50px; font-size: 14.5px; color: var(--muted); }
.checks li::before { content: "✓"; position: absolute; left: 16px; top: 15px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: var(--bg); font-size: 12px; font-weight: 900; }
.checks strong { color: var(--text); font-weight: 650; }

/* FAQ */
.faq { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
details { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 4px 20px; }
summary { cursor: pointer; list-style: none; padding: 14px 0; font-weight: 600; font-size: 15.5px; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--gold); font-size: 20px; line-height: 1; }
details[open] summary::after { content: "–"; }
details p { color: var(--muted); font-size: 14.5px; margin: 0 0 16px; }

/* Launch */
.launch { text-align: center; padding-block: 40px 100px; }
.launch img { display: block; margin: 0 auto 22px; border-radius: 22%; box-shadow: 0 0 60px #e9c47f33; }
.launch h2 { margin-bottom: 12px; }
.launch p { color: var(--muted); font-size: 16px; margin: 0; }
.launch .maker-line { margin-top: 18px; font-size: 14px; }
.maker a, .maker-line a { color: var(--gold); border-bottom: 1px solid #e9c47f55; }
.maker a:hover, .maker-line a:hover { border-bottom-color: var(--gold); }

/* Footer */
.footer { border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 24px; }
.footer p, .footer span { margin: 0; font-size: 13px; color: var(--muted); }

/* Tablet */
@media (max-width: 1000px) {
  .wrap { width: calc(100% - 48px); }
  .header nav { gap: 18px; }
  .hero { grid-template-columns: 1fr; padding-block: 56px 40px; }
  /* One column: the phone sits in the flow, centered, with the mage behind it. */
  .hero-visual { min-height: 0; max-width: 620px; width: 100%; margin-inline: auto; display: flex; justify-content: flex-end; padding-top: 12px; }
  .mage { width: 78%; left: -4%; top: 4%; }
  .phone { position: relative; right: auto; bottom: auto; }
  .apps { grid-template-columns: repeat(3, 1fr); }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .anywhere .grid { grid-template-columns: 1fr; }
  .safety { grid-template-columns: 1fr; gap: 28px; }
  .strip-inner { flex-wrap: wrap; justify-content: center; text-align: center; }
  .strip-label { width: 100%; }
}

/* Phone */
@media (max-width: 720px) {
  .wrap { width: calc(100% - 32px); }
  .header-inner { height: 60px; gap: 12px; }
  .header nav { display: none; }
  .pill { margin-left: auto; }
  .hero { padding-block: 40px 28px; }
  h1 { letter-spacing: -1.6px; }
  .lead { font-size: 17px; }
  .hero-visual { justify-content: center; }
  .mage { width: 110%; left: -40%; top: 10%; opacity: 0.85; }
  .phone { width: 220px; border-radius: 34px; }
  .phone-screen { border-radius: 27px; }
  .section { padding-block: 64px; }
  .steps, .apps, .grid, .faq { grid-template-columns: 1fr; }
  .card, .steps li { padding: 22px; }
  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 380px) {
  .phone { width: 200px; }
  .button { width: 100%; }
}

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

/* Privacy page */
.legal { max-width: 760px; padding-block: 64px 96px; }
.legal h1 { font-size: clamp(32px, 5vw, 46px); line-height: 1.12; letter-spacing: -1.4px; margin-bottom: 10px; }
.legal-date { color: var(--muted); font-size: 14px; margin: 0 0 32px; }
.legal h2 { font-size: 21px; letter-spacing: -0.3px; margin: 40px 0 10px; }
.legal p, .legal li { color: var(--muted); font-size: 15.5px; }
.legal strong { color: var(--text); font-weight: 650; }
.legal ul { padding-left: 20px; }
.legal li { margin-bottom: 8px; }
.legal a { color: var(--gold); border-bottom: 1px solid #e9c47f55; }
.legal a:hover { border-bottom-color: var(--gold); }
.legal-summary { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px 12px; margin-bottom: 32px; }
.legal-summary h2 { margin-top: 0; font-size: 17px; color: var(--gold); }
@media (max-width: 720px) { .legal { padding-block: 40px 64px; } .legal-summary { padding: 18px 18px 6px; } }
