/* ==========================================================================
   The Flyest Website — stylesheet
   --------------------------------------------------------------------------
   Contents
     0.  Fonts (self-hosted)
     1.  Design tokens      <- change colours, fonts and spacing HERE only
     2.  Reset & base
     3.  Utilities
     4.  Buttons
     5.  Header & nav
     6.  Hero + rank ladder
     7.  Scroll fade
     8.  Section shell
     9.  Services
     10. Process steps
     11. What we measure
     12. About
     13. FAQ
     14. Contact & form
     15. Footer
     16. Responsive
     17. Reduced motion & print
   ========================================================================== */


/* ==========================================================================
   0. FONTS — self-hosted
   Both faces are variable (one file covers every weight used) and subset to
   latin. Self-hosted rather than loaded from Google so the page needs no
   third-party connection before it can paint. Both are SIL Open Font Licence,
   which permits this. Replace the files and these two blocks to change fonts.
   ========================================================================== */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 400 600;          /* variable range */
  font-display: swap;
  src: url("../fonts/archivo-latin-var.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+2074, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 600 700;          /* variable range */
  font-display: swap;
  src: url("../fonts/fraunces-latin-var.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;
}


/* ==========================================================================
   1. DESIGN TOKENS
   Every colour in the site comes from this block. Change a value here and it
   updates everywhere. Contrast ratios against --ink are noted so you can keep
   the site accessible if you re-tint the gold.
   ========================================================================== */
:root {
  /* --- Colour ------------------------------------------------------------ */
  --ink:          #000000;   /* page background                              */
  --ink-raised:   #17120A;   /* alternating sections — warm, gold-tinted     */
  --ink-sunken:   #0C0A06;   /* form fields, insets                          */

  --gold:         #E3B341;   /* accents, buttons, links      10.8:1 on ink   */
  --gold-pale:    #F5E3B3;   /* headings                     14.2:1 on ink   */
  --gold-deep:    #A9791C;   /* hairlines and rules — never used for text    */

  --bone:         #EDE7DA;   /* body copy                    13.4:1 on ink   */
  --bone-muted:   #A79F92;   /* captions, labels              7.1:1 on ink   */

  --on-gold:      #100C03;   /* text sitting on a gold fill  10.8:1 on gold  */

  --rule:         rgba(169, 121, 28, 0.38);  /* hairline borders            */
  --rule-strong:  rgba(169, 121, 28, 0.72);

  /* --- Type -------------------------------------------------------------- */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body:    "Archivo", "Segoe UI", system-ui, -apple-system, sans-serif;

  /* Fluid type scale. min → max across the viewport range.                  */
  --size-xs:   0.8125rem;
  --size-sm:   0.9375rem;
  --size-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --size-md:   clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);
  --size-lg:   clamp(1.5rem, 1.3rem + 0.9vw, 2rem);
  --size-xl:   clamp(2rem, 1.6rem + 1.9vw, 3rem);
  --size-2xl:  clamp(2.75rem, 2rem + 3.6vw, 5.25rem);

  /* --- Layout ------------------------------------------------------------ */
  --shell:       74rem;   /* max content width                               */
  --measure:     62ch;    /* max line length for body copy                   */
  --gutter:      clamp(1.25rem, 4vw, 3rem);
  --section-y:   clamp(4.5rem, 9vw, 8rem);

  /* --- Motion ------------------------------------------------------------ */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}


/* ==========================================================================
   2. RESET & BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;   /* clears the sticky header on anchor jumps */
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--font-body);
  font-size: var(--size-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--gold-pale);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

p { margin: 0 0 1.1em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--gold-pale); }

img, svg { max-width: 100%; height: auto; display: block; }

ul, ol { margin: 0; padding: 0; }

/* One visible focus style for every interactive element. */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}


/* ==========================================================================
   3. UTILITIES
   ========================================================================== */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -110%);
  z-index: 100;
  background: var(--gold);
  color: var(--on-gold);
  font-weight: 600;
  padding: 0.7rem 1.25rem;
  text-decoration: none;
  border-radius: 0 0 4px 4px;
}
.skip-link:focus { transform: translate(-50%, 0); color: var(--on-gold); }

