/* ==========================================================================
   Go Dark Sky — design system
   Palette (Westgate): navy #273443 · navy deep #1A242F · green #6CBF57
   red #E2503F · text #EEF2F5 · muted #9AABB8 · skyglow #D98A3D
   Type: Outfit 300–700
   ========================================================================== */

:root {
  --navy: #273443;
  --navy-deep: #1A242F;
  --green: #6CBF57;
  --red: #E2503F;
  --text: #EEF2F5;
  --muted: #9AABB8;
  --hairline: rgba(255, 255, 255, 0.09);
  --skyglow: #D98A3D;
  --amber: #D9A23D;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 14px 44px rgba(6, 10, 14, 0.45);
  --font: 'Outfit', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  background: var(--navy);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--green); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
  border-radius: 4px;
}

h1, h2, h3, h4 { font-weight: 600; line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-weight: 700; }
p { margin: 0 0 1em; }

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.center { text-align: center; }

.eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin: 0 0 0.9em;
}
.eyebrow-green { color: var(--green); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.narrow { max-width: 640px; margin: 0 auto; padding: 0 20px; }
.section { padding: 72px 0; }

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 13px 22px;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green); color: #14210f; }
.btn-primary:hover { background: #7ccb67; text-decoration: none; }
.btn-outline { background: transparent; color: var(--text); border-color: rgba(255,255,255,0.22); }
.btn-outline:hover { border-color: var(--green); color: var(--green); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--muted); border-color: transparent; }
.btn-ghost:hover { color: var(--text); text-decoration: none; }
.btn-lg { padding: 16px 28px; font-size: 1.05rem; }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(180deg, #0c1218 0%, var(--navy-deep) 55%, var(--navy) 100%);
  overflow: hidden;
  padding: 60px 20px 110px;
}
.hero-stars {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
}
.hero-inner { position: relative; z-index: 2; max-width: 680px; }

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: 42px;
}
.brand-mark {
  width: 26px; height: 26px; border-radius: 7px;
  background:
    radial-gradient(circle at 30% 32%, var(--text) 0 1.4px, transparent 1.6px),
    radial-gradient(circle at 66% 22%, var(--muted) 0 1px, transparent 1.2px),
    radial-gradient(circle at 52% 52%, var(--text) 0 1.2px, transparent 1.4px),
    linear-gradient(180deg, var(--navy-deep) 0 68%, var(--green) 68%);
  border: 1px solid var(--hairline);
}
.brand-name { font-weight: 700; letter-spacing: 0.02em; font-size: 1.05rem; }
.brand-name.small { font-size: 0.95rem; }

.hero-headline {
  font-size: clamp(2rem, 5.6vw, 3.4rem);
  letter-spacing: -0.02em;
  margin-bottom: 0.45em;
}
.hero-headline em { font-style: normal; color: var(--green); }
.hero-subhead {
  font-size: clamp(1rem, 2.4vw, 1.15rem);
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 36px;
  font-weight: 300;
}

.zip-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: stretch;
}
.zip-input {
  font-family: var(--font);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius-sm);
  padding: 13px 18px;
  width: 200px;
  text-align: center;
}
.zip-input::placeholder { color: var(--muted); letter-spacing: 0.01em; font-weight: 400; }
.zip-input:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 3px rgba(108,191,87,0.25); }

.form-status { min-height: 1.4em; margin-top: 14px; font-size: 0.92rem; color: var(--muted); }
.form-status.error { color: var(--red); }

.hero-tagline {
  margin-top: 46px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(154,171,184,0.65);
}

.hero-horizon {
  position: absolute; left: 0; right: 0; bottom: 0; height: 120px; z-index: 1;
  background: radial-gradient(60% 130px at 50% 100%, rgba(217,138,61,0.22), transparent 70%);
  pointer-events: none;
}

/* ==========================================================================
   RESULT CARD
   ========================================================================== */
.section-result { padding: 36px 16px 56px; }
.result-card {
  max-width: 600px;
  margin: 0 auto;
  background: linear-gradient(180deg, #2B3A4B 0%, var(--navy) 60%);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px clamp(18px, 4.5vw, 32px) 26px;
}

.rc-head { position: relative; margin-bottom: 18px; }
.rc-place { font-size: clamp(1.5rem, 5vw, 2rem); margin-bottom: 2px; }
.rc-sub { font-size: 0.9rem; margin: 0; }
.rc-change {
  position: absolute; top: 0; right: 0;
  font-family: var(--font); font-size: 0.82rem; font-weight: 500;
  color: var(--muted); background: none; border: none; cursor: pointer; padding: 4px 6px;
}
.rc-change:hover { color: var(--green); }

.rc-sky { margin: 0 0 20px; }
.rc-sky canvas {
  display: block; width: 100%; height: 170px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--hairline);
  background: var(--navy-deep);
}
.rc-sky figcaption { font-size: 0.75rem; margin-top: 7px; text-align: right; }

