/* ==========================================================================
   Sequel IT — design system v2
   Palette sampled from the original logo (bg #194759, blue #0068A6,
   slate #5A8698). Space Grotesk display, Inter body, JetBrains Mono for
   the SQL vernacular the company is named after.
   ========================================================================== */

:root {
  --ink: #0d242e;            /* deepest surface (footer, terminal) */
  --navy: #194759;           /* logo background — header + hero base */
  --navy-soft: #1f5468;
  --brand: #0068a6;          /* logo blue — CTAs, links */
  --brand-hover: #005286;
  --sky: #4fb3e8;            /* bright accent on dark surfaces */
  --slate: #5a8698;          /* logo muted slate */
  --paper: #f4f8fa;          /* page background */
  --surface: #ffffff;
  --text: #14303c;
  --text-muted: #4a6675;
  --border: #dbe7ec;

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(13, 36, 46, 0.06);
  --shadow-md: 0 6px 24px rgba(13, 36, 46, 0.1);
  --shadow-lg: 0 18px 48px rgba(13, 36, 46, 0.18);

  --container: 74rem;
  --transition: 200ms ease-out;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 600; }
h3 { font-size: 1.3rem; font-weight: 600; }

p { margin: 0 0 1em; }

a {
  color: var(--brand);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--brand-hover); }

img { max-width: 100%; height: auto; }

:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 2px;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 1000;
}
.skip-link:focus {
  left: 0;
  color: #fff;
}

/* --- Header / nav (dark — matches logo background exactly) --------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
}

.brand {
  display: flex;
  align-items: center;
}
.brand-logo {
  display: block;
  height: 46px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: inline-block;
  padding: 0.6rem 0.95rem;
  border-radius: var(--radius-sm);
  color: #c3d7e0;
  font-weight: 500;
  font-size: 0.95rem;
}
.nav-links a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}
.nav-links a[aria-current="page"] {
  color: #ffffff;
  font-weight: 600;
}

.lang-switch {
  display: inline-flex;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  overflow: hidden;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-mono);
}
.lang-switch a {
  padding: 0.35rem 0.8rem;
  color: #c3d7e0;
}
.lang-switch a:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.lang-switch a.active {
  background: var(--sky);
  color: var(--ink);
  pointer-events: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.6rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.nav-toggle:hover { background: rgba(255, 255, 255, 0.1); }
.nav-toggle svg { stroke: #e8f1f5; }

/* --- Buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.7rem 1.6rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background var(--transition), color var(--transition),
    border-color var(--transition), transform var(--transition),
    box-shadow var(--transition);
}
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--brand);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 104, 166, 0.35);
}
.btn-primary:hover {
  background: var(--brand-hover);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(0, 104, 166, 0.45);
}

.btn-outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--border);
}
.btn-outline:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.btn-light {
  background: #ffffff;
  color: var(--navy);
}
.btn-light:hover { background: #dcecf5; color: var(--navy); }

/* --- Hero ------------------------------------------------------------------
   Layered: photo (--hero-img) → navy wash → soft glow. Set the photo per
   page with style="--hero-img:url('/assets/img/….jpg')" on .hero. */

.hero {
  position: relative;
  background: var(--navy);
  color: #d7e6ee;
  padding: 5.5rem 0 6rem;
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-img, none);
  background-size: cover;
  background-position: center;
  opacity: 0.28;
  z-index: -2;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, var(--navy) 12%, rgba(25, 71, 89, 0.72) 45%, rgba(13, 36, 46, 0.55) 100%),
    radial-gradient(46rem 24rem at 88% 12%, rgba(79, 179, 232, 0.22), transparent 60%);
  z-index: -1;
}

.hero h1 { color: #ffffff; max-width: 42rem; }
.hero .lede {
  font-size: 1.15rem;
  max-width: 36rem;
  color: #c3d7e0;
  margin-bottom: 2.2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 3.5rem;
  align-items: center;
}

.hero-eyebrow,
.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}
.hero-eyebrow { color: var(--sky); }
.hero-eyebrow::before,
.eyebrow::before {
  content: "-- ";               /* SQL comment — the house style */
  opacity: 0.7;
}

/* --- Terminal card (hero signature) ---------------------------------------*/

.terminal {
  background: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.75;
  overflow: hidden;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.terminal-bar i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #45606d;
}
.terminal-bar i:nth-child(1) { background: #e0604f; }
.terminal-bar i:nth-child(2) { background: #e0b13f; }
.terminal-bar i:nth-child(3) { background: #4fb361; }
.terminal-bar span {
  margin-left: auto;
  color: #58808f;
  font-size: 0.72rem;
}
.terminal-body {
  padding: 1.1rem 1.25rem 1.3rem;
  color: #bcd6e2;
  white-space: pre;
  overflow-x: auto;
}
.terminal-body .kw { color: var(--sky); }
.terminal-body .comment { color: #58808f; }
.terminal-body .caret {
  display: inline-block;
  width: 0.55em;
  height: 1.1em;
  background: var(--sky);
  vertical-align: text-bottom;
  animation: blink 1s steps(1) infinite;
}
.terminal-result { color: #e8f1f5; }
html.js .terminal-result { opacity: 0; transition: opacity 400ms ease-out; }
html.js .terminal-result.shown { opacity: 1; }

@keyframes blink { 50% { opacity: 0; } }

/* --- Sections --------------------------------------------------------------*/

.section { padding: 5rem 0; }
.section-alt {
  background: var(--surface);
  border-block: 1px solid var(--border);
}

.section-head {
  max-width: 46rem;
  margin-bottom: 2.75rem;
}
.eyebrow { color: var(--brand); }
.section-head p { color: var(--text-muted); font-size: 1.05rem; }

.grid {
  display: grid;
  gap: 1.5rem;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.9rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition),
    border-color var(--transition);
}
.card::after {
  content: "";
  position: absolute;
  inset: -1px -1px auto -1px;
  height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, var(--brand), var(--sky));
  opacity: 0;
  transition: opacity var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: #bcdcef;
}
.card:hover::after { opacity: 1; }
.card .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.1rem;
  height: 3.1rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #e1f0f9, #cde7f5);
  color: var(--brand);
  margin-bottom: 1.2rem;
}
.card p { color: var(--text-muted); margin-bottom: 0; }

/* --- Stats (mono, result-row flavor) ---------------------------------------*/

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  text-align: center;
}
.stat .num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 2.6rem;
  font-weight: 600;
  color: var(--brand);
  display: block;
}
.stat .label { color: var(--text-muted); font-size: 0.95rem; }

