:root {
  --bg: #071119;
  --bg-alt: #0e1a24;
  --surface: #111c27;
  --surface-soft: #151f2a;
  --border-soft: rgba(255,255,255,0.06);
  --text: #f6f7f4;
  --text-soft: #a7b7c7;
  --brand-teal: #27a7c7;
  --brand-green: #34b24a;
  --nav-height: 4rem;
}

:root[data-theme="light"] {
  /* Cooler, higher-contrast light palette */
  --bg: #f3f6fb;
  --bg-alt: #e7edf7;
  --surface: #ffffff;
  --surface-soft: #f5f7fc;
  --border-soft: rgba(16, 37, 65, 0.09);
  --text: #122334;
  --text-soft: #4d6074;
  --brand-teal: #2aa4c3;
  --brand-green: #2f9d48;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  background: radial-gradient(circle at top, var(--bg-alt), var(--bg));
  color: var(--text);
}

a {
  color: inherit;
  text-decoration-color: rgba(255,255,255,0.45);
}
:root[data-theme="light"] a {
  text-decoration-color: rgba(0,0,0,0.35);
}
a:hover {
  text-decoration-color: currentColor;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.page {
  padding: 2.75rem 0 4.5rem;
}

/* HEADER / NAV */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: rgba(7,17,25,0.9);
  border-bottom: 1px solid var(--border-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
}

.brand-logo-wrapper {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  padding: 2px;
  background: radial-gradient(circle at 20% 0%, var(--brand-teal), transparent 60%);
}

.brand-logo-inner {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: #050a0f;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
:root[data-theme="light"] .brand-logo-inner {
  background: #fdf8ec;
}

.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
}
.brand-name {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
}
.brand-tagline {
  font-size: 0.8rem;
  color: var(--text-soft);
}

.nav-shell {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.menu-root {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0;
  margin: 0;
}

.menu-item > a,
.menu-item-toggle {
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  text-decoration: none;
}

.menu-item > a:hover,
.menu-item-toggle:hover {
  border-color: rgba(255,255,255,0.18);
}

.menu-item.has-submenu {
  position: relative;
}

.menu-item-toggle-icon {
  font-size: 0.7rem;
  opacity: 0.7;
}

.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  margin-top: 0.4rem;
  list-style: none;
  padding: 0.6rem;
  border-radius: 1rem;
  border: 1px solid var(--border-soft);
  background: var(--surface);
  display: none;
  z-index: 45;
}
.menu-item.has-submenu:hover > .submenu,
.menu-item.has-submenu.is-open > .submenu {
  display: block;
}

.submenu li a {
  display: block;
  padding: 0.4rem 0.6rem;
  border-radius: 0.6rem;
  font-size: 0.88rem;
  color: var(--text-soft);
  text-decoration: none;
}
.submenu li a:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text);
}

/* THEME TOGGLE */

.theme-toggle {
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: rgba(255,255,255,0.05);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem;
  font-size: 0.78rem;
  cursor: pointer;
  color: var(--text-soft);
}

