/* synergEV migration landing page — v2 dark/rich */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&family=Open+Sans:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --brand-blue: #0C2C54;
  --brand-blue-700: #0a2548;
  --brand-blue-800: #081e3d;
  --brand-blue-900: #051530;
  --brand-blue-1000: #030d1f;
  --brand-green: #2BAB64;
  --brand-green-300: #6dd49a;
  --brand-green-400: #44c084;
  --brand-green-600: #239556;
  --brand-green-100: #e6f5ec;

  --ink-50: #f8fafc;
  --ink-200: #e2e8f0;
  --ink-300: #cbd5e1;
  --ink-400: #94a3b8;
  --ink-500: #64748b;

  --line-on-dark: rgba(255, 255, 255, 0.10);
  --line-on-dark-strong: rgba(255, 255, 255, 0.18);

  /* Card surface — overridable via Tweaks */
  --card-bg: #faf7f0;            /* warm cream */
  --card-bg-soft: #f4efe3;       /* card body inner accents */
  --card-border: rgba(12, 44, 84, 0.10);

  /* Text on cards — flipped to light under .glossy mode */
  --card-fg-head: var(--brand-blue);
  --card-fg-body: #475569;
  --card-fg-meta: var(--ink-500);
  --card-inner-sheen: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0) 100%);
  --hero-fade-mid: color-mix(in srgb, var(--card-bg) 85%, transparent);
  --hero-fade-end: var(--card-bg);

  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;

  --font-sans: 'Open Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Montserrat', 'Open Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-50);
  background: var(--brand-blue-1000);
  background-image:
    radial-gradient(ellipse 60% 50% at 18% 0%, rgba(43, 171, 100, 0.14) 0%, transparent 55%),
    radial-gradient(ellipse 80% 60% at 100% 30%, rgba(12, 44, 84, 0.6) 0%, transparent 60%),
    linear-gradient(180deg, #0a2447 0%, #051530 60%, #030d1f 100%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* faint dot grid for texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: 0 0;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 30%, transparent 75%);
  z-index: 0;
}

/* Top-bar status pill on dark bg */
.topbar .status {
  color: rgba(255, 255, 255, 0.7) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

/* Footer on dark bg */
.footer {
  color: rgba(255, 255, 255, 0.5);
}
.footer a {
  color: rgba(255, 255, 255, 0.85);
  border-bottom-color: rgba(255, 255, 255, 0.2);
}
.footer a:hover { border-bottom-color: rgba(255, 255, 255, 0.7); }

/* ---------- Layout ---------- */
.page {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 18px 64px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
@media (min-width: 720px) {
  .page { padding: 64px 32px 96px; gap: 24px; }
}

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px;
}
.topbar .mark {
  display: inline-flex;
  align-items: center;
}
.topbar .mark img {
  height: 34px;
  display: block;
}
.topbar .status {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-500);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid #e7e5e4;
  border-radius: 999px;
  background: #ffffff;
}
.status .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-green);
  box-shadow: 0 0 0 3px rgba(43, 171, 100, 0.18), 0 0 12px rgba(43, 171, 100, 0.55);
}

/* ---------- Primary card (dark, integrated hero) ---------- */
.primary {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 12px 32px -12px rgba(12, 44, 84, 0.18),
    0 30px 60px -30px rgba(12, 44, 84, 0.12);
}

/* Hero band */
.hero {
  position: relative;
  aspect-ratio: 1200 / 234;
  width: 100%;
  overflow: hidden;
  background: #0a2447;
}
.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* gradient bleed into card body */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, color-mix(in srgb, var(--card-bg) 85%, transparent) 90%, var(--card-bg) 100%);
  pointer-events: none;
}
.hero-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: white;
  z-index: 2;
}
.hero-badge .pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-green-400);
  box-shadow: 0 0 0 4px rgba(43, 171, 100, 0.2), 0 0 12px var(--brand-green);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Card body */
.primary-body {
  position: relative;
  padding: 28px 22px 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: center;
  text-align: center;
}
@media (min-width: 720px) {
  .primary-body { padding: 36px 56px 52px; gap: 20px; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brand-green-300);
  padding: 6px 14px;
  background: rgba(43, 171, 100, 0.12);
  border-radius: 999px;
  border: 1px solid rgba(43, 171, 100, 0.28);
}
.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-green-400);
  box-shadow: 0 0 8px var(--brand-green);
}

