/* air-design-tokens.css
 *
 * Design tokens extracted from https://air3-design.figma.site/
 * Re-extracted 2026-05-21 — primary is BLACK (#000), not cyan. Cyan was a
 * mistake inherited from share-ann (an unrelated module).
 *
 * Aesthetic:
 *   - Cream/off-white surfaces with pure-black hero sections
 *   - Bento-grid layout (asymmetric cards on a strict grid)
 *   - Massive geometric Poppins display + tiny Fira Code utility labels
 *   - Pill buttons (radius:9999px)
 *   - Pastel decorative accents (pink/green/purple/orange/blue/yellow)
 *   - Generous whitespace, soft 3D-ish shadows
 */

:root {
  /* ---- Surfaces ------------------------------------------------------ */
  --air-surface:        #ffffff;
  --air-surface-cream:  #fafaf7;       /* page background — warmer than #fff */
  --air-surface-dim:    #e3e9ea;       /* token: surface-dim */
  --air-surface-soft:   #f2f2f2;
  --air-surface-dark:   #161d1d;       /* hero/contrast sections */
  --air-surface-darker: #0d1212;

  /* ---- Text / Icon -------------------------------------------------- */
  --air-text:            #181b1c;       /* text-primary */
  --air-text-secondary:  #535353;       /* text-secondary */
  --air-text-tertiary:   #798b95;
  --air-text-placeholder:#a8b4bb;
  --air-text-on-colour:  #ffffff;       /* text on dark/black */
  --air-text-inverse:    #ffffff;

  --air-icon:            #181b1c;
  --air-icon-secondary:  #798b95;

  /* ---- Buttons ------------------------------------------------------ */
  --air-button-primary:        #000000;   /* THE accent in AIR is black, not cyan */
  --air-button-primary-hover:  #2a2a2a;
  --air-button-secondary:      #41a7d7;   /* token: button-secondary */
  --air-button-secondary-hover:#31b2e1;

  /* ---- Status ------------------------------------------------------- */
  --air-status-success:  #17b26a;
  --air-status-success-soft: #dff5e6;
  --air-status-pending:  #f99247;
  --air-status-error:    #f3383b;

  /* ---- Danger (destructive actions, e.g. Delete) -------------------
   * Distinct from --air-status-error (which is for inline error banners)
   * because destructive CTAs need their own hover/disabled/bg ramp.
   * Reds chosen to match the existing #dc2626/#b91c1c/#fca5a5/#fef2f2/#fecaca
   * hand-rolled set so the swap is purely a tokenization, not a re-design.
   */
  --air-color-danger:           #dc2626;
  --air-color-danger-hover:     #b91c1c;
  --air-color-danger-disabled:  #fca5a5;
  --air-color-danger-bg:        #fef2f2;
  --air-color-danger-border:    #fecaca;

  /* ---- Overlay (modal backdrops) ----------------------------------- */
  --air-color-overlay: rgba(11, 16, 32, 0.55);

  /* ---- Borders & dividers ------------------------------------------ */
  --air-border:          #d6e0e5;
  --air-border-strong:   #535353;
  --air-border-faint:    #e3e9ea;
  --air-divider:         rgba(13, 28, 36, 0.08);

  /* ---- Decorative pastels (extracted from figma swatch grid) ------- */
  --air-decorative-pink:    #f6c1e5;
  --air-decorative-green:   #a7e1d3;
  --air-decorative-purple:  #b6b8f2;
  --air-decorative-orange:  #fec5a4;
  --air-decorative-blue:    #9bd5ea;
  --air-decorative-yellow:  #f7df99;

  /* Soft (lighter) decorative — for backgrounds */
  --air-decorative-pink-soft:   #fde4f4;
  --air-decorative-green-soft:  #d6f0e6;
  --air-decorative-purple-soft: #dbdcf0;
  --air-decorative-orange-soft: #ffe4d2;
  --air-decorative-blue-soft:   #e6f5fa;
  --air-decorative-yellow-soft: #fbf0d2;

  /* ---- Type --------------------------------------------------------- */
  --air-font-display: "Poppins", ui-sans-serif, system-ui, sans-serif;
  --air-font-body:    "DM Sans", ui-sans-serif, system-ui, sans-serif;
  --air-font-mono:    "Fira Code", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* AIR scale — much bigger than my first pass */
  --air-text-mono-xs: 10px;
  --air-text-mono-sm: 11.5px;
  --air-text-xs:      12px;
  --air-text-sm:      13px;
  --air-text-base:    15px;
  --air-text-md:      17px;
  --air-text-lg:      22px;          /* card title */
  --air-text-xl:      30px;          /* section title */
  --air-text-2xl:     46px;          /* hero h2 */
  --air-text-3xl:     72px;          /* hero h1 — massive Poppins */

  --air-lh-tight:   1.02;
  --air-lh-snug:    1.15;
  --air-lh-body:    1.55;

  --air-track-display: -0.02em;
  --air-track-mono:     0.08em;       /* uppercase utility labels */

  /* ---- Spacing (4pt) ----------------------------------------------- */
  --air-space-1:  4px;
  --air-space-2:  8px;
  --air-space-3:  12px;
  --air-space-4:  16px;
  --air-space-5:  20px;
  --air-space-6:  24px;
  --air-space-7:  28px;
  --air-space-8:  32px;
  --air-space-10: 40px;
  --air-space-12: 56px;
  --air-space-16: 80px;
  --air-space-20: 120px;

  /* ---- Radii (generous, AIR-style) --------------------------------- */
  --air-radius-xs:  8px;
  --air-radius-sm:  12px;
  --air-radius-md:  18px;
  --air-radius-lg:  24px;
  --air-radius-xl:  32px;
  --air-radius-2xl: 40px;
  --air-radius-pill: 9999px;

  /* ---- Shadows (soft, 3D-ish) -------------------------------------- */
  --air-shadow-card:
    0 1px 2px rgba(13, 28, 36, 0.04),
    0 12px 32px rgba(13, 28, 36, 0.06);
  --air-shadow-elev:
    0 8px 24px rgba(13, 28, 36, 0.10),
    0 32px 80px rgba(13, 28, 36, 0.14);
  --air-shadow-button:
    0 1px 2px rgba(13, 28, 36, 0.10),
    0 6px 18px rgba(13, 28, 36, 0.08);
  --air-shadow-inset:
    inset 0 1px 2px rgba(13, 28, 36, 0.04);

  /* ---- Motion ------------------------------------------------------ */
  --air-ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --air-ease-snap:   cubic-bezier(0.5, 0, 0.1, 1);
  --air-dur-fast:    .15s;
  --air-dur-base:    .26s;
  --air-dur-slow:    .42s;

  /* ---- Safe areas & layout shell ----------------------------------- *
   * --bottom-safe-area: every page reserves this much padding-bottom on
   * its body so app content scrolls clear of the WhatsApp FAB and the
   * AIR annotation dock. The annotation dock is NEVER moved; we move
   * around it. Sticky in-page CTAs raise their `bottom` to
   * `calc(var(--bottom-safe-area) + 12px)`.
   */
  --bottom-safe-area: 96px;

  /* ---- Locked design-system v2 tokens (2026-05-23) ----------------- *
   * Kenneth's flat-redesign brief: Apple Settings + Robinhood + Spotify.
   * Use these on all NEW component CSS; the original --air-text-* /
   * --air-radius-* tokens above are retained for back-compat with the
   * existing components but will be migrated over time.
   *
   * Type — semantic hierarchy:
   */
  --text-display: clamp(32px, 8vw, 48px);
  --text-display-lh: 1.05;
  --text-display-weight: 700;
  --text-display-track: -0.025em;

  --text-h1: 28px;
  --text-h1-lh: 1.15;
  --text-h1-weight: 700;
  --text-h1-track: -0.018em;

  --text-h2: 20px;
  --text-h2-lh: 1.2;
  --text-h2-weight: 600;
  --text-h2-track: -0.01em;

  --text-body: 16px;
  --text-body-lh: 1.5;
  --text-body-weight: 500;

  --text-helper: 13px;
  --text-helper-lh: 1.4;
  --text-helper-weight: 400;

  --text-meta: 12px;        /* mono URLs / timestamps */
  --text-meta-lh: 1.3;

  --text-muted: var(--air-text-secondary);

  /* Radii — locked to two values for the flat redesign. */
  --r-card: 16px;
  --r-pill: 9999px;
}

