/* ── Gadget Capital ───────────────────────────────── */
/* ── Brand Tokens ─────────────────────────────────── */
:root {
  --teal-400: #4db8ae;
  --teal-500: #3b9b8f;
  --teal-600: #2e7d73;
  --teal-700: #286560;
  --teal-900: #1e4340;
  --teal-label: #4db8ae;

  --color-bg:       #071428;
  --color-surface:  #0c1e38;
  --color-elevated: #112848;
  --color-border:   rgba(59, 155, 143, 0.12);
  --color-text:     #dce1e8;
  --color-muted:    #94a0b0;
  --color-fine:     #9aa4b4;
  --color-heading:  #eef1f5;
  --navbar-bg:      rgba(7, 20, 40, 0.88);
  --mobile-nav-bg:  rgba(7, 20, 40, 0.95);
}

/* ── Light Mode ──────────────────────────────────── */
html.light {
  --color-bg:       #f0f2f5;
  --color-surface:  #e6e9ee;
  --color-elevated: #ffffff;
  --color-border:   rgba(59, 155, 143, 0.15);
  --color-text:     #2c3442;
  --color-muted:    #4a5568;
  --color-fine:     #4a5568;
  --color-heading:  #1a202c;
  --navbar-bg:      rgba(240, 242, 245, 0.88);
  --mobile-nav-bg:  rgba(240, 242, 245, 0.95);
  --teal-label: #266b62;
}

/* ── Skip Link ──────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 8px 16px;
  background: var(--teal-500);
  color: #ffffff;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 0 0 4px 4px;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 0;
}

/* ── Logo theme swap ─────────────────────────────── */
.logo-light { display: none; }
.logo-dark  { display: block; }
html.light .logo-light { display: block; }
html.light .logo-dark  { display: none; }

/* ── Theme Toggle ────────────────────────────────── */
.theme-toggle {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 9999px;
  cursor: pointer;
  padding: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.theme-toggle:hover {
  color: var(--color-heading);
  border-color: var(--teal-500);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--teal-500);
  outline-offset: 2px;
  border-radius: 9999px;
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Hide the wrong icon based on theme */
.theme-toggle .icon-sun  { display: none; }
.theme-toggle .icon-moon { display: block; }
html.light .theme-toggle .icon-sun  { display: block; }
html.light .theme-toggle .icon-moon { display: none; }

/* ── Reset & Base ────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  background: var(--color-bg);
  color: var(--color-text);
  transition: background 0.3s ease, color 0.3s ease;
}

body {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  background: var(--color-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* ── Navbar ──────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 clamp(24px, 4vw, 64px);
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--navbar-bg);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--color-border);
  transition: background 0.3s ease;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.navbar-logo img {
  height: 36px;
  width: 36px;
  object-fit: contain;
  border-radius: 6px;
}

.navbar-logo span {
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-heading);
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.navbar-links {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.navbar-links a {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-muted);
  transition: color 0.2s ease;
  position: relative;
}

.navbar-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--teal-500);
  transition: width 0.25s ease;
}

.navbar-links a:hover,
.navbar-links a.active {
  color: var(--color-heading);
}

.navbar-links a:hover::after,
.navbar-links a.active::after {
  width: 100%;
}

.navbar-links a:focus-visible {
  outline: 2px solid var(--teal-500);
  outline-offset: 4px;
  border-radius: 2px;
}

/* Navbar CTA button */
.navbar-cta {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  background: var(--teal-700);
  color: #ffffff;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.navbar-cta:hover {
  background: var(--teal-900);
  transform: translateY(-1px);
}

.navbar-cta:focus-visible {
  outline: 2px solid var(--teal-500);
  outline-offset: 3px;
}

.navbar-cta:active {
  transform: translateY(0);
}

@media (max-width: 768px) {
  .navbar-cta { display: none; }
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--color-heading);
}

.menu-toggle:focus-visible {
  outline: 2px solid var(--teal-500);
  outline-offset: 2px;
  border-radius: 4px;
}

.menu-toggle svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

/* Mobile nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  background: var(--mobile-nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
  padding: 24px clamp(24px, 4vw, 64px);
  z-index: 99;
}

.mobile-nav.open {
  display: block;
}

.mobile-nav a {
  display: block;
  padding: 12px 0;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-muted);
  border-bottom: 1px solid var(--color-border);
  transition: color 0.2s ease;
}

.mobile-nav a:last-child {
  border-bottom: none;
}

.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--color-heading);
}

.mobile-nav a:focus-visible {
  outline: 2px solid var(--teal-500);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .navbar-links { display: none; }
  .menu-toggle { display: block; }
}

/* ── Main Content ────────────────────────────────── */
main {
  flex: 1;
  padding-top: 72px;
}

/* ── Footer ──────────────────────────────────────── */
.footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 56px clamp(24px, 4vw, 64px) 32px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-left {
  display: flex;
  align-items: flex-start;
  gap: 48px;
}

.footer-brand {
  max-width: 280px;
}

.footer-brand img {
  height: 32px;
  margin-bottom: 16px;
}

.footer-nav {
  display: flex;
  gap: 64px;
  justify-self: end;
}

.footer-nav-group .footer-nav-heading {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-heading);
  margin-bottom: 16px;
}

.footer-nav-group a {
  display: block;
  font-size: 14px;
  color: var(--color-muted);
  padding: 4px 0;
  transition: color 0.2s ease;
}

.footer-nav-group a:hover {
  color: var(--color-heading);
}

.footer-nav-group a:focus-visible {
  outline: 2px solid var(--teal-500);
  outline-offset: 2px;
  border-radius: 2px;
}

.footer-office {
  display: block;
  font-size: 14px;
  color: var(--color-muted);
  padding: 4px 0;
}

.footer-divider {
  height: 1px;
  background: var(--color-border);
  margin-bottom: 24px;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-copy {
  font-size: 12px;
  color: var(--color-fine);
}

@media (max-width: 768px) {
  .footer-top {
    flex-direction: column;
    gap: 32px;
  }
  .footer-left {
    flex-direction: column;
    gap: 32px;
  }
  .footer-nav {
    flex-direction: column;
    gap: 32px;
  }
}

/* ── Reduced Motion ─────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