/* Logo transition — no rectangle, equal-weight logos */
.transition {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  padding: 0;
  background: transparent;
  border: 0;
}
.transition .old-mark {
  display: inline-flex;
  align-items: center;
  position: relative;
  opacity: 1;
}
.transition .old-mark img {
  height: 120px;
  width: auto;
  display: block;
  filter: none;
}
.transition .arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(43, 171, 100, 0.15);
  color: var(--brand-green-300);
  border: 1px solid rgba(43, 171, 100, 0.3);
  flex-shrink: 0;
}
.transition .new-mark {
  display: inline-flex;
  align-items: center;
}
.transition .new-mark img {
  height: 120px;
  width: auto;
  display: block;
}

/* Headline */
h1.headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 5.2vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--brand-blue);
  margin: 4px 0 0;
  text-wrap: balance;
}
h1.headline .accent {
  color: var(--brand-green);
  background: linear-gradient(135deg, var(--brand-green) 0%, var(--brand-green-600) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lead {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: #475569;
  max-width: 46ch;
  margin: 0;
  text-wrap: pretty;
}
@media (min-width: 720px) {
  .lead { font-size: 17.5px; }
}

/* CTAs row */
.cta-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 380px;
  margin-top: 4px;
}
@media (min-width: 540px) {
  .cta-row { flex-direction: row; justify-content: center; max-width: none; }
}

/* Buttons */
.btn {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease, border-color 140ms ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn:focus-visible { outline: 2px solid var(--brand-green); outline-offset: 2px; }
.btn .arrow-r { transition: transform 150ms ease; }
.btn:hover .arrow-r { transform: translateX(2px); }

.btn-primary {
  background: linear-gradient(180deg, var(--brand-green-400) 0%, var(--brand-green) 100%);
  color: white;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.25) inset,
    0 0 0 1px rgba(43, 171, 100, 0.35),
    0 12px 28px -8px rgba(43, 171, 100, 0.55),
    0 0 24px -6px rgba(43, 171, 100, 0.35);
}
.btn-primary:hover {
  background: linear-gradient(180deg, var(--brand-green) 0%, var(--brand-green-600) 100%);
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.25) inset,
    0 0 0 1px rgba(43, 171, 100, 0.45),
    0 16px 36px -8px rgba(43, 171, 100, 0.7),
    0 0 32px -4px rgba(43, 171, 100, 0.5);
}

.btn-ghost-light {
  background: var(--card-bg);
  color: var(--brand-blue);
  border-color: var(--card-border);
}
.btn-ghost-light:hover {
  background: var(--card-bg-soft);
  border-color: var(--brand-blue);
  transform: translateY(-1px);
}

.btn-lg { padding: 16px 28px; font-size: 16px; }

/* Hint line */
.hint {
  font-size: 13px;
  color: var(--ink-500);
  margin: 0;
}
.hint a {
  color: var(--brand-green-600);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid rgba(35, 149, 86, 0.3);
}
.hint a:hover { border-bottom-color: var(--brand-green-600); }

/* ---------- Migration alert ---------- */
.alert {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.alert::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--brand-green) 0%, var(--brand-green-600) 100%);
}
@media (min-width: 720px) {
  .alert {
    padding: 26px 30px 26px 32px;
    flex-direction: row;
    align-items: center;
    gap: 24px;
  }
}

.alert-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
  background: rgba(43, 171, 100, 0.10);
  color: var(--brand-green-600);
  border: 1px solid rgba(43, 171, 100, 0.22);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.alert-body { flex: 1; min-width: 0; }
.alert-body h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--brand-blue);
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}
.alert-body p {
  font-size: 14px;
  color: #475569;
  margin: 0;
  line-height: 1.5;
}

.alert-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

