/* ============================================================================
   Taskable — landing page
   Windows 11 Fluent on a macOS desktop: Mica surfaces, 4/8 px corners, the accent
   indicator, the logo's blues. Theme resolved by script.js via [data-theme-resolved].
   ============================================================================ */

:root {
  --accent: #0067c0;            /* Windows 11 accent */
  --on-accent: #ffffff;
  --sky: #6fd2ff;               /* logo light blade */
  --deep: #0b5fbe;              /* logo dark blade */

  --bg: #f3f3f3;                /* Mica */
  --surface: #fbfbfb;
  --surface-2: #ffffff;
  --text: #1b1b1b;
  --text-dim: #5d5d5d;
  --hairline: rgba(0, 0, 0, 0.08);
  --hover: rgba(0, 0, 0, 0.05);
  --pressed: rgba(0, 0, 0, 0.03);

  --bar: rgba(238, 240, 244, 0.78);       /* the app's taskbar tint over blur */
  --bar-border: rgba(0, 0, 0, 0.08);
  --active: rgba(255, 255, 255, 0.75);
  --active-border: rgba(0, 0, 0, 0.06);
  --indicator: #7a7a7a;
  --menu: rgba(243, 243, 243, 0.88);
  --field: rgba(255, 255, 255, 0.92);
  --nav-bg: rgba(243, 243, 243, 0.72);

  --desk-a: #bfe3ff;            /* Bloom-like wallpaper */
  --desk-b: #4d9cf0;
  --desk-c: #0b3e91;
  --desk-glow: rgba(255, 255, 255, 0.55);
  --win-chrome: #ffffff;
  --win-body: #f3f3f3;
  --win-line: #dcdfe5;
}

:root[data-theme-resolved="dark"] {
  --accent: #4cc2ff;
  --on-accent: #1b1b1b;

  --bg: #202020;
  --surface: #2b2b2b;
  --surface-2: #323232;
  --text: #ffffff;
  --text-dim: #b0b0b0;
  --hairline: rgba(255, 255, 255, 0.09);
  --hover: rgba(255, 255, 255, 0.06);
  --pressed: rgba(255, 255, 255, 0.04);

  --bar: rgba(28, 28, 28, 0.78);
  --bar-border: rgba(255, 255, 255, 0.08);
  --active: rgba(255, 255, 255, 0.09);
  --active-border: rgba(255, 255, 255, 0.05);
  --indicator: #9a9a9a;
  --menu: rgba(32, 32, 32, 0.88);
  --field: rgba(44, 44, 44, 0.92);
  --nav-bg: rgba(32, 32, 32, 0.72);

  --desk-a: #14335f;
  --desk-b: #0f57a8;
  --desk-c: #041a3d;
  --desk-glow: rgba(120, 190, 255, 0.35);
  --win-chrome: #2b2b2b;
  --win-body: #202020;
  --win-line: #3a3a3a;
}

/* ---- Base ---- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: "Source Sans 3", "Segoe UI Variable Text", "Segoe UI", -apple-system, system-ui, sans-serif;
  font-size: 17px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color .4s ease, color .4s ease;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
svg { display: block; }

h1, h2, h3 { font-weight: 600; letter-spacing: -.025em; line-height: 1.05; }

/* Fluent buttons: 4 px corners, accent fill */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  height: 38px; padding: 0 18px;
  border-radius: 5px;
  font-weight: 600; font-size: .96rem;
  white-space: nowrap;
  transition: background-color .15s ease, transform .15s ease, box-shadow .2s ease;
}
.btn:active { transform: scale(.98); }
.btn-lg { height: 46px; padding: 0 24px; font-size: 1.05rem; }
.btn-steam {
  background: var(--accent); color: var(--on-accent);
  box-shadow: 0 8px 20px -10px var(--accent);
}
.btn-steam:hover { filter: brightness(1.08); box-shadow: 0 12px 26px -10px var(--accent); }
.steam-logo { width: 1.25em; height: 1.25em; flex: none; margin-left: -.1em; }
:root[data-theme-resolved="dark"] .steam-logo { filter: brightness(0); }

/* App icons: macOS-style squircles carrying a gradient and a glyph. --box sizes the
   squircle; the glyph inside stays proportionally smaller. */
