/* ==========================================================================
   AlphaInnovations — site styles
   Source of truth: design_handoff_alphainnovations_site/README.md
   ========================================================================== */

/* ---------- Fonts (self-hosted, variable 400–700) ---------- */
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/space-grotesk-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/space-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Design tokens ---------- */
:root,
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0B0C0E;
  --bg2: #101215;
  --bg3: #16181C;
  --panel: #0E1013;
  --border: #16181C;
  --border2: #1E2126;
  --border3: #2A2E34;
  --ink: #E7E9EC;
  --muted: #9BA0A8;
  --dim: #63666B;
  --faint: #3A3F47;
  --accent: #5EEAD4;
  --accent-hov: #99F6E4;
  --accent-ink: #0B0C0E;
  --overlay: 11, 12, 14;
  --ch-gray: 155, 160, 168;
  --ch-teal: 94, 234, 212;
}
html[data-theme="light"] {
  color-scheme: light;
  --bg: #F4F4F2;
  --bg2: #FFFFFF;
  --bg3: #ECEAE5;
  --panel: #FFFFFF;
  --border: #E3E1DB;
  --border2: #DDDAD3;
  --border3: #C9C6BF;
  --ink: #17181A;
  --muted: #5A5D63;
  --dim: #8A8C90;
  --faint: #B5B2AB;
  --accent: #0D9488;
  --accent-hov: #0F766E;
  --accent-ink: #FFFFFF;
  --overlay: 244, 244, 242;
  --ch-gray: 90, 93, 99;
  --ch-teal: 13, 148, 136;
}

:root {
  --font-sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --pad-x: 48px;
  --pad-y: 96px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s, color 0.3s;
}
::selection { background: #5EEAD4; color: #0B0C0E; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hov); }
h1, h2, h3, p { margin: 0; }
h1, h2, p { text-wrap: pretty; }
h1, h2, h3 { overflow-wrap: anywhere; }
.mono { font-family: var(--font-mono); }
.accent { color: var(--accent); }
.ink { color: var(--ink); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  font-family: var(--font-mono); font-size: 13px;
  background: var(--accent); color: var(--accent-ink);
  padding: 8px 14px; border-radius: 4px;
}
.skip-link:focus { top: 16px; color: var(--accent-ink); }

/* Theme-aware surfaces transition with the toggle */
.nav, .section, .card, .term, .term__bar, .field, .btn, .btn--ghost, .toggle, .footer, .confirm {
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

/* ---------- Keyframes ---------- */
@keyframes blinkCursor { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0; } }
@keyframes typeIn      { 0% { width: 0ch; } 12% { width: 0ch; } 70% { width: 17ch; } 100% { width: 17ch; } }
@keyframes bootLine1   { 0%, 10% { opacity: 0; } 16%, 100% { opacity: 1; } }
@keyframes bootLine2   { 0%, 30% { opacity: 0; } 36%, 100% { opacity: 1; } }
@keyframes bootLine3   { 0%, 52% { opacity: 0; } 58%, 100% { opacity: 1; } }

/* ---------- Logo (terminal-prompt wordmark) ---------- */
.logo {
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.logo:hover { color: var(--ink); }
.logo__chevron { color: var(--accent); }
.logo__gap { display: inline-block; width: 0.6ch; }
.logo__name {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  animation: typeIn 2.4s steps(17, end) 1 both;
}
.cursor {
  display: inline-block;
  width: 9px; height: 18px;
  background: var(--accent);
  margin-left: 4px;
  animation: blinkCursor 1.1s step-end infinite;
}
.cursor--sm {
  width: 8px; height: 15px;
  margin-left: 6px;
  vertical-align: -2px;
}

/* ---------- Nav ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px var(--pad-x);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 3;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-family: var(--font-mono);
  font-size: 13px;
}
.nav__link { color: var(--muted); }
.nav__link:hover { color: var(--accent); }
.toggle {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  background: none;
  border: 1px solid var(--border3);
  border-radius: 4px;
  padding: 7px 12px;
  cursor: pointer;
  line-height: normal;
}
.toggle:hover { color: var(--accent); border-color: var(--accent); }
.toggle__text { margin-left: 0.6ch; }
.nav__cta {
  color: var(--accent-ink);
  background: var(--accent);
  padding: 8px 18px;
  border-radius: 4px;
  font-weight: 500;
}
.nav__cta:hover { background: var(--accent-hov); color: var(--accent-ink); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 640px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse 65% 80% at 38% 50%,
    rgba(var(--overlay), 0.88) 0%,
    rgba(var(--overlay), 0.45) 55%,
    rgba(var(--overlay), 0) 100%
  );
}
.hero__content {
  position: relative;
  z-index: 2;
  padding: 80px var(--pad-x);
  max-width: 780px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 2px;
}
.hero__title {
  font-size: 58px;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -1px;
}
.hero__sub {
  font-size: 19px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 560px;
}
.hero__ctas {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}
.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--accent-ink);
  background: var(--accent);
  padding: 13px 26px;
  border-radius: 4px;
  border: 0;
  cursor: pointer;
  line-height: normal;
  white-space: nowrap;
}
.btn:hover { background: var(--accent-hov); color: var(--accent-ink); }
.btn--ghost {
  font-weight: 400;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--border3);
  padding: 12px 26px;
}
.btn--ghost:hover { background: transparent; border-color: var(--accent); color: var(--accent); }

/* ---------- Sections ---------- */
.section {
  padding: var(--pad-y) var(--pad-x);
  border-top: 1px solid var(--border);
}
.section__head {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.section__title {
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.5px;
}

/* Services */
.services {
  display: flex;
  flex-direction: column;
  gap: 48px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.card:hover { border-color: var(--accent); }
.card__icon {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 20px;
}
.card__title { font-size: 21px; font-weight: 600; }
.card__desc { font-size: 15px; line-height: 1.6; color: var(--muted); }
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding: 0;
  list-style: none;
}
.tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--border3);
  padding: 4px 10px;
  border-radius: 3px;
}

/* About */
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.about__text {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.about__p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--muted);
}
.term {
  border: 1px solid var(--border3);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
}
.term__bar {
  background: var(--bg3);
  padding: 9px 14px;
  display: flex;
  gap: 7px;
  align-items: center;
  border-bottom: 1px solid var(--border3);
}
.term__dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--border3);
}
.term__dot--accent { background: var(--accent); }
.term__label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--dim);
  margin-left: 8px;
}
.term__body {
  padding: 26px 24px;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 2;
  color: var(--muted);
}
.term__body div { overflow-wrap: anywhere; }
.about > * { min-width: 0; }
.grid-3 > * { min-width: 0; }