.lede {
  font-size: var(--size-md);
  line-height: 1.55;
  color: var(--bone);
  max-width: 46ch;
}


/* ==========================================================================
   4. BUTTONS
   ========================================================================== */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: var(--size-sm);
  font-weight: 600;
  line-height: 1;
  padding: 0.95rem 1.6rem;
  border: 1px solid transparent;
  border-radius: 2px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease),
              border-color 0.18s var(--ease);
}

.button--gold {
  background: var(--gold);
  color: var(--on-gold);
}
.button--gold:hover { background: var(--gold-pale); color: var(--on-gold); }

.button--ghost {
  background: transparent;
  color: var(--gold);
  border-color: var(--rule-strong);
}
.button--ghost:hover { border-color: var(--gold); color: var(--gold-pale); }


/* ==========================================================================
   5. HEADER & NAV
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.25rem;
  flex-wrap: wrap;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--gold-pale);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.wordmark__mark { color: var(--gold); display: flex; }

.site-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
  list-style: none;
}
.site-nav a {
  color: var(--bone);
  text-decoration: none;
  font-size: var(--size-sm);
  font-weight: 500;
  padding-block: 0.4rem;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover { color: var(--gold); border-bottom-color: var(--gold); }

.site-nav__cta {
  color: var(--gold) !important;
  border: 1px solid var(--rule-strong) !important;
  border-radius: 2px;
  padding: 0.55rem 1rem !important;
}
.site-nav__cta:hover { background: var(--gold); color: var(--on-gold) !important; }


/* ==========================================================================
   6. HERO + RANK LADDER
   The ladder is the one animated moment on the page: your row rises from
   position 8 to 1 while the competitors shift down. DOM order is the final
   order, so screen readers and search engines always read the settled state.
   ========================================================================== */
