/* ==========================================================================
   Miles AI — stylesheet
   Tokens, layout, components. No framework, no build step.
   ========================================================================== */

:root {
  /* Colour */
  --ink:          #14161A;   /* page ground, dark sections */
  --ink-panel:    #1A1D22;   /* raised surfaces on dark */
  --ink-line:     #292D33;   /* hairlines on dark */
  --ink-line-2:   #383D44;   /* stronger borders on dark */
  --ivory:        #F4F1EA;   /* light sections, text on dark */
  --ivory-panel:  #FBFAF7;   /* raised surfaces on light */
  --ivory-line:   #D8D3C6;   /* hairlines on light */
  --ivory-line-2: #C9C4B8;
  --body-dark:    #9A9A92;   /* body text on dark */
  --body-list:    #C3C3BA;   /* list text on dark */
  --muted-dark:   #8A8A82;   /* small text on dark */
  --nav-dark:     #B7B7AE;
  --body-light:   #5C5C55;   /* body text on light */
  --muted-light:  #6B6862;
  --accent:       #C4703E;   /* accent on dark grounds */
  --accent-hi:    #E08C58;   /* accent, hover on dark */
  --accent-ink:   #8A5230;   /* accent on light grounds (AA at body size) */

  /* Type */
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Layout */
  --wrap: 1440px;
  --gutter: 96px;
  --radius: 8px;
  --pill: 999px;
  --section-y: 110px;
}

/* --------------------------------------------------------------------------
   Reset
   -------------------------------------------------------------------------- */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0;
}

h1 { font-size: clamp(38px, 4.6vw, 66px); line-height: 1.02; }
h2 { font-size: clamp(36px, 3.9vw, 56px); line-height: 1.05; }
h3 { font-size: 23px; line-height: 1.15; letter-spacing: -0.01em; }

p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

a { color: var(--accent); }
a:hover { color: var(--accent-hi); }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

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

/* --------------------------------------------------------------------------
   Layout primitives
   -------------------------------------------------------------------------- */

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

.section { padding-block: var(--section-y); }
.section--dark { background: var(--ink); color: var(--ivory); }
.section--light { background: var(--ivory); color: var(--ink); }
.section--divided.section--dark { border-top: 1px solid var(--ink-line); }
.section--divided.section--light { border-top: 1px solid var(--ivory-line); }

.section__head {
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 56px;
}

.split {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 80px;
  margin-bottom: 56px;
}
.split > div { max-width: 720px; display: flex; flex-direction: column; gap: 18px; }
.split__aside {
  width: 400px;
  flex: none;
  font-size: 17px;
  line-height: 1.65;
  color: var(--body-light);
}

.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* --------------------------------------------------------------------------
   Shared bits
   -------------------------------------------------------------------------- */

.eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted-dark);
}
.eyebrow--accent { color: var(--accent); }
.eyebrow--ink { color: var(--accent-ink); }
.eyebrow--rule { display: flex; align-items: center; gap: 14px; color: var(--accent); }
.eyebrow--rule::before {
  content: "";
  width: 44px;
  height: 1px;
  background: currentColor;
  flex: none;
}

