/* ==========================================================================
   Athliix — shared site styles
   Tokens mirror the Flutter app's lib/core/utils/app_colors.dart exactly.
   Contrast-critical choices are annotated; see Skills.md before changing them.
   ========================================================================== */

:root {
  /* Brand — exact values from app_colors.dart */
  --brand:        #F45600;
  --brand-deep:   #53260D;
  --black:        #000000;
  --surface:      #161616;
  --surface-2:    #1A1A1A;
  --card:         #343434;
  --hairline:     rgba(255, 255, 255, 0.08);
  --text:         #EFF0F6;
  --text-dim:     #9E9E9E;   /* 6.75:1 on --surface. Use THIS for body copy. */
  --text-faint:   #7D7D91;   /* 4.49:1 — fails AA. Large/decorative text ONLY. */

  /* Derived */
  --card-soft:    rgba(255, 255, 255, 0.035);
  --brand-glow:   rgba(244, 86, 0, 0.16);

  --maxw:         1120px;
  --gutter:       clamp(20px, 5vw, 40px);
  --radius:       14px;
  --radius-lg:    22px;

  --font: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
}

/* --------------------------------------------------------------- reset -- */

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

html {
  background: var(--surface);
  color: var(--text);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  background: var(--surface);
  color: var(--text-dim);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg, picture { max-width: 100%; display: block; }
h1, h2, h3, h4 { color: var(--text); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.02em; }
p { margin: 0 0 1.1em; }
ul { margin: 0 0 1.1em; padding-left: 1.3em; }
li { margin-bottom: .45em; }
strong { color: var(--text); font-weight: 700; }

/* Orange on dark is 5.32:1 — fine for the text itself, but only 2.99:1 against
   neighbouring body text, below the 3:1 WCAG 1.4.1 needs when colour alone marks
   a link. Hence the permanent underline. Do not remove it. */
a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

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

/* ------------------------------------------------------------- layout --- */

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

.section { padding: clamp(64px, 9vw, 118px) 0; }
.section--alt { background: var(--surface-2); }
.section--black { background: var(--black); }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--brand); color: var(--surface);
  padding: 12px 20px; font-weight: 700; z-index: 100;
  text-decoration: none;
}
.skip:focus { left: 0; }

/* ------------------------------------------------------------- header --- */

.hdr {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 10, 10, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hairline);
}
.hdr__in { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 20px; }
.hdr__nav { display: flex; align-items: center; gap: clamp(16px, 3vw, 30px); }
/* :not(.btn) is load-bearing. Without it this rule (0,1,1) outranks
   .btn--primary (0,1,0) and repaints the header CTA's label --text-dim on
   orange — a 1.27:1 contrast ratio. Do not simplify to `.hdr__nav a`. */
.hdr__nav a:not(.btn) {
  color: var(--text-dim); text-decoration: none;
  font-size: 15px; font-weight: 600; white-space: nowrap;
}
.hdr__nav a:not(.btn):hover { color: var(--text); }
/* display:contents lets the links become direct flex children of the nav.
   Must live here, not inline, or the media query below loses on specificity. */
.hdr__links { display: contents; }
@media (max-width: 620px) { .hdr__links { display: none; } }

/* Brand lockup. */
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.logo img { height: 30px; width: auto; }
/* Footer wordmark sits outside a .logo wrapper — without this it renders at
   its intrinsic width. Scoped to .ftr__top so it can't catch badge art. */
.ftr__top img { height: 26px; width: auto; }

/* -------------------------------------------------------------- button -- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 26px; min-height: 48px;
  border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 800; font-size: 16px;
  text-decoration: none; cursor: pointer;
  transition: transform .16s ease, background-color .16s ease;
}
/* White on #F45600 is 3.40:1 and FAILS AA. Dark-on-orange is 5.32:1.
   This is deliberate — do not "fix" it to white. */