.rc-verdict { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.rc-badge {
  flex: 0 0 auto;
  width: 68px; height: 68px;
  border-radius: var(--radius-sm);
  display: grid; place-items: center;
  font-size: 2rem; font-weight: 700;
  border: 1px solid var(--hairline);
}
.rc-badge.tier-good  { background: rgba(108,191,87,0.16); color: var(--green); border-color: rgba(108,191,87,0.4); }
.rc-badge.tier-mid   { background: rgba(217,162,61,0.14); color: var(--amber); border-color: rgba(217,162,61,0.4); }
.rc-badge.tier-bad   { background: rgba(226,80,63,0.14);  color: var(--red);   border-color: rgba(226,80,63,0.4); }
.rc-verdict-text h3 { margin-bottom: 3px; font-size: 1.2rem; }
.rc-verdict-text p { margin: 0; font-size: 0.95rem; }

.rc-scale { margin-bottom: 26px; }
.rc-scale-bar {
  position: relative; height: 10px; border-radius: 6px;
  background: linear-gradient(90deg, var(--green) 0%, #a9c14a 30%, var(--amber) 52%, #dd7a3e 72%, var(--red) 100%);
}
.rc-scale-marker {
  position: absolute; top: 50%;
  width: 18px; height: 18px;
  transform: translate(-50%, -50%);
  background: var(--text);
  border: 3px solid var(--navy-deep);
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.35);
  transition: left 0.6s cubic-bezier(.2,.8,.2,1);
}
.rc-scale-labels { display: flex; justify-content: space-between; font-size: 0.74rem; margin-top: 7px; }

.rc-cols {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
  padding: 20px 0; border-top: 1px solid var(--hairline);
}
@media (max-width: 540px) { .rc-cols { grid-template-columns: 1fr; } }
.rc-col-title {
  font-size: 0.72rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.14em; margin-bottom: 12px;
}
.rc-col-title.see { color: var(--green); }
.rc-col-title.lost { color: var(--red); }
.rc-list { list-style: none; margin: 0; padding: 0; font-size: 0.92rem; }
.rc-list li { display: flex; gap: 9px; align-items: baseline; padding: 4px 0; }
.rc-list .mk { flex: 0 0 auto; font-weight: 700; }
.rc-list.see .mk { color: var(--green); }
.rc-list.lost .mk { color: var(--red); }
.rc-list.lost li { color: var(--muted); }
.rc-list .qual { color: var(--muted); font-size: 0.85em; }

.rc-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin: 0 0 16px; padding: 18px 0;
  border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline);
  text-align: center;
}
.rc-stats dt { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 600; margin-bottom: 4px; }
.rc-stats dd { margin: 0; font-size: 1.15rem; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 420px) { .rc-stats dd { font-size: 1rem; } }

.rc-moon { font-size: 0.85rem; margin-bottom: 18px; }

.rc-darker {
  background: rgba(108,191,87,0.1);
  border: 1px solid rgba(108,191,87,0.35);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin-bottom: 18px;
}
.rc-darker h4 {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--green); margin-bottom: 7px;
}
.rc-darker p { margin: 0; font-size: 0.95rem; }

.rc-why { font-size: 0.88rem; margin-bottom: 20px; }

.rc-sharebar { display: flex; gap: 10px; flex-wrap: wrap; }
.rc-sharebar .btn { flex: 1 1 auto; justify-content: center; }

.rc-sharemenu { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.share-chip {
  font-family: var(--font); font-size: 0.85rem; font-weight: 500;
  color: var(--text); background: rgba(255,255,255,0.06);
  border: 1px solid var(--hairline); border-radius: 999px;
  padding: 8px 15px; cursor: pointer; text-decoration: none;
}
.share-chip:hover { border-color: var(--green); color: var(--green); text-decoration: none; }

/* ==========================================================================
   CONTENT SECTIONS
   ========================================================================== */
.section-why { background: var(--navy-deep); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.section-why h2, .section-solution h2 { font-size: clamp(1.5rem, 4vw, 2.1rem); }

.section-solution { position: relative; }
.fix-list { list-style: none; padding: 0; margin: 0 0 1.4em; }
.fix-list li { padding: 9px 0 9px 30px; position: relative; border-bottom: 1px solid var(--hairline); }
.fix-list li::before { content: "✓"; position: absolute; left: 2px; color: var(--green); font-weight: 700; }

.section-method { background: var(--navy-deep); border-top: 1px solid var(--hairline); padding: 48px 0; }
.section-share { border-top: 1px solid var(--hairline); }
.share-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }

/* ==========================================================================
   FOOTER · MODAL · TOAST
   ========================================================================== */
.footer { border-top: 1px solid var(--hairline); padding: 34px 0; background: var(--navy-deep); }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
.footer p { margin: 0; }

.modal {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center;
  background: rgba(10, 15, 20, 0.7);
  padding: 20px;
}
.modal-card {
  background: var(--navy);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 520px; width: 100%;
  padding: 26px;
}
.embed-code {
  width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem; color: var(--text);
  background: var(--navy-deep); border: 1px solid var(--hairline);
  border-radius: var(--radius-sm); padding: 12px; resize: vertical;
}
.modal-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }

.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: var(--green); color: #14210f;
  font-weight: 600; font-size: 0.9rem;
  padding: 11px 20px; border-radius: 999px;
  box-shadow: var(--shadow); z-index: 60;
}

/* ==========================================================================
   EMBED MODE (?embed=1)
   ========================================================================== */
body.embed .hero { min-height: 0; padding: 28px 16px 36px; }
body.embed .hero-headline { font-size: 1.4rem; }
body.embed .hero-subhead, body.embed .hero-tagline, body.embed .hero-horizon { display: none; }
body.embed .section-why, body.embed .section-solution, body.embed .section-method,
body.embed .section-share, body.embed .footer { display: none; }
body.embed .section-result { padding-bottom: 24px; }
.embed-credit { display: none; text-align: center; padding: 0 0 22px; font-size: 0.8rem; }
body.embed .embed-credit { display: block; }

@media (max-width: 480px) {
  .zip-form { flex-direction: column; }
  .zip-input { width: 100%; }
  .zip-form .btn { justify-content: center; }
  .section { padding: 56px 0; }
  .rc-change { position: static; display: inline-block; margin-top: 8px; padding-left: 0; }
}
