/* LoyalTee design tokens and shared components.
   Used by both the marketing site (site.css) and the app (app.css).
   Brand colours must match scripts/build-brand.mjs. */

@font-face {
  font-family: "Bricolage";
  src: url("/fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  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;
}
@font-face {
  font-family: "Bricolage";
  src: url("/fonts/bricolage-grotesque-ext.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Brand */
  --tangerine: #FF6B35;
  --raspberry: #E5306E;
  --brand: #F04A52;               /* the midpoint, for flat uses */
  --brand-grad: linear-gradient(135deg, var(--tangerine), var(--raspberry));
  --gold: #FFB020;
  --mint: #0FA968;
  --sky: #2F80ED;

  /* Surfaces and text (light) */
  --bg: #FFF7F0;                  /* warm cream page */
  --bg-2: #FFEFE3;
  --surface: #FFFFFF;
  --surface-2: #FBF6F2;
  --ink: #17131F;
  --ink-2: #5E5869;
  --ink-3: #8C8696;
  --line: rgba(23, 19, 31, .10);
  --line-2: rgba(23, 19, 31, .18);
  --focus: #2F80ED;
  --danger: #D92D20;
  --ok: var(--mint);
  --on-brand: #FFFFFF;
  --nav-bg: rgba(255, 247, 240, .78);

  --shadow-1: 0 1px 2px rgba(23, 19, 31, .06), 0 1px 1px rgba(23, 19, 31, .04);
  --shadow-2: 0 10px 30px -12px rgba(23, 19, 31, .18), 0 2px 6px rgba(23, 19, 31, .05);
  --shadow-3: 0 30px 60px -24px rgba(23, 19, 31, .30), 0 8px 18px -8px rgba(23, 19, 31, .12);
  --shadow-brand: 0 18px 40px -16px rgba(229, 48, 110, .55);

  --r-xs: 8px;
  --r-sm: 12px;
  --r: 18px;
  --r-lg: 26px;
  --r-xl: 34px;
  --r-pill: 999px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;
  --display: "Bricolage", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E0B12;
    --bg-2: #15111B;
    --surface: #1B1622;
    --surface-2: #231D2B;
    --ink: #F8F3EE;
    --ink-2: #B9B1C2;
    --ink-3: #8B8397;
    --line: rgba(255, 255, 255, .10);
    --line-2: rgba(255, 255, 255, .18);
    --nav-bg: rgba(14, 11, 18, .74);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-2: 0 10px 30px -12px rgba(0, 0, 0, .6);
    --shadow-3: 0 30px 60px -24px rgba(0, 0, 0, .75);
  }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }

h1, h2, h3, .display { font-family: var(--display); font-weight: 750; letter-spacing: -.025em; line-height: 1.05; }
.grad-text { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 10px; z-index: 1000; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; text-decoration: none; }
.skip:focus { left: 12px; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--bg);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  border: 0; border-radius: var(--r-pill);
  background: var(--btn-bg); color: var(--btn-fg);
  font-weight: 650; font-size: 16px; letter-spacing: -.01em; line-height: 1;
  text-decoration: none; white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s, opacity .2s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn[disabled], .btn.is-busy { opacity: .55; pointer-events: none; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-brand { background: var(--brand-grad); color: var(--on-brand); box-shadow: var(--shadow-brand); }
.btn-brand:hover { box-shadow: 0 22px 46px -16px rgba(229, 48, 110, .7); }
.btn-ghost { --btn-bg: transparent; --btn-fg: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.btn-ghost:hover { --btn-bg: var(--surface); }
.btn-soft { --btn-bg: var(--surface-2); --btn-fg: var(--ink); }
.btn-danger { --btn-bg: transparent; --btn-fg: var(--danger); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--danger) 35%, transparent); }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 17px; }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 14.5px; }
.btn-block { width: 100%; }

/* ---------- Forms ---------- */
.field { display: grid; gap: 7px; }
.field > span, .label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.field small, .hint { font-size: 13px; color: var(--ink-3); }
.input, .select, .textarea {
  width: 100%; min-height: 50px; padding: 12px 15px;
  background: var(--surface); color: var(--ink);
  border: 1.5px solid var(--line-2); border-radius: var(--r-sm);
  font-size: 16px; /* 16px stops iOS zooming on focus */
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
.textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
.select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%238C8696' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 15px center; padding-right: 40px; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus) 20%, transparent); }
.input::placeholder, .textarea::placeholder { color: var(--ink-3); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--ink-2); }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--raspberry); flex: none; }

/* ---------- Bits ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: var(--r-pill); font-size: 13px; font-weight: 650; background: var(--surface-2); color: var(--ink-2); }
.pill-brand { background: color-mix(in srgb, var(--raspberry) 12%, transparent); color: var(--raspberry); }
.pill-ok { background: color-mix(in srgb, var(--mint) 14%, transparent); color: var(--mint); }
.pill-gold { background: color-mix(in srgb, var(--gold) 18%, transparent); color: #A66A00; }
@media (prefers-color-scheme: dark) { .pill-gold { color: var(--gold); } .pill-brand { color: #FF6F9C; } }

.card-surface { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