/* ---- Foundational element resets aligned to AIR ---------------------- */

.air-app, .air-app * { box-sizing: border-box; }
.air-app {
  font-family: var(--air-font-body);
  color: var(--air-text);
  font-size: var(--air-text-base);
  line-height: var(--air-lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv01";
  /* Reserve room for bottom-fixed widgets (WhatsApp FAB on partner pages,
     AIR annotation dock on deployed pages). NEVER move the annotation
     dock — work around it. Kenneth-locked 2026-05-23. */
  padding-bottom: var(--bottom-safe-area);
}

.air-app h1, .air-app h2, .air-app h3, .air-app h4 {
  font-family: var(--air-font-display);
  font-weight: 600;
  color: var(--air-text);
  letter-spacing: var(--air-track-display);
  margin: 0;
}
.air-app h1 { font-size: var(--air-text-3xl); line-height: var(--air-lh-tight); font-weight: 700; }
.air-app h2 { font-size: var(--air-text-2xl); line-height: var(--air-lh-snug); }
.air-app h3 { font-size: var(--air-text-lg);  line-height: var(--air-lh-snug); }
.air-app p  { margin: 0; }
.air-app code, .air-app kbd { font-family: var(--air-font-mono); font-size: 0.92em; }

/* AIR utility labels — uppercase Fira Code microcopy */
.air-eyebrow {
  font: 600 var(--air-text-mono-sm)/1 var(--air-font-mono);
  letter-spacing: var(--air-track-mono);
  color: var(--air-text-secondary);
  text-transform: uppercase;
}

/* Reusable primitives */

.air-input {
  appearance: none;
  display: block;
  width: 100%;
  padding: 14px 18px;
  /* 16px minimum prevents iOS Safari from zooming on focus, which would
     break the tap target for any popover/dropdown anchored to the input. */
  font: 500 16px/1.4 var(--air-font-body);
  color: var(--air-text);
  background: var(--air-surface);
  border: 1px solid var(--air-border);
  /* Subtle radius — data-entry inputs should look like fields, not pills.
     Reserve full pill rounding for chips/buttons. */
  border-radius: 12px;
  box-shadow: var(--air-shadow-inset);
  transition: border-color var(--air-dur-fast), box-shadow var(--air-dur-fast);
}
.air-input::placeholder { color: var(--air-text-placeholder); }
.air-input:focus {
  outline: none;
  border-color: var(--air-text);
  box-shadow: 0 0 0 3px rgba(13, 28, 36, 0.10), var(--air-shadow-inset);
}
.air-input:disabled {
  background: var(--air-surface-soft);
  color: var(--air-text-tertiary);
  cursor: not-allowed;
}

.air-label {
  display: block;
  font: 600 var(--air-text-sm)/1.3 var(--air-font-body);
  color: var(--air-text);
  margin-bottom: 8px;
  letter-spacing: -0.005em;
}
.air-label .air-label-hint {
  font-weight: 400;
  color: var(--air-text-secondary);
  margin-left: 6px;
  /* Slightly smaller than the label to make the inline hint clearly
     subordinate (Kenneth audit 2026-05-23: "helper-vs-label hierarchy
     mush"). Step down one size + lower-case for editorial calm. */
  font-size: var(--air-text-xs);
  text-transform: none;
  letter-spacing: 0;
}

.air-help {
  display: block;
  font: 500 var(--air-text-xs)/1.5 var(--air-font-body);
  color: var(--air-text-secondary);
  margin-top: 6px;
}

/* Pill buttons — the AIR signature */
.air-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  /* Enforce 44px minimum tap target on touch devices — see .air-btn-sm
     for rationale. Base size already exceeds 44px from padding alone,
     but explicit min-height defends against custom padding overrides
     that might inadvertently shrink it. */
  min-height: 44px;
  border: 0;
  border-radius: var(--air-radius-pill);
  background: var(--air-button-primary);
  color: var(--air-text-on-colour);
  font: 600 var(--air-text-base)/1 var(--air-font-body);
  cursor: pointer;
  transition: transform var(--air-dur-fast), box-shadow var(--air-dur-fast),
              background var(--air-dur-fast), opacity var(--air-dur-fast);
  box-shadow: var(--air-shadow-button);
  letter-spacing: -0.005em;
  white-space: nowrap;
}
.air-btn:hover { transform: translateY(-1px); background: var(--air-button-primary-hover); }
.air-btn:active { transform: translateY(0); opacity: 0.92; }
.air-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }

.air-btn-primary { background: var(--air-button-primary); color: var(--air-text-on-colour); }
.air-btn-secondary { background: var(--air-button-secondary); color: var(--air-text-on-colour); }
.air-btn-secondary:hover { background: var(--air-button-secondary-hover); }
.air-btn-ghost {
  background: transparent;
  color: var(--air-text);
  border: 1px solid var(--air-border-strong);
  box-shadow: none;
}
.air-btn-ghost:hover { background: var(--air-text); color: var(--air-text-on-colour); border-color: var(--air-text); }
.air-btn-sm {
  padding: 10px 18px;
  font-size: var(--air-text-sm);
  /* Enforce 44px minimum tap target — Kenneth audit 2026-05-23:
     P0 tap targets <44px. With 10px vertical padding + 14px font + 1
     line-height, base height is ~34px which fails. min-height keeps
     buttons accessible on touch devices without bloating the visual. */
  min-height: 44px;
}
.air-btn-lg { padding: 18px 36px; font-size: var(--air-text-md); }

/* Chips / pills (compact tags) */
.air-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font: 600 var(--air-text-sm)/1.2 var(--air-font-body);
  background: var(--air-surface);
  color: var(--air-text);
  border: 1px solid var(--air-border);
  border-radius: var(--air-radius-pill);
  cursor: pointer;
  transition: all var(--air-dur-fast);
  letter-spacing: -0.005em;
}
.air-chip:hover { background: var(--air-surface-soft); border-color: var(--air-text); }
.air-chip[aria-pressed="true"], .air-chip.active {
  background: var(--air-text);
  color: var(--air-text-on-colour);
  border-color: var(--air-text);
}

/* Bento card */
.air-card {
  background: var(--air-surface);
  border: 1px solid var(--air-divider);
  border-radius: var(--air-radius-xl);
  padding: var(--air-space-8);
  box-shadow: var(--air-shadow-card);
}
.air-card-cream { background: var(--air-surface-cream); }
.air-card-soft  { background: var(--air-surface-soft); }
.air-card-dark  { background: var(--air-surface-dark); color: var(--air-text-on-colour); border-color: transparent; }
.air-card-dark h1, .air-card-dark h2, .air-card-dark h3 { color: var(--air-text-on-colour); }
.air-card-dark .air-eyebrow { color: rgba(255,255,255,0.6); }

/* Decorative card accents */
.air-card-pink   { background: var(--air-decorative-pink-soft); }
.air-card-green  { background: var(--air-decorative-green-soft); }
.air-card-purple { background: var(--air-decorative-purple-soft); }
.air-card-orange { background: var(--air-decorative-orange-soft); }
.air-card-blue   { background: var(--air-decorative-blue-soft); }
.air-card-yellow { background: var(--air-decorative-yellow-soft); }
