/* ============================================================================
   FRAMING site v02, tokens and Liquid Glass primitives
   ----------------------------------------------------------------------------
   Based on tokens.css from the Liquid Glass skill (R-2026-002).
   MIT License, Copyright (c) 2026 Xenit (Mehmet). Full text in
   js/LICENSE-liquid-glass.txt. Colours, fonts and tint swapped for the
   approved v02 spec (18 Nov 2026). No dark mode: the dark blocks are removed.

   Fonts live in one place (this file, "type" below), so the headline font can
   change later without touching any page.
   ========================================================================== */

@font-face {
  font-family: 'Inter';
  src: url('../fonts/InterVariable-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* --- ground and surfaces (look B) -------------------------------------- */
  --ground:        #f3f1ec;   /* warm page */
  --ground-2:      #eeebe4;   /* a touch deeper, for the ambient ground */
  --surface:       #ffffff;   /* cards */
  --surface-2:     #f8f7f3;
  --dark:          #141414;   /* call to action block, players */
  --dark-2:        #1f1f1f;   /* raised on dark */

  /* --- text --------------------------------------------------------------- */
  --ink:           #141414;   /* 16.3:1 on ground */
  --ink-2:         #55524d;   /* 6.9:1 on ground, 7.8:1 on white */
  --on-dark:       #f3f1ec;
  --on-dark-2:     #cfccc6;

  /* --- hairlines (no 1px solid borders) ---------------------------------- */
  --separator:     rgba(20, 20, 20, 0.12);
  --fill:          rgba(20, 20, 20, 0.06);

  /* --- tint: the tungsten accent, rationed -------------------------------- */
  --tint:          #b83a0b;   /* 5.1:1 on ground, white on it 5.8:1 */
  --tint-hover:    #9c3008;
  --on-tint:       #ffffff;

  /* --- Liquid Glass, regular ---------------------------------------------- */
  --glass:         rgba(252, 252, 254, 0.72);
  --glass-thick:   rgba(250, 249, 246, 0.96);   /* reduced transparency, no blur */
  --glass-rim:     rgba(255, 255, 255, 0.85);
  --glass-rim-2:   rgba(255, 255, 255, 0.35);
  --glass-edge:    rgba(0, 0, 0, 0.06);
  --glass-shadow:  0 8px 26px rgba(0, 0, 0, 0.10), 0 1px 3px rgba(0, 0, 0, 0.06);
  --glass-blur:    saturate(180%) blur(28px);
  --glass-sheen:   0.30;
  --rim-1:         rgba(255, 255, 255, 0.90);
  --rim-2:         rgba(255, 255, 255, 0.16);
  --rim-3:         rgba(255, 255, 255, 0.55);
  --glass-refract: rgba(252, 252, 254, 0.42);

  /* --- content layer: shadows, never glass -------------------------------- */
  --card-shadow:   0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
  --card-shadow-h: 0 2px 4px rgba(0, 0, 0, 0.06), 0 14px 34px rgba(0, 0, 0, 0.09);

  /* --- radii (nested so the visual gap stays even; our rule, not Apple's) - */
  --r-card:  20px;
  --r-media: 12px;   /* media inside a card */
  --r-tile:  14px;   /* video tiles */
  --r-block: 28px;   /* the dark contact block */
  --r-pill:  999px;

  /* --- type: the one place fonts are set ---------------------------------- */
  --font:         'Inter', system-ui, sans-serif;
  --font-display: 'Inter', system-ui, sans-serif;   /* opsz 32 = Inter Display */

  --t-display: clamp(46px, 6.2vw, 92px);
  --t-section: clamp(36px, 4.4vw, 64px);
  --t-card:    clamp(26px, 2.4vw, 34px);
  --t-lead:    clamp(18px, 1.5vw, 20px);
  --t-body:    17px;
  --t-label:   clamp(13px, 1vw, 14px);
  --t-small:   12px;

  --tr-display: -0.035em;
  --tr-section: -0.03em;
  --tr-card:    -0.022em;
  --tr-body:    -0.012em;

  /* --- motion ------------------------------------------------------------- */
  --ease-out:  cubic-bezier(0.22, 1, 0.36, 1);
  --dur:       240ms;
  --dur-press: 120ms;

  /* --- layout ------------------------------------------------------------- */
  --page-max: 1320px;
  --pad: max(20px, 5vw);
  --section-gap: 96px;
  --nav-h: 60px;
  --nav-top: 16px;
}

@media (max-width: 700px) {
  :root { --section-gap: 64px; --nav-h: 56px; --nav-top: 12px; }
}

/* ============================================================================
   Liquid Glass, functional layer only. Never on a content card.
   ========================================================================== */

.glass {
  position: relative;
  isolation: isolate;
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow:
    inset 0 0.5px 0 var(--glass-rim),
    inset 0 0 0 0.5px var(--glass-rim-2),
    var(--glass-shadow);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass, .glass-clear { background: var(--glass-thick); }
  .glass-clear { background: rgba(20, 20, 20, 0.78); }
}

.glass::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg,
    rgba(255, 255, 255, var(--glass-sheen)) 0%,
    rgba(255, 255, 255, calc(var(--glass-sheen) * 0.2)) 34%,
    transparent 62%);
}

.glass::before,
.glass-clear::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  padding: 1px;
  pointer-events: none;
  background: linear-gradient(135deg, var(--rim-1) 0%, var(--rim-2) 45%, var(--rim-3) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}

.glass.is-refracting { background-color: var(--glass-refract); }
.glass.glass-text.is-refracting { background-color: var(--glass); }

.lg-refract-mirror,
.lg-refract-tint {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}
.lg-refract-bend { position: absolute; inset: 0; }
.lg-refract-tint { background-color: var(--glass-refract); }
.glass-clear > .lg-refract-tint { background-color: rgba(255, 255, 255, 0.10); }
.glass-text > .lg-refract-tint { background-color: var(--glass); }
.glass-dim > .lg-refract-tint { background-image: linear-gradient(rgba(0,0,0,.35), rgba(0,0,0,.35)); }
.glass-clear.is-refracting { background-color: rgba(255, 255, 255, 0.10); }

/* Clear glass: only over video. Always with the 35% dark layer here, since
   our frames are often bright. */
.glass-clear {
  position: relative;
  isolation: isolate;
  background-color: rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
}
.glass-dim { background-image: linear-gradient(rgba(0,0,0,.35), rgba(0,0,0,.35)); }

/* ============================================================================
   Accessibility fallbacks
   ========================================================================== */

@media (prefers-reduced-transparency: reduce) {
  .glass, .glass-clear {
    background: var(--glass-thick);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .glass-clear { background: rgba(20, 20, 20, 0.82); }
  .glass::after { display: none; }
  .glass.is-refracting { background: var(--glass-thick); }
}

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