/* ==========================================================================
   Kestrel Systems — website styles
   Tokens come from Brand Guidelines v025 (navy dominant, gold for emphasis,
   off-white for space). Gold text is only used on navy: on light backgrounds
   gold fails contrast, so it is limited to rules, borders and fills there.
   ========================================================================== */

@font-face {
  font-family: "Baradig";
  font-weight: 500;
  font-display: swap;
  src: local("Baradig Medium"), local("Baradig"),
       url("../assets/fonts/Baradig-Medium.woff2") format("woff2");
}
@font-face {
  font-family: "Baradig";
  font-weight: 700;
  font-display: swap;
  src: local("Baradig Bold"),
       url("../assets/fonts/Baradig-Bold.woff2") format("woff2");
}

:root {
  /* core palette */
  --navy: #141B31;
  --gold: #B89C5B;
  --paper: #F2F1EC;
  /* navy tints */
  --navy-2: #363B50;
  --navy-3: #747783;
  --silver: #ABADB6;
  --silver-2: #DCDDE1;
  /* gold tints */
  --gold-2: #C2AB72;
  --gold-3: #D4C29B;
  --gold-4: #E7DBC3;
  --gold-5: #F4EFE3;
  /* text */
  --muted: #4A5068;
  --white: #FFFFFF;

  --font-body: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Baradig", "Space Grotesk", system-ui, sans-serif;

  --radius: 12px;
  --radius-sm: 6px;
  --wrap: 1200px;
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--navy);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { line-height: 1.12; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2.3rem, 5.4vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }

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

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--gold); color: var(--navy); padding: 10px 16px; border-radius: 6px; font-weight: 600;
}
.skip:focus { top: 12px; }

.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(20, 27, 49, .96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(184, 156, 91, .25);
}
.bar { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand img { height: 44px; width: auto; }
.nav { display: flex; align-items: center; gap: 30px; color: var(--paper); }
.nav a { text-decoration: none; font-weight: 500; font-size: .98rem; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--gold); }
.nav a[aria-current="page"] { border-bottom-color: var(--gold); }
.nav .btn { border-bottom: 1.5px solid transparent; padding: .6em 1.1em; }
.nav-toggle {
  display: none; background: none; color: var(--paper); border: 1.5px solid rgba(242, 241, 236, .4);
  border-radius: 6px; padding: 8px 14px; font: inherit; font-weight: 500; cursor: pointer;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .85em 1.5em; border-radius: var(--radius-sm); border: 1.5px solid transparent;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; line-height: 1.2;
  transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn--gold { background: var(--gold); color: var(--navy); }
.btn--gold:hover { background: var(--gold-2); }
.btn--ghost { border-color: rgba(242, 241, 236, .55); color: var(--paper); }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn--navy { background: var(--navy); color: var(--paper); }
.btn--navy:hover { background: var(--navy-2); }
.btn--outline { border-color: var(--navy); color: var(--navy); }
.btn--outline:hover { background: var(--navy); color: var(--paper); }
.btn--block { width: 100%; }
.btn--sm { font-size: .92rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section--white { background: var(--white); }
.section--navy { background: var(--navy); color: var(--paper); }
.section--pattern { position: relative; isolation: isolate; }
.section--pattern::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: url("../assets/img/pattern-navy.svg") center / 240px auto;
}
.section-head { max-width: 720px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head--center { margin-inline: auto; text-align: center; }
.lede { font-size: 1.15rem; color: var(--muted); }
.section--navy .lede, .hero .lede { color: var(--silver-2); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-display); font-weight: 500; font-size: .78rem;
  letter-spacing: .2em; text-transform: uppercase; margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 34px; height: 2px; background: var(--gold); }
.section--navy .eyebrow, .hero .eyebrow { color: var(--gold); }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; color: var(--paper);
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 150%);
  padding: clamp(56px, 9vw, 120px) 0 clamp(80px, 11vw, 150px);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 40px), 0 100%);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: url("../assets/img/pattern-navy.svg") center / 260px auto;
}
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero--inner { padding-bottom: clamp(72px, 9vw, 120px); }
.hero--inner .hero__grid { grid-template-columns: 1.2fr .8fr; }
.crumbs { font-size: .9rem; color: var(--silver); margin-bottom: 20px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--gold); }