.ic {
  --box: 30px;
  display: inline-grid; place-items: center; flex: none;
  width: var(--box); height: var(--box); border-radius: 22%;
  background: linear-gradient(160deg, var(--g1), var(--g2));
  box-shadow: 0 1px 2px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.35);
  font-size: calc(var(--box) * .58); line-height: 1; font-style: normal;
}

/* ============================================================================
   Nav
   ============================================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; gap: 1.5rem;
  height: 56px; padding: 0 clamp(1rem, 4vw, 2.5rem);
  background: var(--nav-bg);
  backdrop-filter: saturate(160%) blur(22px);
  -webkit-backdrop-filter: saturate(160%) blur(22px);
  border-bottom: 1px solid var(--hairline);
  transition: background-color .4s ease, border-color .4s ease, box-shadow .3s ease;
}
.nav-brand { display: flex; align-items: center; gap: .55rem; font-weight: 600; font-size: 1.05rem; }
.nav-logo { width: 28px; height: 28px; }
.nav-links { display: flex; gap: 1.5rem; margin-left: auto; font-size: .95rem; }
.nav-links a { color: var(--text-dim); padding: .2rem 0; position: relative; }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: .75rem; margin-left: .5rem; }
.theme-toggle {
  display: flex; align-items: center; gap: .45rem;
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: 5px; padding: 0 .75rem; height: 34px; font-size: .88rem;
  transition: border-color .15s;
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle-icon { width: 12px; height: 12px; border-radius: 50%; background: linear-gradient(135deg, var(--sky), var(--deep)); }
@media (max-width: 860px) { .nav-links { display: none; } }
@media (max-width: 520px) { .nav .btn-steam span { display: none; } .nav .btn-steam { padding: 0 12px; } }

/* ============================================================================
   Hero: a desktop with the taskbar along its bottom edge
   ============================================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding: clamp(6rem, 14vh, 9rem) 1.25rem 0;
  overflow: hidden;
}
.wallpaper {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(165deg, var(--desk-a) 0%, var(--desk-b) 55%, var(--desk-c) 100%);
  transition: background .4s ease;
}
.ribbon {
  position: absolute; border-radius: 50%; filter: blur(60px); opacity: .9;
}
.r1 { width: 70vw; height: 42vh; left: -12vw; top: 36vh; background: radial-gradient(ellipse at center, var(--desk-glow), transparent 68%); transform: rotate(-18deg); }
.r2 { width: 60vw; height: 36vh; right: -14vw; top: 14vh; background: radial-gradient(ellipse at center, var(--sky), transparent 66%); opacity: .55; transform: rotate(14deg); }
.r3 { width: 50vw; height: 30vh; left: 28vw; bottom: 6vh; background: radial-gradient(ellipse at center, var(--deep), transparent 66%); opacity: .5; transform: rotate(-8deg); }

.hero-copy {
  position: relative; z-index: 1;
  max-width: 860px; text-align: center;
  color: #fff;
  text-shadow: 0 2px 20px rgba(0, 30, 80, .35);
  margin-bottom: clamp(9rem, 22vh, 15rem);   /* room for the Start menu to open */
  transition: opacity .25s ease;
}
/* while the Start menu is up it's the thing to look at */
.hero.menu-open .hero-copy { opacity: .28; }
.hero-copy h1 {
  font-size: clamp(2.4rem, 6.6vw, 4.9rem);
  font-weight: 700; letter-spacing: -.03em; line-height: 1.02;
}
.hero-copy p {
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  max-width: 640px; margin: 1.3rem auto 0;
  color: rgba(255,255,255,.92);
}
.hero-cta { display: flex; flex-direction: column; align-items: center; gap: .9rem; margin-top: 2rem; }
.hero-cta .btn-steam { background: #fff; color: var(--deep); box-shadow: 0 10px 30px -10px rgba(0,20,60,.6); }
.hero-cta .btn-steam:hover { filter: none; background: #f4f9ff; }
.hero-cta .steam-logo { filter: none; }
.hero-hint { font-size: .9rem; color: rgba(255,255,255,.8); text-shadow: none; }

/* The desk holds the taskbar, its bubble and the Start menu, in the hero's coordinate space */
.desk { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.desk > * { pointer-events: auto; }

.taskbar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 48px;
  background: var(--bar);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-top: 1px solid var(--bar-border);
  transition: background-color .4s ease;
}
/* the app's edge shadow, cast upward onto the desktop */
.taskbar::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 14px; pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,.12), transparent);
}
.tb-center {
  position: absolute; left: 50%; top: 0; bottom: 0; transform: translateX(-50%);
  display: flex; align-items: center; gap: 4px;
  max-width: calc(100% - 280px);
}
.tiles { display: flex; align-items: center; gap: 4px; }
.tile {
  position: relative; flex: none;
  width: 40px; height: 40px; border-radius: 5px;
  display: grid; place-items: center;
  border: 1px solid transparent;
  transition: background-color .12s ease, border-color .12s ease, transform .12s ease;
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.tile:hover { background: var(--hover); }
.tile:active { transform: scale(.94); background: var(--pressed); }
.tile.active { background: var(--active); border-color: var(--active-border); }
.tile .pinwheel { width: 23px; height: 23px; }
.tile .ic { --box: 30px; }
/* running indicator: a short capsule, wider and accent-colored when active */
.tile.running::after {
  content: ""; position: absolute; bottom: 1px; left: 50%; transform: translateX(-50%);
  width: 6px; height: 3px; border-radius: 2px; background: var(--indicator);
  transition: width .25s cubic-bezier(.2,.8,.2,1), background-color .25s;
}
.tile.running.active::after { width: 16px; background: var(--accent); }

/* grow-in / shrink-out: the tile's slot opens or closes along the bar */
.tile, .tb-search { max-width: 220px; opacity: 1; overflow: hidden; }
.tile.pre, .tb-search.pre, .mini-tile.pre { max-width: 0 !important; opacity: 0; margin-left: -4px; padding: 0; border-width: 0; }
.tile, .tb-search, .mini-tile {
  transition: max-width .32s cubic-bezier(.2,.8,.2,1), opacity .25s ease, margin .32s cubic-bezier(.2,.8,.2,1),
              background-color .12s ease, border-color .12s ease, transform .12s ease;
}

/* dragging: the tile becomes the spacer, a ghost follows the pointer */
.tile.dragging { background: var(--hover); border-color: var(--hairline); }
.tile.dragging .ic { visibility: hidden; }
.tile.dragging::after { display: none; }
.drag-ghost {
  position: absolute; z-index: 5; pointer-events: none;
  width: 36px; height: 36px; transform: translate(-50%, -50%) scale(1.1);
  filter: drop-shadow(0 6px 12px rgba(0,0,0,.3));
}
.drag-ghost .ic { --box: 36px; }

.tb-search {
  display: flex; align-items: center; gap: 8px; flex: none;
  width: 180px; height: 32px; padding: 0 12px;
  border-radius: 999px;
  background: var(--field); border: 1px solid var(--bar-border);
  color: var(--text-dim); font-size: 13px;
  transition: filter .15s;
}
.tb-search:hover { filter: brightness(.97); }
:root[data-theme-resolved="dark"] .tb-search:hover { filter: brightness(1.15); }
.tb-search svg { width: 14px; height: 14px; }
/* Narrow screens: the search pill goes, then the rightmost tiles, so the row never runs under the clock */
@media (max-width: 720px) { .tb-search { display: none; } .tb-center { max-width: calc(100% - 150px); } .tiles .tile:nth-child(n+7) { display: none; } }
@media (max-width: 480px) { .tiles .tile:nth-child(n+5) { display: none; } }

.tray {
  position: absolute; right: 10px; top: 0; bottom: 0;
  display: flex; align-items: center; gap: 2px;
}
.tray-btn {
  width: 28px; height: 40px; border-radius: 5px; display: grid; place-items: center;
  transition: background-color .12s;
}
.tray-btn:hover { background: var(--hover); }
.tray-btn svg { width: 16px; height: 16px; }
.tray-clock {
  display: flex; flex-direction: column; align-items: flex-end; justify-content: center;
  height: 40px; padding: 0 8px; border-radius: 5px;
  font-size: 12px; line-height: 1.25; font-variant-numeric: tabular-nums;
  transition: background-color .12s;
}
.tray-clock:hover { background: var(--hover); }
@media (max-width: 720px) { .tray-btn { display: none; } }

/* hover bubble */
.bubble {
  position: absolute; bottom: 58px; left: 0; transform: translate(-50%, 4px);
  padding: 6px 10px; border-radius: 8px;
  background: var(--menu); border: 1px solid var(--hairline);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  color: var(--text); font-size: 12px; white-space: nowrap;
  box-shadow: 0 8px 24px -8px rgba(0,0,0,.35);
  opacity: 0; pointer-events: none; z-index: 4;
  transition: opacity .15s ease, transform .15s ease;
}
.bubble.on { opacity: 1; transform: translate(-50%, 0); }

/* Start menu */
.startmenu {
  position: absolute; left: 50%; bottom: 60px; z-index: 3;
  width: min(640px, calc(100% - 2rem)); max-height: min(600px, calc(100% - 200px));
  transform: translate(-50%, 24px);
  display: flex; flex-direction: column;
  border-radius: 10px; overflow: hidden;
  background: var(--menu); border: 1px solid var(--hairline);
  backdrop-filter: blur(30px) saturate(150%); -webkit-backdrop-filter: blur(30px) saturate(150%);
  box-shadow: 0 30px 70px -20px rgba(0,0,0,.5);
  opacity: 0; pointer-events: none;
  transition: opacity .18s ease-out, transform .18s ease-out;
}
.startmenu.open { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.sm-search {
  display: flex; align-items: center; gap: 10px;
  margin: 26px 32px 14px; height: 36px; padding: 0 14px;
  border-radius: 999px; background: var(--field); border: 1px solid var(--hairline);
  position: relative;
}
.sm-search::after { content: ""; position: absolute; left: 18px; right: 18px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); }
.sm-glass { width: 15px; height: 15px; color: var(--text-dim); flex: none; }
.sm-search input { flex: 1; background: none; border: 0; outline: 0; font: inherit; font-size: 14px; color: var(--text); min-width: 0; }
.sm-search input::placeholder { color: var(--text-dim); }
.sm-body { padding: 0 32px 8px; overflow: auto; flex: 1; }
.sm-heading { font-size: 14px; font-weight: 600; letter-spacing: 0; margin: 10px 8px 6px; }
.sm-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.sm-app {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  height: 84px; padding-top: 12px; border-radius: 5px;
  font-size: 11px; line-height: 1.2; text-align: center;
  transition: background-color .12s;
}
.sm-app:hover { background: var(--hover); }
.sm-app .ic { --box: 36px; }
.sm-list { display: grid; gap: 1px; }
.sm-row { display: flex; align-items: center; gap: 12px; height: 36px; padding: 0 12px; border-radius: 5px; font-size: 13px; }
.sm-row:hover { background: var(--hover); }
.sm-row .ic { --box: 24px; }
.sm-letter { font-size: 13px; font-weight: 600; padding: 10px 12px 4px; }
.sm-empty { padding: 1.5rem 12px; color: var(--text-dim); font-size: 13px; }
.sm-footer {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; padding: 0 44px;
  background: rgba(0,0,0,.035); border-top: 1px solid var(--hairline);
}
:root[data-theme-resolved="dark"] .sm-footer { background: rgba(0,0,0,.18); }
.sm-user { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.avatar {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(180deg, var(--sky), var(--deep)); color: #fff; font-size: 11px; font-weight: 600;
}
.sm-power { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 5px; }
.sm-power svg { width: 17px; height: 17px; }
@media (max-width: 720px) { .sm-grid { grid-template-columns: repeat(4, 1fr); } .sm-search { margin: 18px 18px 10px; } .sm-body { padding: 0 18px 8px; } .sm-footer { padding: 0 24px; } }

/* ============================================================================
   Statement
   ============================================================================ */
.statement { max-width: 980px; margin: 0 auto; padding: clamp(6rem, 14vh, 11rem) clamp(1.25rem, 6vw, 4rem); text-align: center; }
.statement p { font-size: clamp(1.6rem, 4vw, 2.9rem); font-weight: 600; letter-spacing: -.03em; line-height: 1.15; }
.statement .dim { color: var(--text-dim); }

/* ============================================================================
   Feature sections: copy on the left, demo on the right
   ============================================================================ */
.feature {
  max-width: 1160px; margin: 0 auto;
  padding: clamp(4rem, 10vh, 7.5rem) clamp(1.25rem, 6vw, 4rem);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 6vw, 5rem); align-items: center;
}
@media (max-width: 880px) { .feature { grid-template-columns: 1fr; gap: 2.2rem; } }
.feature h2 {
  position: relative; padding-left: 1.1rem;
  font-size: clamp(2.6rem, 6.4vw, 4.8rem); font-weight: 600; letter-spacing: -.035em; line-height: 1;
  color: var(--accent);
}
/* the Fluent selection indicator: a short accent capsule; it draws to full height as the
   title scrolls in (--reveal is driven by script.js, 1 when static) */
.feature h2::before {
  content: ""; position: absolute; left: 0; top: .16em;
  width: 4px; height: calc(.72em * var(--reveal, 1)); border-radius: 2px; background: var(--accent);
}

/* Scroll-scrubbed title reveal: each word wipes in from the left, in turn, as the title rises
   through the viewport. script.js splits the words and sets the inline styles per frame. */
.scroll-title .w { display: inline-block; will-change: transform, opacity, clip-path; }
@media (prefers-reduced-motion: reduce) {
  .scroll-title .w { opacity: 1 !important; transform: none !important; clip-path: none !important; filter: none !important; }
}
.feature .lead { font-size: clamp(1.25rem, 2.3vw, 1.6rem); font-weight: 600; letter-spacing: -.015em; line-height: 1.2; margin-top: 1.2rem; max-width: 26ch; }
.feature .text { color: var(--text-dim); margin-top: .9rem; max-width: 56ch; font-size: 1.06rem; }
.points { list-style: none; margin-top: 1.3rem; display: grid; gap: .55rem; max-width: 56ch; }
.points li { position: relative; padding-left: 1.4rem; font-size: 1rem; }
/* bullets are the taskbar's running indicator */
.points li::before { content: ""; position: absolute; left: 0; top: .62em; width: 12px; height: 3px; border-radius: 2px; background: var(--accent); }
.hint { margin-top: 1.4rem; font-weight: 600; }
.hint a { color: var(--accent); }
.hint a:hover { text-decoration: underline; }

/* ---- Demo stages ---- */
.demo { width: 100%; }
.desk-demo {
  position: relative; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden;
  background: linear-gradient(165deg, var(--desk-a), var(--desk-b) 55%, var(--desk-c));
  box-shadow: 0 20px 50px -24px rgba(0,0,0,.5); border: 1px solid var(--hairline);
}
.desk-demo::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 30% 60%, var(--desk-glow), transparent 60%); pointer-events: none; }
.mini-bar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 36px;
  display: flex; align-items: center; justify-content: center; gap: 3px;
  background: var(--bar); border-top: 1px solid var(--bar-border);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.mini-bar::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 10px; background: linear-gradient(to top, rgba(0,0,0,.12), transparent); }
