/* aJet site: shared base. Tokens mirror the app's design/tokens.json. Light mode only.
   Section-specific styles live in /assets/sections/<id>.css under a .s-<id> root class. */
:root {
  color-scheme: light only;

  /* Neutrals (app tokens) */
  --ink: #0b0b0f;
  --ink-secondary: #5b5b66;
  --ink-tertiary: #70707f;
  --ink-quaternary: #c9c9d2;
  --canvas: #f6f6f8;
  --surface: #ffffff;
  --surface-sunken: #efeff2;
  --hairline: #e8e8ed;

  /* Brand (logo) */
  --jet: #1f4dff;
  --jet-ink: #0b1b3a;
  --jet-tint: #eef2ff;

  /* Data hues: fills for marks, *-text variants whenever the hue is type */
  --recovery: #0fb981;
  --recovery-text: #0b875e;
  --effort: #ff6b35;
  --effort-text: #db3b00;
  --caution: #f5b301;
  --caution-text: #996f01;
  --critical: #dd1f25;
  --info: #3b82f6;
  --info-text: #1e6ff5;
  --protein: #ff6b4a;
  --protein-text: #e52a00;
  --carbs: #3b9eff;
  --carbs-text: #0074e6;
  --fat: #f5b301;
  --fat-text: #996f01;

  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 20px;
  --space-xxl: 24px;
  --space-xxxl: 32px;
  --space-section: 40px;

  --radius-card: 20px;
  --radius-card-large: 28px;
  --radius-control: 14px;
  --radius-pill: 999px;

  --shadow-card: 0 4px 16px rgba(11, 11, 15, 0.04);
  --shadow-sheet: 0 12px 32px rgba(11, 11, 15, 0.08);

  --font-text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --font-rounded: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Helvetica Neue", Arial, sans-serif;

  /* Motion: CSS equivalents of the app springs */
  --ease-standard: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-snappy: cubic-bezier(0.3, 0.9, 0.3, 1);
  --ease-gentle: cubic-bezier(0.25, 0.9, 0.3, 1);
  --duration-snappy: 0.3s;
  --duration-standard: 0.42s;
  --duration-gentle: 0.6s;
  --duration-rest: 0.25s;

  --gutter: 20px;
  --page-width: 1080px;
  --prose-width: 34rem;
  --section-gap: 88px;
  --tap-min: 44px;
  --button-height: 54px;

  --phone-width: 264px;
  --phone-bezel: 9px;
  --phone-screen-radius: calc(var(--phone-width) * 0.14);
}

@media (min-width: 640px) {
  :root {
    --gutter: 32px;
    --phone-width: 284px;
  }
}

@media (min-width: 900px) {
  :root {
    --section-gap: 128px;
    --phone-width: 300px;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

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

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 2px solid var(--jet);
  outline-offset: 3px;
  border-radius: 6px;
}

main:focus {
  outline: none;
}

[hidden] {
  display: none !important;
}

.wrap {
  width: 100%;
  max-width: calc(var(--page-width) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  padding: var(--space-md) var(--space-lg);
  background: var(--ink);
  color: var(--surface);
  border-radius: var(--radius-control);
  z-index: 100;
}

.skip-link:focus {
  top: var(--space-md);
}

/* Type roles */
.label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--ink-tertiary);
}

.display {
  font-size: clamp(40px, 6.2vw, 64px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.title {
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.lede {
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--ink-secondary);
  max-width: var(--prose-width);
  text-wrap: pretty;
}

.caption {
  font-size: 13px;
  color: var(--ink-tertiary);
}

.numeral {
  font-family: var(--font-rounded);
  font-variant-numeric: tabular-nums;
}

/* Primary action: the single ink pill */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--button-height);
  padding-inline: var(--space-xxxl);
  background: var(--ink);
  color: var(--surface);
  font-size: 17px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  text-align: center;
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  font-size: 15px;
  font-weight: 600;
}

.card {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: var(--space-xl);
  box-shadow: var(--shadow-card);
}

.note {
  padding: var(--space-lg);
  background: var(--surface-sunken);
  border-radius: var(--radius-control);
  font-size: 13px;
  color: var(--ink-secondary);
}

/* Logo */
.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  color: var(--ink);
}

.logo {
  height: 30px;
  width: auto;
}

/* iPhone frame for app screenshots (1179 x 2556) */
.phone {
  width: calc(var(--phone-width) + 2 * var(--phone-bezel));
  padding: var(--phone-bezel);
  background: var(--ink);
  border-radius: calc(var(--phone-screen-radius) + var(--phone-bezel));
  box-shadow: var(--shadow-sheet);
  flex: none;
}

.phone-screen {
  position: relative;
  overflow: hidden;
  border-radius: var(--phone-screen-radius);
  background: var(--canvas);
  aspect-ratio: 1179 / 2556;
}

.phone-screen::after {
  content: "";
  position: absolute;
  top: 1.3%;
  left: 50%;
  width: 31%;
  aspect-ratio: 126 / 37;
  transform: translateX(-50%);
  background: var(--ink);
  border-radius: var(--radius-pill);
}

.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Simple pages (support, 404) */
.simple {
  padding-block: var(--space-section) var(--section-gap);
}

.simple .wrap {
  display: grid;
  gap: var(--space-xxl);
  justify-items: start;
}

.simple .section-head {
  display: grid;
  gap: var(--space-md);
}

.simple .card {
  display: grid;
  gap: var(--space-md);
  justify-items: start;
  width: 100%;
  max-width: var(--prose-width);
  padding: var(--space-xxl);
}

.email {
  font-family: var(--font-rounded);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

/* Scroll entry: add class "reveal" to an element. Opacity + 0.97 scale only.
   Active only when JS is running and the visitor has not asked for reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: scale(0.97);
    transition:
      opacity var(--duration-standard) var(--ease-standard),
      transform var(--duration-standard) var(--ease-standard);
  }

  .js .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}

@media print {
  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

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

/* Mascot moods: the same scene three times, differing only in the face. The happy face sits
   underneath; a section fades the "ok" or "tired" copy in over it when its demo changes. */
.mood {
  --mood-droop: translateY(3%) scale(0.97);
  display: grid;
  transition: transform var(--mood-speed, 0.45s) var(--ease-standard);
}

.mood > .mood-face {
  grid-area: 1 / 1;
  width: 100%;
  height: auto;
}

.mood > .mood-ok,
.mood > .mood-tired {
  opacity: 0;
  transition: opacity 0.2s linear;
}

@media (prefers-reduced-motion: reduce) {
  .mood,
  .mood > .mood-face {
    transition: none;
  }
}
