/* ==========================================================================
   Ailty GFX — minimal white, sleek type-led design
   ========================================================================== */

:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --ink: #0a0a0a;
  --ink-2: #3d3d3d;
  --muted: #8a8a8a;
  --line: #e6e6e6;
  --line-strong: #d4d4d4;
  --inverse: #0a0a0a;
  --on-inverse: #fafafa;

  --radius: 14px;
  --radius-sm: 10px;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1320px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);

  --font-display: 'Archivo', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--ink); color: var(--bg); }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- type ---------- */
.display {
  font-family: var(--font-display);
  font-stretch: 115%;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  line-height: 0.88;
  margin: 0;
}
.h2 {
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.025em;
  line-height: 0.95;
  font-size: clamp(36px, 6vw, 76px);
  margin: 0;
}
.h3 {
  font-family: var(--font-display);
  font-stretch: 108%;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  font-size: 22px;
  line-height: 1.1;
  margin: 0;
}
.label {
  font: 500 12px/1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); max-width: 46ch; margin: 0; }
.muted { color: var(--muted); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 22px;
  border-radius: 999px; border: 1px solid var(--ink);
  font: 600 14px/1 var(--font-body); letter-spacing: 0.01em;
  cursor: pointer; white-space: nowrap;
  transition: transform .35s var(--ease), background .25s, color .25s, border-color .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-solid { background: var(--ink); color: var(--bg); }
.btn-solid:hover { background: #262626; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-light { background: var(--bg); color: var(--ink); border-color: var(--bg); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 13px; }
.btn svg { width: 18px; height: 18px; flex: none; }
.arrow { transition: transform .35s var(--ease); }
.btn:hover .arrow, a:hover > .arrow { transform: translateX(4px); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 250, 250, 0.82);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.brand span {
  font-family: var(--font-display); font-stretch: 115%; font-weight: 800;
  text-transform: uppercase; letter-spacing: -0.02em; font-size: 19px;
}
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a:not(.btn) {
  padding: 10px 14px; border-radius: 999px;
  font-size: 14px; font-weight: 500; color: var(--ink-2);
  transition: color .2s, background .2s;
}
.nav-links a:not(.btn):hover, .nav-links a[aria-current="page"] { color: var(--ink); background: #efefef; }
.nav-links .btn { margin-left: 10px; }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; margin-right: -10px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; transition: transform .3s var(--ease), opacity .2s; }
.nav.open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 8px var(--gutter) 20px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    opacity: 0; transform: translateY(-8px); pointer-events: none;
    transition: opacity .25s, transform .3s var(--ease);
  }
  .nav.open .nav-links { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a:not(.btn) { padding: 14px 4px; font-size: 17px; border-radius: 0; border-bottom: 1px solid var(--line); background: none !important; }
  .nav-links .btn { margin: 14px 0 0; justify-content: center; }
}

/* ---------- sections ---------- */
section { padding: clamp(64px, 8vw, 112px) 0; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  margin-bottom: clamp(32px, 5vw, 56px);
}
.section-head .label { display: block; margin-bottom: 18px; }
.section-head p { margin: 14px 0 0; color: var(--ink-2); max-width: 52ch; }
.link-more { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; white-space: nowrap; border-bottom: 1px solid var(--ink); padding-bottom: 3px; }
@media (max-width: 640px) { .section-head { flex-direction: column; align-items: flex-start; } }

/* ---------- hero ---------- */
.hero { padding: clamp(48px, 8vw, 110px) 0 0; }
.hero-top { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: end; }
.hero h1 { font-size: clamp(56px, 13.5vw, 210px); }
.display .outline { color: transparent; -webkit-text-stroke: 2px var(--ink); }
.hero-side { display: flex; flex-direction: column; gap: 28px; max-width: 360px; padding-bottom: 10px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-meta { display: flex; gap: 24px; margin-top: clamp(32px, 5vw, 56px); padding-top: 20px; border-top: 1px solid var(--line); justify-content: space-between; flex-wrap: wrap; }
@keyframes rise { to { transform: none; } }
@media (max-width: 900px) {
  .hero-top { grid-template-columns: 1fr; }
  .hero-side { max-width: none; }
}

/* thumbnail reel under the hero */
.reel { margin-top: clamp(40px, 6vw, 72px); overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.reel-track { display: flex; gap: 16px; width: max-content; animation: scroll var(--reel-speed, 60s) linear infinite; }
.reel:hover .reel-track { animation-play-state: paused; }
.reel-item { width: clamp(240px, 30vw, 420px); aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #eee; flex: none; }
.reel-item img { width: 100%; height: 100%; object-fit: cover; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- stats ---------- */
.stats { padding: clamp(56px, 8vw, 96px) 0; border-bottom: 1px solid var(--line); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 8px 24px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat-num { font-family: var(--font-display); font-stretch: 115%; font-weight: 800; font-size: clamp(40px, 5.5vw, 76px); line-height: 1; letter-spacing: -0.03em; }
.stat .label { display: block; margin-top: 14px; }
@media (max-width: 760px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); row-gap: 36px; }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
}

/* ---------- work cards ---------- */
.grid-work { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: clamp(16px, 2vw, 28px); }
.card { display: flex; flex-direction: column; gap: 14px; cursor: pointer; text-align: left; background: none; border: 0; padding: 0; width: 100%; }
.card-media { position: relative; border-radius: var(--radius); overflow: hidden; background: #ececec; aspect-ratio: var(--ar, 16 / 9); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.card:hover .card-media img, .card:focus-visible .card-media img { transform: scale(1.04); }
.card:focus-visible { outline: none; }
.card:focus-visible .card-media { outline: 2px solid var(--ink); outline-offset: 3px; }
.badge {
  position: absolute; top: 12px; right: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 11px; border-radius: 999px;
  background: rgba(10, 10, 10, 0.72); color: #fff;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font: 600 12px/1 var(--font-mono); letter-spacing: 0.02em;
}
.badge svg { width: 13px; height: 13px; }
.card-info { display: flex; align-items: center; gap: 12px; min-width: 0; }
.avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; background: #e4e4e4; display: grid; place-items: center; font-weight: 700; font-size: 15px; color: var(--muted); }
.card-text { min-width: 0; }
.card-title { font-weight: 600; font-size: 15px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.card-media.fit { background: #efefef; }
.card-media.fit img { object-fit: contain; padding: 6%; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.chip {
  height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: transparent; cursor: pointer; font-size: 14px; font-weight: 500;
  transition: background .2s, color .2s, border-color .2s;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip .count { opacity: .5; margin-left: 6px; font-family: var(--font-mono); font-size: 12px; }

.empty {
  border: 1px dashed var(--line-strong); border-radius: var(--radius);
  padding: 56px 24px; text-align: center; color: var(--muted);
}

/* ---------- channels ---------- */
.channels-band { padding: clamp(56px, 8vw, 96px) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 12px; width: max-content; animation: scroll var(--speed, 40s) linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee + .marquee { margin-top: 12px; }
.marquee.reverse .marquee-track { animation-direction: reverse; }
.chan {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 20px 10px 10px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg); flex: none;
  transition: border-color .2s, transform .3s var(--ease);
}
.chan:hover { border-color: var(--ink); transform: translateY(-2px); }
.chan .avatar { width: 44px; height: 44px; }
.chan-name { font-weight: 600; font-size: 15px; line-height: 1.2; white-space: nowrap; }
.chan-subs { font: 500 12px/1.4 var(--font-mono); color: var(--muted); }

.channel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.channel-grid .chan { border-radius: var(--radius); padding: 14px; }
.channel-grid .chan-name { white-space: normal; }

/* ---------- services ---------- */
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); border-top: 1px solid var(--line); }
.service {
  display: flex; flex-direction: column; gap: 40px; justify-content: space-between;
  padding: 28px 24px 28px 0; border-bottom: 1px solid var(--line); min-height: 240px;
  transition: padding .4s var(--ease);
}
.service + .service { padding-left: 24px; border-left: 1px solid var(--line); }
.service:hover { padding-top: 22px; }
.service .num { font: 500 12px/1 var(--font-mono); color: var(--muted); }
.service-price { font-family: var(--font-display); font-stretch: 112%; font-weight: 800; font-size: 40px; letter-spacing: -0.03em; line-height: 1; }
.service-price small { font-family: var(--font-body); font-weight: 500; font-size: 13px; letter-spacing: 0; color: var(--muted); margin-right: 6px; }
.service.soon .service-price { color: var(--muted); font-size: 28px; }
@media (max-width: 760px) {
  .service, .service + .service { padding: 24px 0; border-left: 0; min-height: 0; gap: 20px; }
}

/* ---------- reviews ---------- */
.reviews { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.review {
  display: flex; flex-direction: column; gap: 24px; justify-content: space-between;
  padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
}
.stars { display: flex; gap: 3px; }
.stars svg { width: 16px; height: 16px; fill: var(--ink); }
.stars svg.off { fill: var(--line-strong); }
.review blockquote { margin: 0; font-size: 17px; line-height: 1.55; color: var(--ink); }
.review-by { display: flex; align-items: center; gap: 12px; }
.review-initial {
  width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: var(--bg);
  display: grid; place-items: center; font-weight: 700; font-size: 15px; flex: none;
}
.review-name { font-weight: 600; font-size: 15px; }
.review-role { font-size: 13px; color: var(--muted); }

/* ---------- CTA band ---------- */
.cta { background: var(--inverse); color: var(--on-inverse); border-radius: calc(var(--radius) * 2); padding: clamp(40px, 7vw, 96px); position: relative; overflow: hidden; }
.cta .display { font-size: clamp(44px, 9vw, 140px); }
.cta p { color: #a3a3a3; max-width: 44ch; margin: 24px 0 36px; font-size: 18px; }
.cta-star { position: absolute; right: -6%; top: 50%; width: clamp(220px, 34vw, 480px); transform: translateY(-50%) rotate(0deg); opacity: .14; animation: spin 40s linear infinite; pointer-events: none; }
@keyframes spin { to { transform: translateY(-50%) rotate(360deg); } }
.cta-wrap { padding-bottom: clamp(48px, 8vw, 96px); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 40px 0; font-size: 14px; color: var(--muted); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer .brand img { width: 28px; height: 28px; border-radius: 7px; }
.footer .brand span { font-size: 16px; color: var(--ink); }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a:hover { color: var(--ink); }

/* ---------- page header (inner pages) ---------- */
.page-head { padding: clamp(56px, 9vw, 120px) 0 clamp(32px, 5vw, 56px); }
.page-head .display { font-size: clamp(52px, 11vw, 168px); }
.page-head .label { display: block; margin-bottom: 24px; }
.page-head .lede { margin-top: 28px; }

/* ---------- pricing ---------- */
.price-block { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 32px; padding: 48px 0; border-top: 1px solid var(--line); }
.price-block .meta { display: flex; flex-direction: column; gap: 14px; }
.price-block .h2 { font-size: clamp(30px, 4vw, 52px); }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-strong); font: 500 12px/1 var(--font-mono); text-transform: uppercase; letter-spacing: .06em; width: fit-content; }
.pill.dark { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.tier { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.tier-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 16px; flex-wrap: wrap; }
.tier-price { font-family: var(--font-display); font-stretch: 112%; font-weight: 800; font-size: 44px; letter-spacing: -0.03em; line-height: 1; white-space: nowrap; }
.tier-price.text { font-size: 26px; }
.tier p { margin: 0; color: var(--ink-2); font-size: 15px; }
.tier ul, .soon-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: var(--ink-2); }
.tier li, .soon-list li { display: flex; gap: 10px; }
.tier li::before, .soon-list li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); flex: none; margin-top: 8px; }
.note-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 28px; background: var(--surface); display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
@media (max-width: 860px) { .price-block { grid-template-columns: minmax(0, 1fr); } }

/* ---------- terms ---------- */
.terms { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; align-items: start; padding-bottom: 96px; }
.terms-toc { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 4px; }
.terms-toc a { padding: 8px 0; font-size: 14px; color: var(--muted); border-left: 2px solid transparent; padding-left: 14px; transition: color .2s, border-color .2s; }
.terms-toc a:hover { color: var(--ink); border-left-color: var(--ink); }
.term { padding: 36px 0; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.term:first-child { border-top: 0; padding-top: 0; }
.term .h3 { display: flex; gap: 18px; align-items: baseline; font-size: 26px; margin-bottom: 20px; }
.term .h3 .label { font-size: 13px; }
.term ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; }
.term li { position: relative; padding-left: 24px; color: var(--ink-2); max-width: 70ch; }
.term li::before { content: ''; position: absolute; left: 0; top: 11px; width: 10px; height: 1px; background: var(--ink); }
@media (max-width: 860px) { .terms { grid-template-columns: 1fr; } .terms-toc { display: none; } }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }


/* ==========================================================================
   Motion & stars
   ========================================================================== */
:root {
  --sparkle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0C12.7 6.4 17.6 11.3 24 12 17.6 12.7 12.7 17.6 12 24 11.3 17.6 6.4 12.7 0 12 6.4 11.3 11.3 6.4 12 0Z'/%3E%3C/svg%3E");
  --sparkle-white: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fafafa' d='M12 0C12.7 6.4 17.6 11.3 24 12 17.6 12.7 12.7 17.6 12 24 11.3 17.6 6.4 12.7 0 12 6.4 11.3 11.3 6.4 12 0Z'/%3E%3C/svg%3E");
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.76, 0, .24, 1);
}

/* ---------- page curtain: enter (pure CSS, runs on every load) ---------- */
body:not(.no-curtain)::after,
body:not(.no-curtain)::before {
  content: ''; position: fixed; inset: 0; pointer-events: none;
}
body:not(.no-curtain)::after {
  z-index: 1000; background: var(--inverse);
  animation: curtain-up .8s var(--ease-io) .25s both;
}
body:not(.no-curtain)::before {
  z-index: 1001;
  background: var(--sparkle-white) center / 56px no-repeat;
  animation: curtain-star-out .55s var(--ease-io) both;
}
@keyframes curtain-up { to { transform: translateY(-100%); visibility: hidden; } }
@keyframes curtain-star-out {
  from { transform: rotate(0) scale(1); }
  to { transform: rotate(180deg) scale(0); opacity: 0; visibility: hidden; }
}

/* ---------- page curtain: leave (added by motion.js) ---------- */
.curtain {
  position: fixed; inset: 0; z-index: 1000; pointer-events: none;
  background: var(--inverse); display: grid; place-items: center;
  transform: translateY(100%); transition: transform .5s var(--ease-io);
}
.curtain.cover { transform: none; pointer-events: auto; }
.curtain-star { width: 56px; height: 56px; fill: var(--on-inverse); transform: scale(0) rotate(-180deg); transition: transform .5s var(--ease-out) .15s; }
.curtain.cover .curtain-star { transform: none; }

/* ---------- headline lines rise in (hero + inner pages) ---------- */
.display .line { display: block; overflow: hidden; padding-bottom: .04em; margin-bottom: -.04em; }
.display .line > span { display: inline-block; transform: translateY(108%); animation: rise 1.1s var(--ease-out) .55s forwards; }
.display .line:nth-child(2) > span { animation-delay: .65s; }
.hero-star {
  display: inline-block; width: .42em; height: .42em; margin-left: .08em; vertical-align: .62em;
  fill: currentColor; animation: star-in 1.4s var(--ease-out) 1s both, spin 14s linear 2.4s infinite;
}
@keyframes star-in { from { transform: scale(0) rotate(-270deg); } to { transform: scale(1) rotate(0); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- hero decoration ---------- */
.hero { position: relative; }
.hero-stars { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: -1; }
.hero-big-star {
  position: absolute; right: -4%; top: 2%; width: min(46vw, 600px); fill: #eeeeee;
  animation: spin 80s linear infinite;
}
.twinkle { position: absolute; width: 14px; height: 14px; fill: var(--ink); animation: twinkle 3.6s ease-in-out infinite; }
.t1 { left: 46%; top: 9%;  animation-delay: 0s; }
.t2 { left: 61%; top: 34%; width: 9px; height: 9px; animation-delay: .9s; }
.t3 { left: 88%; top: 12%; width: 20px; height: 20px; animation-delay: 1.6s; }
.t4 { left: 4%;  top: 3%;  width: 10px; height: 10px; animation-delay: 2.2s; }
.t5 { left: 72%; top: 58%; width: 12px; height: 12px; animation-delay: 2.9s; }
.t6 { left: 40%; top: 48%; width: 8px; height: 8px; animation-delay: 1.2s; }
@keyframes twinkle {
  0%, 100% { transform: scale(0) rotate(0); opacity: 0; }
  45%, 55% { transform: scale(1) rotate(90deg); opacity: 1; }
}
.meta-star { width: 9px; height: 9px; fill: currentColor; vertical-align: 0; margin: 0 6px; display: inline-block; }
.status { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.pulse-star { width: 12px; height: 12px; fill: var(--ink); animation: pulse-star 2s ease-in-out infinite; }
@keyframes pulse-star { 50% { transform: scale(.55) rotate(45deg); opacity: .5; } }
@media (max-width: 900px) { .hero-big-star { display: none; } .t1, .t6 { display: none; } }

/* ---------- section labels get a star that spins in ---------- */
.section-head .label, .page-head .label, .cta .label { display: inline-flex !important; align-items: center; gap: 10px; }
.section-head .label::before, .page-head .label::before, .cta .label::before {
  content: ''; width: 11px; height: 11px; background: currentColor; flex: none;
  -webkit-mask: var(--sparkle) center / contain no-repeat; mask: var(--sparkle) center / contain no-repeat;
  transform: scale(0) rotate(-180deg); transition: transform 1s var(--ease-out) .2s;
}
.in .label::before, .label.in::before, .page-head .label::before { transform: none; }
.page-head .label::before { animation: star-in 1.2s var(--ease-out) .5s both; }

/* ---------- star bullets ---------- */
.term li::before, .tier li::before, .soon-list li::before {
  width: 10px; height: 10px; border-radius: 0; background: var(--ink);
  -webkit-mask: var(--sparkle) center / contain no-repeat; mask: var(--sparkle) center / contain no-repeat;
  transition: transform .5s var(--ease-out);
}
.term li::before { top: 7px; }
.tier li::before, .soon-list li::before { margin-top: 6px; }
.term li:hover::before, .tier li:hover::before { transform: rotate(90deg) scale(1.3); }

/* ---------- nav: sliding hover pill, progress bar ---------- */
.nav-pill {
  position: absolute; left: 0; top: 50%; height: 38px; margin-top: -19px; border-radius: 999px;
  background: #ececec; opacity: 0; pointer-events: none; z-index: -1;
  transition: transform .45s var(--ease-out), width .45s var(--ease-out), opacity .25s;
}
@media (min-width: 761px) {
  .nav-links { position: relative; }
  .nav-links a:not(.btn):hover, .nav-links a[aria-current="page"] { background: transparent; }
}
.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none; }
.progress-fill { position: absolute; inset: 0; background: var(--ink); transform-origin: left; transform: scaleX(var(--p, 0)); }
.progress-star {
  position: absolute; top: 50%; left: calc(var(--p, 0) * (100% - 14px) + 7px); width: 14px; height: 14px; fill: var(--ink);
  transform: translate(-50%, -50%) rotate(calc(var(--p, 0) * 720deg)); opacity: min(1, calc(var(--p, 0) * 40));
}
.brand img { transition: transform .8s var(--ease-out); }
.brand:hover img { transform: rotate(-12deg) scale(1.08); }

/* mobile menu: links stagger in */
@media (max-width: 760px) {
  .nav-links > a { opacity: 0; transform: translateY(-10px); transition: opacity .35s, transform .45s var(--ease-out); }
  .nav.open .nav-links > a { opacity: 1; transform: none; }
  .nav.open .nav-links > a:nth-of-type(2) { transition-delay: .05s; }
  .nav.open .nav-links > a:nth-of-type(3) { transition-delay: .1s; }
  .nav.open .nav-links > a:nth-of-type(4) { transition-delay: .15s; }
  .nav.open .nav-links > a:nth-of-type(5) { transition-delay: .2s; }
}

/* ---------- buttons: fill sweep + magnetic ---------- */
.btn { position: relative; overflow: hidden; isolation: isolate; transition: transform .35s var(--ease), background .25s, color .3s, border-color .25s, translate .5s var(--ease-out); }
.btn.magnet-on { transition: transform .35s var(--ease), background .25s, color .3s, border-color .25s, translate .12s linear; }
.btn::before {
  content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  transform: translateY(101%); transition: transform .5s var(--ease-out);
}
.btn:hover::before { transform: none; }
.btn-ghost::before { background: var(--ink); }
.btn-ghost:hover { color: var(--bg); border-color: var(--ink); }
.btn-solid::before { background: #2a2a2a; }
.btn-light::before { background: #fff; }
.btn:active { transform: scale(.96); }

/* ---------- chips: sliding active pill ---------- */
.filters { position: relative; }
.chip { position: relative; z-index: 1; transition: color .35s, border-color .2s, transform .2s; }
.chip:active { transform: scale(.95); }
.chip[aria-pressed="true"] { background: transparent; }
.chip-pill { position: absolute; left: 0; top: 0; border-radius: 999px; background: var(--ink); transition: transform .5s var(--ease-out), width .5s var(--ease-out); }
.filters:not(:has(.chip-pill)) .chip[aria-pressed="true"] { background: var(--ink); }

/* ---------- cards: tilt, shine, star "open" button ---------- */
.card-media { transition: transform .6s var(--ease-out), box-shadow .6s var(--ease-out); transform-style: preserve-3d; will-change: transform; }
.card-media.tilting { transition: transform .12s linear, box-shadow .6s var(--ease-out); }
.card:hover .card-media { box-shadow: 0 28px 50px -24px rgba(0, 0, 0, .35); }
.card-media::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .28), transparent 55%);
}
.card-media.tilting::after { opacity: 1; }
.card-open {
  position: absolute; left: 12px; bottom: 12px; width: 38px; height: 38px; border-radius: 50%;
  background: var(--bg); display: grid; place-items: center;
  transform: scale(0) rotate(-120deg); transition: transform .55s var(--ease-out);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .2);
}
.card-open svg { width: 16px; height: 16px; fill: var(--ink); }
.card:hover .card-open, .card:focus-visible .card-open { transform: none; }
.card:hover .card-open svg { animation: spin 3s linear infinite; }
.card-title { transition: transform .5s var(--ease-out); }
.card:hover .card-title { transform: translateX(4px); }
@media (hover: none) { .card-open { transform: scale(.8); } }

/* View Transitions for portfolio filtering */
::view-transition-group(*) { animation-duration: .55s; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
::view-transition-old(root), ::view-transition-new(root) { animation: none; }

/* ---------- channels: star separators, hover ---------- */
.sep { display: grid; place-items: center; flex: none; padding: 0 4px; }
.sep svg { width: 14px; height: 14px; fill: var(--ink); animation: spin 8s linear infinite; }
.chan .avatar { transition: transform .6s var(--ease-out); }
.chan:hover .avatar { transform: rotate(-10deg) scale(1.08); }
.chan:hover { background: var(--ink); color: var(--bg); }
.chan:hover .chan-subs { color: #a3a3a3; }
.chan { transition: border-color .2s, transform .3s var(--ease), background .3s, color .3s; }

/* ---------- services & tiers ---------- */
.service { position: relative; }
.service::after {
  content: ''; position: absolute; right: 24px; top: 26px; width: 18px; height: 18px; background: var(--ink);
  -webkit-mask: var(--sparkle) center / contain no-repeat; mask: var(--sparkle) center / contain no-repeat;
  transform: scale(0) rotate(-180deg); transition: transform .6s var(--ease-out);
}
.service:hover::after { transform: none; }
.service .service-price { transition: transform .5s var(--ease-out); }
.service:hover .service-price { transform: translateX(6px); }
@media (max-width: 760px) { .service::after { right: 0; } }
.tier { transition: transform .5s var(--ease-out), border-color .3s, box-shadow .5s var(--ease-out); }
.tier:hover { transform: translateY(-6px); border-color: var(--ink); box-shadow: 0 24px 50px -30px rgba(0, 0, 0, .35); }

/* ---------- reviews ---------- */
.review { transition: transform .5s var(--ease-out), border-color .3s, box-shadow .5s var(--ease-out); }
.review:hover { transform: translateY(-6px) rotate(-.4deg); border-color: var(--ink); box-shadow: 0 24px 50px -30px rgba(0, 0, 0, .35); }
.review.in .stars svg { animation: star-in .8s var(--ease-out) both; }
.review.in .stars svg:nth-child(2) { animation-delay: .08s; }
.review.in .stars svg:nth-child(3) { animation-delay: .16s; }
.review.in .stars svg:nth-child(4) { animation-delay: .24s; }
.review.in .stars svg:nth-child(5) { animation-delay: .32s; }

/* ---------- stats ---------- */
.stat-num { display: inline-block; transition: transform .5s var(--ease-out); }
.stat:hover .stat-num { transform: translateY(-4px) skewX(-4deg); }

/* ---------- CTA ---------- */
.cta .btn-light:hover { color: var(--ink); }
.cta::after {
  content: ''; position: absolute; left: 8%; bottom: 18%; width: 14px; height: 14px; background: var(--on-inverse);
  -webkit-mask: var(--sparkle) center / contain no-repeat; mask: var(--sparkle) center / contain no-repeat;
  animation: twinkle 3.2s ease-in-out infinite 1s;
}

/* ---------- footer wordmark ---------- */
.footer { padding-top: 0; border-top: 0; }
.footer-mark {
  text-align: center; padding-top: clamp(24px, 4vw, 48px); padding-bottom: clamp(24px, 4vw, 40px);
  border-bottom: 1px solid var(--line); margin-bottom: 32px; user-select: none; overflow: hidden;
}
.footer-mark-inner {
  display: inline-flex; align-items: center; gap: .08em; white-space: nowrap;
  font-family: var(--font-display); font-stretch: 125%; font-weight: 900; text-transform: uppercase;
  font-size: 12vw; line-height: .8; letter-spacing: -.04em; color: var(--ink);
  padding: 0 2px; /* room for the outline stroke */
}
.footer-mark .outline { color: transparent; -webkit-text-stroke: 2px var(--ink); }
.footer-star { width: .5em; height: .5em; fill: var(--ink); flex: none; animation: spin 12s linear infinite; transition: transform .6s; }
.footer-mark:hover .footer-star { animation-duration: 1.5s; }

/* ---------- back to top ---------- */
.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 52px; height: 52px; border-radius: 50%;
  border: 0; background: var(--ink); cursor: pointer; display: grid; place-items: center;
  transform: translateY(90px) rotate(-180deg); transition: transform .6s var(--ease-out), translate .5s var(--ease-out);
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .4);
}
.to-top.show { transform: none; }
.to-top svg { width: 20px; height: 20px; fill: var(--bg); transition: transform .6s var(--ease-out); }
.to-top:hover svg { transform: rotate(180deg) scale(1.15); }

/* ---------- star burst + cursor ---------- */
.burst { position: fixed; z-index: 1200; width: 14px; height: 14px; pointer-events: none; mix-blend-mode: difference; }
.burst svg { width: 100%; height: 100%; fill: #fff; }
.cursor-star {
  position: fixed; left: 0; top: 0; z-index: 1100; width: 18px; height: 18px; pointer-events: none;
  mix-blend-mode: difference;
}
.cursor-star svg { width: 100%; height: 100%; fill: #fff; transition: transform .35s var(--ease-out); }
.cursor-star.big svg { transform: scale(2); }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: clamp(16px, 4vw, 64px); visibility: hidden; }
.lightbox.active { visibility: visible; }
.lightbox-bg {
  position: absolute; inset: 0; background: rgba(250, 250, 250, 0.95);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  opacity: 0; transition: opacity .45s var(--ease-out);
}
.lightbox.open .lightbox-bg { opacity: 1; }
.lightbox-inner { position: relative; width: min(1200px, 100%); display: flex; flex-direction: column; gap: 18px; }
.lightbox-stage { display: grid; place-items: center; }
.lightbox-stage > * { grid-area: 1 / 1; }
.lightbox-img {
  width: min(100%, calc((100vh - 230px) * var(--ar, 1.7778))); aspect-ratio: var(--ar, 16 / 9); height: auto;
  object-fit: cover; border-radius: var(--radius); background: #eee; transform-origin: top left;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .35);
}
.lightbox-img.leaving { transform-origin: center; }
.lightbox-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  width: min(100%, calc((100vh - 230px) * 1.7778)); margin: 0 auto;
  opacity: 0; transform: translateY(14px); transition: opacity .4s, transform .6s var(--ease-out);
}
.lightbox.open .lightbox-bar { opacity: 1; transform: none; transition-delay: .25s; }
.lb-ctl {
  position: absolute; z-index: 2; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line-strong);
  background: var(--surface); cursor: pointer; display: grid; place-items: center;
  opacity: 0; transform: scale(.6); transition: opacity .3s, transform .5s var(--ease-out), background .2s, color .2s, border-color .2s;
}
.lightbox.open .lb-ctl { opacity: 1; transform: none; transition-delay: .2s; }
.lb-ctl:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.lightbox-close { top: 18px; right: 18px; }
.lightbox-nav { top: 50%; margin-top: -24px; }
.lightbox-nav.prev { left: 18px; }
.lightbox-nav.next { right: 18px; }
.lightbox.single .lightbox-nav { display: none; }
.lightbox-count { position: absolute; left: 24px; top: 32px; z-index: 2; opacity: 0; transition: opacity .4s .3s; }
.lightbox.open .lightbox-count { opacity: 1; }
@media (max-width: 760px) {
  .lightbox-nav { top: auto; bottom: 18px; margin-top: 0; }
  .lightbox-nav.prev { left: calc(50% - 56px); }
  .lightbox-nav.next { right: calc(50% - 56px); }
}

/* ---------- 404 ---------- */
.lost { position: relative; overflow: hidden; }
.lost-star { position: absolute; right: -6%; top: 10%; width: min(50vw, 520px); fill: var(--ink); opacity: .06; animation: drift 18s ease-in-out infinite; }
@keyframes drift { 50% { transform: translate(-6%, 8%) rotate(140deg); } 100% { transform: rotate(360deg); } }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reel-track, .marquee-track, .cta-star, .hero-big-star, .twinkle, .sep svg, .footer-star { animation: none !important; }
  .display .line > span, .hero-star { transform: none; animation: none !important; }
  .twinkle { opacity: .6; transform: none; }
  .reveal { opacity: 1; transform: none; }
  body::after, body::before { display: none; }
}
.lb-ctl:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ---------- portfolio: grid sizes, visitor sort, hidden badges ---------- */
.grid-work.size-large { grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); }
.grid-work.size-small { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.grid-work.size-small .card-title { font-size: 14px; }
.no-badges .badge { display: none; }
.work-bar { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 36px; }
.work-bar .filters { margin-bottom: 0; }
.sort-select { position: relative; display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.sort-select select {
  appearance: none; -webkit-appearance: none; font: 500 14px var(--font-body); color: var(--ink);
  height: 40px; padding: 0 38px 0 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; cursor: pointer;
  transition: border-color .2s;
}
.sort-select select:hover { border-color: var(--ink); }
.sort-select::after {
  content: ''; position: absolute; right: 14px; width: 11px; height: 11px; background: var(--ink); pointer-events: none;
  -webkit-mask: var(--sparkle) center / contain no-repeat; mask: var(--sparkle) center / contain no-repeat;
  transition: transform .5s var(--ease-out);
}
.sort-select:hover::after { transform: rotate(90deg); }

/* ---------- Featured carousel (home) ---------- */
.head-right { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.feat-nav { display: inline-flex; align-items: center; gap: 10px; }
.feat-arrow {
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line-strong); background: transparent;
  display: grid; place-items: center; cursor: pointer; color: var(--ink);
  transition: background .25s, color .25s, border-color .25s, transform .35s var(--ease-out);
}
.feat-arrow svg { width: 18px; height: 18px; transition: transform .35s var(--ease-out); }
.feat-arrow:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.feat-arrow[data-dir="-1"]:hover svg { transform: translateX(-3px); }
.feat-arrow[data-dir="1"]:hover svg { transform: translateX(3px); }
.feat-arrow:active { transform: scale(.92); }
.feat-count { font: 500 13px/1 var(--font-mono); letter-spacing: .08em; min-width: 64px; text-align: center; }

.feat-viewport { --feat-gap: 32px; overflow: hidden; margin: -24px -16px; padding: 24px 16px; box-sizing: border-box; transition: height .8s cubic-bezier(.65, 0, .2, 1); }
.feat-track { display: flex; align-items: flex-start; gap: var(--feat-gap); transition: transform .8s cubic-bezier(.65, 0, .2, 1); will-change: transform; }
.feat-page { flex: 0 0 100%; min-width: 0; }
.feat-page .card.reveal:not(.in) { transform: translate(var(--slide, 0px), 24px); }

.feat-dots { display: flex; justify-content: center; gap: 8px; margin-top: 36px; }
.feat-dots button {
  width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: var(--line-strong); cursor: pointer;
  transition: width .45s var(--ease-out), background .3s;
}
.feat-dots button:hover { background: var(--muted); }
.feat-dots button[aria-current="true"] { width: 28px; background: var(--ink); }

@media (max-width: 640px) {
  .head-right { width: 100%; justify-content: space-between; }
  .feat-viewport { --feat-gap: 20px; }
}
@media (prefers-reduced-motion: reduce) { .feat-track { transition: none; } }