.mini-tile {
  position: relative; flex: none; width: 30px; height: 30px; border-radius: 4px;
  display: grid; place-items: center; overflow: hidden; max-width: 30px;
}
.mini-tile.hover { background: var(--hover); }
.mini-tile .pinwheel { width: 17px; height: 17px; }
.mini-tile .ic { --box: 22px; }
.mini-tile .dot { position: absolute; bottom: 1px; left: 50%; transform: translateX(-50%); width: 5px; height: 2px; border-radius: 1px; background: var(--indicator); }
.demo-caption {
  position: absolute; top: 12px; left: 14px;
  font-size: 12px; font-weight: 600; color: #fff; text-shadow: 0 1px 6px rgba(0,20,60,.5);
  padding: 4px 10px; border-radius: 999px; background: rgba(0, 20, 60, .28); backdrop-filter: blur(8px);
}

/* Start-menu style panels (Start feature, Search demo) */
.sd-panel {
  border-radius: 10px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--hairline);
  box-shadow: 0 20px 50px -24px rgba(0,0,0,.45);
  font-size: 13px;
}
.sd-search {
  display: flex; align-items: center; gap: 10px; position: relative;
  margin: 20px 24px 10px; height: 34px; padding: 0 12px;
  border-radius: 999px; background: var(--field); border: 1px solid var(--hairline);
  color: var(--text-dim);
}
.sd-search svg { width: 14px; height: 14px; flex: none; }
.sd-search.live { color: var(--text); }
.sd-search.live::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); }
.caret { width: 1px; height: 16px; background: var(--text); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.sd-heading { font-weight: 600; margin: 10px 32px 4px; }
.sd-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px; padding: 0 24px; }
.sd-grid > span { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 8px 0 6px; font-size: 11px; border-radius: 4px; }
.sd-grid .ic { --box: 30px; }
.sd-list { padding: 0 24px 10px; display: grid; gap: 2px; }
.sd-list > span { display: flex; align-items: center; gap: 10px; height: 30px; padding: 0 8px; }
.sd-list > span:first-child { font-weight: 600; padding-top: 6px; }
.sd-list .ic { --box: 20px; }
.sd-footer { display: flex; align-items: center; justify-content: space-between; height: 52px; padding: 0 36px; background: rgba(0,0,0,.035); border-top: 1px solid var(--hairline); }
:root[data-theme-resolved="dark"] .sd-footer { background: rgba(0,0,0,.18); }
.sd-footer > span { display: flex; align-items: center; gap: 10px; }
.sd-footer .avatar { width: 26px; height: 26px; font-size: 9px; }
.sd-power { width: 16px; height: 16px; }
@media (max-width: 480px) { .sd-grid { grid-template-columns: repeat(4, 1fr); } .sd-grid > span:nth-child(n+9) { display: none; } }

