/* ==========================================================================
   Jay Tech Labs — site styles
   Shared by every page, so the browser caches it once.
   Fluid type via clamp(): no page needs its own font-size media queries.
   ========================================================================== */

/* — fonts —————————————————————————————————————————————————————————————— */
@font-face {
  font-family: 'Caprasimo';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/caprasimo-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: 'Caprasimo';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/caprasimo-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;
}
/* Figtree ships as a variable font — one file covers 300–900. */
@font-face {
  font-family: 'Figtree';
  font-style: normal; font-weight: 300 900; font-display: swap;
  src: url("fonts/figtree-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: 'Figtree';
  font-style: normal; font-weight: 300 900; font-display: swap;
  src: url("fonts/figtree-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;
}

/* — tokens ————————————————————————————————————————————————————————————— */
:root {
  --ink:        #171615;  /* page ground */
  --ink-2:      #1b1a19;  /* alternating band */
  --surface:    #201E1D;  /* cards */
  --surface-2:  #191817;  /* wells inside cards */
  --line:       #2e2b29;  /* hairline divider */
  --line-2:     #33302d;  /* card border */
  --line-3:     #3a3633;  /* input border */

  --cream:      #F5EAD8;  /* primary text */
  --body:       #c5bdb4;  /* body copy */
  --body-2:     #e2dbd2;  /* list copy */
  --muted:      #a09891;  /* labels, footer */
  --muted-2:    #8f8781;  /* fine print — 5.1:1 on --ink, passes AA */
  --nav-link:   #b8b0a8;

  --orange:     #FF7722;
  --orange-lt:  #FFBE93;
  --teal:       #0E6E6E;
  --teal-lt:    #7FC6C1;

  --font-heading: "Caprasimo", Georgia, serif;
  --font-body: "Figtree", system-ui, -apple-system, sans-serif;

  --wrap: 1180px;
  --gutter: clamp(20px, 5vw, 32px);

  /* Fluid type — scales between a 360px phone and a 1180px desktop, so no
     heading needs a breakpoint of its own. */
  --fs-hero:    clamp(38px, 7.2vw, 68px);
  --fs-h1:      clamp(34px, 6.4vw, 50px);
  --fs-h2:      clamp(28px, 5vw, 44px);
  --fs-h3:      clamp(21px, 2.6vw, 24px);
  --fs-lead:    clamp(16px, 1.7vw, 19px);
  --fs-body:    clamp(15px, 1.4vw, 16px);
}

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

/* An inline `display:flex` outranks the browser's [hidden] rule, so state
   toggled with the hidden attribute needs this to actually hide. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.08;
  margin: 0;
  text-wrap: pretty;
}

p { margin: 0; }
img, svg { display: block; max-width: 100%; }

a { color: var(--orange); text-decoration: none; }
a:hover { color: var(--orange-lt); }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; border-radius: 4px; }
::selection { background: rgba(255,119,34,.3); }

/* Keyboard users get a way past the nav. */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  padding: 12px 20px; background: var(--orange); color: var(--ink);
  font-weight: 800; border-radius: 0 0 12px 0;
}
.skip-link:focus { left: 0; color: var(--ink); }

/* Jump-link targets clear the sticky nav instead of hiding underneath it. */
:target, section[id], .doc section { scroll-margin-top: 88px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); width: 100%; }
.section { border-bottom: 1px solid var(--line); }
.section-inner { padding-block: clamp(56px, 8vw, 88px); display: flex; flex-direction: column; gap: clamp(28px, 4vw, 40px); }

.kicker {
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--orange); font-weight: 800;
}
.lead { font-size: var(--fs-lead); line-height: 1.6; color: var(--body); }