.btn--primary { background: var(--brand); color: var(--surface); }
.btn--primary:hover { background: #ff6614; transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--hairline); }
.btn--ghost:hover { border-color: var(--text-dim); transform: translateY(-2px); }

/* -------------------------------------------------------------- badges -- */

.badges { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.badges a {
  display: inline-flex; align-items: center;
  min-height: 48px;              /* ≥44px hit area even if art renders shorter */
  text-decoration: none;
  border-radius: 9px;
}
/* The vendor artwork is the light-background variant, so the pill has to stay
   light. Muted fill + slight transparency keeps it from flaring against the
   near-black hero; it returns to full strength on hover. */
.badges img {
  height: 48px; width: auto;
  opacity: .86;
  transition: opacity .16s ease;
}
.badges a:hover img,
.badges a:focus-visible img { opacity: 1; }

/* ---------------------------------------------------------------- hero -- */

.hero {
  position: relative; overflow: hidden;
  background: var(--black);
  padding: clamp(56px, 9vw, 104px) 0 clamp(64px, 9vw, 110px);
}
.hero::before {
  content: ""; position: absolute; inset: -30% 0 auto -10%;
  width: 120%; height: 90%;
  background: radial-gradient(48% 60% at 28% 34%, var(--brand-glow), transparent 68%);
  pointer-events: none;
}
.hero__in {
  position: relative;
  display: grid; gap: clamp(40px, 6vw, 68px);
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 900px) { .hero__in { grid-template-columns: 1.05fr .95fr; } }

.hero h1 {
  font-size: clamp(2.15rem, 6.2vw, 3.9rem);
  font-weight: 900; letter-spacing: -0.035em; margin-bottom: 20px;
}
.hero h1 em { color: var(--brand); font-style: normal; }
.hero__sub {
  font-size: clamp(1.03rem, 2.1vw, 1.22rem);
  max-width: 33em; margin-bottom: 30px; color: var(--text-dim);
}
.hero__note { font-size: 14px; color: var(--text-dim); margin: 20px 0 0; }

/* ---------------------------------------------------------- proof chips -- */

.chips {
  display: flex; flex-wrap: wrap; gap: 10px;
  list-style: none; padding: 0; margin: 0;
}
.chips li {
  margin: 0;
  border: 1px solid var(--hairline); border-radius: 999px;
  padding: 9px 17px; font-size: 14px; font-weight: 600;
  color: var(--text); background: var(--card-soft);
}
.chips b { color: var(--brand); font-weight: 800; }

/* --------------------------------------------------------------- cards -- */

.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); }

.card {
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: clamp(22px, 3vw, 30px);
}
.section--alt .card { background: var(--surface); }
.card h3 { font-size: 1.14rem; margin-bottom: .45em; }
.card p:last-child { margin-bottom: 0; }
.card__n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; margin-bottom: 16px;
  border-radius: 10px; background: rgba(244, 86, 0, 0.13);
  color: var(--brand); font-weight: 900; font-size: 17px;
}

/* ------------------------------------------------------------- feature -- */

.feat { display: grid; gap: clamp(32px, 5vw, 64px); align-items: center; grid-template-columns: 1fr; }
@media (min-width: 880px) {
  .feat { grid-template-columns: 1fr 1fr; }
  .feat--flip .feat__media { order: -1; }
}
.feat + .feat { margin-top: clamp(56px, 8vw, 96px); }
.feat__eyebrow {
  color: var(--brand); font-weight: 800; font-size: 13px;
  letter-spacing: .13em; text-transform: uppercase; margin-bottom: 12px;
}
.feat h2 { font-size: clamp(1.55rem, 3.4vw, 2.2rem); }
.feat ul { list-style: none; padding: 0; margin-top: 18px; }
.feat li { position: relative; padding-left: 26px; }
.feat li::before {
  content: ""; position: absolute; left: 4px; top: .62em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--brand);
}

/* --------------------------------------------------------------- phone -- */

/* The supplied screenshots already have a device bezel composited in, so this
   is a bare wrapper — adding a CSS frame here would double-bezel them. */
.shot { width: min(300px, 78vw); margin-inline: auto; }
.shot img {
  width: 100%; height: auto; display: block;
  filter: drop-shadow(0 26px 55px rgba(0, 0, 0, .62));
}

.shotcap { margin: 14px auto 0; max-width: 300px; text-align: center; font-size: 14px; color: var(--text-dim); }

/* ------------------------------------------------------------- privacy -- */

.privacy-panel {
  border: 1px solid rgba(244, 86, 0, .3);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(244, 86, 0, .07), transparent 62%);
  padding: clamp(28px, 4.5vw, 46px);
}

/* ----------------------------------------------------------------- faq -- */

.faq { border-top: 1px solid var(--hairline); }
.faq details { border-bottom: 1px solid var(--hairline); padding: 4px 0; }
.faq summary {
  cursor: pointer; padding: 18px 0; font-weight: 700; color: var(--text);
  font-size: 1.04rem; list-style: none; display: flex; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font-size: 1.5rem; line-height: 1; font-weight: 400; }
