/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.brand-icon {
  width: 48px;
  height: auto;
}

.brand-word {
  font-family: var(--font-display);
  font-size: 21px;
  letter-spacing: 6px;
  display: flex;
  gap: 10px;
  white-space: nowrap;
}

.brand-word strong {
  font-weight: 800;
}

.brand-word em {
  font-style: normal;
  font-weight: 300;
  color: var(--slate);
}

.nav-row {
  position: relative;
  display: flex;
  align-items: center;
  margin-left: auto;
}

.nav-links {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-hint {
  display: none;
}

.nav-links a {
  padding: 9px 13px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 8px;
  white-space: nowrap;
  transition: color 0.25s, background 0.25s;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--blue-soft);
}

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

.nav-indicator {
  position: absolute;
  bottom: -14px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--blue);
  border-radius: 2px;
  box-shadow: 0 0 14px rgba(0, 122, 255, 0.7);
  transition: left 0.4s var(--ease), width 0.4s var(--ease);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.lang-switch {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 9px;
  overflow: hidden;
}

.lang-btn {
  background: none;
  border: 0;
  padding: 7px 12px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
}

.lang-btn + .lang-btn {
  border-left: 1px solid var(--border);
}

.lang-btn.active {
  background: var(--blue);
  color: #fff;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: none;
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}

.icon-btn:hover {
  color: var(--text);
  border-color: var(--blue);
  background: var(--blue-soft);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.icon-sun,
.icon-moon {
  display: none;
}

[data-theme="dark"] .icon-sun {
  display: block;
}

[data-theme="light"] .icon-moon {
  display: block;
}

/* ---------- Hero ---------- */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 88px 24px 64px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--blue);
}

.eyebrow::before {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--blue);
  clip-path: polygon(0 0, 100% 0, 0 100%);
  flex-shrink: 0;
}

.hero h1 {
  font-size: clamp(40px, 5.6vw, 66px);
  font-weight: 800;
  letter-spacing: -1.5px;
  margin: 18px 0 20px;
}

.grad {
  background: linear-gradient(92deg, var(--blue), var(--blue-bright) 55%, var(--slate));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.65;
  max-width: 54ch;
  margin-bottom: 32px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 360px;
}

.hero-logo {
  width: min(300px, 58vw);
  position: relative;
  z-index: 2;
  animation: float 7s ease-in-out infinite;
  filter: drop-shadow(0 18px 40px rgba(0, 122, 255, 0.35));
}

.hero-glow {
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-1), transparent 65%);
}

.ring {
  position: absolute;
  border: 1px solid var(--border);
  border-radius: 50%;
}

.ring-1 {
  width: 300px;
  height: 300px;
  animation: pulse-ring 5s ease-in-out infinite;
}

.ring-2 {
  width: 400px;
  height: 400px;
  animation: pulse-ring 5s ease-in-out 1.2s infinite;
}

/* ---------- Stats strip ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-block: 1px solid var(--border);
  background: var(--bg-2);
}

.stat {
  padding: 30px 26px;
  border-left: 1px solid var(--border);
}

.stat:first-child {
  border-left: 0;
}

.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(30px, 3.4vw, 42px);
  font-weight: 800;
  color: var(--blue);
  letter-spacing: -0.5px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.4px;
}

/* ---------- Sections ---------- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 76px 24px;
}

.section-tight {
  padding-top: 24px;
}

.section-head {
  max-width: 660px;
  margin-bottom: 46px;
}

.section-head h2 {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 800;
  margin: 14px 0 12px;
}

.section-head p {
  color: var(--text-muted);
  font-size: 16.5px;
  line-height: 1.65;
}

.section-head-center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-head-center .eyebrow {
  justify-content: center;
}

/* ---------- Home: mission ---------- */
.mission {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.mission-copy h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 800;
  margin: 14px 0 16px;
}

.mission-copy p:last-child {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.7;
}

.mission-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* ---------- Tab panels ---------- */
.tab {
  display: none;
}

.tab.active {
  display: block;
  animation: tab-in 0.45s var(--ease);
}

.slant-wrap {
  background: var(--bg-2);
  clip-path: polygon(0 0, 100% 76px, 100% 100%, 0 100%);
  padding-top: 76px;
}

.slant-wrap > .section {
  padding-top: 0;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  padding: 36px 24px;
}

.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
}

.footer-tagline {
  color: var(--text-muted);
  font-size: 14px;
}

.footer-legal {
  color: var(--text-muted);
  font-size: 13px;
  width: 100%;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translate(-50%, 20px);
  z-index: 99;
  background: var(--surface);
  border: 1px solid rgba(0, 122, 255, 0.5);
  padding: 14px 22px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  font-size: 14.5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 56px;
  }

  .hero-art {
    min-height: 300px;
    order: -1;
  }

  .hero-logo {
    width: min(240px, 55vw);
  }

  .mission {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 1280px) {
  .brand-word {
    font-size: 18px;
    letter-spacing: 5px;
    gap: 9px;
  }

  .nav-links a {
    padding: 9px 9px;
    font-size: 13px;
  }
}

@media (max-width: 900px) {
  .nav-inner {
    flex-wrap: wrap;
    height: auto;
    padding-top: 10px;
    padding-bottom: 10px;
    gap: 10px;
  }

  .nav-row {
    order: 3;
    width: 100%;
    margin-left: 0;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-links.nav-fade-right {
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent 100%);
    mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent 100%);
  }

  .nav-links.nav-fade-left {
    -webkit-mask-image: linear-gradient(270deg, #000 calc(100% - 28px), transparent 100%);
    mask-image: linear-gradient(270deg, #000 calc(100% - 28px), transparent 100%);
  }

  .nav-links.nav-fade-left.nav-fade-right {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent);
  }

  .nav-indicator {
    display: none;
  }

  .nav-hint {
    display: flex;
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--blue);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s var(--ease);
  }

  .nav-hint svg {
    width: 100%;
    height: 100%;
  }

  .nav-hint.show {
    opacity: 1;
    animation: nav-hint-in 0.5s var(--ease) both;
  }

  .nav-hint.show svg {
    animation: nav-hint-nudge 1.4s var(--ease) 0.6s infinite;
  }

  .brand-word {
    font-size: 17px;
    letter-spacing: 5px;
    gap: 8px;
  }

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

  .stat {
    border-left: 0;
    border-top: 1px solid var(--border);
  }

  .stat:nth-child(-n + 2) {
    border-top: 0;
  }

  .stat:nth-child(even) {
    border-left: 1px solid var(--border);
  }
}
