/* Charter template — design system. Tokens, type, glass, objects, motion.
   One family: Geist. The accent defaults to ink; a company's brand accent overrides --accent (build.mjs). Photos carry the colour. */

:root {
  --ink: #0a0c0e;
  --ink-2: #16191d;
  --ink-3: #23272c;
  --paper: #f7f6f2;
  --paper-2: #efede7;
  --card: #ffffff;
  --muted: #676b72;
  --muted-2: #9a9ea5;
  --line: rgba(10, 12, 14, 0.09);
  --line-strong: rgba(10, 12, 14, 0.16);
  --on-dark: #f5f4f0;
  --on-dark-muted: rgba(245, 244, 240, 0.64);
  --line-dark: rgba(245, 244, 240, 0.14);
  --ok: #1f7a4d;

  /* Brand accent: ink buttons, active chips, seg controls. build.mjs overrides these per company (contrast-checked on paper). */
  --accent: var(--ink);
  --accent-hover: var(--ink-3);
  /* Photo placeholders (shown until the photo paints) and selection: per company, neutral by default. */
  --hero-bg: #1d2328;
  --stage-bg: #1d2328;
  --band-bg: #1d2328;
  --selection: var(--accent);
  /* Hero photo framing (object-position), per company */
  --hero-pos: 50% 50%;
  --hero-pos-tall: 50% 50%;
  /* Logo height multiplier for marks that read small at the default height */
  --logo-k: 1;

  --font-display: 'Geist', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Geist', 'Helvetica Neue', Arial, sans-serif;

  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-pill: 999px;

  --shadow-card: 0 1px 0 rgba(10, 12, 14, 0.03), 0 12px 32px -16px rgba(10, 12, 14, 0.22);
  --shadow-lift: 0 2px 0 rgba(10, 12, 14, 0.03), 0 24px 48px -20px rgba(10, 12, 14, 0.32);
  --shadow-float: 0 20px 56px -18px rgba(0, 0, 0, 0.55);
  --shadow-sheet: 0 -18px 48px -24px rgba(10, 12, 14, 0.35);

  /* Liquid glass, dark: anything that floats over photography. Always carries a scrim. */
  --glass-dark-bg: rgba(14, 16, 19, 0.38);
  --glass-dark-edge: inset 0 0 0 0.5px rgba(255, 255, 255, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.26);
  /* Liquid glass, light: header and bars over paper content. */
  --glass-light-bg: rgba(247, 246, 242, 0.74);
  --glass-light-edge: inset 0 0 0 0.5px rgba(10, 12, 14, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  --glass-blur: blur(22px) saturate(180%);

  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --ease-sheet: cubic-bezier(0.32, 0.72, 0, 1);

  --gutter: 16px;
  --section: 72px;
  --maxw: 1320px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --topbar-h: 60px;
  --tabbar-h: 64px;
}
@media (min-width: 900px) {
  :root { --gutter: 40px; --section: 128px; --topbar-h: 76px; }
}
@media (min-width: 1600px) {
  :root { --gutter: 56px; --maxw: 1520px; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: auto; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, picture, svg, video, canvas { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 6px; }

/* ---------- Type ---------- */
.display, h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-stretch: 108%;
  font-variation-settings: 'wdth' 108;
  letter-spacing: -0.028em;
  line-height: 1.02;
  margin: 0;
  text-wrap: balance;
}
.h1 { font-size: clamp(36px, 5.2vw, 76px); }
.h2 { font-size: clamp(30px, 3.6vw, 56px); }
.h3 { font-size: clamp(21px, 1.7vw, 26px); letter-spacing: -0.02em; line-height: 1.12; }
.lede { font-size: clamp(17px, 1.25vw, 20px); color: var(--muted); line-height: 1.5; max-width: 52ch; margin: 0; text-wrap: pretty; }
.eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.num { font-variant-numeric: tabular-nums; }
.on-dark { color: var(--on-dark); }
.on-dark .lede, .on-dark .eyebrow { color: var(--on-dark-muted); }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section--ink { background: var(--ink); color: var(--on-dark); }
.section--paper2 { background: var(--paper-2); }
.stack > * + * { margin-top: var(--stack, 16px); }

/* ---------- Pills / buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: var(--r-pill);
  font-weight: 500; font-size: 15px; letter-spacing: -0.005em; white-space: nowrap;
  transition: transform 0.18s var(--ease-out), background-color 0.2s, box-shadow 0.2s, opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.btn:active { transform: scale(0.97); }
.btn--ink { background: var(--accent); color: var(--on-dark); box-shadow: 0 10px 24px -12px rgba(10, 12, 14, 0.6); }
.btn--ink:hover { background: var(--accent-hover); }
.btn--paper { background: var(--card); color: var(--ink); box-shadow: var(--shadow-card); }
.btn--line { box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--ink); }
.btn--line:hover { background: rgba(10, 12, 14, 0.04); }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled='true'] { opacity: 0.4; pointer-events: none; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- Liquid glass ---------- */
.glass {
  position: relative;
  isolation: isolate;
  background: var(--glass-dark-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-dark-edge), var(--shadow-float);
  color: var(--on-dark);
}
/* specular highlight along the top rim */
.glass::before {
  content: '';
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 42%);
}
.glass--light {
  background: var(--glass-light-bg);
  box-shadow: var(--glass-light-edge), 0 16px 40px -22px rgba(10, 12, 14, 0.4);
  color: var(--ink);
}
.glass--light::before { background: linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 50%); }
/* Chromium-only refraction layer is attached by js/glass.js via data-refract. */
.glass[data-refract-on] { -webkit-backdrop-filter: var(--refract) blur(10px) saturate(175%); backdrop-filter: var(--refract) blur(10px) saturate(175%); }

.icon-btn {
  width: 44px; height: 44px; border-radius: 50%;
  display: inline-grid; place-items: center; flex: none;
  transition: transform 0.18s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.icon-btn:active { transform: scale(0.92); }
.icon-btn svg { width: 20px; height: 20px; }

/* ---------- Objects ---------- */
.card {
  background: var(--card);
  border-radius: var(--r-md);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-card);
}
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 500;
  background: var(--card); box-shadow: inset 0 0 0 1px var(--line);
}
.on-dark .chip, .chip--dark { background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px var(--line-dark); color: var(--on-dark); }
.chip svg { width: 15px; height: 15px; }

/* Segmented control (durations, locations) */
.seg {
  display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding: 4px; gap: 4px; border-radius: var(--r-pill);
  background: rgba(10, 12, 14, 0.06);
}
.seg button {
  min-height: 40px; padding: 0 16px; border-radius: var(--r-pill);
  font-weight: 500; font-size: 14px; color: var(--muted);
  transition: background-color 0.25s var(--ease-out), color 0.2s, box-shadow 0.25s;
}
.seg button[aria-pressed='true'] { background: var(--card); color: var(--accent); box-shadow: 0 1px 2px rgba(10, 12, 14, 0.08), 0 6px 14px -8px rgba(10, 12, 14, 0.3); }
.seg button[disabled] { opacity: 0.35; pointer-events: none; }
.seg--dark { background: rgba(255, 255, 255, 0.1); }
.seg--dark button { color: var(--on-dark-muted); }
.seg--dark button[aria-pressed='true'] { background: rgba(255, 255, 255, 0.92); color: var(--accent); }

/* Press feedback on any tappable object */
.pressable { transition: transform 0.2s var(--ease-out); -webkit-tap-highlight-color: transparent; }
.pressable:active { transform: scale(0.975); }

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

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