/* Liquid Tabs — step 2: the glass lens follows the finger */
:root {
  --stage: #0C0D10;
  --ink: #F4F1EC;
  --dim: #8B8F99;
  --accent: #FF6B35;
  --sans: 'Plus Jakarta Sans', system-ui, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
  --bar-w: min(344px, 86vw);
  --bar-h: 76px;
  --pad: 7px;
  --tabs: 5;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--stage);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none; user-select: none;
  overflow: hidden;
}

/* ---- the stage ---- */
.stage {
  position: relative; height: 100dvh; display: grid; place-items: center;
  background:
    radial-gradient(60% 34% at 50% 54%, rgba(255, 107, 53, .15), transparent 70%),
    radial-gradient(90% 60% at 50% 0%, #1A1C22 0%, transparent 70%),
    var(--stage);
}
.stage::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}
.title { position: absolute; top: 12dvh; left: 0; right: 0; text-align: center; }
.series { margin: 0 0 14px; font-size: 11px; font-weight: 600; letter-spacing: .34em; text-transform: uppercase; color: var(--dim); }
.series b { color: var(--accent); font-weight: 800; }
.title h1 { margin: 0; font-size: clamp(44px, 14vw, 60px); font-weight: 800; line-height: .9; letter-spacing: -.045em; }
.title h1 em { font-family: var(--serif); font-weight: 400; font-style: italic; letter-spacing: -.02em; color: var(--accent); }

/* ---- the tab bar: smoked glass, icons centred ---- */
.tabbar {
  position: relative; touch-action: none;
  width: var(--bar-w); height: var(--bar-h);
  display: grid; grid-template-columns: repeat(var(--tabs), 1fr);
  padding: var(--pad); border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .03));
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, .09);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .12),
    inset 0 -1px 0 rgba(0, 0, 0, .35),
    0 30px 60px -20px rgba(0, 0, 0, .8),
    0 12px 24px -12px rgba(0, 0, 0, .6);
}
.tab {
  display: grid; place-items: center;
  min-width: 44px; padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--dim);
}
.tab svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tab .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }   /* read by screen readers, not shown */
.tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -6px; border-radius: 999px; }

/* ---- the lens: clear glass on the selected tab ---- */
.lens {
  position: absolute; top: 0; left: 0; z-index: 2; pointer-events: none;
  border-radius: 999px; overflow: hidden;
  background:
    radial-gradient(120% 80% at 30% 8%, rgba(255, 255, 255, .26), rgba(255, 255, 255, .05) 55%, rgba(255, 255, 255, 0) 100%),
    radial-gradient(80% 60% at 50% 112%, rgba(255, 107, 53, .42), transparent 70%),
    rgba(255, 255, 255, .04);
  box-shadow:
    inset 0 1.5px 1px rgba(255, 255, 255, .55),
    inset 0 -2px 3px rgba(255, 107, 53, .35),
    inset 0 0 0 1px rgba(255, 255, 255, .14),
    0 10px 26px -8px rgba(255, 107, 53, .55),
    0 4px 10px -4px rgba(0, 0, 0, .6);
  will-change: transform, width, height;
}
.lens::after {                          /* the specular glint, above the magnified copy */
  content: ''; position: absolute; top: 8%; left: 20%; width: 36%; height: 17%;
  border-radius: 999px; background: linear-gradient(180deg, rgba(255, 255, 255, .65), rgba(255, 255, 255, 0));
}

/* ---- the touch circle: where the finger is, only while it is down ---- */
.touch {
  position: fixed; top: 0; left: 0; z-index: 10; width: 30px; height: 30px; margin: -15px 0 0 -15px;
  border-radius: 50%; pointer-events: none; opacity: 0;
  border: 1.5px solid rgba(255, 255, 255, .9); background: rgba(255, 255, 255, .14);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, .06);
  transition: opacity .12s;
}
.touch.is-on { opacity: 1; }

@media (prefers-reduced-motion: reduce) { .touch { transition: none; } }

.tab { position: relative; z-index: 3; transition: color .2s; }
.tab[aria-selected="true"] { color: var(--ink); }
