:root {
  --color-primary: #2c445a;
  --color-primary-dark: #16232f;
  --color-accent: #5f8096;
  --color-accent-light: #96c8e1;
  --color-bg: #ffffff;
  --color-bg-soft: #f4f7f9;
  --color-text: #1a2530;
  --color-text-soft: #4a5a68;
  --color-border: #e1e7ea;
  --radius: 10px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.55;
}

a { color: var(--color-primary); text-decoration: none; transition: color 0.15s ease, opacity 0.15s ease; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Site header / nav ─────────────────────────────────────────── */

.site-header {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(22, 35, 47, 0.06), 0 4px 16px rgba(22, 35, 47, 0.04);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand img { height: 52px; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.main-nav a {
  color: var(--color-text-soft);
  font-size: 0.95rem;
  font-weight: 500;
}

.main-nav a:hover, .main-nav a.active {
  color: var(--color-primary);
  text-decoration: none;
}

.lang-switch {
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 0.85rem;
  color: var(--color-text-soft);
}

.lang-switch:hover { border-color: var(--color-accent); text-decoration: none; }

/* ── Hero / sections ────────────────────────────────────────────── */

.hero {
  position: relative;
  background:
    radial-gradient(ellipse at 15% 20%, rgba(150, 200, 225, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 80%, rgba(95, 128, 150, 0.16) 0%, transparent 50%),
    linear-gradient(160deg, #0a121a 0%, var(--color-primary-dark) 60%, #0d1a24 100%);
  color: #fff;
  padding: 64px 0 54px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 30px 30px;
  opacity: 0.4;
  pointer-events: none;
}

.hero .container { position: relative; z-index: 1; }

.hero h1 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  color: #fff;
  margin: 0 0 14px;
  max-width: 760px;
  letter-spacing: -0.01em;
}

.hero p.lede {
  font-size: 1.05rem;
  color: #b7c6d1;
  max-width: 620px;
}

/* ── Homepage hero: full-bleed, dark, dramatic -- SpaceX-style scale ─── */

.hero-space {
  position: relative;
  min-height: 86vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    radial-gradient(ellipse at 18% 15%, rgba(150, 200, 225, 0.14) 0%, transparent 50%),
    radial-gradient(ellipse at 82% 85%, rgba(95, 128, 150, 0.18) 0%, transparent 50%),
    linear-gradient(160deg, #0a121a 0%, var(--color-primary-dark) 55%, #0d1a24 100%);
  color: #fff;
  overflow: hidden;
  padding: 80px 0 56px;
}

.hero-space::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: 0.5;
  pointer-events: none;
}

.hero-space .container { position: relative; z-index: 1; }

.hero-space .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-accent-light);
  margin-bottom: 18px;
}

.hero-space h1 {
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 1.05;
  font-weight: 800;
  margin: 0 0 22px;
  max-width: 880px;
  letter-spacing: -0.01em;
  color: #fff;
}

.hero-space p.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  color: #b7c6d1;
  max-width: 620px;
  margin: 0 0 36px;
}

.hero-space .hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 52px; }

.btn-hero {
  background: #fff;
  color: var(--color-primary-dark);
  padding: 14px 30px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
}
.btn-hero:hover { background: var(--color-accent-light); color: #0b141d; text-decoration: none; }

.btn-hero-outline {
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  padding: 14px 30px;
  border-radius: 999px;
  font-weight: 600;
}
.btn-hero-outline:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
  color: #fff;
}

/* ── Rotating product showcase inside the hero ─────────────────────── */

.product-showcase {
  position: relative;
  min-height: 150px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 32px;
}

.product-slide {
  position: absolute;
  inset: 0;
  top: 32px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 26px;
}

.product-slide.active { opacity: 1; transform: translateY(0); pointer-events: auto; }

.product-slide .badge-lg {
  width: 84px;
  height: 84px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--color-accent-light), var(--color-accent));
  color: #0b141d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.1rem;
  font-weight: 800;
  flex-shrink: 0;
}

.product-slide img.badge-lg {
  object-fit: contain;
  background: transparent;
}

.product-slide h3 { font-size: clamp(1.3rem, 2.2vw, 1.9rem); margin: 0 0 6px; color: #fff; }
.product-slide p { margin: 0; color: #a9bac6; max-width: 480px; }

.product-dots { display: flex; gap: 8px; margin-top: 22px; }
.product-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, width 0.2s ease;
}
.product-dots button.active { background: var(--color-accent-light); width: 22px; border-radius: 4px; }

section.block { padding: 72px 0; }
section.block.soft { background: var(--color-bg-soft); }

h2.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.01em;
  margin: 0 0 28px;
}

h2.section-title::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-light));
  flex-shrink: 0;
}

.prose { max-width: 720px; white-space: pre-line; color: var(--color-text-soft); font-size: 1.02rem; }
.prose p { margin: 0 0 16px; }

/* ── Cards / grids ──────────────────────────────────────────────── */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 26px;
  background: var(--color-bg);
  box-shadow: 0 1px 3px rgba(22, 35, 47, 0.04);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  box-shadow: 0 12px 28px rgba(22, 35, 47, 0.1);
  transform: translateY(-3px);
  border-color: var(--color-accent);
}

