/* ==========================================================================
   WyvTech — Shared Stylesheet
   Loaded by index.html and careers.html. Page-specific CSS lives in each
   page's <style> block. This file holds all shared design tokens, base
   typography, components (buttons, nav, footer, cards, modal, forms) and
   responsive + reduced-motion rules.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Brand colors */
  --ink: #0e2747;
  --body: #46566f;
  --sky: #2ba8f0;
  --sky-bright: #4fc3ff;
  --royal: #1668d8;
  --navy: #12305a;
  --paper: #ffffff;
  --mist: #f3f8fe;
  --mist-2: #eaf3fd;
  --line: rgba(18, 48, 90, 0.1);

  /* Gradients */
  --grad: linear-gradient(105deg, #1668d8 0%, #2ba8f0 100%);
  --grad-soft: linear-gradient(120deg, #eaf3fd 0%, #f6fbff 60%, #fefeff 100%);

  /* Shadows */
  --shadow: 0 18px 50px -22px rgba(22, 104, 216, 0.35);
  --shadow-sm: 0 12px 30px -18px rgba(18, 48, 90, 0.28);
  --shadow-lg: 0 40px 90px -30px rgba(18, 48, 90, 0.45);

  /* Radii */
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --r: var(--radius-md);

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  /* Layout */
  --maxw: 1180px;
  --maxw-tight: 920px;
}

/* --------------------------------------------------------------------------
   2. Reset + base typography
   -------------------------------------------------------------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  color: var(--body);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.lock {
  overflow: hidden;
}
h1,
h2,
h3,
h4 {
  font-family: "Sora", sans-serif;
  color: var(--ink);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 700;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  max-width: 100%;
  display: block;
}
::selection {
  background: var(--sky);
  color: #fff;
}

/* --------------------------------------------------------------------------
   3. Utilities
   -------------------------------------------------------------------------- */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}
.skip-link {
  position: absolute;
  left: 16px;
  top: -40px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 10px 14px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  transition: top 0.2s;
}
.skip-link:focus {
  top: 16px;
  z-index: 1000;
}
a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(43, 168, 240, 0.35);
  outline-offset: 3px;
  border-radius: 10px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: "Sora", sans-serif;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--royal);
  background: #fff;
  border: 1px solid var(--line);
  padding: 0.5em 1em;
  border-radius: 999px;
  box-shadow: 0 6px 20px -12px rgba(22, 104, 216, 0.5);
}
.eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 0 4px rgba(43, 168, 240, 0.18);
}

/* Section bands + headings */
section {
  position: relative;
}
.band {
  padding: clamp(66px, 8.5vw, 114px) 0;
}
.band.mist {
  background: var(--mist);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.sec-head {
  max-width: var(--maxw-tight);
  margin: 0 auto 56px;
  text-align: center;
}
.sec-head .eyebrow {
  margin-bottom: 18px;
}
.sec-head h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 16px;
}
.sec-head p {
  font-size: 1.08rem;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.7s cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal.in {
  opacity: 1;
  transform: none;
}
.hero .reveal {
  transition-delay: var(--d, 0s);
}

/* --------------------------------------------------------------------------
   4. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  font-family: "Sora", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85em 1.5em;
  border-radius: 999px;
  cursor: pointer;
  border: 0;
  transition:
    transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.25s,
    background 0.25s;
  white-space: nowrap;
}
.btn svg {
  width: 1.05em;
  height: 1.05em;
}
.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: var(--shadow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 55px -20px rgba(22, 104, 216, 0.55);
}
.btn-ghost {
  background: rgba(18, 48, 90, 0.04);
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover {
  background: rgba(18, 48, 90, 0.07);
  transform: translateY(-2px);
}
.btn-outline {
  background: transparent;
  color: var(--royal);
  border: 1.5px solid rgba(22, 104, 216, 0.35);
}
.btn-outline:hover {
  background: rgba(22, 104, 216, 0.06);
  border-color: var(--royal);
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   5. Header / Nav (sticky, glassmorphism, mobile hamburger)
   -------------------------------------------------------------------------- */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition:
    border-color 0.3s,
    box-shadow 0.3s;
}
header.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 8px 30px -22px rgba(18, 48, 90, 0.4);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
}
.nav .logo img {
  height: 54px;
  max-height: 100%;
  width: auto;
  transform: translateY(4px);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}
