/* Hyntech — shared styles */
:root {
  --bg: #0a0d0c;
  --bg-2: #0f1413;
  --bg-3: #131918;
  --surface: #161d1c;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #e8efee;
  --text-dim: #9aa6a4;
  --text-mute: #6c7674;
  --teal: #1FB098;
  --teal-bright: #28d4b6;
  --teal-dim: #0d6857;
  --teal-glow: rgba(31, 176, 152, 0.35);
  --teal-soft: rgba(31, 176, 152, 0.08);
  --max: 1320px;
  --pad: clamp(20px, 4vw, 56px);
  --font-display: "Söhne", "Neue Haas Grotesk Display", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ---- Layout ---- */
.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }

/* ---- Type ---- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 24px; height: 1px;
  background: var(--teal);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: #fff;
}

h1 {
  font-size: clamp(48px, 7.6vw, 120px);
  font-weight: 400;
  letter-spacing: -0.035em;
}
h2 {
  font-size: clamp(32px, 4.6vw, 64px);
  letter-spacing: -0.025em;
  line-height: 1.08;
}
h3 {
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 500;
}

.lead {
  font-size: clamp(17px, 1.4vw, 21px);
  color: var(--text-dim);
  line-height: 1.5;
  max-width: 60ch;
}

/* ---- Nav ---- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 18px 0;
  transition: background 0.3s ease, backdrop-filter 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(10, 13, 12, 0.78);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: var(--line);
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-logo { display: flex; align-items: center; gap: 10px; }
.nav-logo img { height: 50px; width: auto; }
.nav-links {
  display: flex;
  gap: 40px;
  list-style: none;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
  position: relative;
  padding: 6px 0;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: #fff; }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--teal);
}

/* Dropdown */
.has-drop { position: relative; }
.has-drop > a::after {
  content: "▾";
  display: inline-block;
  margin-left: 6px;
  font-size: 9px;
  transform: translateY(-1px);
  color: var(--text-mute);
  transition: transform 0.2s, color 0.2s;
}
.has-drop:hover > a::after { color: var(--teal); transform: translateY(-1px) rotate(180deg); }
/* Hover bridge so the dropdown stays open while the cursor crosses the gap */
.has-drop::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: 100%;
  height: 18px;
  pointer-events: auto;
}
.dropdown {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 240px;
  background: rgba(15, 20, 19, 0.94);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 6px;
  list-style: none;
  display: grid;
  gap: 2px;
  z-index: 60;
  overflow: hidden;
  /* Drawer animation */
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-color: transparent;
  opacity: 0;
  pointer-events: none;
  transition:
    max-height 0.36s cubic-bezier(0.2, 0.7, 0.2, 1),
    padding 0.36s cubic-bezier(0.2, 0.7, 0.2, 1),
    opacity 0.2s ease 0.04s,
    border-color 0.2s ease 0.04s,
    background-color 0.2s ease;
}
.has-drop:hover .dropdown,
.has-drop:focus-within .dropdown {
  max-height: 320px;
  padding-top: 6px;
  padding-bottom: 6px;
  opacity: 1;
  pointer-events: auto;
  border-color: var(--line-strong);
}
.dropdown li {
  display: block;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}
.has-drop:hover .dropdown li,
.has-drop:focus-within .dropdown li {
  opacity: 1;
  transform: translateY(0);
}
.has-drop:hover .dropdown li:nth-child(1),
.has-drop:focus-within .dropdown li:nth-child(1) { transition-delay: 0.08s; }
.has-drop:hover .dropdown li:nth-child(2),
.has-drop:focus-within .dropdown li:nth-child(2) { transition-delay: 0.14s; }
.has-drop:hover .dropdown li:nth-child(3),
.has-drop:focus-within .dropdown li:nth-child(3) { transition-delay: 0.20s; }
.dropdown a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: background 0.2s, color 0.2s, padding-left 0.2s;
  white-space: nowrap;
}
.dropdown a:hover { background: rgba(31, 176, 152, 0.1); color: #fff; padding-left: 18px; }
.dropdown a::after { display: none !important; content: none; }
.dropdown a .ext {
  font-size: 10px;
  color: var(--teal);
  letter-spacing: 0.08em;
}
.nav-cta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 11px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: #fff;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.nav-cta:hover { border-color: var(--teal); background: var(--teal-soft); }
.nav-cta .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 10px var(--teal-glow); }

