:root {
  --bg: #f2f2f7;
  --fg: #0b0b0f;
  --muted: #5b5b66;
  --glass-fg: #0b0b0f;
  --accent: #0a84ff;
  --tint: 0.06;
  --spring: cubic-bezier(.3, 1.55, .45, 1);
  color-scheme: light;
}
html.dark {
  --bg: #050507;
  --fg: #f5f5f7;
  --muted: #a1a1aa;
  --glass-fg: #fff;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; background: var(--bg); color: var(--fg); }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .4s, color .4s;
}
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ------------------------------------------------------------------ */
/* Glass base material                                                  */
/* ------------------------------------------------------------------ */
[data-glass] {
  background: rgba(255, 255, 255, var(--tint));
  color: var(--glass-fg);
  box-shadow:
    0 14px 40px -14px rgba(0, 0, 0, .35),
    0 2px 8px rgba(0, 0, 0, .08),
    inset 0 0 0 .5px rgba(255, 255, 255, .28);
}
html.dark [data-glass] {
  background: rgba(10, 10, 14, calc(var(--tint) * 2));
  box-shadow:
    0 14px 40px -14px rgba(0, 0, 0, .7),
    inset 0 0 0 .5px rgba(255, 255, 255, .18);
}

/* Adaptive foreground: set by app.js when the glass sits over dark content. */
[data-glass].on-dark { --glass-fg: #fff; color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, .25); }
.on-dark .tab { color: #fff; }
.on-dark .tab[aria-selected="true"] { color: #64d2ff; }

/* Fallback for browsers that can't run SVG filters in backdrop-filter. */
html.lg-fallback [data-glass] {
  -webkit-backdrop-filter: blur(8px) saturate(180%);
  backdrop-filter: blur(8px) saturate(180%);
}
html.lg-fallback [data-glass]::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow:
    inset 1.5px 1.5px 1px -1px rgba(255, 255, 255, .95),
    inset -1.5px -1.5px 1px -1px rgba(255, 255, 255, .55),
    inset 0 0 14px rgba(255, 255, 255, .18);
}

/* ------------------------------------------------------------------ */
/* Page content                                                         */
/* ------------------------------------------------------------------ */
.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 50% at 20% 25%, #ff6a3d 0%, transparent 60%),
    radial-gradient(50% 60% at 85% 30%, #7a5cff 0%, transparent 60%),
    radial-gradient(60% 60% at 60% 90%, #00c2ff 0%, transparent 60%),
    linear-gradient(135deg, #1a1033, #0b1a3a);
}
.blob {
  position: absolute;
  width: 46vmax;
  height: 46vmax;
  border-radius: 50%;
  filter: blur(40px);
  opacity: .85;
  mix-blend-mode: screen;
  animation: float 18s ease-in-out infinite alternate;
  animation-play-state: paused;
}
body.animate .blob { animation-play-state: running; }
.b1 { background: #ff2d55; top: -10%; left: -8%; }
.b2 { background: #ffcc00; top: 35%; left: 55%; width: 32vmax; height: 32vmax; animation-duration: 22s; animation-delay: -6s; }
.b3 { background: #34c759; top: 60%; left: 5%; width: 30vmax; height: 30vmax; animation-duration: 26s; animation-delay: -12s; }
.b4 { background: #5856d6; top: -15%; left: 60%; animation-duration: 20s; animation-delay: -3s; }
@keyframes float {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(12vw, 8vh) scale(1.15); }
  100% { transform: translate(-8vw, 14vh) scale(.9); }
}
@media (prefers-reduced-motion: reduce) { .blob { animation: none; } }

.hero-inner { text-align: center; padding: 120px 24px 160px; max-width: 980px; }
.eyebrow { text-transform: uppercase; letter-spacing: .2em; font-size: 13px; font-weight: 600; opacity: .85; margin: 0 0 12px; }
.hero h1 {
  margin: 0;
  font-size: clamp(84px, 17vw, 240px);
  line-height: .86;
  font-weight: 800;
  letter-spacing: -.055em;
  text-shadow: 0 6px 40px rgba(0, 0, 0, .25);
}
.lede { font-size: clamp(17px, 2vw, 22px); line-height: 1.45; max-width: 640px; margin: 28px auto 0; opacity: .92; }
.lede code { font: 600 .9em ui-monospace, "SF Mono", Menlo, monospace; background: rgba(255,255,255,.15); padding: 2px 6px; border-radius: 6px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; margin-top: 36px; }
.hint { margin-top: 28px; font-size: 14px; opacity: .7; }

.glass-btn {
  position: relative;
  border: 0;
  height: 56px;
  padding: 0 30px;
  border-radius: 28px;
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .3);
  transition: transform .45s var(--spring);
}
.glass-btn.round { width: 56px; padding: 0; display: grid; place-items: center; }
.glass-btn:active { transform: scale(1.08); }
.hero .glass-btn { color: #fff; }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 20px;
  padding: 80px max(20px, 4vw);
  max-width: 1400px;
  margin: 0 auto;
}
.photo {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 3;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(135deg, #ff9f0a, #ff375f 50%, #5e5ce6);
}
.photo:nth-child(2n) { background: linear-gradient(135deg, #64d2ff, #30d158); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo figcaption {
  position: absolute;
  left: 16px;
  bottom: 16px;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .35);
}

.type { max-width: 1100px; margin: 0 auto; padding: 80px max(20px, 4vw); }
.type h2 { font-size: clamp(44px, 7vw, 96px); letter-spacing: -.04em; line-height: .95; margin: 0 0 32px; }
.type p { font-size: clamp(22px, 2.6vw, 34px); line-height: 1.35; font-weight: 500; color: var(--muted); margin: 0 0 24px; }
.type p.mono { font: 500 clamp(16px, 2vw, 22px) ui-monospace, "SF Mono", Menlo, monospace; color: var(--fg); word-break: break-all; }

.stripes {
  height: 340px;
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,.85) 0 14px, transparent 14px 28px),
    linear-gradient(90deg, #ff375f, #ff9f0a, #ffd60a, #30d158, #64d2ff, #0a84ff, #bf5af2);
}
.stripes span {
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 700;
  color: #fff;
  background: #000;
  padding: 8px 18px;
  border-radius: 12px;
}

.swatches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0;
  padding: 0;
}
.swatches div { aspect-ratio: 1; background: var(--c); }
.swatches .checker {
  background: repeating-conic-gradient(#000 0 25%, #fff 0 50%) 0 0 / 28px 28px;
}

.foot { text-align: center; padding: 60px 20px 160px; color: var(--muted); font-size: 14px; }

/* ------------------------------------------------------------------ */
/* Navbar                                                               */
/* ------------------------------------------------------------------ */
.navbar {
  position: fixed;
  z-index: 30;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: min(760px, calc(100% - 28px));
  height: 60px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 12px 0 22px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; color: inherit; text-decoration: none; letter-spacing: -.01em; }
.brand .dot { width: 18px; height: 18px; border-radius: 50%; background: conic-gradient(from 200deg, #ff375f, #ffd60a, #30d158, #64d2ff, #bf5af2, #ff375f); }
.links { display: flex; gap: 4px; margin-left: auto; }
.links a { color: inherit; text-decoration: none; font-size: 15px; font-weight: 500; padding: 8px 14px; border-radius: 18px; opacity: .85; }
.links a:hover { background: rgba(255, 255, 255, .18); opacity: 1; }
.badge { font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 14px; background: rgba(52, 199, 89, .22); white-space: nowrap; }
html.lg-fallback .badge { background: rgba(255, 159, 10, .28); }
@media (max-width: 640px) { .links { display: none; } .badge { margin-left: auto; } }

/* ------------------------------------------------------------------ */
/* Draggable lens                                                       */
/* ------------------------------------------------------------------ */
.lens {
  position: fixed;
  z-index: 40;
  left: 0;
  top: 0;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  cursor: grab;
  touch-action: none;
  will-change: transform;
  background: rgba(255, 255, 255, calc(var(--tint) * .4));
}
.lens.grabbing { cursor: grabbing; }

/* ------------------------------------------------------------------ */
/* Control panel                                                        */
/* ------------------------------------------------------------------ */
.panel {
  position: fixed;
  z-index: 25;
  right: 16px;
  top: 90px;
  width: 290px;
  border-radius: 30px;
  padding: 14px 20px 18px;
  background: rgba(255, 255, 255, calc(var(--tint) + .22));
}
html.dark .panel { background: rgba(28, 28, 32, calc(var(--tint) + .38)); }
.panel-head { display: flex; align-items: center; justify-content: space-between; height: 32px; }
.panel-head strong { font-size: 17px; letter-spacing: -.01em; }
.icon-btn { width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(120, 120, 128, .2); display: grid; place-items: center; cursor: pointer; }
.icon-btn svg { transition: transform .4s var(--spring); }
.panel.collapsed .icon-btn svg { transform: rotate(180deg); }
.panel.collapsed .panel-body { display: none; }
.panel-body { padding-top: 10px; }
.row { display: flex; align-items: center; justify-content: space-between; height: 44px; font-size: 15px; font-weight: 500; }
.ctl { margin-top: 10px; }
.ctl-head { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.ctl-head output { font-variant-numeric: tabular-nums; opacity: .6; }
@media (max-width: 640px) {
  .panel { top: auto; bottom: 104px; right: 12px; left: 12px; width: auto; max-height: 55vh; overflow-y: auto; }
}

/* iOS 26 style switch — thumb turns into a glass lens while pressed */
.lg-switch {
  position: relative;
  flex: none;
  width: 64px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: rgba(120, 120, 128, .32);
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color .3s;
}
.lg-switch[aria-checked="true"] { background: #34c759; }
.lg-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 38px;
  height: 24px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .18), 0 0 0 .5px rgba(0, 0, 0, .04);
  transition: transform .5s var(--spring), background-color .22s;
  pointer-events: none;
}
.lg-switch[aria-checked="true"] .lg-switch-thumb { transform: translateX(22px); }
.lg-switch.pressed .lg-switch-thumb { background: rgba(255, 255, 255, .04); transform: scale(1.45, 1.6); }
.lg-switch.pressed[aria-checked="true"] .lg-switch-thumb { transform: translateX(22px) scale(1.45, 1.6); }

/* Slider with glass thumb */
.lg-slider { --p: .5; --tw: 38px; position: relative; height: 30px; cursor: pointer; touch-action: none; }
.lg-slider-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 6px;
  margin-top: -3px;
  border-radius: 3px;
  overflow: hidden;
  background: rgba(120, 120, 128, .28);
}
.lg-slider-fill { height: 100%; width: calc(var(--p) * (100% - var(--tw)) + var(--tw) / 2); background: var(--accent); }
.lg-slider-thumb {
  position: absolute;
  top: 3px;
  left: calc(var(--p) * (100% - var(--tw)));
  width: var(--tw);
  height: 24px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .18), 0 0 0 .5px rgba(0, 0, 0, .04);
  transition: transform .5s var(--spring), background-color .22s;
}
.lg-slider.pressed .lg-slider-thumb { background: rgba(255, 255, 255, .04); transform: scale(1.5, 1.65); }

/* ------------------------------------------------------------------ */
/* Tab bar                                                              */
/* ------------------------------------------------------------------ */
.tabbar-wrap {
  position: fixed;
  z-index: 30;
  bottom: max(18px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
}
.tabbar {
  position: relative;
  display: flex;
  padding: 6px;
  border-radius: 34px;
  touch-action: none;
  user-select: none;
}
.tab {
  width: 78px;
  height: 56px;
  border: 0;
  border-radius: 28px;
  background: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  color: var(--glass-fg);
  transition: color .25s;
}
.tab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tab[aria-selected="true"] { color: var(--accent); }
.tab-indicator {
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 28px;
  pointer-events: none;
  transform-origin: center;
  will-change: transform;
  background: rgba(120, 120, 128, .14);
  box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .3);
}