.theme-toggle-icon {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: conic-gradient(from 120deg, #f5c657 0 40%, #111c27 40% 100%);
}

.theme-toggle-label {
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* MOBILE NAV TOGGLE */

.nav-toggle {
  display: none;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: rgba(17,28,39,0.9);
  width: 2.35rem;
  height: 2.35rem;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.nav-toggle-bars {
  width: 1.3rem;
  height: 1.3rem;
  position: relative;
}

.nav-toggle-bars span {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
}

.nav-toggle-bars span:nth-child(1) { top: 4px; }
.nav-toggle-bars span:nth-child(2) { top: 10px; }
.nav-toggle-bars span:nth-child(3) { top: 16px; }

/* HERO */

.hero {
  padding: 3rem 0 0;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.2fr);
  gap: 2.5rem;
  align-items: center;
}

.hero-kicker {
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.hero-title {
  font-size: clamp(2rem, 3vw, 2.65rem);
  line-height: 1.16;
  margin: 0.6rem 0 0.75rem;
}

.hero-body {
  max-width: 34rem;
  color: var(--text-soft);
  margin-bottom: 1.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}

.btn {
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  padding: 0.7rem 1.25rem;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  cursor: pointer;
  text-decoration: none;
  background: var(--surface-soft);
  color: var(--text);
}
.btn-primary {
  background: linear-gradient(135deg, var(--brand-green) 0, var(--brand-teal) 100%);
  border-color: transparent;
  color: #020608;
  font-weight: 600;
}
.btn-ghost {
  background: transparent;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.hero-tags li {
  font-size: 0.8rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: var(--surface);
  color: var(--text-soft);
}

.hero-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  text-align: center;
}
.hero-logo-frame {
  width: min(280px, 68vw);
  aspect-ratio: 16 / 9;
  border-radius: 1.4rem;
  background: #050a0f;
  padding: 0.9rem;
}
.hero-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.hero-caption {
  font-size: 0.8rem;
  color: var(--text-soft);
}

/* SECTIONS / CARDS */

.section {
  margin-top: 3.25rem;
}

.section-header {
  margin-bottom: 1.75rem;
  max-width: 40rem;
}
.section-header.align-left {
  text-align: left;
}
.section-header h2 {
  margin: 0 0 0.5rem;
  font-size: 1.6rem;
}
.section-header p {
  margin: 0;
  color: var(--text-soft);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.4rem;
}
.card-grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  border-radius: 1.25rem;
  background: var(--surface-soft);
  border: 1px solid var(--border-soft);
  padding: 1.35rem 1.4rem;
}
.card h3 {
  margin-top: 0;
  margin-bottom: 0.4rem;
  font-size: 1.02rem;
}
.card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.9rem;
}

/* FORMS (for existing contact page) */

.container-narrow {
  max-width: 780px;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}
.field label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.15rem;
}
.field input,
.field textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border-radius: 0.7rem;
  border: 1px solid var(--border-soft);
  background: #0b1520;
  color: var(--text);
  font: inherit;
}
:root[data-theme="light"] .field input,
:root[data-theme="light"] .field textarea {
  background: #ffffff;
}
.field textarea {
  resize: vertical;
}

/* FOOTER */

.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 1.75rem 0 2.25rem;
  background: #050a0f;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-soft);
}
.footer-links a {
  text-decoration: none;
  margin-left: 0.8rem;
}

/* ACCESSIBILITY */

.skip-link {
  position: absolute;
  left: -999px;
  padding: 0.4rem 0.75rem;
  background: #f5f5f7;
  color: #05060a;
  border-radius: 0 0 0.5rem 0.5rem;
  z-index: 999;
}
.skip-link:focus {
  left: 0.75rem;
  top: 0.4rem;
}

/* RESPONSIVE */

@media (max-width: 900px) {
  .nav-shell {
    gap: 0.5rem;
  }

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

  .main-nav {
    position: fixed;
    inset: calc(var(--nav-height) + 0.35rem) 0 0 0;
    background: rgba(7,17,25,0.97);
    padding: 1.1rem 1.25rem 1.5rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
  }
  .main-nav.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .menu-root {
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
  }

  .menu-item > a,
  .menu-item-toggle {
    width: 100%;
    justify-content: space-between;
  }

  .menu-item.has-submenu .submenu {
    position: static;
    margin-top: 0.3rem;
  }

  .menu-item.has-submenu:hover > .submenu {
    display: none;
  }

  .menu-item.has-submenu.is-open > .submenu {
    display: block;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-visual {
    order: -1;
  }
}

@media (max-width: 540px) {
  .header-inner {
    padding-inline: 0.35rem;
  }

  .brand-name {
    font-size: 0.8rem;
  }

  .brand-tagline {
    display: none;
  }

  .hero {
    padding-top: 2.25rem;
  }
}
