/* Homepage styles: hero, the Switchy panel, and the sections below it. One file so the homepage loads one render-blocking sheet after base.css. */

/* ===== Hero ===== */
/* The hero: centred copy, then a framed Mac where a scripted cursor demos Switchy.
   The Mac is a recording, not a control: it is inert and ignores the pointer. */

.hero { position: relative; background: var(--paper); padding-bottom: 8px; overflow: hidden; }

/* ---------- Black Friday bar (js/sale.js shows it only while the code works) ---------- */
.sale-bar {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 10px;
  padding: 10px 20px; background: #111214; color: #fff; font-size: 14px; text-align: center;
}
.sale-bar[hidden] { display: none; }
.sale-bar:hover { text-decoration: none; background: #000; }
.sale-bar strong { color: #c9bcff; }
.sale-bar span { transition: transform 0.3s var(--ease-out); }
.sale-bar:hover span { transform: translateX(3px); }
[data-theme="dark"] .sale-bar { background: #1f1a3a; }

/* ---------- Top nav ---------- */
.topnav {
  max-width: 1376px; margin: 0 auto; padding: 20px 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.topnav__brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.topnav__brand:hover { text-decoration: none; }
.topnav__brand img { border-radius: 7px; }
.topnav__links { display: flex; gap: 28px; font-size: 15px; font-weight: 500; }
.topnav__links a { color: var(--ink); }
.btn--sm { min-height: 38px; padding: 0 18px; font-size: 14px; box-shadow: none; }
.topnav__ctas { display: flex; align-items: center; gap: 8px; }
.topnav__ctas .btn { white-space: nowrap; }
.topnav__short { display: none; }

/* ---------- Copy ---------- */
.hero__copy {
  max-width: 1120px; margin: 0 auto; padding: 44px 24px 44px;
  display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center;
}
.hero__eyebrow {
  display: inline-flex; align-items: center; height: 30px; padding: 0 14px; border-radius: 999px;
  background: var(--card); box-shadow: inset 0 0 0 1px var(--line);
  font-size: 13px; font-weight: 500; color: var(--muted);
}
.hero h1 { font-size: clamp(40px, 5.2vw, 72px); line-height: 1.04; letter-spacing: -0.035em; font-weight: 700; text-wrap: balance; }
.hero h1 { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.hero h1 .hero__eyebrow { letter-spacing: normal; line-height: normal; }
.hero__tagline { display: block; }
/* Glowing Apple logo before "Mac" (js/hero-apple.js). The flat mark shows
   until the shader's first frame, then darkens to navy under the glow. */
.hero__mac { white-space: nowrap; }
.apple-glow { position: relative; display: inline-block; width: 0.98em; height: 0.98em; margin: 0 0.04em 0 -0.04em; vertical-align: -0.13em; }
.apple-glow__mask {
  position: absolute; inset: 12.5%; background: currentColor;
  -webkit-mask: url(../assets/apple-logo.svg) center / contain no-repeat;
  mask: url(../assets/apple-logo.svg) center / contain no-repeat;
  transition: background-color 0.9s var(--ease-out), opacity 0.9s var(--ease-out);
}
.apple-glow__canvas { position: absolute; inset: 0; opacity: 0; transition: opacity 0.9s var(--ease-out); }
.apple-glow__canvas canvas { display: block; width: 100%; height: 100%; }
.apple-glow[data-ready] .apple-glow__mask { background: #1d2a52; }
.apple-glow[data-ready] .apple-glow__canvas { opacity: 1; }
/* On cream the glow's pale halo shows as a box: multiply it away, no navy underlay */
[data-theme="light"] .apple-glow__canvas { mix-blend-mode: multiply; }
[data-theme="light"] .apple-glow[data-ready] .apple-glow__mask { opacity: 0; }
.hero__accent { display: block; color: var(--violet); }
.hero__copy p { max-width: 600px; font-size: 19px; line-height: 1.5; color: var(--muted); }
.hero__ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.hero__meta { font-size: 13px; color: var(--muted); }

/* ---------- Stage: the Mac is drawn at a fixed design size, then scaled to fit ---------- */
.stage {
  --w: 968; --h: 720;
  position: relative; width: min(1160px, calc(100% - 64px)); margin: 0 auto;
  aspect-ratio: var(--w) / var(--h);
  perspective: 1800px;
  /* The bottom 15% fades out into the page */
  -webkit-mask-image: linear-gradient(to bottom, #000 85%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 85%, transparent 100%);
}
.stage__frame { position: absolute; inset: 0; transform-origin: 50% 0; }
.mac {
  position: absolute; left: 0; top: 0;
  width: calc(var(--w) * 1px); height: calc(var(--h) * 1px);
  transform: scale(var(--k, 1)); transform-origin: 0 0;
  border-radius: 18px; overflow: hidden; isolation: isolate;
  pointer-events: none; user-select: none;
  color: #0b1530;
  --mb-ink: #000; --mb-hl: rgb(0 0 0 / 0.1); --mb-bg: rgb(255 255 255 / 0.2);
}
.mac[data-theme="dark"] { color: #fff; --mb-ink: #fff; --mb-hl: rgb(255 255 255 / 0.2); --mb-bg: rgb(0 0 0 / 0.18); }
.mac::after { content: ""; position: absolute; inset: 0; z-index: 70; border-radius: inherit; box-shadow: inset 0 0 0 1px rgb(17 18 20 / 0.08); }

/* Wallpaper: the day artwork loads with the page; the night one fades in after load */
.wallpaper { position: absolute; inset: 0; z-index: -1; background: linear-gradient(170deg, #a9cbff 0%, #dcdcff 55%, #f6dff0 100%); }
.mac[data-theme="dark"] .wallpaper { background: linear-gradient(170deg, #050820 0%, #0d1140 60%, #1d1048 100%); }
.wallpaper__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; opacity: 0; transition: opacity 0.9s var(--ease-out); }
.mac:not([data-theme="dark"]) .wallpaper__img--day,
.mac[data-theme="dark"] .wallpaper__img--night.is-loaded { opacity: 1; }

/* ---------- Menu bar ---------- */
.menubar {
  position: relative; z-index: 20; height: 24px; padding: 0 8px;
  display: flex; align-items: center; justify-content: space-between;
  color: var(--mb-ink); font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  font-size: 13px; letter-spacing: -0.01em; transition: color 0.5s;
}
/* Blur lives on a pseudo-element: a blurred ancestor would stop the panel's own blur */
.menubar::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--mb-bg); transition: background-color 0.5s;
  -webkit-backdrop-filter: blur(40px) saturate(160%); backdrop-filter: blur(40px) saturate(160%);
}
.mb-group { display: flex; align-items: center; height: 100%; min-width: 0; }
.mb-item { height: 22px; padding: 0 10px; border-radius: 5px; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; transition: background-color 0.15s; }
.mb-item--app { font-weight: 700; }
.mb-apple { padding: 0 12px 0 10px; }
.mb-apple svg { width: 14px; height: 16px; }
.mb-icon { padding: 0 7px; }
.mb-icon svg { width: 18px; height: 18px; }
.mb-clock { padding: 0 8px 0 10px; font-variant-numeric: tabular-nums; }
.mb-switchy { position: relative; display: flex; align-items: center; height: 100%; }
.mb-switchy__btn[data-on="true"] { background: var(--mb-hl); }
.mb-pill {
  height: 22px; padding: 0 8px; margin-right: 4px; border-radius: 11px;
  display: inline-flex; align-items: center; gap: 4px;
  color: #fff; font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums;
  background: #007aff; transition: background-color 0.35s;
}
.mb-pill svg { width: 13px; height: 13px; }
.mb-pill[data-phase="succeeded"] { background: #28cd41; }

/* The panel hangs 6pt under the icon, centred on it (StatusPanelController) */
/* Centred by margin, not translate, so the demo can find targets from layout offsets */
.sw-panel--hero { position: absolute; top: calc(100% + 6px); left: 50%; margin-left: -180px; z-index: 30; }

/* ---------- Dock ---------- */
.dock {
  position: absolute; left: 50%; bottom: 8px; translate: -50% 0; z-index: 10;
  display: flex; align-items: flex-end; gap: 6px; padding: 5px 7px; border-radius: 18px;
  background: rgb(255 255 255 / 0.28);
  -webkit-backdrop-filter: blur(30px) saturate(170%); backdrop-filter: blur(30px) saturate(170%);
  box-shadow: inset 0 0 0 0.5px rgb(255 255 255 / 0.45), 0 10px 30px rgb(0 0 0 / 0.15);
  transition: background-color 0.6s;
}
.mac[data-theme="dark"] .dock { background: rgb(30 30 34 / 0.35); box-shadow: inset 0 0 0 0.5px rgb(255 255 255 / 0.18), 0 10px 30px rgb(0 0 0 / 0.35); }
.dock__app { position: relative; width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; color: #fff; }
.dock__app svg { width: 26px; height: 26px; }
.dock__app img { width: 44px; height: 44px; border-radius: 11px; }
.dock__app.is-running::after {
  content: ""; position: absolute; left: 50%; bottom: -4px; width: 4px; height: 4px; margin-left: -2px;
  border-radius: 50%; background: rgb(0 0 0 / 0.55);
}
.mac[data-theme="dark"] .dock__app.is-running::after { background: rgb(255 255 255 / 0.8); }

/* ---------- Scripted cursor ---------- */
.cursor { position: absolute; left: 0; top: 0; z-index: 60; will-change: transform; visibility: hidden; }
.cursor svg { width: 19px; height: 24px; transform-origin: 2px 2px; filter: drop-shadow(0 1.5px 2px rgb(0 0 0 / 0.35)); }
.cursor__ring {
  position: absolute; left: -15px; top: -15px; width: 30px; height: 30px; border-radius: 50%;
  background: rgb(10 132 255 / 0.22); box-shadow: 0 0 0 1.5px rgb(10 132 255 / 0.55); opacity: 0;
}

/* ---------- Narrow screens: a slimmer Mac, cropped to the menu bar's right side ---------- */
@media (max-width: 760px) {
  .topnav { padding: 16px 20px; }
  .topnav__links { display: none; }
  .topnav__buy { display: none; }
  .hero__copy { padding: 36px 20px 32px; }
  .hero__copy p { font-size: 17px; }
  .stage { --w: 440; width: calc(100% - 32px); }
  .mb-hide-sm { display: none !important; }
}

/* Intro: hero extras wait for GSAP (the headline never does) */
html.is-intro [data-intro] { opacity: 0; }

/* The Mac rises in with CSS, transform only: it paints at once, so it never delays LCP */
@keyframes stage-rise { from { transform: translateY(36px); } }
@media (prefers-reduced-motion: no-preference) {
  .stage { animation: stage-rise 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.25s both; }
}

/* Small phones: the nav button says just "Free trial" so it fits beside the logo. */
@media (max-width: 400px) {
  .topnav__long { display: none; }
  .topnav__short { display: inline; }
}

/* ===== Panel ===== */
/* The Switchy panel, matched to the SwiftUI source (PanelView, SwitchTileGrid,
   StatusStripView, PanelFooterView, CodesListView, UsageAccountCard, Theme).
   The black style: the panel is always dark, a solid #121212 ground with
   neutral grey cards. 1pt in the app = 1px here. */

.sw {
  --p: 255 255 255;               /* Color.primary as a fill (always dark) */
  --text: rgb(255 255 255 / 0.85);
  --sec: rgb(255 255 255 / 0.55);
  --ter: rgb(255 255 255 / 0.25);
  --acc: #0a84ff;
  --blue: #2f7bff;                /* Color.switchyBlue */
  --amber: #f5b13d;               /* Color.switchyAmber: anything in progress */
  --green: #32d74b; --orange: #ff9f0a; --red: #ff453a;
  --ground: #121212;              /* Color.panelGround */
  --card: rgb(var(--p) / 0.055);  /* PanelStyle.cardFill */
  --card-hover: rgb(var(--p) / 0.085);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  font-size: 13px; line-height: 1.2; color: var(--text);
  letter-spacing: -0.003em;
  -webkit-font-smoothing: antialiased;
  text-align: left;
}
:where(.sw) button { border: 0; background: none; padding: 0; cursor: default; font: inherit; color: inherit; text-align: inherit; }
.sw svg { flex: none; }
.sw .mono { font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace; }
.sw .tnum { font-variant-numeric: tabular-nums; }

/* ---------- Window: PanelMetrics width 360, radius 22, hairline edge ---------- */
.sw-panel {
  width: 360px;
  border-radius: 22px;
  background: var(--ground);
  box-shadow:
    inset 0 0 0 1px rgb(255 255 255 / 0.09),
    0 10px 36px rgb(0 0 0 / 0.32),
    0 0.5px 3px rgb(0 0 0 / 0.18);
  overflow: hidden;
  transform-origin: 50% 0;
}

/* ---------- Tab picker: segmented, radius 14 track, radius 11 thumb ---------- */
.sw-tabs {
  position: relative; display: flex; gap: 2px;
  margin: 12px 12px 0; padding: 3px; border-radius: 14px;
  background: rgb(var(--p) / 0.06);
}
.sw-tabs__hl {
  position: absolute; top: 3px; bottom: 3px; left: 3px;
  width: calc((100% - 10px) / 3); border-radius: 11px;
  background: rgb(var(--p) / 0.12);
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
.sw-tab {
  position: relative; flex: 1; padding: 6px 0; border-radius: 11px;
  font-size: 13px; font-weight: 500; text-align: center; color: var(--sec);
  transition: color 0.22s, transform 0.2s;
}
.sw-tab[aria-selected="true"] { color: var(--text); font-weight: 600; }
.sw-tab:active { transform: scale(0.97); opacity: 0.82; }

.sw-body { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.sw-body[hidden] { display: none; }

/* ---------- Status strip: radius 18 cards, no tint, no glowing dots ---------- */
.sw-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sw-card {
  display: flex; flex-direction: column; gap: 5px; min-width: 0;
  padding: 12px 14px; border-radius: 18px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px transparent;
  transition: background-color 0.22s, box-shadow 0.22s;
}
.sw-card:hover { background: var(--card-hover); }
.sw-card[aria-expanded="true"] { background: rgb(var(--p) / 0.085); box-shadow: inset 0 0 0 1px rgb(var(--p) / 0.14); }
.sw-card__row { display: flex; align-items: center; gap: 7px; }
.sw-card__title { font-size: 12.5px; font-weight: 500; color: var(--sec); flex: 1; }
.sw-card[aria-expanded="true"] .sw-card__title { font-weight: 600; color: var(--text); }
.sw-card__chev { width: 9px; height: 9px; color: var(--sec); transition: transform 0.22s; }
.sw-card[aria-expanded="true"] .sw-card__chev { transform: rotate(180deg); }
.sw-card__l1 { font-size: 15px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-card__l2 { font-size: 12.5px; color: var(--sec); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Three cards across (Disk on): StatusStripView.isCompact, tighter padding and smaller numbers */
.sw-strip--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.sw-strip--3 .sw-card { padding: 10px 10px; gap: 4px; }
.sw-strip--3 .sw-card__l1 { font-size: 13.5px; }
.sw-strip--3 .sw-card__l2 { font-size: 11.5px; }
.sw-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--sec); flex: none; transition: background-color 0.3s; }
.sw-dot[data-c="green"] { background: var(--green); }
.sw-dot[data-c="orange"] { background: var(--amber); }
.sw-dot[data-c="red"] { background: var(--red); }

.sw-detail { border-radius: 18px; background: var(--card); overflow: hidden; }
.sw-detail[hidden] { display: none; }
.sw-detail--net { display: flex; align-items: center; gap: 8px; padding: 10px 14px; }
.sw-detail--net > span { font-size: 12px; font-weight: 500; color: var(--sec); margin-right: auto; }
.sw-seg { display: flex; gap: 2px; padding: 2px; border-radius: 10px; background: rgb(var(--p) / 0.06); }
.sw-seg button { font-size: 12px; padding: 4px 9px; border-radius: 8px; color: var(--sec); }
.sw-seg button[aria-pressed="true"] { font-weight: 600; color: var(--text); background: rgb(var(--p) / 0.12); }
.sw-iconbtn { width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--sec); }
.sw-iconbtn:hover { background: rgb(var(--p) / 0.1); color: var(--text); }
.sw-iconbtn svg { width: 11px; height: 11px; }

.sw-detail--dev { padding: 6px; display: flex; flex-direction: column; gap: 2px; }
/* DevelopmentDetailView.SectionHeader: title left, buttons and toggle grouped right */
.sw-sechead { height: 30px; padding: 0 4px 0 8px; display: flex; align-items: center; gap: 4px; }
.sw-sechead__title { font-size: 11px; font-weight: 600; letter-spacing: 0.8px; color: var(--sec); margin-right: auto; }
.sw-row { height: 34px; padding: 0 4px 0 8px; display: flex; align-items: center; gap: 8px; min-width: 0; }
.sw-row__name { font-size: 13px; font-weight: 600; white-space: nowrap; }
.sw-row__meta { font-size: 11.5px; color: var(--sec); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.sw-row__time { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--sec); padding-right: 4px; }
.sw-row:has(.sw-tag[data-c="orange"]) .sw-row__time { color: var(--amber); }
/* DevelopmentDetailView.StatusTag: coloured dot, grey word, fixed width so names line up */
.sw-tag {
  width: 72px; flex: none; display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 500; color: var(--sec); white-space: nowrap;
}
.sw-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; flex: none; background: var(--sec); }
.sw-tag[data-c="green"]::before { background: var(--green); }
.sw-tag[data-c="orange"]::before { background: var(--amber); }
.sw-tag[data-c="red"]::before { background: var(--red); }

/* Theme.swift PillToggleStyle */
.sw-pilltoggle { width: 30px; height: 18px; flex: none; border-radius: 999px; background: var(--acc); position: relative; }
.sw-pilltoggle::after {
  content: ""; position: absolute; top: 2px; right: 2px; width: 14px; height: 14px; border-radius: 50%;
  background: #fff linear-gradient(var(--acc), var(--acc)) center / 1.5px 6px no-repeat;
  box-shadow: 0 1px 1px rgb(0 0 0 / 0.2);
}

/* ---------- Tile grid: 54 tall, radius 16; on shows in the blue circle only ---------- */
.sw-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sw-tile {
  height: 54px; padding: 0 11px; border-radius: 16px;
  display: flex; align-items: center; gap: 10px; min-width: 0;
  background: var(--card);
  transition: background-color 0.22s, transform 0.2s, opacity 0.2s;
}
.sw-tile:hover { background: var(--card-hover); }
.sw-tile:active { transform: scale(0.97); opacity: 0.82; }
.sw-tile[aria-pressed="true"] { background: rgb(var(--p) / 0.1); }
.sw-tile[aria-pressed="true"]:hover { background: rgb(var(--p) / 0.13); }
.sw-tile__icon {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: rgb(var(--p) / 0.1); color: rgb(var(--p) / 0.8);
  transition: background-color 0.22s, color 0.22s;
}
.sw-tile__icon svg { width: 16px; height: 16px; }
.sw-tile[aria-pressed="true"] .sw-tile__icon { background: var(--acc); color: #fff; }
.sw-tile__text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sw-tile__title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-tile__sub { font-size: 11.5px; color: var(--sec); font-variant-numeric: tabular-nums; white-space: nowrap; display: flex; align-items: center; gap: 3px; }
.sw-tile__sub svg { width: 8px; height: 8px; }
/* A timed switch mid-countdown (Pomodoro running, timed Keep Awake) reads amber */
.sw-tile__sub.is-counting { color: var(--amber); }


/* ---------- Footer ---------- */
.sw-divider { height: 1px; margin: 0 12px; background: rgb(var(--p) / 0.1); }
.sw-footer { display: flex; align-items: center; padding: 10px 14px 12px; }
.sw-footer__spacer { flex: 1; }
.sw-hoverbtn { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: var(--sec); transition: background-color 0.15s, color 0.15s; }
.sw-hoverbtn:hover { color: var(--text); background: rgb(var(--p) / 0.1); }
.sw-hoverbtn svg { width: 17px; height: 17px; }
.sw-capsule { font-size: 13px; font-weight: 600; padding: 7px 24px; border-radius: 999px; background: rgb(var(--p) / 0.1); transition: background-color 0.15s; }
.sw-capsule:hover { background: rgb(var(--p) / 0.15); }

/* ---------- Codes: radius 16 rows, amber countdown ---------- */
.sw-codes { display: flex; flex-direction: column; gap: 8px; }
.sw-code {
  min-height: 66px; padding: 10px 12px; border-radius: 16px; width: 100%;
  display: flex; align-items: center; gap: 12px;
  background: var(--card);
  transition: background-color 0.15s, transform 0.2s;
}
.sw-code:hover { background: var(--card-hover); }
.sw-code:active { transform: scale(0.98); }
/* ServiceIcon.letterIcon: neutral grey, the letter in the label colour */
.sw-svc {
  width: 34px; height: 34px; border-radius: 8.84px; flex: none;
  display: grid; place-items: center;
  background: rgb(var(--p) / 0.1); color: var(--text); font-size: 15px; font-weight: 700;
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, sans-serif;
}
/* ServiceIcon.siteIcon: the site's own logo on white */
.sw-svc--site { background: #fff; }
.sw-svc--site svg { width: 26px; height: 26px; }
.sw-code__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sw-code__l1 { display: flex; align-items: center; gap: 10px; }
.sw-code__name { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-code__otp { font-size: 19px; font-weight: 600; white-space: pre; transition: color 0.2s; }
.sw-code.is-expiring .sw-code__otp { color: var(--red); }
.sw-code__copied { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif; font-size: 12px; font-weight: 600; color: #fff; background: var(--acc); padding: 4px 10px; border-radius: 999px; }
.sw-code__detail { font-size: 12.5px; color: var(--sec); }
.sw-ring { position: relative; width: 22px; height: 22px; flex: none; }
.sw-ring svg { width: 22px; height: 22px; transform: rotate(-90deg); }
.sw-ring circle { fill: none; stroke-width: 2.5; }
.sw-ring .track { stroke: rgb(var(--p) / 0.12); }
.sw-ring .arc { stroke: var(--amber); stroke-linecap: round; transition: stroke-dashoffset 1s linear, stroke 0.2s; }
.sw-code.is-expiring .sw-ring .arc { stroke: var(--red); }
.sw-ring span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 8.5px; font-weight: 600; color: var(--sec); font-variant-numeric: tabular-nums; }
.sw-code.is-expiring .sw-ring span { color: var(--red); }

/* ---------- Usage: radius 18 cards; bars blue < 60%, amber 60-84%, red 85%+ ---------- */
.sw-usage { display: flex; flex-direction: column; gap: 8px; }
.sw-acct { padding: 14px; border-radius: 18px; background: var(--card); display: flex; flex-direction: column; gap: 12px; }
.sw-acct__head { display: flex; align-items: center; gap: 10px; }
.sw-mark { width: 30px; height: 30px; border-radius: 8.4px; display: grid; place-items: center; flex: none; }
.sw-mark svg { width: 15px; height: 15px; }
.sw-mark--claude { color: #d97857; background: rgb(217 120 87 / 0.18); }
.sw-mark--codex { color: var(--text); background: rgb(var(--p) / 0.1); }
.sw-acct__who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.sw-acct__title { font-size: 14px; font-weight: 600; }
.sw-acct__email { font-size: 12px; color: var(--sec); }
.sw-plan { font-size: 11.5px; font-weight: 600; color: var(--sec); padding: 3px 9px; border-radius: 9px; background: rgb(var(--p) / 0.08); }
.sw-bars { display: flex; flex-direction: column; gap: 9px; }
.sw-bar { display: grid; grid-template-columns: 58px 1fr 40px; column-gap: 10px; row-gap: 4px; align-items: center; }
.sw-bar__label { font-size: 12.5px; color: rgb(var(--p) / 0.8); }
.sw-bar__track { height: 7px; border-radius: 999px; background: rgb(var(--p) / 0.1); overflow: hidden; }
.sw-bar__fill { display: block; height: 100%; min-width: 3px; border-radius: 999px; background: var(--blue); transition: background-color 0.3s; }
.sw-bar__fill[data-c="orange"] { background: var(--amber); }
.sw-bar__fill[data-c="red"] { background: var(--red); }
.sw-bar__pct { font-size: 13px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; transition: color 0.3s; }
.sw-bar:has([data-c="orange"]) .sw-bar__pct { color: var(--amber); }
.sw-bar:has([data-c="red"]) .sw-bar__pct { color: var(--red); }
.sw-bar__reset { grid-column: 2 / 4; font-size: 11.5px; color: var(--sec); }
.sw-usage__summary { display: flex; justify-content: flex-end; padding: 2px 4px 0; font-size: 11px; color: var(--ter); }

/* A standalone app surface used outside the hero (the switch cards) */
.sw-surface {
  border-radius: 22px; padding: 12px;
  background: var(--ground);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.09), 0 10px 36px rgb(0 0 0 / 0.22);
}

/* CodesLockedView */
.sw-locked { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 24px; }
.sw-locked[hidden] { display: none; }
.sw-locked__icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgb(var(--p) / 0.07); color: var(--sec); }
.sw-locked__icon svg { width: 22px; height: 22px; }
.sw-locked__title { font-size: 14px; font-weight: 600; }
.sw-locked__btn { margin-top: 4px; font-size: 12px; font-weight: 600; color: #fff !important; background: var(--acc) !important; padding: 6px 18px !important; border-radius: 999px; }

/* ===== Sections ===== */
/* Below-the-fold sections: the story, the switch cards, platforms, FAQ, download. */

.section { padding: 112px 16px 0; }
main > .section:last-child { padding-bottom: 96px; }

.head { display: flex; flex-direction: column; gap: 16px; max-width: 760px; margin-bottom: 48px; }
.h2 { font-size: clamp(36px, 4.4vw, 54px); line-height: 1.04; letter-spacing: -0.035em; font-weight: 700; text-wrap: balance; }
.lede { font-size: 19px; line-height: 1.5; color: var(--muted); }

.t-sky { background: var(--sky); } .t-mint { background: var(--mint); }
.t-butter { background: var(--butter); } .t-lilac { background: var(--lilac); }
.t-blush { background: var(--blush); }

/* ---------- Every switch, by name (under the bento) ---------- */
.switch-list { margin-top: 48px; padding: 28px; border-radius: var(--radius-lg); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.switch-list__title { font-size: 22px; letter-spacing: -0.01em; font-weight: 700; }
.switch-list dl { margin-top: 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px 28px; }
.switch-list dl > div { min-width: 0; }
.switch-list dt { font-weight: 600; }
.switch-list dt a { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
.switch-list dd { margin: 2px 0 0; font-size: 15px; line-height: 1.45; color: var(--muted); }
.card__body a { white-space: nowrap; }

/* ---------- See it in action: one card per moment ----------
   On wide screens each card's Mac is fixed to the middle of the window and the
   card's clip-path cuts it to the card, so scrolling wipes one Mac into the next. */
.scards { --scard-max: 1320px; display: flex; flex-direction: column; gap: 24px; }
.scard {
  position: relative; display: flex; align-items: stretch;
  width: 100%; max-width: var(--scard-max); margin: 0 auto;
  min-height: max(640px, calc(100svh - 80px));
  border-radius: 32px; clip-path: inset(0 round 32px);
  background: #0a0a0b; color: #f5f5f5;
}
[data-theme="dark"] .scard { box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.07); }

.scard__copy {
  flex: 0 0 50%; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  gap: 18px; padding: 64px clamp(32px, 5vw, 80px);
}
.scard__label { font-size: 15px; font-weight: 600; color: rgb(255 255 255 / 0.6); }
.scard__title { max-width: 13em; font-size: clamp(32px, 3.4vw, 46px); line-height: 1.06; letter-spacing: -0.03em; font-weight: 700; text-wrap: balance; }
.scard__body { max-width: 440px; font-size: 18px; line-height: 1.5; color: rgb(255 255 255 / 0.66); }
.scard__body .accent { color: #c9bcff; }

.scard__media { flex: 1 1 50%; min-width: 0; }
.scard__pin {
  position: fixed; top: 50%;
  left: calc(50% + min(var(--scard-max), 100% - 32px) * 0.2);
  width: min(520px, calc(min(var(--scard-max), 100% - 32px) / 2 - 96px), calc((100svh - 150px) * 0.55));
  transform: translate(-50%, -50%);
}

/* The story's panel floats on the card: no Mac, no wallpaper. Only the Switchy
   icon and deploy pill stay, with a notch pointing up at them from the panel. */
.stage.stage--story { --w: 384; --h: 700; width: 100%; perspective: none; -webkit-mask-image: none; mask-image: none; }
/* Disk's panel is the tallest (the app doesn't cap its height): a taller frame, sized down to fit the window */
[data-scard="disk"] .stage--story { --h: 920; }
[data-scard="disk"] .scard__pin { width: min(520px, calc(min(var(--scard-max), 100% - 32px) / 2 - 96px), calc((100svh - 150px) * 0.417)); }
.mac--float { overflow: visible; border-radius: 0; --mb-ink: #fff; --mb-hl: rgb(255 255 255 / 0.16); }
.mac--float::after { display: none; }
.menubar--float { justify-content: center; }
.menubar--float::before { display: none; }
.mac--float .sw-panel { box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.09), 0 30px 70px rgb(0 0 0 / 0.5); }
.mac--float .mb-switchy::after {
  content: ""; position: absolute; z-index: 31; top: calc(100% - 1px); left: 50%;
  width: 14px; height: 14px; margin-left: -7px; border-radius: 3px 0 0 0; transform: rotate(45deg);
  background: #121212; box-shadow: inset 1px 1px 0 rgb(255 255 255 / 0.09);
}

/* Without JS there is no panel to show, so the copy stands alone */
html:not(.js) .scard__media { display: none; }

/* ---------- DiskDetailView: usage bar, Safe to clear, Worktrees ---------- */
.sw-detail--disk { padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.dk-sec { position: relative; display: flex; flex-direction: column; gap: 2px; }
.dk-sec + .dk-sec { margin-top: 4px; }
.dk-aside { font-size: 11.5px; font-weight: 500; color: var(--sec); font-variant-numeric: tabular-nums; padding-right: 4px; }
.dk-bar { display: flex; gap: 2px; height: 10px; margin: 2px 8px 0; border-radius: 999px; overflow: hidden; }
.dk-bar > span { height: 100%; }
.dk-bar__dev { background: var(--blue); }
.dk-bar__apps { background: #bf5af2; }
.dk-bar__other { background: rgb(var(--p) / 0.35); }
.dk-bar__free { background: rgb(var(--p) / 0.08); }
.dk-legend { display: flex; flex-wrap: wrap; gap: 3px 12px; padding: 6px 8px 2px; font-size: 11px; color: var(--sec); font-variant-numeric: tabular-nums; }
.dk-legend > span { display: inline-flex; align-items: center; gap: 5px; }
.dk-legend i { width: 7px; height: 7px; border-radius: 50%; }
.dk-legend .dk-bar__free { background: rgb(var(--p) / 0.3); }
.dk-row { min-height: 38px; padding: 3px 4px 3px 8px; display: flex; align-items: center; gap: 9px; min-width: 0; }
.dk-row[hidden] { display: none; }
.dk-row__icon { width: 26px; height: 26px; flex: none; border-radius: 8px; display: grid; place-items: center; background: rgb(var(--p) / 0.07); color: var(--sec); }
.dk-row__icon svg { width: 14px; height: 14px; }
.dk-row__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.dk-row__title { font-size: 12.5px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dk-row__cap { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--sec); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dk-row__cap .sw-dot { width: 6px; height: 6px; }
.dk-size { font-size: 12px; font-weight: 600; color: var(--sec); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dk-btn { flex: none; font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: rgb(var(--p) / 0.1); color: var(--text); white-space: nowrap; }
.dk-btn--red { color: var(--red); background: rgb(255 69 58 / 0.14); }
.dk-btn--none { visibility: hidden; }
.dk-summary { padding: 0 8px 2px; font-size: 11.5px; color: var(--green); }
.dk-summary[hidden] { display: none; }
.dk-more { width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--sec); }
.dk-more[aria-expanded="true"] { background: rgb(var(--p) / 0.12); color: var(--text); }
.dk-more svg { width: 12px; height: 12px; }
/* The "…" menu, an NSMenu: dark, hairline edge, the item highlighted under the pointer */
.dk-menu {
  position: absolute; z-index: 2; top: 28px; right: 2px; padding: 5px; border-radius: 10px;
  background: #2b2b2e; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.1), 0 12px 30px rgb(0 0 0 / 0.45);
  transform-origin: 100% 0;
}
.dk-menu[hidden] { display: none; }
.dk-menu span { display: block; padding: 5px 10px; border-radius: 6px; font-size: 13px; color: #fff; background: #0a64d6; white-space: nowrap; }
.dk-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 6px; }

/* ---------- Switch cards ---------- */
.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card {
  display: flex; flex-direction: column; border-radius: 26px; overflow: hidden;
  background: var(--card); box-shadow: 0 0 0 1px var(--line);
}
.card--wide { grid-column: span 2; }
.card__stage { height: 280px; margin: 8px; border-radius: 20px; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; overflow: hidden; }
.card__copy { padding: 18px 26px 26px; display: flex; flex-direction: column; gap: 6px; }
.card__title { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.card__body { font-size: 16px; line-height: 1.5; color: var(--muted); }

.mini { width: 320px; max-width: calc(100% - 32px); }
.mini--wide { width: 620px; }
.mini--wide .sw-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mini--list { padding: 4px; }
.mini--disk { width: 620px; padding: 8px; min-width: 0; }
.mini--wt { width: 330px; padding: 6px; min-width: 0; }
/* Held open on the card, the menu takes its own line instead of covering a row */
.mini--wt .dk-menu { position: static; align-self: flex-end; margin: 0 2px 4px; }

.keys { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.keys__row { display: flex; gap: 10px; }
.key {
  width: 58px; height: 58px; border-radius: 14px; display: grid; place-items: center;
  background: var(--card); font-size: 24px; font-weight: 500;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", var(--font); /* ⌃ ⌥ come from the system font */
  box-shadow: inset 0 -3px 0 var(--line), 0 0 0 1px var(--line), 0 8px 18px rgb(17 18 20 / 0.08);
}
.keys__toast {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px; border-radius: 999px;
  background: var(--ink); color: var(--paper); font-size: 14px; font-weight: 500;
}

/* A slice of a light menu bar with the Pomodoro countdown in it */
.mbar {
  display: flex; align-items: center; gap: 4px; height: 34px; padding: 0 10px; border-radius: 10px;
  background: rgb(255 255 255 / 0.85); color: #000;
  box-shadow: 0 0 0 0.5px rgb(0 0 0 / 0.1), 0 16px 40px rgb(17 18 20 / 0.12);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif; font-size: 15px;
}
.mbar__timer {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px; border-radius: 6px;
  background: rgb(0 0 0 / 0.1); font-weight: 600; font-variant-numeric: tabular-nums;
}
.mbar__item { display: inline-flex; padding: 0 7px; }

.blackout {
  width: 260px; height: 160px; border-radius: 14px; background: #0b0b0d;
  box-shadow: 0 16px 40px rgb(17 18 20 / 0.25);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  color: rgb(255 255 255 / 0.72); font-size: 13px; font-weight: 500;
}

/* ---------- Platforms ---------- */
.platforms { display: flex; flex-wrap: wrap; gap: 10px; }
.platform {
  display: inline-flex; align-items: center; gap: 12px; height: 60px; padding: 0 20px 0 12px; border-radius: 18px;
  background: var(--card); box-shadow: 0 0 0 1px var(--line);
  font-size: 17px; font-weight: 600; letter-spacing: -0.01em;
}
.platform__mark { width: 36px; height: 36px; flex: none; border-radius: 10px; display: grid; place-items: center; color: #fff; }
.platform__mark svg { width: 20px; height: 20px; }
.platform__mark--letter { font-size: 16px; font-weight: 700; }
[data-theme="dark"] .platform__mark { box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.14); }

/* ---------- FAQ ---------- */
.faq { display: flex; flex-wrap: wrap; gap: 48px; }
.faq > .h2 { flex: 1 1 300px; }
.faq__list {
  flex: 2 1 560px; min-width: 0; border-radius: 24px; overflow: hidden;
  background: var(--card); box-shadow: 0 0 0 1px var(--line);
}
.faq details { padding: 0 26px; border-top: 1px solid var(--line); }
.faq details:first-child { border-top: 0; }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: 68px; padding: 14px 0; font-size: 18px; font-weight: 600; cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { flex: none; color: var(--muted); transition: transform 0.35s var(--ease-out); }
.faq details[open] summary svg { transform: rotate(45deg); }
.faq details p { padding: 0 0 22px; font-size: 16px; line-height: 1.55; color: var(--muted); }
.faq details p a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Download ---------- */
.cta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 48px;
  padding: clamp(28px, 5vw, 56px); border-radius: 32px; background: #111214; color: #fff;
}
[data-theme="dark"] .cta { background: #1a1b20; box-shadow: 0 0 0 1px var(--line); }
.cta__main { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
.cta__icon { border-radius: 22px; box-shadow: 0 20px 50px rgb(0 0 0 / 0.45); }
.cta__accent { display: block; color: #c9bcff; }
.cta__buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.cta small { font-size: 14px; color: rgb(255 255 255 / 0.66); }
.cta__portal { margin-top: -10px; }
.cta__portal a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.cta__price { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.cta__free { display: flex; align-items: baseline; gap: 12px; font-size: 18px; color: rgb(255 255 255 / 0.66); }
.cta__free span { font-size: 88px; font-weight: 700; letter-spacing: -0.04em; line-height: 1; color: #fff; }
.cta__note { font-size: 17px; color: rgb(255 255 255 / 0.72); }
.cta__list li {
  display: flex; justify-content: space-between; padding: 14px 0;
  border-top: 1px solid rgb(255 255 255 / 0.12); font-size: 17px; color: rgb(255 255 255 / 0.66);
}
.cta__list li:last-child { border-bottom: 1px solid rgb(255 255 255 / 0.12); }
.cta__list s { color: rgb(255 255 255 / 0.5); }
.cta__list li > span { color: #fff; font-weight: 600; }

/* ---------- Footer ---------- */
.footer { padding: 0 16px 40px; font-size: 14px; color: var(--muted); }
.footer a { color: var(--muted); transition: color 0.2s; }
.footer a:hover { color: var(--ink); text-decoration: none; }
.footer__top {
  display: grid; grid-template-columns: minmax(200px, 1.2fr) 3fr; gap: 48px;
  padding: 48px 0 44px; border-top: 1px solid var(--line);
}
.footer .footer__brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 17px; font-weight: 600; }
.footer__brand img { border-radius: 7px; }
.footer__tagline { margin: 14px 0 0; max-width: 24ch; line-height: 1.5; }
.footer__cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.footer__head { margin: 0 0 14px; font-size: 13px; font-weight: 600; color: var(--ink); }
.footer__cols ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.footer__bottom {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px;
  padding-top: 22px; border-top: 1px solid var(--line);
}
.footer__legal { display: flex; flex-wrap: wrap; gap: 20px; margin-right: auto; }
.footer__directories { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding-top: 22px; }
.footer__directories a { display: inline-flex; max-width: 100%; }
.footer__directories img { display: block; max-width: 100%; height: auto; }
.footer__trust { list-style: none; margin: 0; padding: 18px 0 0; display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 13px; }
.footer__trust li { display: inline-flex; align-items: center; gap: 7px; }
.footer__trust li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); flex: none; }
.footer__trust a { text-decoration: underline; text-underline-offset: 3px; }

/* System / Light / Dark */
.theme-switch { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--chip); }
.theme-switch button {
  width: 32px; height: 26px; padding: 0; border: 0; border-radius: 999px; cursor: pointer;
  display: grid; place-items: center; background: transparent; color: var(--muted);
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.theme-switch svg { width: 15px; height: 15px; }
.theme-switch button:hover { color: var(--ink); }
.theme-switch button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgb(0 0 0 / 0.12); }
.theme-switch button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

@media (max-width: 900px) {
  .footer__top { grid-template-columns: 1fr; gap: 36px; padding-top: 40px; }
  .footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
}

/* Reveal: hidden only once JS says motion is on */
.js-motion [data-reveal] { opacity: 0; transform: translateY(24px); }

/* ---------- Narrow screens ---------- */
@media (max-width: 900px) {
  /* Narrow: the cards stack, each with its Mac in the flow under the copy */
  .scards { gap: 16px; }
  .scard { flex-direction: column; min-height: 0; border-radius: 28px; clip-path: inset(0 round 28px); }
  .scard__copy { flex: none; gap: 14px; padding: 32px 24px 8px; }
  .scard__title { font-size: 30px; }
  .scard__body { font-size: 17px; }
  .scard__media { padding: 16px 16px 20px; }
  .scard__pin { position: static; width: 100%; max-width: 380px; margin: 0 auto; transform: none; }
  /* Stacked, each Mac is only as tall as its own panel (design px, measured) */
  [data-scard="switch"] .stage--story { --h: 515; }
  [data-scard="codes"] .stage--story { --h: 400; }
  [data-scard="usage"] .stage--story { --h: 512; }
  [data-scard="disk"] .stage--story { --h: 950; }
  [data-scard="disk"] .scard__pin { width: 100%; }
  .dk-cols { grid-template-columns: minmax(0, 1fr); }

  .bento { grid-template-columns: minmax(0, 1fr); }
  .card--wide { grid-column: auto; }
  .mini--wide .sw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card__stage { height: auto; min-height: 240px; padding: 20px 0; }
}

@media (max-width: 520px) {
  .section { padding-top: 80px; }
  .head { margin-bottom: 32px; }
  .lede { font-size: 17px; }
  .cta { gap: 32px; }
  .cta__free span { font-size: 72px; }
}