/* search results */
/* The Search panel never grows past the copy beside it: the demo adds nothing to the grid row's height
   (height: 0) and then stretches to fill it, so the panel can cap itself at 100% and clip the rest. */
.search-demo { height: 0; min-height: 100%; display: flex; flex-direction: column; justify-content: center; }
.search-demo .sd-panel { flex: none; max-height: 100%; }
@media (max-width: 880px) { .search-demo { height: auto; min-height: 0; } .search-demo .sd-panel { max-height: none; } }
.results { min-height: 280px; padding: 4px 24px 18px; overflow: clip; } /* clipped while its height animates */
.res-heading { font-weight: 600; padding: 10px 8px 4px; }
.res { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 8px; border-radius: 5px; }
.res.best { height: 58px; }
.res.best .ic { --box: 34px; }
.res.sel { background: var(--hover); box-shadow: inset 3px 0 0 var(--accent); }
.res .ic { --box: 22px; }
.res b { font-weight: 400; display: block; }
.res small { display: block; color: var(--text-dim); font-size: 11px; line-height: 1.2; }
.res .ic.setting { background: linear-gradient(160deg, #6fa6ff, #1f5fd0); }
.res .ic.doc { background: linear-gradient(160deg, #fff, #dfe3ea); color: #333; }

/* previews demo */
.previews-demo { display: block; }
.pv-bubble {
  position: absolute; left: 50%; bottom: 46px; transform: translateX(-50%);
  display: flex; gap: 8px; padding: 10px; border-radius: 8px;
  background: var(--menu); border: 1px solid var(--hairline);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 16px 40px -14px rgba(0,0,0,.5);
}
.pv-card { width: 150px; padding: 8px; border-radius: 6px; }
.pv-card:first-child { background: var(--hover); }
.pv-title { display: flex; align-items: center; gap: 6px; font-size: 11px; margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-title .ic { --box: 14px; }
.pv-thumb { height: 84px; border-radius: 4px; background: var(--win-body); border: 1px solid var(--hairline); padding: 8px; display: grid; gap: 6px; align-content: start; }
.pv-thumb i { display: block; height: 8px; border-radius: 3px; background: var(--win-line); }
.pv-thumb i:first-child { height: 26px; background: linear-gradient(120deg, #cfe6ff, #e9d8ff); }
.pv-thumb.alt i:first-child { background: linear-gradient(120deg, #1f76e6, #6fd2ff); }
.pv-thumb i:nth-child(2) { width: 80%; }
.pv-thumb i:nth-child(3) { width: 55%; }
@media (max-width: 480px) { .pv-card:last-child { display: none; } }

/* trim demo */
.mini-win {
  position: absolute; left: 16%; top: 10%; width: 56%; height: 64%;
  border-radius: 8px; background: var(--win-body); border: 1px solid var(--hairline);
  box-shadow: 0 16px 40px -16px rgba(0,0,0,.5); overflow: hidden;
}
.mw-bar { height: 22px; background: var(--win-chrome); display: flex; align-items: center; gap: 5px; padding: 0 9px; border-bottom: 1px solid var(--hairline); }
.mw-bar i { width: 8px; height: 8px; border-radius: 50%; background: #ff5f57; }
.mw-bar i:nth-child(2) { background: #febc2e; }
.mw-bar i:nth-child(3) { background: #28c840; }
.trim-demo.play .mini-win { animation: trim 6s cubic-bezier(.4, 0, .2, 1) infinite; }
/* the strip begins at 36 px from the bottom ≈ 11.5% of a 16:10 stage; the window
   zooms past it, then is trimmed so its bottom lands just above the bar */
@keyframes trim {
  0%, 18%  { height: 64%; }
  38%, 48% { height: 84%; }            /* over the taskbar */
  58%, 100% { height: 76%; }           /* trimmed back */
}
.trim-demo .mini-bar { z-index: 2; }

/* theme tiles */
.theme-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 480px) { .theme-tiles { grid-template-columns: 1fr; } }
.theme-tile {
  border: 2px solid var(--hairline); border-radius: 10px; padding: .8rem;
  display: flex; flex-direction: column; gap: .7rem; align-items: center;
  transition: border-color .15s, transform .15s;
}
.theme-tile:hover { transform: translateY(-2px); border-color: var(--accent); }
:root[data-theme="light"] .theme-light, :root[data-theme="dark"] .theme-dark, :root[data-theme="auto"] .theme-auto { border-color: var(--accent); }
.tt-desk { position: relative; width: 100%; aspect-ratio: 16 / 10; border-radius: 6px; overflow: hidden; }
.theme-light .tt-desk { background: linear-gradient(165deg, #bfe3ff, #4d9cf0 55%, #0b3e91); }
.theme-dark .tt-desk { background: linear-gradient(165deg, #14335f, #0f57a8 55%, #041a3d); }
.theme-auto .tt-desk { background: linear-gradient(105deg, #4d9cf0 0 50%, #0f57a8 50% 100%); }
.tt-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 22%; }
.theme-light .tt-bar { background: rgba(238,240,244,.85); }
.theme-dark .tt-bar { background: rgba(28,28,28,.85); }
.theme-auto .tt-bar { background: linear-gradient(105deg, rgba(238,240,244,.85) 0 50%, rgba(28,28,28,.85) 50%); }
.tt-bar::after { content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 46%; height: 45%; border-radius: 3px; background: repeating-linear-gradient(90deg, rgba(0,102,192,.55) 0 10%, transparent 10% 16%); }
.tt-name { font-weight: 600; font-size: .95rem; }

/* ============================================================================
   Details: a Windows 11 settings list
   ============================================================================ */
.details { max-width: 900px; margin: 0 auto; padding: clamp(4rem, 10vh, 7rem) clamp(1.25rem, 6vw, 4rem); }
.details-title { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 1.5rem; }
.settings-list { border-radius: 8px; background: var(--surface); border: 1px solid var(--hairline); overflow: hidden; }
.row { display: grid; grid-template-columns: 44px 1fr; gap: .4rem; align-items: center; padding: 1rem 1.25rem; min-height: 72px; }
.row + .row { border-top: 1px solid var(--hairline); }
.row-icon { font-size: 22px; text-align: center; }
.row h3 { font-size: 1.05rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
.row p { color: var(--text-dim); font-size: .95rem; margin-top: .15rem; max-width: 62ch; }

/* ============================================================================
   Download + footer
   ============================================================================ */
.download { text-align: center; max-width: 720px; margin: 0 auto; padding: clamp(5rem, 14vh, 9rem) 1.25rem; }
.dl-icon { width: 108px; margin: 0 auto 1.4rem; filter: drop-shadow(0 16px 32px rgba(11, 95, 190, .35)); }
.download h2 { font-size: clamp(2.2rem, 5.5vw, 3.4rem); }
.download p { font-size: 1.15rem; color: var(--text-dim); margin: .9rem 0 1.8rem; }
.download .btn { margin: 0 auto; }

.footer { border-top: 1px solid var(--hairline); padding: 3rem 1.25rem; }
.footer-inner { max-width: 900px; margin: 0 auto; text-align: center; display: grid; gap: .8rem; }
.footer-brand { display: flex; gap: .5rem; align-items: center; justify-content: center; font-weight: 600; }
.footer-logo { width: 24px; height: 24px; }
.footer-credit { color: var(--text-dim); }
.footer-credit a { color: var(--accent); }
.footer-credit a:hover { text-decoration: underline; }
.footer-fine { font-size: .8rem; color: var(--text-dim); max-width: 600px; margin: 0 auto; }

/* ---- Reduced motion: no staggered load, no loops ---- */
@media (prefers-reduced-motion: reduce) {
  .tile, .tb-search, .mini-tile, .startmenu, .bubble { transition: none; }
  .tile.pre, .tb-search.pre { max-width: 220px !important; opacity: 1; margin-left: 0; }
  .trim-demo.play .mini-win { animation: none; height: 76%; }
  .caret { animation: none; }
}