.hero {
  padding-block: clamp(3.5rem, 8vw, 7rem) clamp(4rem, 9vw, 7.5rem);
  border-bottom: 1px solid var(--rule);
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

.hero h1 {
  font-size: var(--size-2xl);
  font-weight: 700;
  font-variation-settings: "opsz" 120, "SOFT" 0, "WONK" 1;
  margin-bottom: 0.45em;
  max-width: 14ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
  max-width: none;
}

/* --- the ladder --------------------------------------------------------- */
.ladder { margin: 0; }

.ladder__frame {
  --rowh: 2.9rem;
  position: relative;
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  gap: 0 0.9rem;
  padding: 1.5rem 1.5rem 1.6rem;
  background: var(--ink-raised);
  border: 1px solid var(--rule);
  border-radius: 3px;
}

.ladder__positions {
  display: grid;
  grid-auto-rows: var(--rowh);
  font-size: var(--size-xs);
  font-variant-numeric: tabular-nums;
  color: var(--bone-muted);
}
.ladder__positions span {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 0.2rem;
}
.ladder__positions span:first-child { color: var(--gold); font-weight: 600; }

.ladder__rows {
  display: grid;
  grid-auto-rows: var(--rowh);
  list-style: none;
}

.ladder__row {
  display: flex;
  align-items: center;
  align-self: center;
  height: 2.1rem;
  padding: 0 0.85rem;
  border-radius: 2px;
  /* competitor rows: a dim gold bar, width set inline per row */
  width: var(--w, 100%);
  background: rgba(169, 121, 28, 0.30);
  border: 1px solid rgba(169, 121, 28, 0.46);
  animation: ladder-drop 0.9s var(--ease) 0.25s both;
}

.ladder__row--you {
  width: 100%;
  gap: 0.6rem;
  justify-content: space-between;
  background: var(--gold);
  border-color: var(--gold);
  animation: ladder-rise 1.05s var(--ease) 0.25s both;
}

.ladder__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--size-sm);
  color: var(--on-gold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ladder__tag {
  font-size: var(--size-xs);
  font-weight: 600;
  color: var(--on-gold);
  border: 1px solid rgba(16, 12, 3, 0.45);
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
  flex: none;
}

/* Your row climbs seven positions; everyone else slides down one. */
@keyframes ladder-rise {
  from { transform: translateY(calc(var(--rowh) * 7)); }
  to   { transform: translateY(0); }
}
@keyframes ladder-drop {
  from { transform: translateY(calc(var(--rowh) * -1)); opacity: 0.35; }
  to   { transform: translateY(0); opacity: 1; }
}

.ladder figcaption {
  margin-top: 0.9rem;
  font-size: var(--size-xs);
  line-height: 1.5;
  color: var(--bone-muted);
  max-width: 44ch;
}


/* ==========================================================================
   7. SCROLL FADE
   One quiet transition as each section arrives, not a per-card effect. Gated
   entirely on the "js-fade" class the inline head script adds (see
   index.html) — that script itself checks for prefers-reduced-motion and
   IntersectionObserver support, so this only ever runs where it will look
   smooth. Without that class, sections are simply visible: no JS, no motion
   preference, and the reduced-motion override below are all safe no-ops.
   ========================================================================== */
html.js-fade .fade-target {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
html.js-fade .fade-target.is-visible {
  opacity: 1;
  transform: none;
}


/* ==========================================================================
   8. SECTION SHELL
   ========================================================================== */
.section { padding-block: var(--section-y); }

.section--alt {
  background: var(--ink-raised);
  border-block: 1px solid var(--rule);
}

.section__title {
  font-size: var(--size-xl);
  font-variation-settings: "opsz" 72, "WONK" 1;
  margin-bottom: 0.4em;
}

.section__intro {
  font-size: var(--size-md);
  color: var(--bone);
  max-width: 48ch;
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}


/* ==========================================================================
   9. SERVICES
   A definition list on hairline rules — not cards. The rule carries the
   structure so nothing needs a shadow.
   ========================================================================== */
.offer { margin: 0; }

.offer__item {
  display: grid;
  grid-template-columns: minmax(0, 16.5rem) minmax(0, 1fr);
  gap: 0.5rem clamp(1.5rem, 5vw, 4rem);
  padding-block: clamp(1.75rem, 3.5vw, 2.5rem);
  border-top: 1px solid var(--rule);
}
.offer__item:last-child { border-bottom: 1px solid var(--rule); }

.offer dt {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--size-lg);
  font-variation-settings: "opsz" 40;
  color: var(--gold);
  line-height: 1.15;
}

.offer dd { margin: 0; }
.offer dd { max-width: var(--measure); }


/* ==========================================================================
   10. PROCESS STEPS
   The only numbered list on the page, because it is the only real sequence.
   ========================================================================== */
.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 1px;
  background: var(--rule);          /* gap fill = hairline grid */
  border: 1px solid var(--rule);
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.steps__item {
  counter-increment: step;
  background: var(--ink);
  padding: clamp(1.5rem, 3vw, 2.25rem);
}

.steps__item::before {
  content: counter(step);
  display: block;
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 600;
  font-variation-settings: "opsz" 60;
  line-height: 1;
  color: var(--gold-deep);
  margin-bottom: 0.9rem;
}

.steps__item h3 {
  font-size: var(--size-md);
  color: var(--gold-pale);
  margin-bottom: 0.4em;
}

.steps__item p {
  font-size: var(--size-sm);
  color: var(--bone);
  margin: 0;
}


/* ==========================================================================
   11. WHAT WE MEASURE
   ========================================================================== */
.proof {
  list-style: none;
  display: grid;
  gap: clamp(1.75rem, 4vw, 3rem);
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.proof__item { border-top: 2px solid var(--gold-deep); padding-top: 1.1rem; }

.proof__item h3 {
  font-size: var(--size-md);
  color: var(--gold);
  margin-bottom: 0.35em;
}

.proof__item p { font-size: var(--size-sm); margin: 0; }


/* ==========================================================================
   12. ABOUT
   ========================================================================== */
.about {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: start;
}
.about .section__title { margin: 0; }
.about__body p { font-size: var(--size-md); line-height: 1.6; }


/* ==========================================================================
   13. FAQ
   Native <details> — keyboard operable and screen-reader friendly for free.
   ========================================================================== */
/* The list is narrowed, not the container — so the FAQ keeps the same left
   edge as every other section. */
.qa { max-width: 52rem; border-bottom: 1px solid var(--rule); }
.qa:first-of-type { border-top: 1px solid var(--rule); }

.qa summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  cursor: pointer;
  list-style: none;
  padding: 1.35rem 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--size-md);
  font-variation-settings: "opsz" 40;
  color: var(--gold-pale);
}
.qa summary::-webkit-details-marker { display: none; }