.nav-links > .btn {
  display: none;
}
.nav-links a:not(.btn) {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink);
  position: relative;
  opacity: 0.85;
  transition: opacity 0.2s;
}
.nav-links a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--grad);
  transition: width 0.28s ease;
}
.nav-links a:not(.btn):hover {
  opacity: 1;
}
.nav-links a:not(.btn):hover::after {
  width: 100%;
}
.nav-links a.nav-careers {
  color: var(--royal);
  font-weight: 700;
}
.nav-cta {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Hamburger -> X animation */
.menu-btn {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  transition:
    transform 0.3s,
    opacity 0.3s;
  border-radius: 2px;
}
.menu-btn.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-btn.active span:nth-child(2) {
  opacity: 0;
}
.menu-btn.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   6. Card base
   -------------------------------------------------------------------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 32px 28px;
  transition:
    transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.3s,
    border-color 0.3s;
  position: relative;
  overflow: hidden;
}
/* Gradient top border revealed on hover */
.card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 3px;
  width: 100%;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: transparent;
}
.card:hover::before {
  transform: scaleX(1);
}
/* Icon container with glow */
.card .ic {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  background: linear-gradient(
    140deg,
    rgba(43, 168, 240, 0.15),
    rgba(22, 104, 216, 0.12)
  );
  color: var(--royal);
  box-shadow: 0 0 0 8px rgba(22, 104, 216, 0.05);
}
.card .ic svg {
  width: 26px;
  height: 26px;
}
.card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 10px;
}
.card p {
  font-size: 0.96rem;
}
.card .tags {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.card .tags span {
  font-size: 0.72rem;
  font-weight: 600;
  font-family: "Sora", sans-serif;
  color: var(--royal);
  background: var(--mist-2);
  padding: 0.3em 0.6em;
  border-radius: 6px;
}

/* --------------------------------------------------------------------------
   7. Footer (dark navy, 3-col)
   -------------------------------------------------------------------------- */
footer {
  position: relative;
  background: linear-gradient(180deg, #12305a, #0c2244);
  color: rgba(255, 255, 255, 0.7);
  padding: 64px 0 30px;
  overflow: hidden;
}
/* Glowing accent dots */
footer::before,
footer::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.4;
  pointer-events: none;
}
footer::before {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, #1668d8, transparent 70%);
  top: -120px;
  right: -80px;
}
footer::after {
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, #2ba8f0, transparent 70%);
  bottom: -120px;
  left: -60px;
  opacity: 0.25;
}
footer .wrap {
  position: relative;
  z-index: 1;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.foot-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.foot-logo {
  width: 160px;
  height: auto;
}
.wordmark {
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: #fff;
  letter-spacing: -0.02em;
}
.wordmark .w {
  color: var(--sky-bright);
}
footer .blurb {
  margin-top: 14px;
  max-width: 34ch;
  font-size: 0.95rem;
}
footer h4 {
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
  font-family: "Sora", sans-serif;
}
footer ul {
  list-style: none;
  display: grid;
  gap: 10px;
}
footer ul a {
  font-size: 0.95rem;
  opacity: 0.8;
  transition: opacity 0.2s;
}
footer ul a:hover {
  opacity: 1;
  color: var(--sky-bright);
}
.foot-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  font-size: 0.85rem;
  gap: 16px;
  flex-wrap: wrap;
}
.foot-social {
  display: flex;
  gap: 12px;
}
.foot-social a {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  transition:
    background 0.25s,
    transform 0.25s;
}
.foot-social a:hover {
  background: var(--royal);
  transform: translateY(-2px);
}
.foot-social svg {
  width: 18px;
  height: 18px;
  fill: #fff;
}

/* --------------------------------------------------------------------------
   8. Modal + forms
   -------------------------------------------------------------------------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 5vh 18px 18px;
  overflow-y: auto;
}
.modal.open {
  display: flex;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 24, 46, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fade 0.3s ease;
}
@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.modal-card {
  position: relative;
  width: 100%;
  max-width: 560px;
  background: #fff;
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  padding: 34px;
  animation: pop 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.modal-card h3 {
  font-size: 1.6rem;
  margin-bottom: 6px;
}
.modal-card .sub {
  font-size: 0.98rem;
  margin-bottom: 22px;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--ink);
  transition: background 0.2s;
}
.modal-close:hover {
  background: var(--mist);
}
.modal-close svg {
  width: 18px;
  height: 18px;
}

/* Form fields */
.field {
  margin-bottom: 15px;
}
.field.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
label {
  display: block;
  font-family: "Sora", sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
label .req {
  color: var(--royal);
}
input,
select,
textarea {
  width: 100%;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 0.96rem;
  color: var(--ink);
  padding: 0.7em 0.85em;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fbfdff;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
input:focus,
select:focus,
textarea:focus {
  outline: 0;
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(43, 168, 240, 0.18);
}
textarea {
  resize: vertical;
  min-height: 84px;
}
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-submit {
  width: 100%;
  margin-top: 6px;
}
.form-note {
  font-size: 0.8rem;
  color: #8493aa;
  margin-top: 12px;
  text-align: center;
}
.form-status {
  display: none;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.7em 0.9em;
  border-radius: 11px;
  margin-bottom: 14px;
}
.form-status.err {
  display: block;
  background: #fff2f2;
  color: #c0392b;
  border: 1px solid #f3c7c3;
}
.success {
  text-align: center;
  padding: 10px 0;
}
.success .badge {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(140deg, #dff3ff, #cfe8ff);
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
}
.success .badge svg {
  width: 30px;
  height: 30px;
  stroke: var(--royal);
}
.success h3 {
  margin-bottom: 8px;
}

/* --------------------------------------------------------------------------
   9. Responsive breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 920px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .foot-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}
@media (max-width: 640px) {
  .nav-links {
    display: none;
  }
  .nav-cta .btn {
    display: none;
  }
  .menu-btn {
    display: block;
  }
  /* Mobile nav: slides in from top */
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 74px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    padding: 22px 28px;
    gap: 16px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    animation: navSlide 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  @keyframes navSlide {
    from {
      opacity: 0;
      transform: translateY(-12px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
  .nav-links.open .btn {
    display: inline-flex;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .foot-grid {
    grid-template-columns: 1fr;
  }
  .field.row {
    grid-template-columns: 1fr;
  }
  .modal-card {
    padding: 26px;
  }
}

/* --------------------------------------------------------------------------
   10. Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