/* Mobile menu */
.nav-toggle { display: none; }
@media (max-width: 880px) {
  .nav-row { position: relative; }
  .nav-cta { display: none; }
  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    width: 42px; height: 42px;
    align-items: center;
    justify-content: center;
    z-index: 70;
  }
  .nav-toggle span {
    display: block;
    width: 18px; height: 1.5px;
    background: #fff;
    transition: transform 0.3s, opacity 0.3s;
  }
  .nav-toggle.open span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

  /* Drawer */
  .nav nav {
    position: fixed;
    inset: 0;
    background: rgba(10, 13, 12, 0.96);
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 60;
  }
  .nav nav.open {
    opacity: 1;
    pointer-events: auto;
  }
  .nav-links {
    display: flex !important;
    flex-direction: column;
    gap: 28px;
    text-align: center;
    padding: 0;
  }
  .nav-links a {
    font-size: 18px;
    letter-spacing: 0.18em;
  }
  /* Dropdown becomes inline list on mobile */
  .has-drop::after { display: none; }
  .has-drop > a::after { display: none; }
  .dropdown {
    position: static;
    transform: none;
    margin: 16px auto 0;
    background: transparent;
    border: 0;
    padding: 0 !important;
    max-height: none;
    opacity: 1;
    pointer-events: auto;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    gap: 14px;
  }
  .dropdown li { opacity: 1 !important; transform: none !important; }
  .dropdown a {
    justify-content: center;
    color: var(--text-mute);
    font-size: 13px;
    padding: 4px;
  }
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 28px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: all 0.25s ease;
  cursor: pointer;
  border: 1px solid transparent;
  position: relative;
}
.btn-primary {
  background: var(--teal);
  color: #04130f;
  font-weight: 600;
}
.btn-primary:hover {
  background: var(--teal-bright);
  transform: translateY(-1px);
  box-shadow: 0 10px 40px -10px var(--teal-glow);
}
.btn-ghost {
  border-color: var(--line-strong);
  color: #fff;
}
.btn-ghost:hover { border-color: var(--teal); background: var(--teal-soft); }
.btn .arrow {
  transition: transform 0.25s ease;
  display: inline-block;
}
.btn:hover .arrow { transform: translateX(4px); }

/* ---- Section frame ---- */
section { position: relative; }
.section-pad { padding: clamp(80px, 10vw, 160px) 0; }
.section-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: end;
  margin-bottom: 72px;
}
@media (max-width: 880px) {
  .section-head { grid-template-columns: 1fr; gap: 24px; margin-bottom: 48px; }
}

/* ---- Reveal animation ---- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Footer ---- */
.footer {
  border-top: 1px solid var(--line);
  padding: 80px 0 40px;
  margin-top: 80px;
  background: var(--bg-2);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 64px;
  margin-bottom: 80px;
}
@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}
.footer h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-mute);
  font-weight: 500;
  margin-bottom: 20px;
}
.footer ul { list-style: none; display: grid; gap: 12px; }
.footer ul a { color: var(--text-dim); transition: color 0.2s; font-size: 15px; }
.footer ul a:hover { color: var(--teal); }
.footer-brand img { height: 28px; margin-bottom: 20px; }
.footer-brand p { color: var(--text-dim); max-width: 32ch; line-height: 1.55; }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--text-mute);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
}

/* ---- Generic page hero (used on sub-pages) ---- */
.page-hero {
  padding: 200px 0 100px;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 80% at 80% 20%, var(--teal-soft), transparent 60%);
  pointer-events: none;
}
.page-hero h1 {
  font-size: clamp(48px, 7vw, 100px);
  max-width: 14ch;
}
.page-hero .lead { margin-top: 32px; font-size: clamp(17px, 1.4vw, 22px); }

/* ---- Selection ---- */
::selection { background: var(--teal); color: #04130f; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #1f2826; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #2a3432; }