/* Contact */
.contact {
  padding-top: 110px;
  padding-bottom: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  text-align: center;
}
.boot {
  font-family: var(--font-mono);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  color: var(--faint);
}
.contact__title {
  font-size: 44px;
  font-weight: 600;
  letter-spacing: -0.5px;
}
.contact__sub {
  font-size: 17px;
  color: var(--muted);
  max-width: 480px;
}
.direct {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--muted);
}
.direct a { color: var(--muted); }
.direct a:hover { color: var(--accent); }
.direct__sep { color: var(--border3); }

/* Boot-sequence animation: only once JS has marked the section visible.
   Without JS everything is simply shown. */
html.js .contact:not(.is-visible) .boot__l1,
html.js .contact:not(.is-visible) .boot__l2,
html.js .contact:not(.is-visible) .boot__l3 { opacity: 0; }
.contact.is-visible .boot__l1 { animation: bootLine1 5s step-end 1 both; }
.contact.is-visible .boot__l2 { animation: bootLine2 5s step-end 1 both; }
.contact.is-visible .boot__l3 { animation: bootLine3 5s step-end 1 both; }

.form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 480px;
  margin-top: 8px;
  text-align: left;
}
.field {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ink);
  background: var(--bg2);
  border: 1px solid var(--border3);
  border-radius: 4px;
  padding: 13px 16px;
  width: 100%;
  line-height: normal;
}
.field::placeholder { color: var(--dim); opacity: 1; }
.field:focus { outline: none; border-color: var(--accent); }
textarea.field { resize: vertical; min-height: 0; line-height: 1.5; }
.form__submit {
  font-size: 15px;
  padding: 15px 32px;
  align-self: flex-start;
}
.form__submit[disabled] { opacity: 0.7; cursor: progress; }
.form__error {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  border: 1px solid var(--border3);
  border-radius: 4px;
  padding: 12px 16px;
}
.form__error:empty { display: none; }
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.turnstile:empty { display: none; }
.turnstile iframe { display: block; max-width: 100%; }
.confirm {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--accent);
  border: 1px solid var(--border3);
  border-radius: 8px;
  padding: 24px 32px;
  margin-top: 8px;
  max-width: 480px;
}
[hidden] { display: none !important; }

.page-404 { flex: 1; justify-content: center; }

/* ---------- Footer ---------- */
.footer {
  margin-top: auto;
  padding: 28px var(--pad-x);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--dim);
}