/* ---------- Resource cards ---------- */
.resources {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 540px) {
  .resources { grid-template-columns: 1fr 1fr; }
}
.resource {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  transition: border-color 140ms ease, transform 140ms ease, background 140ms ease, box-shadow 140ms ease;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.resource::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(43, 171, 100, 0.4), transparent);
  opacity: 0;
  transition: opacity 200ms ease;
}
.resource:hover {
  border-color: rgba(43, 171, 100, 0.45);
  background: var(--card-bg);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -8px rgba(43, 171, 100, 0.18), 0 2px 6px rgba(15, 23, 42, 0.05);
}
.resource:hover::after { opacity: 1; }

.resource-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-500);
}
.resource-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--brand-blue);
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  letter-spacing: -0.01em;
}
.resource-desc {
  font-size: 13.5px;
  color: #475569;
  margin: 0;
  line-height: 1.5;
}
.resource .arrow-icon {
  color: var(--ink-400);
  transition: color 140ms ease, transform 140ms ease;
  flex-shrink: 0;
}
.resource:hover .arrow-icon {
  color: var(--brand-green-600);
  transform: translate(2px, -2px);
}

/* ════════════════════════════════════════════════════════════════
   GLOSSY MODE — frosted-glass dark cards over the navy background.
   Triggered via [data-surface="glossy"] on <body>.
   ═══════════════════════════════════════════════════════════════ */
body[data-surface="glossy"] {
  --card-bg: rgba(255, 255, 255, 0.06);
  --card-bg-soft: rgba(255, 255, 255, 0.04);
  --card-border: rgba(255, 255, 255, 0.14);
  --card-fg-head: #ffffff;
  --card-fg-body: rgba(255, 255, 255, 0.72);
  --card-fg-meta: rgba(255, 255, 255, 0.55);
  --card-inner-sheen: linear-gradient(180deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0) 30%, rgba(255,255,255,0) 100%);
  --hero-fade-mid: rgba(8, 26, 54, 0.55);
  --hero-fade-end: rgba(8, 26, 54, 0.85);
}

body[data-surface="glossy"] .primary,
body[data-surface="glossy"] .alert,
body[data-surface="glossy"] .resource {
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  background-image: var(--card-inner-sheen);
  background-color: var(--card-bg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    0 1px 2px rgba(0, 0, 0, 0.25),
    0 20px 50px -20px rgba(0, 0, 0, 0.55),
    0 30px 80px -30px rgba(0, 0, 0, 0.45);
}

body[data-surface="glossy"] .transition {
  background: transparent;
  border: 0;
}
body[data-surface="glossy"] .transition .old-mark img { filter: brightness(2) saturate(0.3); }

body[data-surface="glossy"] h1.headline { color: var(--card-fg-head); }
body[data-surface="glossy"] h1.headline .accent {
  background: linear-gradient(135deg, var(--brand-green-300) 0%, var(--brand-green) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
body[data-surface="glossy"] .lead,
body[data-surface="glossy"] .alert-body p,
body[data-surface="glossy"] .resource-desc { color: var(--card-fg-body); }

body[data-surface="glossy"] .alert-body h3,
body[data-surface="glossy"] .resource-title { color: var(--card-fg-head); }

body[data-surface="glossy"] .resource-label,
body[data-surface="glossy"] .hint { color: var(--card-fg-meta); }

body[data-surface="glossy"] .eyebrow {
  background: rgba(43, 171, 100, 0.14);
  border-color: rgba(43, 171, 100, 0.32);
  color: var(--brand-green-300);
}

body[data-surface="glossy"] .alert-icon {
  background: rgba(43, 171, 100, 0.14);
  border-color: rgba(43, 171, 100, 0.32);
  color: var(--brand-green-300);
}

body[data-surface="glossy"] .btn-ghost-light {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.20);
}
body[data-surface="glossy"] .btn-ghost-light:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.35);
}

body[data-surface="glossy"] .resource:hover {
  background: rgba(43, 171, 100, 0.10);
  border-color: rgba(43, 171, 100, 0.45);
}

body[data-surface="glossy"] .hint a {
  color: var(--brand-green-300);
  border-bottom-color: rgba(109, 212, 154, 0.3);
}
body[data-surface="glossy"] .hint a:hover { border-bottom-color: var(--brand-green-300); }
.footer {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  text-align: center;
  padding-top: 12px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12.5px;
}
.footer a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.footer a:hover { border-bottom-color: rgba(255, 255, 255, 0.7); }
.footer .meta {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.6;
}