/* ---------- Grids / cards ---------- */
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white); border: 1px solid var(--silver-2); border-radius: var(--radius); padding: 28px;
}
.section--white .card { background: var(--paper); }
.card--dark { background: rgba(255, 255, 255, .04); border-color: rgba(184, 156, 91, .35); color: var(--paper); }
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }
.card--dark p { color: var(--silver-2); }

.num {
  font-family: var(--font-display); font-weight: 700; font-size: .85rem; letter-spacing: .15em;
  color: var(--navy); display: inline-block; padding-bottom: 8px; margin-bottom: 14px;
  border-bottom: 2px solid var(--gold);
}
.card--dark .num { color: var(--gold); }

.pcard { display: flex; flex-direction: column; gap: 14px; padding: 32px; position: relative; }
.pcard__icon { width: 52px; height: 52px; color: var(--gold); background: var(--navy); border-radius: 12px; padding: 10px; }
.pcard__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-family: var(--font-display); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 4px; background: var(--gold-5); border: 1px solid var(--gold-4); color: var(--navy);
}
.pcard h3 { font-size: 1.5rem; margin: 0; }
.pcard__sub { color: var(--muted); font-weight: 500; margin: 0; }
.pcard__price { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--silver-2); color: var(--muted); font-size: .95rem; }
.pcard__price b { color: var(--navy); font-size: 1.1rem; }
.pcard__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.pcard[hidden] { display: none; }

/* filter chips */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; align-items: center; }
.chip {
  font: inherit; font-weight: 500; font-size: .95rem; padding: .5em 1.1em; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--navy); background: transparent; color: var(--navy);
}
.chip[aria-pressed="true"] { background: var(--navy); color: var(--paper); }
.filters__label { font-weight: 600; margin-right: 6px; }

/* steps */
.steps { counter-reset: step; display: grid; gap: 20px; grid-template-columns: repeat(4, 1fr); }
.step { position: relative; padding-top: 20px; border-top: 2px solid var(--gold); }
.step::before {
  counter-increment: step; content: "0" counter(step);
  font-family: var(--font-display); font-weight: 700; letter-spacing: .12em; font-size: .85rem; color: var(--gold);
  display: block; margin-bottom: 10px;
}
.section:not(.section--navy) .step::before { color: var(--navy); }
.step h3 { font-size: 1.1rem; }
.step p { color: var(--muted); font-size: .97rem; }
.section--navy .step p { color: var(--silver-2); }

/* two ways to deploy */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.split .card { padding: 36px; }
.ticks li { position: relative; padding-left: 26px; margin-bottom: 10px; }
.ticks li::before {
  content: ""; position: absolute; left: 2px; top: .55em; width: 9px; height: 9px; background: var(--gold);
  transform: rotate(45deg);
}