/* ---------- Responsive (not in the design; desktop-first) ---------- */
@media (max-width: 1024px) {
  :root { --pad-x: 32px; --pad-y: 80px; }
  .hero__title { font-size: 50px; }
  .about { gap: 40px; }
}
@media (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; }
  .hero__title { font-size: 44px; }
  .section__title { font-size: 32px; }
  .contact__title { font-size: 38px; }
  .contact { padding-top: 90px; padding-bottom: 90px; }
}
@media (max-width: 640px) {
  :root { --pad-x: 20px; --pad-y: 64px; }
  .nav { padding-top: 16px; padding-bottom: 16px; }
  .nav__links { gap: 14px; }
  .nav__link { display: none; }           /* nav collapses to toggle + CTA */
  .nav__cta { padding: 8px 14px; }
  .hero { min-height: 560px; }
  .hero__content { padding-top: 64px; padding-bottom: 64px; gap: 22px; }
  .hero__title { font-size: 38px; letter-spacing: -0.5px; }
  .hero__sub { font-size: 17px; }
  .hero__ctas .btn { width: 100%; text-align: center; }
  .section__title { font-size: 28px; }
  .contact__title { font-size: 32px; }
  .form__submit { align-self: stretch; }
  .direct { flex-direction: column; gap: 10px; }
  .direct__sep { display: none; }
  .footer { justify-content: center; text-align: center; }
  .term__body { padding: 20px 16px; font-size: 13px; }
}
@media (max-width: 480px) {
  .logo { font-size: 15px; }
  .cursor { width: 8px; height: 16px; }
  .nav__links { gap: 10px; }
  .toggle { padding: 6px 9px; }
  .toggle__text { display: none; }          /* icon-only toggle; aria-label carries the text */
  .nav__cta { padding: 7px 12px; }
}
@media (max-width: 360px) {
  :root { --pad-x: 16px; }
  .nav { flex-wrap: wrap; justify-content: center; row-gap: 10px; }
  .hero__title { font-size: 32px; }
  .contact__title { font-size: 28px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .logo__name { animation: none; width: auto; }
  html.js .contact:not(.is-visible) .boot__l1,
  html.js .contact:not(.is-visible) .boot__l2,
  html.js .contact:not(.is-visible) .boot__l3 { opacity: 1; }
  .contact.is-visible .boot__l1,
  .contact.is-visible .boot__l2,
  .contact.is-visible .boot__l3 { animation: none; }
}

/* ---------- Print ---------- */
@media print {
  .hero__canvas, .hero__overlay, .toggle, .skip-link { display: none !important; }
  body { background: #fff; color: #0B0C0E; }
  .logo__chevron { color: #0D9488; }
  .cursor { animation: none; background: #0D9488; }
}

/* ---------- Footer links ---------- */
.footer__links { display: flex; gap: 18px; align-items: center; }
.footer__link {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--dim);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.footer__link:hover { color: var(--accent); }
.footer__link--inline { font-size: 16px; color: var(--accent); }

/* ---------- Cookie / storage consent ---------- */
.consent {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 50;
  width: min(440px, calc(100vw - 40px));
  background: var(--bg2);
  border: 1px solid var(--border3);
  border-radius: 8px;
  padding: 18px 20px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: consentIn 0.35s ease-out both;
}
@keyframes consentIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.consent__title { font-family: var(--font-mono); font-size: 13px; color: var(--ink); }
.consent__text  { font-family: var(--font-mono); font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.consent__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.consent__btn { font-size: 13px; padding: 10px 16px; }
.consent__btn.btn--ghost { padding: 9px 16px; }
@media (max-width: 640px) {
  .consent { left: 12px; right: 12px; bottom: 12px; width: auto; padding: 16px; }
  .consent__btn { flex: 1; text-align: center; }
}
@media (prefers-reduced-motion: reduce) { .consent { animation: none; } }

/* ---------- Privacy page ---------- */
.prose { max-width: 720px; display: flex; flex-direction: column; gap: 18px; }
.prose h1 { font-size: 40px; font-weight: 600; letter-spacing: -0.5px; }
.prose h2 { font-size: 22px; font-weight: 600; margin-top: 18px; }
.prose p, .prose li { font-size: 16px; line-height: 1.7; color: var(--muted); }
.prose ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose .meta { font-family: var(--font-mono); font-size: 12px; color: var(--dim); }
.tablewrap { overflow-x: auto; }
.prose table { border-collapse: collapse; width: 100%; font-size: 14px; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border: 1px solid var(--border2); vertical-align: top; color: var(--muted); line-height: 1.5; }
.prose th { font-family: var(--font-mono); font-size: 12px; letter-spacing: 1px; color: var(--ink); background: var(--bg2); }
.prose code { font-family: var(--font-mono); font-size: 13px; color: var(--ink); }