/* — buttons ———————————————————————————————————————————————————————————— */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 28px; border: 0; border-radius: 999px;
  font-family: var(--font-body); font-weight: 800; font-size: 16px;
  cursor: pointer; text-align: center;
  /* Without this a <button> picks up the UA's light default background;
     the <a> variants looked fine and hid the bug. */
  background: transparent; color: var(--cream);
  -webkit-appearance: none; appearance: none;
}
.btn-primary { background: var(--orange); color: var(--ink); }
.btn-primary:hover { background: #ff8c45; color: var(--ink); }
.btn-outline { color: var(--cream); box-shadow: inset 0 0 0 2px #46413d; }
.btn-outline:hover { color: var(--cream); background: rgba(245,234,216,.06); }
.btn-dark { background: var(--ink); color: var(--cream); }
.btn-dark:hover { background: #2a2725; color: var(--cream); }
.btn-on-orange { color: var(--ink); box-shadow: inset 0 0 0 2px rgba(23,22,21,.35); }
.btn-on-orange:hover { color: var(--ink); background: rgba(23,22,21,.08); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* — nav ———————————————————————————————————————————————————————————————— */
.nav {
  position: sticky; top: 0; z-index: 20; width: 100%;
  background: rgba(23,22,21,.9);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding-block: 14px;
}
.brand { display: flex; align-items: center; gap: 11px; color: var(--cream); flex: 0 0 auto; }
.brand:hover { color: var(--cream); }
.brand-name {
  font-size: 15px; font-weight: 800; letter-spacing: -.03em; text-transform: uppercase;
  white-space: nowrap;
}
.brand-name span { font-weight: 500; opacity: .7; }

.nav-links { display: flex; align-items: center; gap: 26px; font-size: 14px; font-weight: 600; }
.nav-links a { color: var(--nav-link); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--orange); }
.nav-cta {
  display: inline-flex; align-items: center; height: 40px; padding: 0 22px;
  border-radius: 999px; background: var(--orange); color: var(--ink);
  font-weight: 800; white-space: nowrap;
}
.nav-cta:hover { background: #ff8c45; color: var(--ink); }
.nav-back { font-size: 14px; font-weight: 700; color: var(--nav-link); }

/* Mobile nav — a checkbox toggle, so it works with JS disabled. */
.nav-toggle { display: none; }
.nav-burger {
  display: none; width: 44px; height: 44px; border: 0; background: transparent;
  color: var(--cream); cursor: pointer; align-items: center; justify-content: center;
  border-radius: 12px;
}
.nav-burger:hover { background: rgba(245,234,216,.08); }

@media (max-width: 820px) {
  .nav-burger { display: inline-flex; }
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ink); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 20px;
  }
  .nav-toggle:checked ~ .nav-links { display: flex; }
  .nav-links a {
    padding: 14px 4px; font-size: 16px;
    border-bottom: 1px solid var(--line);
  }
  .nav-cta {
    height: 48px; justify-content: center; margin-top: 16px;
    border-bottom: 0 !important;
  }
  .nav-inner { position: relative; }
}

/* — cards —————————————————————————————————————————————————————————————— */
.card {
  border-radius: 22px; background: var(--surface); border: 1px solid var(--line-2);
  padding: clamp(24px, 3.4vw, 34px);
  display: flex; flex-direction: column; gap: 18px;
}
.card h3 { font-size: var(--fs-h3); }
.card p { font-size: var(--fs-body); line-height: 1.6; color: var(--body); }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }

.icon-badge {
  width: 48px; height: 48px; flex: 0 0 auto; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
}
.icon-round {
  width: 52px; height: 52px; flex: 0 0 auto; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
}

.tick-list { display: flex; flex-direction: column; gap: 10px; font-size: var(--fs-body); color: var(--body-2); }
.tick-list > div { display: flex; gap: 10px; align-items: flex-start; }
.tick-list .mark { color: var(--orange); font-weight: 800; flex: 0 0 auto; }
.tick-list .mark-teal { color: var(--teal-lt); }

/* — forms —————————————————————————————————————————————————————————————— */
.field { display: flex; flex-direction: column; gap: 7px; flex: 1 1 200px; }
.field-label {
  font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); font-weight: 700;
}
.field-label .opt { text-transform: none; letter-spacing: 0; }
.input, .select, .textarea {
  width: 100%; padding: 0 15px; height: 48px;
  border-radius: 12px; border: 1px solid var(--line-3);
  background: var(--surface-2); color: var(--cream);
  /* 16px stops iOS Safari zooming the page on focus. */
  font-size: 16px; font-family: inherit;
}
.textarea { height: auto; padding: 13px 15px; line-height: 1.6; resize: vertical; min-height: 130px; }
.select { padding-inline: 12px; }
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible {
  outline: 2px solid var(--orange); outline-offset: 2px; border-color: var(--orange);
}
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: #ff6b5e; }

.field-error { font-size: 13px; color: #ff9a91; min-height: 0; }
.field-error:empty { display: none; }

.consent {
  display: flex; gap: 11px; align-items: flex-start;
  font-size: 13.5px; line-height: 1.55; color: var(--body);
}
.consent input {
  margin-top: 3px; width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--orange);
}
/* Honeypot — off-screen rather than display:none, which some bots skip. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-note { font-size: 12.5px; color: var(--muted); text-align: center; }
.form-status { border-radius: 12px; padding: 14px 16px; font-size: 14px; line-height: 1.55; }
.form-status[data-state="error"] { background: rgba(255,107,94,.12); border: 1px solid #7a3a34; color: #ffb3ac; }
.form-status[hidden] { display: none; }

/* — footer ————————————————————————————————————————————————————————————— */
.footer { background: var(--ink); }
.footer-top {
  padding-block: clamp(40px, 6vw, 56px) 40px;
  display: flex; gap: 40px; flex-wrap: wrap; justify-content: space-between;
}
.footer-col { display: flex; flex-direction: column; gap: 11px; font-size: 14px; }
.footer-head {
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); font-weight: 800;
}
.footer-col a { color: var(--body); }
.footer-col a:hover { color: var(--orange); }
.footer-bottom {
  padding-block: 20px 44px; border-top: 1px solid var(--line);
  display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap;
  font-size: 13px; color: var(--muted);
}
.footer-bottom a { color: var(--muted); }
.footer-bottom a:hover { color: var(--orange); }
.footer-legal { display: flex; gap: 20px; flex-wrap: wrap; }

/* — long-form legal pages —————————————————————————————————————————————— */
.doc { max-width: 760px; margin: 0 auto; padding-block: clamp(48px, 7vw, 72px) clamp(64px, 9vw, 96px); }
.doc h1 { font-size: var(--fs-h1); }
.doc h2 { font-size: clamp(21px, 3vw, 26px); margin-bottom: 12px; }
.doc section { margin-top: clamp(32px, 4.5vw, 44px); }
.doc p { font-size: var(--fs-body); line-height: 1.7; color: var(--body); margin-bottom: 14px; }
.doc p:last-child { margin-bottom: 0; }
.doc b { color: var(--cream); }
.doc-meta { display: flex; gap: 20px; flex-wrap: wrap; font-size: 13px; color: var(--muted-2); margin-top: 18px; }
.doc-box {
  border-radius: 16px; background: var(--surface); border: 1px solid var(--line-2);
  padding: 20px 22px; margin-bottom: 14px;
}
.doc-box h3 { font-family: var(--font-body); font-weight: 800; font-size: 15px; color: var(--cream); margin-bottom: 6px; }
.doc-toc { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; margin-top: 8px; }
