/* ============================================================
   elMoondo — Design System
   Dark, moonlit-night aesthetic. Plain CSS, no build step.
   ============================================================ */

:root {
  /* Palette */
  --bg: #0e1027;
  --bg-soft: #12142c;
  --surface: #171a35;
  --surface-2: #1d2140;
  --border: rgba(245, 243, 238, 0.1);
  --border-strong: rgba(245, 243, 238, 0.18);
  --text: #f5f3ee;
  --text-muted: #b7b8cf;
  --text-faint: #82849e;
  --gold: #7cd3ff;
  --gold-soft: rgba(124, 211, 255, 0.14);
  --periwinkle: #a9c9ff;
  --periwinkle-soft: rgba(169, 201, 255, 0.14);

  /* Type */
  --font-head: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;

  /* Layout */
  --max-w: 1180px;
  --radius: 18px;
  --radius-sm: 10px;
  --gap: clamp(1rem, 2vw, 2rem);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-head);
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ---------- Layout helpers ---------- */
.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: clamp(3rem, 7vw, 6rem) 0;
}

.section-head {
  max-width: 640px;
  margin: 0 0 2.5rem;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.9rem;
}

.grid {
  display: grid;
  gap: var(--gap);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 900px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ---------- Glow backgrounds ---------- */
.glow-top {
  position: relative;
  overflow: hidden;
}

.glow-top::before {
  content: "";
  position: absolute;
  top: -220px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 500px;
  background: radial-gradient(closest-side, rgba(124, 211, 255, 0.2), transparent 70%);
  pointer-events: none;
}

.glow-side {
  position: relative;
  overflow: hidden;
}

.glow-side::after {
  content: "";
  position: absolute;
  top: 20%;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(closest-side, rgba(169, 201, 255, 0.14), transparent 70%);
  pointer-events: none;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--gold);
  color: #04202f;
}

.btn-primary:hover {
  background: #a6e3ff;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn-block {
  width: 100%;
  justify-content: center;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(14, 16, 39, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.2rem;
}

.brand svg {
  width: 30px;
  height: 30px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  width: 42px;
  height: 42px;
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

@media (max-width: 860px) {
  .nav-links {
    position: fixed;
    inset: 78px 0 0 0;
    background: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem 24px;
    gap: 1.5rem;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
  }

  .nav-links.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-links a {
    font-size: 1.15rem;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-cta .btn-ghost {
    display: none;
  }
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(3.5rem, 8vw, 6.5rem) 0 3rem;
  position: relative;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 5.2vw, 3.85rem);
  max-width: 15ch;
}

.hero .lede {
  max-width: 56ch;
  font-size: 1.15rem;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin: 2rem 0 2.75rem;
  flex-wrap: wrap;
}

.trust-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 2.2rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 0.9rem;
}

.trust-bar strong {
  color: var(--text);
  font-family: var(--font-head);
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
}

.card .icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--gold-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--gold);
}

.card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
}

.card p {
  color: var(--text-muted);
  font-size: 0.96rem;
  margin-bottom: 1.25rem;
}

.card .card-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.card-sm {
  padding: 1.4rem 1.6rem;
}

.card-sm h4 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.card-sm p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

/* ---------- Stat band ---------- */
.stat-card {
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: clamp(2rem, 4vw, 3.5rem);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

@media (max-width: 640px) {
  .stat-grid {
    grid-template-columns: 1fr;
  }
}

.stat-num {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--gold);
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.tag {
  display: inline-block;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* ---------- Testimonials ---------- */
.testimonial {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.9rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.testimonial p {
  color: var(--text-muted);
  font-size: 0.98rem;
  margin: 0;
}

.testimonial .who {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--periwinkle-soft);
  color: var(--periwinkle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  flex-shrink: 0;
}

.who strong {
  display: block;
  font-size: 0.92rem;
}

.who span {
  display: block;
  font-size: 0.82rem;
  color: var(--text-faint);
}

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--surface-2), var(--bg-soft));
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  padding: clamp(2.5rem, 6vw, 4.5rem);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-band h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  max-width: 20ch;
  margin: 0 auto 0.75rem;
}

.cta-band .lede {
  max-width: 48ch;
  margin: 0 auto 2rem;
  color: var(--text-muted);
}

.cta-band .hero-actions {
  justify-content: center;
  margin: 0;
}

/* ---------- Forms ---------- */
.field {
  margin-bottom: 1.4rem;
}

.field label {
  display: block;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.8rem 1rem;
}

.field textarea {
  resize: vertical;
  min-height: 120px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--gold);
}

.checkbox-row {
  display: flex;
  gap: 0.75rem;
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
  align-items: flex-start;
}

.checkbox-row input {
  margin-top: 0.25rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.chip {
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  font-size: 0.86rem;
  cursor: pointer;
  color: var(--text-muted);
  background: transparent;
}

.chip input {
  display: none;
}

.chip:has(input:checked) {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-soft);
}

.form-success {
  display: none;
  background: var(--gold-soft);
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-top: 1rem;
  font-size: 0.92rem;
}

.form-success.show {
  display: block;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3.5rem 0 2rem;
  margin-top: 4rem;
  color: var(--text-faint);
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

@media (max-width: 760px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.footer-grid h4 {
  color: var(--text);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.footer-grid li {
  margin-bottom: 0.65rem;
}

.footer-grid a:hover {
  color: var(--text);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}

/* ---------- Page header (interior pages) ---------- */
.page-hero {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 2.5rem;
}

.page-hero h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  max-width: 20ch;
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-faint);
  margin-bottom: 1.25rem;
}

.breadcrumb a:hover {
  color: var(--gold);
}

/* ---------- Content blocks (service / blog detail) ---------- */
.prose {
  max-width: 72ch;
  color: var(--text-muted);
}

.prose h2 {
  color: var(--text);
  font-size: 1.5rem;
  margin-top: 2rem;
}

.prose ul {
  margin: 0 0 1.2rem;
  padding-left: 1.2rem;
  list-style: disc;
}

.prose li {
  margin-bottom: 0.5rem;
}

.two-col {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
}

@media (max-width: 860px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}

.side-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  height: fit-content;
}

.side-card h4 {
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.side-card li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}

.side-card li:last-child {
  border-bottom: none;
}

/* ---------- Blog / post meta ---------- */
.post-meta {
  display: flex;
  gap: 1rem;
  color: var(--text-faint);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.post-card h3 {
  font-size: 1.1rem;
}

/* ---------- Role list (careers) ---------- */
.role-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.4rem 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.role-row h4 {
  margin: 0 0 0.25rem;
  font-size: 1.02rem;
}

.role-row span {
  color: var(--text-faint);
  font-size: 0.85rem;
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Utility ---------- */
.text-center {
  text-align: center;
}

.mt-0 {
  margin-top: 0;
}

.center-head {
  max-width: 640px;
  margin: 0 auto 2.5rem;
  text-align: center;
}