.faq details[open] summary::after { content: "\2013"; }
.faq details > p { padding-bottom: 6px; margin-bottom: 12px; }

/* -------------------------------------------------------------- footer -- */

.ftr { background: var(--black); border-top: 1px solid var(--hairline); padding: clamp(48px, 6vw, 72px) 0 40px; }
.ftr__top { display: grid; gap: 32px; grid-template-columns: 1fr; margin-bottom: 40px; }
@media (min-width: 760px) { .ftr__top { grid-template-columns: 1.4fr 1fr 1fr; } }
/* h3, not h4: jumping H2 -> H4 skips a heading level (WCAG 1.3.1). */
.ftr h3 { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 14px; }
.ftr ul { list-style: none; padding: 0; margin: 0; }
.ftr li { margin-bottom: 9px; }
.ftr a { color: var(--text); text-decoration: none; }
.ftr a:hover { color: var(--brand); text-decoration: underline; }
.ftr__legal {
  border-top: 1px solid var(--hairline); padding-top: 26px;
  font-size: 12.5px; color: var(--text-dim); line-height: 1.7;
  overflow-wrap: anywhere;      /* long entity name / email at 320px */
}
.ftr__legal p { margin: 0 0 .6em; }

/* ------------------------------------------------------------ document -- */
/* Privacy policy / 404 long-form text */

.doc { max-width: 780px; margin: 0 auto; padding: clamp(44px, 7vw, 76px) 0 clamp(64px, 9vw, 100px); }
.doc h1 { font-size: clamp(1.9rem, 4.4vw, 2.5rem); margin-bottom: 6px; }
.doc .updated { color: var(--text-dim); font-size: .92rem; margin-bottom: 40px; }
.doc h2 {
  font-size: 1.24rem; margin-top: 46px; margin-bottom: 12px;
  padding-bottom: 9px; border-bottom: 1px solid var(--hairline);
}
.doc h3 { font-size: 1.03rem; margin-top: 26px; margin-bottom: 8px; }
.doc p, .doc li { color: var(--text-dim); }
.doc footer {
  margin-top: 58px; padding-top: 22px;
  border-top: 1px solid var(--hairline);
  color: var(--text-dim); font-size: .86rem;
}

/* ----------------------------------------------------------------- 404 -- */

.err { text-align: center; padding: clamp(80px, 16vh, 170px) 0; }
.err h1 { font-size: clamp(3.4rem, 13vw, 6.5rem); color: var(--brand); margin-bottom: 4px; line-height: 1; }
.err p { max-width: 34em; margin-inline: auto; }

/* -------------------------------------------------------------- utility -- */

.lede { font-size: clamp(1.02rem, 2vw, 1.15rem); max-width: 42em; }
.center { text-align: center; }
.center .lede, .center .chips { margin-inline: auto; }
.center .chips { justify-content: center; }
.mt-l { margin-top: clamp(30px, 4vw, 48px); }
.mt-s { margin-top: 20px; }
.mb-l { margin-bottom: 32px; }
.btn--sm { padding: 10px 20px; min-height: 42px; font-size: 15px; }
.chips--center { justify-content: center; }
.badges--center { justify-content: center; }
.section--tight { padding-block: clamp(34px, 4.5vw, 52px); }
.wrap--narrow { max-width: 820px; }
.heading-block { margin-bottom: clamp(30px, 4.5vw, 50px); }
.fineprint { font-size: 14px; margin-top: 18px; }
.ftr__blurb { margin-top: 12px; max-width: 30em; }
.eyebrow {
  color: var(--brand); font-weight: 800; font-size: 13px;
  letter-spacing: .13em; text-transform: uppercase; margin-bottom: 12px;
}
h2.big { font-size: clamp(1.7rem, 3.9vw, 2.5rem); }

/* --------------------------------------------------------- a11y guards -- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .btn:hover, .badges a:hover { transform: none; }
}

/* Windows High Contrast strips custom colours — keep controls identifiable. */
@media (forced-colors: active) {
  .btn, .chips li, .card, .shot { border: 1px solid ButtonBorder; }
  .btn--primary { forced-color-adjust: none; background: Highlight; color: HighlightText; }
  .hdr { background: Canvas; }
}