.card h3 { margin: 0 0 8px; color: var(--color-primary); font-size: 1.15rem; }
.card p { margin: 0 0 12px; color: var(--color-text-soft); font-size: 0.95rem; }

.card .logo-mark { height: 56px; width: 56px; object-fit: contain; border-radius: 12px; margin-bottom: 14px; }

/* Shown instead of a product/team image until a real one is uploaded via
   /admin -- a plain missing-image icon looks broken; this looks intentional. */
.avatar-fallback {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.avatar-fallback.round { border-radius: 50%; }

.btn {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn:hover { background: var(--color-primary-dark); text-decoration: none; color: #fff; transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
}

.btn-outline:hover { background: var(--color-bg-soft); color: var(--color-primary); }

/* ── Forms ──────────────────────────────────────────────────────── */

form.stack { display: flex; flex-direction: column; gap: 16px; max-width: 520px; }

label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--color-text-soft); margin-bottom: 6px; }

input[type="text"], input[type="email"], input[type="password"], input[type="number"],
textarea, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--color-text);
  background: #fff;
}

textarea { resize: vertical; min-height: 100px; }

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(95, 128, 150, 0.15);
}

.checkbox-row { display: flex; align-items: center; gap: 8px; }
.checkbox-row input { width: auto; }

.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .field-pair { grid-template-columns: 1fr; } }

/* ── Footer ─────────────────────────────────────────────────────── */

.site-footer {
  background: var(--color-primary-dark);
  color: #cfd9e0;
  padding: 52px 0 32px;
  margin-top: 80px;
  font-size: 0.9rem;
}

.site-footer .brand img { height: 40px; margin-bottom: 14px; }
.site-footer a { color: #cfd9e0; }
.site-footer a:hover { color: var(--color-accent-light); }

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-grid .tagline { color: #8fa3b3; font-size: 0.88rem; max-width: 320px; margin: 0; }

.footer-nav { display: flex; flex-direction: column; gap: 10px; }
.footer-nav a { font-size: 0.88rem; }

.footer-bottom { margin-top: 24px; }
.site-footer .legal { margin-top: 10px; color: #8fa3b3; font-size: 0.8rem; line-height: 1.6; }

.site-footer .admin-link { margin-top: 14px; }
.site-footer .admin-link a { color: #5f7180; font-size: 0.72rem; opacity: 0.7; }
.site-footer .admin-link a:hover { opacity: 1; color: #5f7180; }

/* ── Admin shell ────────────────────────────────────────────────── */

.admin-shell { display: flex; min-height: 100vh; }

.admin-sidebar {
  width: 230px;
  background: var(--color-primary-dark);
  color: #cfd9e0;
  padding: 24px 0;
  flex-shrink: 0;
}

.admin-sidebar .brand { padding: 0 20px 24px; }
.admin-sidebar .brand img { height: 40px; }

.admin-sidebar nav a {
  display: block;
  padding: 10px 20px;
  color: #cfd9e0;
  font-size: 0.92rem;
}

.admin-sidebar nav a:hover, .admin-sidebar nav a.active {
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
  color: #fff;
}

.admin-main { flex: 1; padding: 32px 40px; background: var(--color-bg-soft); }

.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.admin-topbar h1 { margin: 0; font-size: 1.5rem; color: var(--color-primary); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; margin-bottom: 32px; }

.stat-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
}

.stat-card .num { font-size: 2rem; font-weight: 700; color: var(--color-primary); }
.stat-card .label { color: var(--color-text-soft); font-size: 0.85rem; }

table.admin-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; }
table.admin-table th, table.admin-table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.92rem;
}
table.admin-table th { background: var(--color-bg-soft); color: var(--color-text-soft); font-weight: 600; }
table.admin-table tr:last-child td { border-bottom: none; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.badge.yes { background: #e3f3e6; color: #256c34; }
.badge.no { background: #f3e6e6; color: #8a2f2f; }

/* An immediate, in-place toggle -- flips on click, no form/Save round trip
   needed just to hide or show something on the public site. */
.toggle-form { display: inline-block; }
.switch { position: relative; display: inline-block; width: 42px; height: 24px; vertical-align: middle; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch .slider {
  position: absolute;
  inset: 0;
  background: #cbd5db;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.switch .slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.switch input:checked + .slider { background: var(--color-primary); }
.switch input:checked + .slider::before { transform: translateX(18px); }
.switch input:focus-visible + .slider { outline: 2px solid var(--color-accent); outline-offset: 2px; }

.admin-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 720px;
}

.actions-row { display: flex; gap: 10px; margin-top: 24px; }

.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-soft);
}

.login-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 40px;
  width: 100%;
  max-width: 380px;
}

.login-card .brand { text-align: center; margin-bottom: 24px; }
.login-card .brand img { height: 56px; margin: 0 auto; }
.error-text { color: #b23a3a; font-size: 0.9rem; margin-bottom: 12px; }
.hint { color: var(--color-text-soft); font-size: 0.82rem; margin-top: 4px; }