/* --- CTA band ---------------------------------------------------------------*/

.cta-band {
  position: relative;
  background: var(--navy);
  color: #c3d7e0;
  border-radius: var(--radius);
  padding: 3.25rem 2.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  overflow: hidden;
  isolation: isolate;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--band-img, none);
  background-size: cover;
  background-position: center;
  opacity: 0.22;
  z-index: -2;
}
.cta-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, var(--navy) 25%, rgba(25, 71, 89, 0.6) 100%);
  z-index: -1;
}
.cta-band h2 { color: #ffffff; margin: 0 0 0.35em; }
.cta-band p { margin: 0; }

/* --- AirCast / downloads ------------------------------------------------------*/

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #dcedf7;
  color: #075985;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  align-self: flex-start;
}

.download-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.download-card .meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}
.download-card .btn { align-self: flex-start; }

.notice {
  background: #fff9e8;
  border: 1px solid #f2dd9b;
  color: #8a6410;
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.15rem;
  font-size: 0.9rem;
}

.diagram {
  background: var(--ink);
  color: #7fc4e8;
  border-radius: var(--radius);
  padding: 1.5rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* --- Contact -------------------------------------------------------------------*/

.contact-list {
  list-style: none;
  margin: 0;
  padding: 1.6rem 1.5rem;
  display: grid;
  gap: 1.25rem;
  align-self: start;    /* don't stretch with the (taller) form column */
  align-content: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.contact-list li {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}
.contact-list .icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #e1f0f9, #cde7f5);
  color: var(--brand);
}
.contact-list strong { display: block; color: var(--navy); font-family: var(--font-display); }
.contact-list span { color: var(--text-muted); font-size: 0.95rem; }

/* --- Contact form ----------------------------------------------------------------*/

.contact-form {
  display: grid;
  gap: 1.1rem;
}
.form-field label {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--navy);
  margin-bottom: 0.35rem;
}
.form-field .req { color: var(--brand); }
.form-field input,
.form-field textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem; /* >= 16px: avoids iOS auto-zoom */
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem;
  min-height: 44px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-field textarea { resize: vertical; min-height: 8rem; }
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 104, 166, 0.18);
}
.form-field.invalid input,
.form-field.invalid textarea {
  border-color: #b3261e;
}
.form-field.invalid input:focus,
.form-field.invalid textarea:focus {
  box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.15);
}
.field-error {
  margin: 0.3rem 0 0;
  min-height: 1.2em;
  font-size: 0.85rem;
  color: #b3261e;
}
.contact-form .btn[disabled] {
  opacity: 0.6;
  cursor: default;
  transform: none;
}
.form-status {
  margin: 0;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}
.form-status.error {
  background: #fbeae9;
  border: 1px solid #e5b5b1;
  color: #8c1d16;
}
.form-success {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  background: #e8f4ec;
  border: 1px solid #b9dcc5;
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  color: #1d5233;
}
.form-success svg { flex-shrink: 0; margin-top: 0.2rem; }
.form-success strong {
  display: block;
  font-family: var(--font-display);
  color: #14402a;
}
/* Honeypot: hidden from humans, present for bots (never display:none — some
   bots skip invisible fields) */
.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  margin: 0;
}

/* --- Footer ------------------------------------------------------------------------*/

.site-footer {
  background: var(--ink);
  color: #8fadbb;
  padding: 3.75rem 0 2rem;
  margin-top: 4rem;
  font-size: 0.92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
.site-footer h3 {
  color: #ffffff;
  font-size: 1rem;
  margin-bottom: 0.9rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.site-footer a { color: #8fadbb; }
.site-footer a:hover { color: #ffffff; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.85rem;
}
.footer-bottom span:last-child { font-family: var(--font-mono); font-size: 0.78rem; }

/* --- Reveal animation ------------------------------------------------------------------*/

html.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 550ms ease-out, transform 550ms ease-out;
}
html.js .reveal.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  html.js .terminal-result { opacity: 1; }
  .terminal-body .caret { animation: none; }
  .card, .btn { transition: none; }
}

/* --- Responsive ---------------------------------------------------------------------------*/

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--navy);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0.75rem 1.25rem 1.25rem;
    box-shadow: var(--shadow-md);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.85rem 0.9rem; }
  .brand-logo { height: 38px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; gap: 2rem; }
  .cta-band { padding: 2.25rem 1.5rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .terminal { font-size: 0.74rem; }
}