/* ---------- Pricing ---------- */
.price-block { margin-top: 8px; }
.price-block + .price-block { margin-top: clamp(56px, 7vw, 88px); }
.price-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 28px; }
.price-head h2 { margin: 0; }
.price-head p { margin: 6px 0 0; color: var(--muted); max-width: 560px; }
.plans { display: grid; gap: 24px; grid-template-columns: repeat(3, 1fr); align-items: stretch; }
.plan {
  position: relative; display: flex; flex-direction: column; background: var(--white);
  border: 1px solid var(--silver-2); border-radius: var(--radius); padding: 32px 28px 28px;
}
.section--white .plan { background: var(--paper); }
.plan--featured { border: 2px solid var(--gold); box-shadow: 0 24px 48px -28px rgba(20, 27, 49, .45); }
.plan__flag {
  position: absolute; top: -13px; left: 28px; background: var(--gold); color: var(--navy);
  font-family: var(--font-display); font-weight: 700; font-size: .68rem; letter-spacing: .14em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 4px;
}
.plan__kind { font-family: var(--font-display); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.plan h3 { font-size: 1.35rem; margin-bottom: 14px; }
.price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin: 0 0 4px; }
.price__from { font-size: .9rem; color: var(--muted); }
.price__amt { font-size: 2.5rem; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.price__unit { color: var(--muted); font-weight: 500; }
.plan__note { font-size: .88rem; color: var(--muted); min-height: 2.6em; margin-bottom: 18px; }
.plan .ticks { margin: 6px 0 26px; font-size: .96rem; }
.plan .btn { margin-top: auto; }
.plan__save { display: block; font-size: .85rem; font-weight: 600; min-height: 1.4em; }

.toggle { display: inline-flex; border: 1.5px solid var(--navy); border-radius: 999px; padding: 4px; background: var(--white); }
.toggle button {
  font: inherit; font-weight: 600; font-size: .92rem; border: 0; background: transparent; color: var(--navy);
  padding: .5em 1.2em; border-radius: 999px; cursor: pointer;
}
.toggle button[aria-pressed="true"] { background: var(--navy); color: var(--paper); }
.toggle small { font-weight: 500; opacity: .8; margin-left: 4px; }

.disclaimer { margin-top: 28px; font-size: .9rem; color: var(--muted); border-left: 3px solid var(--gold); padding-left: 14px; }

/* table */
.table-wrap { overflow-x: auto; border: 1px solid var(--silver-2); border-radius: var(--radius); background: var(--white); }
table { width: 100%; border-collapse: collapse; min-width: 720px; font-size: .96rem; }
th, td { text-align: left; padding: 16px 20px; border-bottom: 1px solid var(--silver-2); vertical-align: top; }
thead th { background: var(--navy); color: var(--paper); font-family: var(--font-display); font-weight: 500; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; }
tbody th { font-weight: 600; width: 20%; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }

/* FAQ */
.faq { display: grid; gap: 12px; max-width: 860px; }
.faq details { background: var(--white); border: 1px solid var(--silver-2); border-radius: var(--radius); padding: 0 24px; }
.section--white .faq details { background: var(--paper); }
.faq summary { cursor: pointer; font-weight: 600; padding: 20px 28px 20px 0; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 1.5rem; color: var(--gold); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); padding-bottom: 20px; margin: 0; }

/* CTA band */
.cta {
  position: relative; isolation: isolate; text-align: center; color: var(--paper);
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 140%);
  padding: clamp(56px, 8vw, 96px) 0;
}
.cta::before { content: ""; position: absolute; inset: 0; z-index: -1; background: url("../assets/img/pattern-navy.svg") center / 240px auto; }
.cta h2 { max-width: 760px; margin-inline: auto; }
.cta p { color: var(--silver-2); max-width: 600px; margin-inline: auto; }
.cta .btn-row { justify-content: center; }

/* ---------- Forms ---------- */
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.form { background: var(--white); border: 1px solid var(--silver-2); border-radius: var(--radius); padding: clamp(24px, 4vw, 40px); display: grid; gap: 18px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--navy); background: var(--paper);
  border: 1.5px solid var(--silver); border-radius: var(--radius-sm); padding: .75em .9em;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--navy); outline: 3px solid var(--gold-3); outline-offset: 0; }
.field textarea { min-height: 140px; resize: vertical; }
.form__status { font-size: .95rem; border-left: 3px solid var(--gold); padding: 10px 14px; background: var(--gold-5); border-radius: 0 6px 6px 0; }
.form__status[hidden] { display: none; }
.form__fine { font-size: .85rem; color: var(--muted); margin: 0; }