.qa summary::after {
  content: "+";
  flex: none;
  font-family: var(--font-body);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--gold);
  transition: transform 0.2s var(--ease);
}
.qa[open] summary::after { transform: rotate(45deg); }

.qa summary:hover { color: var(--gold); }

.qa__body { padding-bottom: 1.5rem; }
.qa__body p { color: var(--bone); margin: 0; }


/* ==========================================================================
   14. CONTACT & FORM
   ========================================================================== */
.section--contact { background: var(--ink-raised); border-top: 1px solid var(--rule); }

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}

.contact__blurb { font-size: var(--size-md); }

.contact__details {
  list-style: none;
  margin-top: 2.25rem;
  display: grid;
  gap: 0.9rem;
}
.contact__details li {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 1rem;
  align-items: baseline;
  padding-top: 0.9rem;
  border-top: 1px solid var(--rule);
  font-size: var(--size-sm);
  word-break: break-word;
}
.contact__label { color: var(--bone-muted); }

.form { display: grid; gap: 1.1rem; }

.field { display: grid; gap: 0.4rem; }

.field label {
  font-size: var(--size-sm);
  font-weight: 500;
  color: var(--bone);
}
.field__hint { color: var(--bone-muted); font-weight: 400; }

.field input,
.field textarea {
  width: 100%;
  font-family: inherit;
  font-size: var(--size-base);
  color: var(--bone);
  background: var(--ink-sunken);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 0.75rem 0.85rem;
  transition: border-color 0.16s var(--ease);
}
.field textarea { resize: vertical; min-height: 6rem; }

.field input::placeholder,
.field textarea::placeholder { color: var(--bone-muted); }

.field input:hover,
.field textarea:hover { border-color: var(--rule-strong); }

.field input:focus-visible,
.field textarea:focus-visible { border-color: var(--gold); outline-offset: 1px; }

.form .button { justify-self: start; margin-top: 0.35rem; }

.form__note { font-size: var(--size-xs); color: var(--bone-muted); margin: 0; }


/* ==========================================================================
   15. FOOTER
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
  font-size: var(--size-sm);
}

.site-footer__inner { display: grid; gap: 0.75rem; }

.site-footer__brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--size-md);
  color: var(--gold-pale);
  margin: 0;
}

.site-footer__meta { color: var(--bone-muted); margin: 0; max-width: none; }

.site-footer__nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  list-style: none;
  margin-top: 0.5rem;
}
.site-footer__nav a { color: var(--bone); text-decoration: none; }
.site-footer__nav a:hover { color: var(--gold); text-decoration: underline; }

.site-footer__legal {
  color: var(--bone-muted);
  font-size: var(--size-xs);
  margin: 1rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  max-width: none;
}


/* ==========================================================================
   16. RESPONSIVE
   ========================================================================== */
@media (max-width: 62rem) {
  .hero__inner,
  .about,
  .contact { grid-template-columns: minmax(0, 1fr); }

  .hero h1 { max-width: 18ch; }
  .about .section__title { margin-bottom: 0.3em; }
}

@media (max-width: 46rem) {
  .site-header__inner { padding-block: 0.75rem; }
  .site-nav ul { gap: 1rem; row-gap: 0.5rem; flex-wrap: wrap; }

  .offer__item { grid-template-columns: minmax(0, 1fr); }
  .offer dt { margin-bottom: 0.25rem; }

  .contact__details li { grid-template-columns: minmax(0, 1fr); gap: 0.15rem; }
}

@media (max-width: 30rem) {
  .ladder__frame { --rowh: 2.6rem; padding-inline: 1rem; }
  .hero__actions .button { flex: 1 1 100%; }
}


/* ==========================================================================
   17. REDUCED MOTION & PRINT
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .ladder__row,
  .ladder__row--you { animation: none; }

  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@media print {
  .site-header, .ladder, .form { display: none; }
  body { background: #fff; color: #000; }
  h1, h2, h3 { color: #000; }
  a { color: #000; }
}