.lede {
  max-width: 62ch;
  font-size: 18px;
  line-height: 1.6;
  color: var(--body-dark);
}
.section--light .lede { color: var(--body-light); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 56px;
  padding-inline: 30px;
  border: 1px solid transparent;
  border-radius: var(--pill);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn--sm { height: 46px; padding-inline: 24px; font-size: 14px; }
.btn--solid { background: var(--accent); color: var(--ink); }
.btn--solid:hover { background: var(--accent-hi); color: var(--ink); }
.btn--ghost { border-color: var(--ink-line-2); color: var(--ivory); font-weight: 600; }
.btn--ghost:hover { border-color: var(--ivory); color: var(--ivory); }
.section--light .btn--ghost { border-color: var(--ivory-line-2); color: var(--ink); }
.section--light .btn--ghost:hover { border-color: var(--ink); color: var(--ink); }

/* --------------------------------------------------------------------------
   Nav
   -------------------------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ink);
  border-bottom: 1px solid var(--ink-line);
}
.nav__inner {
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  text-decoration: none;
}
.logo__word {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ivory);
}
.logo__mark {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.24em;
  color: var(--accent);
}

.nav__links { display: flex; align-items: center; gap: 36px; }
.nav__links > a:not(.btn) {
  font-size: 15px;
  font-weight: 500;
  color: var(--nav-dark);
  text-decoration: none;
}
.nav__links > a:not(.btn):hover { color: var(--ivory); }

.nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--ivory);
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero { padding-block: 90px; }
.hero__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 72px;
}
.hero__copy {
  max-width: 610px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.hero__copy .lede { font-size: 19px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; }

/* Console mock */
.console {
  width: 566px;
  flex: none;
  border: 1px solid var(--ink-line);
  border-radius: 10px;
  background: var(--ink-panel);
  overflow: hidden;
}
.console__bar {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-inline: 18px;
  border-bottom: 1px solid var(--ink-line);
}
.console__dot { width: 9px; height: 9px; border-radius: 50%; background: #3A4048; }
.console__title { margin-left: 12px; font-size: 12px; color: var(--body-dark); }
.console__body { display: flex; min-height: 392px; }
.console__rail {
  width: 158px;
  flex: none;
  padding: 20px 16px;
  border-right: 1px solid var(--ink-line);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.console__railhead {
  margin-bottom: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted-dark);
}
.console__step { padding: 8px 10px; border-radius: 5px; font-size: 13px; color: var(--body-dark); }
.console__step.is-active { background: #24282E; color: var(--ivory); font-weight: 600; }
.console__main {
  flex: 1;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.console__heading { font-size: 14px; font-weight: 700; color: var(--ivory); }
.console__line { height: 8px; border-radius: 4px; background: #2B3037; }
.console__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.chip {
  padding: 6px 11px;
  border: 1px solid var(--ink-line-2);
  border-radius: var(--pill);
  font-size: 11px;
  color: var(--nav-dark);
}
.console__foot {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--ink-line);
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   Partners
   -------------------------------------------------------------------------- */

.partners {
  border-top: 1px solid var(--ink-line);
  border-bottom: 1px solid var(--ink-line);
}
.partners__inner {
  min-height: 150px;
  display: flex;
  align-items: center;
  gap: 44px;
  padding-block: 32px;
}
.partners__inner .eyebrow { letter-spacing: 0.2em; white-space: nowrap; }
.partners__grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}
.partners__slot {
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--ink-line-2);
  border-radius: 6px;
  font-size: 12px;
  color: var(--muted-dark);
}

/* --------------------------------------------------------------------------
   Cards, tiles, pillars
   -------------------------------------------------------------------------- */

.card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px;
  border: 1px solid var(--ink-line);
  border-radius: var(--radius);
  background: var(--ink-panel);
}
.card__tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}
.card p:not(.card__tag) { font-size: 14px; color: var(--body-dark); }

.cta-row {
  margin-top: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.cta-row__title {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 30px;
  border: 1px solid var(--ivory-line);
  border-radius: var(--radius);
  background: var(--ivory-panel);
}
.tile__icon { width: 26px; height: 26px; color: var(--accent-ink); }
.tile h3 { font-size: 24px; }
.tile p { font-size: 14px; color: var(--body-light); }

.pillar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 30px;
  border-top: 2px solid var(--ink);
}
.pillar h3 { font-size: 27px; }
.pillar p { font-size: 15px; color: var(--body-light); }

/* --------------------------------------------------------------------------
   Tabs
   -------------------------------------------------------------------------- */

.tabs { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 40px; }
.tab {
  height: 46px;
  padding-inline: 24px;
  border: 1px solid var(--ink-line-2);
  border-radius: var(--pill);
  background: transparent;
  color: var(--nav-dark);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.tab:hover { border-color: var(--ivory); color: var(--ivory); }
.tab.is-active {
  background: var(--ivory);
  border-color: var(--ivory);
  color: var(--ink);
}

.panel { padding-top: 26px; border-top: 1px solid var(--ink-line); }
.panel[hidden] { display: none; }

.listing { display: flex; flex-direction: column; gap: 16px; }
.listing h3 {
  font-family: var(--body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
.listing ul { display: flex; flex-direction: column; gap: 16px; }
.listing li { color: var(--body-list); }

/* --------------------------------------------------------------------------
   Press
   -------------------------------------------------------------------------- */

#press h2 { margin-bottom: 40px; }

.press { margin-bottom: 40px; }
.press__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding-block: 30px;
  border-top: 1px solid var(--ink-line);
  text-decoration: none;
  color: inherit;
}
.press__row:last-child { border-bottom: 1px solid var(--ink-line); }
.press__row:hover .press__title { color: var(--accent); }
.press__title {
  font-family: var(--display);
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ivory);
  transition: color 0.15s ease;
}
.press__meta { font-size: 14px; color: var(--body-dark); white-space: nowrap; }

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */

.qa {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--ivory-line-2);
}
.qa h3 { font-size: 24px; }
.qa p { font-size: 15px; line-height: 1.65; color: var(--body-light); }

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

.footer { background: var(--ink); padding-top: 64px; }
.footer__top {
  display: flex;
  justify-content: space-between;
  gap: 80px;
  padding-bottom: 48px;
}
.footer__brand { max-width: 480px; display: flex; flex-direction: column; gap: 20px; }
.footer__brand p { font-size: 15px; line-height: 1.65; color: var(--body-dark); }
.footer__cols { display: flex; gap: 72px; }
.footer__col { display: flex; flex-direction: column; gap: 14px; }
.footer__col .eyebrow { letter-spacing: 0.2em; }
.footer__col a, .footer__col address, .footer__col span:not(.eyebrow) {
  font-size: 15px;
  font-style: normal;
  line-height: 1.5;
  color: var(--body-list);
  text-decoration: none;
}
.footer__col a:hover { color: var(--ivory); }
.footer__bottom {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--ink-line);
  font-size: 13px;
  color: var(--muted-dark);
}
.footer__legal { display: flex; gap: 24px; }
.footer__legal a { color: var(--muted-dark); text-decoration: none; }
.footer__legal a:hover { color: var(--ivory); }

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