.contact-list { display: grid; gap: 18px; margin: 28px 0; }
.contact-list li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; }
.contact-list .dot {
  width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: var(--gold);
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: .85rem;
}
.contact-list small { display: block; color: var(--muted); font-size: .85rem; }
.contact-list a { text-decoration: none; font-weight: 600; }
.contact-list a:hover { text-decoration: underline; }

/* ---------- Product mock (placeholder for real screenshots) ---------- */
.mock {
  background: #0E1427; border: 1px solid rgba(184, 156, 91, .4); border-radius: 14px; overflow: hidden;
  box-shadow: 0 34px 60px -24px rgba(0, 0, 0, .6); color: var(--paper);
}
.mock__bar { display: flex; gap: 6px; padding: 11px 14px; background: rgba(255, 255, 255, .05); }
.mock__bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--navy-3); }
.mock__body { display: grid; grid-template-columns: 52px 1fr; min-height: 310px; }
.m-side { border-right: 1px solid rgba(255, 255, 255, .07); padding: 14px 10px; display: grid; gap: 10px; align-content: start; }
.m-side i { height: 28px; border-radius: 6px; background: rgba(255, 255, 255, .07); }
.m-side i:first-child { background: var(--gold); }
.m-main { padding: 18px; display: grid; gap: 14px; align-content: start; }
.m-title { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: .9rem; }
.m-title span { font-size: .7rem; color: var(--navy); background: var(--gold); padding: 3px 9px; border-radius: 4px; font-weight: 700; }
.m-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.m-tile { background: rgba(255, 255, 255, .06); border-radius: 8px; padding: 12px; }
.m-tile b { display: block; color: var(--gold); font-size: 1.3rem; line-height: 1.2; }
.m-tile span { font-size: .68rem; color: var(--silver); letter-spacing: .04em; }
.m-card { background: rgba(255, 255, 255, .05); border-radius: 8px; padding: 12px; display: grid; gap: 8px; font-size: .75rem; color: var(--silver-2); }
.m-bar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.m-bar i { display: block; height: 100%; background: var(--gold); }
.m-split { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; }
.m-qr { width: 104px; background: var(--paper); padding: 8px; border-radius: 8px; color: var(--navy); }
.m-dots { display: grid; grid-template-columns: repeat(14, 1fr); gap: 5px; }
.m-dots i { aspect-ratio: 1; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.m-dots i.on { background: var(--gold); }
.mock-caption { font-size: .78rem; color: var(--silver); text-align: center; margin-top: 12px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: var(--silver-2); padding: 64px 0 28px; border-top: 3px solid var(--gold); }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 40px; }
.site-footer h4 { color: var(--paper); font-family: var(--font-display); font-weight: 500; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 16px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.site-footer li { margin-bottom: 10px; }
.site-footer .brand img { height: 52px; margin-bottom: 16px; }
.site-footer p { font-size: .95rem; max-width: 300px; }
.footer__bottom { margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .12); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .85rem; color: var(--silver); }

/* ---------- Motion ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover { transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .grid--4, .steps { grid-template-columns: repeat(2, 1fr); }
  .grid--3, .plans { grid-template-columns: 1fr; }
  .plans { max-width: 520px; }
  .hero__grid, .hero--inner .hero__grid, .contact-grid, .split { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .nav-toggle { display: inline-block; }
  .nav {
    position: absolute; top: var(--header-h); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--navy); border-bottom: 1px solid rgba(184, 156, 91, .3); padding: 8px 20px 20px; display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, .08); }
  .nav .btn { margin-top: 14px; padding: .9em 1em; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .grid--2, .grid--4, .steps, .form__row, .footer__grid { grid-template-columns: 1fr; }
  .brand img { height: 36px; }
  .hero { clip-path: polygon(0 0, 100% 0, 100% calc(100% - 24px), 0 100%); }
  .m-row { grid-template-columns: repeat(2, 1fr); }
  .m-row .m-tile:last-child { display: none; }
}