@media (max-width: 1240px) {
  :root { --gutter: 56px; --section-y: 88px; }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero__inner { flex-direction: column; align-items: stretch; gap: 48px; }
  .hero__copy { max-width: none; }
  .console { width: 100%; }
  .split { flex-direction: column; align-items: stretch; gap: 24px; }
  .split__aside { width: auto; }
}

@media (max-width: 900px) {
  .nav__toggle { display: flex; }
  .nav__links {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 16px var(--gutter) 28px;
    background: var(--ink);
    border-bottom: 1px solid var(--ink-line);
  }
  .nav__links:not(.is-open) { display: none; }
  .nav__links > a:not(.btn) { padding-block: 14px; font-size: 17px; }
  .nav__links > .btn { margin-top: 12px; }

  .partners__inner { flex-direction: column; align-items: stretch; gap: 20px; }
  .partners__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--2 { grid-template-columns: 1fr; gap: 28px; }

  .footer__top { flex-direction: column; gap: 40px; }
}

@media (max-width: 680px) {
  :root { --gutter: 24px; --section-y: 64px; }

  .nav__inner { height: 68px; }
  .logo__word { font-size: 21px; }

  .hero { padding-block: 40px; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
  .nav__links > .btn { width: 100%; }

  .console__body { flex-direction: column; min-height: 0; }
  .console__rail {
    width: auto;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    border-right: 0;
    border-bottom: 1px solid var(--ink-line);
  }
  .console__railhead { display: none; }
  .console__step { font-size: 12px; padding: 6px 10px; }
  .console__main { min-height: 220px; }

  .grid, .grid--3, .grid--4 { grid-template-columns: 1fr; gap: 16px; }

  .section__head { margin-bottom: 36px; gap: 14px; }
  .cta-row { flex-direction: column; align-items: stretch; gap: 16px; margin-top: 36px; }
  .cta-row__title { font-size: 27px; }

  .press__row { flex-direction: column; align-items: flex-start; gap: 8px; padding-block: 20px; }
  .press__title { font-size: 20px; line-height: 1.2; }

  .footer__cols { gap: 48px; }
  .footer__bottom { height: auto; flex-direction: column; align-items: flex-start; gap: 12px; padding-block: 24px; }
}
