/* granstrm.com — shared styles for the index and the Grubit page. */

@view-transition { navigation: auto; }

@property --g1 { syntax: "<color>"; inherits: true; initial-value: #27a865; }
@property --g2 { syntax: "<color>"; inherits: true; initial-value: #f4a259; }

:root {
  color-scheme: light dark;

  --bg: light-dark(#f4f4f0, #09090b);
  --ink: light-dark(#0b0b0c, #f5f5f1);
  --ink-2: light-dark(#56564f, #a5a59d);
  --ink-3: light-dark(#8d8d85, #6c6c66);
  --line: light-dark(rgb(11 11 12 / 0.11), rgb(245 245 241 / 0.12));
  --surface: light-dark(rgb(255 255 255 / 0.62), rgb(255 255 255 / 0.045));
  --surface-solid: light-dark(#ffffff, #131316);

  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gutter: clamp(20px, 4vw, 56px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --spring: linear(
    0, 0.009, 0.035 2.1%, 0.141, 0.281 6.7%, 0.723 12.9%, 0.938 16.7%, 1.017,
    1.077, 1.121, 1.149 24.3%, 1.159, 1.163, 1.161, 1.154 29.9%, 1.129 32.8%,
    1.051 39.6%, 1.017 43.1%, 0.991, 0.977 51%, 0.974 53.8%, 0.975 57.1%,
    0.997 69.8%, 1.003 76.9%, 1.004 83.8%, 1
  );
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

a { color: inherit; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; }
::selection { background: var(--ink); color: var(--bg); }

.wrap {
  width: min(1200px, 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.logo { display: block; fill: currentColor; overflow: visible; }

/* The diamond lattice behind everything, drawn in site.js. */
.lattice {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  color: var(--ink);
  pointer-events: none;
  mask-image: radial-gradient(110% 85% at 50% 0%, #000 25%, transparent 85%);
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--gutter);
  view-transition-name: nav;
}
.nav::before {
  content: "";
  position: absolute;
  inset: 0 0 -24px;
  z-index: -1;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px);
  mask-image: linear-gradient(#000 68%, transparent);
  pointer-events: none;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.brand .logo {
  width: 26px;
  height: 26px;
  transition: rotate 0.9s var(--spring);
}
.brand:hover .logo { rotate: 90deg; }
.nav__right { display: flex; align-items: center; gap: 6px; }
.nav__link {
  padding: 8px 14px;
  border-radius: 99px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}
.nav__link:hover { color: var(--ink); background: var(--line); }

.theme-toggle {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  cursor: pointer;
  transition: scale 0.5s var(--spring), border-color 0.2s;
}
.theme-toggle:hover { scale: 1.08; border-color: var(--ink-3); }
.theme-toggle:active { scale: 0.94; }
.theme-toggle svg {
  width: 18px;
  height: 18px;
  rotate: light-dark(0deg, 180deg);
  transition: rotate 0.9s var(--spring);
}
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* Theme switch: the new theme grows out of the toggle. */
.vt-theme * { view-transition-name: none !important; }
html.vt-theme::view-transition-old(root) { animation: none; }
html.vt-theme::view-transition-new(root) {
  animation: theme-reveal 0.75s var(--ease-out);
}
@keyframes theme-reveal {
  from { clip-path: circle(0 at var(--vx, 50%) var(--vy, 0%)); }
  to { clip-path: circle(150vmax at var(--vx, 50%) var(--vy, 0%)); }
}
::view-transition-group(*) {
  animation-duration: 0.6s;
  animation-timing-function: var(--ease-out);
}

/* ---------- Reveal on scroll ---------- */

.js .reveal { opacity: 0; }
.js .reveal.is-in {
  opacity: 1;
  animation: rise 1s var(--ease-out) backwards;
  animation-delay: calc(var(--i, 0) * 70ms);
}
@keyframes rise {
  from { opacity: 0; translate: 0 32px; }
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  place-items: center;
  min-height: calc(100svh - 68px);
  padding: 12px var(--gutter) 72px;
  text-align: center;
}
.hero__inner {
  display: grid;
  justify-items: center;
  gap: clamp(20px, 4svh, 40px);
}
@supports (animation-timeline: scroll()) {
  .hero__inner {
    animation: hero-out linear both;
    animation-timeline: scroll(root);
    animation-range: 0 85svh;
  }
  @keyframes hero-out {
    to { opacity: 0; scale: 0.9; translate: 0 -8svh; }
  }
}

.hero__stage {
  --size: min(44svh, 66vw, 460px);
  position: relative;
  width: var(--size);
  height: var(--size);
  perspective: 900px;
}
.hero__stage::before {
  content: "";
  position: absolute;
  inset: -35%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--ink) 13%, transparent), transparent);
  animation: halo 7s ease-in-out infinite alternate;
}
@keyframes halo {
  to { scale: 1.18; opacity: 0.6; }
}
.logo--hero {
  width: 100%;
  height: 100%;
  cursor: pointer;
  transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  filter: drop-shadow(0 24px 30px color-mix(in srgb, var(--ink) 16%, transparent));
  -webkit-tap-highlight-color: transparent;
}
.logo--hero .piece { will-change: transform; }
.logo--hero .piece path {
  transform-box: fill-box;
  transform-origin: center;
  animation: piece-in 1.5s var(--spring) both;
  animation-delay: calc(var(--i) * 75ms + 120ms);
}
@keyframes piece-in {
  from {
    opacity: 0;
    transform: translate(calc(var(--ix, 0) * 1px), calc(var(--iy, 0) * 1px)) scale(var(--is, 1)) rotate(var(--ir, 0deg));
  }
}

.eyebrow {
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.wordmark {
  display: flex;
  justify-content: center;
  overflow: hidden;
  padding-bottom: 0.12em;
  font-size: clamp(52px, 10.5vw, 132px);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.065em;
}
.wordmark .ch {
  display: inline-block;
  animation: ch-in 1.1s var(--ease-out) both;
  animation-delay: calc(var(--i) * 45ms + 700ms);
}
@keyframes ch-in {
  from { translate: 0 110%; }
}
.hero__lede {
  max-width: 30ch;
  font-size: clamp(17px, 1.6vw, 21px);
  color: var(--ink-2);
  text-wrap: balance;
  animation: fade-up 1.1s var(--ease-out) 1.15s both;
}
.hero .eyebrow { animation: fade-up 1.1s var(--ease-out) 1s both; }
@keyframes fade-up {
  from { opacity: 0; translate: 0 14px; }
}
.hero__text { display: grid; justify-items: center; gap: 16px; }

.scroll-cue {
  position: absolute;
  bottom: 22px;
  left: 50%;
  translate: -50% 0;
  display: grid;
  place-items: center;
  width: 26px;
  height: 42px;
  border: 1px solid var(--ink-3);
  border-radius: 99px;
  animation: fade-up 1s var(--ease-out) 1.6s both;
}
.scroll-cue::before {
  content: "";
  width: 4px;
  height: 4px;
  rotate: 45deg;
  background: var(--ink);
  animation: cue 2s var(--ease-out) infinite;
}
@keyframes cue {
  from { translate: 0 -9px; opacity: 0; }
  40% { opacity: 1; }
  to { translate: 0 9px; opacity: 0; }
}
.hero { position: relative; }

/* ---------- Index and cards ---------- */

.index { padding-block: 40px 120px; scroll-margin-top: 60px; }
.index__head { margin-bottom: 28px; }
.h2 {
  font-size: clamp(34px, 5vw, 60px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.05em;
}
.h2 sup {
  margin-left: 6px;
  font: 500 13px/1 var(--mono);
  letter-spacing: 0;
  color: var(--ink-3);
  vertical-align: top;
}

/* The first three rows share one height; the row of stats cards under them sets its own. */
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(3, 1fr); gap: 14px; }

/* Frosted tiles; a light follows the pointer (--px/--py are set in site.js). */
.card {
  --accent: oklch(0.74 0.16 var(--h, 250));
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-height: 200px;
  padding: 22px;
  border-radius: 26px;
  isolation: isolate;
  background: var(--surface);
  backdrop-filter: blur(20px) saturate(1.5);
  box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 light-dark(rgb(255 255 255 / 0.9), rgb(255 255 255 / 0.07));
  text-decoration: none;
  transition: transform 0.7s var(--spring);
  -webkit-tap-highlight-color: transparent;
}
.card:hover { transform: translateY(-5px); }
.card:active { transform: scale(0.985); }
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: radial-gradient(240px circle at var(--px, 50%) var(--py, 50%), var(--ink), transparent 72%);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.card__fx {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--px, 50%) var(--py, 50%), color-mix(in oklch, var(--accent) 26%, transparent), transparent 62%);
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
}
.card:hover::before { opacity: 0.55; }
.card:hover .card__fx { opacity: 1; }
.card__top { display: flex; align-items: center; gap: 12px; }
.card__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  box-shadow: inset 0 0 0 1px var(--line);
}
.card__icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.card__icon svg.is-solid { fill: currentColor; stroke: none; }
.card__icon img {
  display: block;
  width: 100%;
  height: 100%;
  padding: 12%;
  border-radius: inherit;
  background: #f4f6f1;
}
.card__tag {
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.card__num {
  margin-left: auto;
  font: 500 12px/1 var(--mono);
  color: var(--ink-3);
}
.card__title {
  display: block;
  font-size: 23px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.card__desc {
  display: block;
  margin-top: 8px;
  font-size: 15px;
  color: var(--ink-2);
  text-wrap: balance;
}
.card__foot {
  display: flex;
  margin-top: auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font: 500 12.5px/1 var(--mono);
  color: var(--ink-2);
}
.card__host { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card__arrow {
  flex: none;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: translate 0.6s var(--spring);
}
.card:hover .card__arrow { translate: 3px -3px; }

/* Grubit: the large tile. Its icon and title morph into the product page's. */
.card--feature { grid-column: span 2; grid-row: span 2; padding: 28px; }
.card--feature .card__icon { width: 84px; height: 84px; border-radius: 22px; view-transition-name: grubit-icon; }
.card--feature .card__body { margin-top: auto; }
.card--feature .card__title {
  width: fit-content;
  font-size: clamp(40px, 5vw, 64px);
  letter-spacing: -0.05em;
  view-transition-name: grubit-title;
}
.card--feature .card__desc { font-size: 18px; max-width: 24ch; }
.card--feature .card__foot { margin-top: 0; }
.card--wide { grid-column: span 2; }

/* Cards with live numbers (see initStats in site.js): the numbers sit in a row under the title. */
.card--stats .card__body { display: grid; gap: 18px; }
.stats { display: flex; flex-wrap: wrap; gap: 16px 28px; }
/* Raider.io: the raids of the season share one row, and the score has the row under it.
   The raids are added by the script, so their row keeps its height while it is empty. */
.stats--rows { display: grid; }
.raids {
  display: grid;
  grid-auto-flow: column;
  /* However many raids there are, they stay on the one row. When it is full, the columns
     share the width evenly up to what each needs, so only an overlong name is cut short. */
  grid-auto-columns: minmax(0, max-content);
  justify-content: start;
  gap: 16px 28px;
  min-height: 48px;
}
.raids .stat { min-width: 0; }
.raids :is(.stat__value, .stat__label) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat { display: grid; gap: 7px; }
.stat__value {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.stat__value small { font-size: 15px; font-weight: 500; letter-spacing: -0.01em; color: var(--ink-3); }
/* Raider.io gives every score a colour; it is shown as a small diamond before the number. */
.stat__value--tier::before {
  content: "";
  align-self: center;
  width: 9px;
  height: 9px;
  margin-right: 3px;
  rotate: 45deg;
  background: var(--tier, var(--ink-3));
  transition: background 0.6s;
}
.stat__label {
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
  white-space: nowrap;
}

/* The link shortener: a card with a form in its foot (see initShortener in site.js). */
.field {
  display: flex;
  width: 100%;
  padding: 4px;
  border-radius: 99px;
  background: light-dark(rgb(11 11 12 / 0.05), rgb(255 255 255 / 0.06));
  box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow 0.3s;
}
.field:focus-within { box-shadow: inset 0 0 0 1px var(--ink-2); }
.field__input {
  flex: 1;
  min-width: 0;
  padding: 0 8px 0 12px;
  border: 0;
  outline: 0;
  background: none;
  color: var(--ink);
  font: 500 13px/1 var(--mono);
  text-overflow: ellipsis;
}
.field__input::placeholder { color: var(--ink-3); }
.field__button {
  flex: none;
  display: grid;
  place-items: center;
  min-width: 76px;
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 99px;
  background: var(--ink);
  color: var(--bg);
  font: 500 13px/1 var(--sans);
  cursor: pointer;
  transition: scale 0.5s var(--spring), opacity 0.2s;
}
.field__button:hover { scale: 1.04; }
.field__button:active { scale: 0.95; }
.field__button:disabled { cursor: default; }
/* While waiting for the server the label makes way for a turning diamond. */
.card--tool.is-busy .field__button span { display: none; }
.card--tool.is-busy .field__button::before {
  content: "";
  width: 9px;
  height: 9px;
  background: currentColor;
  animation: turn 0.9s var(--ease-out) infinite;
}
@keyframes turn {
  from { rotate: 45deg; }
  to { rotate: 225deg; }
}
.card--tool.is-done .field { box-shadow: inset 0 0 0 1px var(--accent); }
.card--tool.is-done .field__input { animation: fade-up 0.6s var(--ease-out); }
@media (hover: none) {
  /* Below 16px, iOS zooms the page when the field is focused. */
  .field__input { font-size: 16px; }
}

/* ---------- Footer ---------- */

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 28px 36px;
  border-top: 1px solid var(--line);
  font: 500 12.5px/1.4 var(--mono);
  color: var(--ink-2);
}
.footer .logo { width: 20px; height: 20px; color: var(--ink); }
.footer__left { display: flex; align-items: center; gap: 12px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer a { text-decoration: none; transition: color 0.2s; }
.footer a:hover { color: var(--ink); }

/* ---------- Grubit product page ---------- */

.product { transition: --g1 0.9s var(--ease-out), --g2 0.9s var(--ease-out); }

.p-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(32px, 6vw, 80px);
  min-height: calc(100svh - 68px);
  padding-block: 32px 80px;
}
.p-hero__copy { display: grid; justify-items: start; gap: 22px; }
.app-icon {
  width: 104px;
  height: 104px;
  padding: 14px;
  border-radius: 25px;
  background: #f4f6f1;
  box-shadow: 0 0 0 1px var(--line), 0 18px 34px -14px rgb(0 0 0 / 0.4);
  view-transition-name: grubit-icon;
}
.p-title {
  width: fit-content;
  font-size: clamp(68px, 11vw, 150px);
  font-weight: 600;
  line-height: 0.86;
  letter-spacing: -0.065em;
  view-transition-name: grubit-title;
}
.p-tagline {
  max-width: 18ch;
  font-size: clamp(22px, 2.6vw, 34px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--ink-2);
  text-wrap: balance;
}
.p-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 6px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  border-radius: 99px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}
.pill--solid { background: var(--ink); color: var(--bg); }
.pill--ghost {
  box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow 0.2s, scale 0.5s var(--spring);
}
.pill--ghost:hover { box-shadow: inset 0 0 0 1px var(--ink-3); scale: 1.03; }
.pill__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--g1);
  box-shadow: 0 0 0 0 var(--g1);
  animation: ping 2.2s var(--ease-out) infinite;
}
@keyframes ping {
  to { box-shadow: 0 0 0 10px transparent; }
}
.p-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* The phone: an illustration of the Today screen, in the theme picked below it. */
.p-hero__device { display: grid; justify-items: center; gap: 26px; }
.phone-stage { position: relative; perspective: 1400px; }
.phone-stage::before {
  content: "";
  position: absolute;
  inset: -12% -30%;
  z-index: -1;
  background:
    radial-gradient(closest-side at 35% 40%, color-mix(in oklch, var(--g1) 55%, transparent), transparent),
    radial-gradient(closest-side at 68% 62%, color-mix(in oklch, var(--g2) 55%, transparent), transparent);
  filter: blur(50px);
  opacity: light-dark(0.55, 0.4);
  pointer-events: none;
}
.phone {
  --scr-bg: color-mix(in oklch, var(--g2) 10%, #fbfbf8);
  --scr-ink: #111113;
  --scr-mute: rgb(17 17 19 / 0.55);
  --scr-card: rgb(255 255 255 / 0.66);
  --scr-track: rgb(17 17 19 / 0.09);
  position: relative;
  width: min(76vw, clamp(250px, 33svh, 300px));
  aspect-ratio: 9 / 19.2;
  padding: 10px;
  border-radius: 56px;
  background: #0c0c0e;
  box-shadow: 0 0 0 1px light-dark(rgb(0 0 0 / 0.5), rgb(255 255 255 / 0.22)), 0 50px 80px -34px rgb(0 0 0 / 0.55);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 1.1s var(--spring);
  animation: float 7s ease-in-out infinite alternate;
}
.phone.is-tilting { transition: transform 0.16s linear; }
@keyframes float {
  to { translate: 0 -12px; }
}
.phone[data-scheme="dark"] {
  --scr-bg: color-mix(in oklch, var(--g2) 16%, #0b0b0f);
  --scr-ink: #f6f6f2;
  --scr-mute: rgb(246 246 242 / 0.6);
  --scr-card: rgb(255 255 255 / 0.085);
  --scr-track: rgb(255 255 255 / 0.13);
}
.phone__screen {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  padding: 16px 14px 14px;
  overflow: hidden;
  border-radius: 46px;
  background:
    radial-gradient(120% 55% at 10% 0%, color-mix(in oklch, var(--g1) 34%, transparent), transparent 70%),
    radial-gradient(110% 50% at 100% 100%, color-mix(in oklch, var(--g2) 38%, transparent), transparent 70%),
    var(--scr-bg);
  color: var(--scr-ink);
  font-size: 12px;
  line-height: 1.25;
  transition: color 0.6s;
}
.phone__island {
  align-self: center;
  flex: none;
  width: 84px;
  height: 24px;
  border-radius: 99px;
  background: #0c0c0e;
}
.scr-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 4px 0; }
.scr-head strong { font-size: 25px; font-weight: 700; letter-spacing: -0.03em; }
.scr-streak {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  border-radius: 99px;
  background: var(--scr-card);
  font-weight: 600;
}
.scr-streak svg { width: 12px; height: 12px; fill: var(--g2); }
.scr-card {
  padding: 12px;
  border-radius: 20px;
  background: var(--scr-card);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.14);
  transition: background 0.6s;
}
.scr-summary { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 12px; }
.ring { position: relative; display: grid; place-items: center; }
.ring svg { width: 96px; height: 96px; rotate: -90deg; }
.ring circle { fill: none; stroke-width: 11; stroke-linecap: round; }
.ring__track { stroke: var(--scr-track); }
.ring__value {
  stroke: var(--g1);
  stroke-dasharray: 251.3;
  stroke-dashoffset: 251.3;
  transition: stroke-dashoffset 1.8s var(--ease-out) 0.5s;
}
.is-in .ring__value { stroke-dashoffset: 89; }
.ring__label { position: absolute; text-align: center; }
.ring__label b { display: block; font-size: 19px; font-weight: 700; letter-spacing: -0.03em; }
.ring__label span, .scr-mute { color: var(--scr-mute); font-size: 10.5px; }
.scr-left b { display: block; font-size: 15px; font-weight: 600; letter-spacing: -0.02em; }
.macros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.macro b { display: block; margin-top: 1px; font-size: 12.5px; font-weight: 600; }
.bar { height: 5px; margin-top: 6px; border-radius: 99px; background: var(--scr-track); overflow: hidden; }
.bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--c, var(--g1));
  scale: 0 1;
  transform-origin: left;
  transition: scale 1.5s var(--ease-out) 0.8s;
}
.is-in .bar i { scale: var(--v, 0.5) 1; }
.scr-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.scr-row b { font-size: 13px; font-weight: 600; }
.scr-plus {
  padding: 5px 10px;
  border-radius: 99px;
  background: var(--g1);
  color: #fff;
  font-size: 10.5px;
  font-weight: 600;
}
.scr-meals { display: grid; gap: 9px; }
.scr-tabs {
  display: flex;
  justify-content: space-around;
  margin-top: auto;
  padding: 10px 8px;
  border-radius: 99px;
  background: var(--scr-card);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.16);
}
.scr-tabs i { width: 22px; height: 6px; border-radius: 99px; background: var(--scr-track); }
.scr-tabs i:first-child { background: var(--g1); }

/* Above the phone's glow, which reaches down over the swatches. */
.themes { position: relative; z-index: 1; display: grid; justify-items: center; gap: 12px; max-width: 400px; }
.themes__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.swatch {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--a) 50%, var(--b) 50%);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--line);
  cursor: pointer;
  transition: scale 0.5s var(--spring), box-shadow 0.3s;
}
.swatch:hover { scale: 1.15; }
.swatch[aria-pressed="true"] { scale: 1.15; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ink); }
.themes__name, .caption { font: 500 12px/1.4 var(--mono); color: var(--ink-2); text-align: center; }
.themes__name b { color: var(--ink); font-weight: 500; }

.p-section { padding-block: clamp(56px, 9vw, 120px); }
.p-section__head { display: grid; gap: 14px; max-width: 640px; margin-bottom: 36px; }
.p-section__head p { font-size: 18px; color: var(--ink-2); text-wrap: pretty; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.feature {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 24px;
  border-radius: 24px;
  background: var(--surface);
  backdrop-filter: blur(18px);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: transform 0.7s var(--spring);
}
.feature:hover { transform: translateY(-4px); }
.feature__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 8px;
  border-radius: 14px;
  background: color-mix(in oklch, var(--g1) 16%, transparent);
  color: light-dark(color-mix(in oklch, var(--g1) 72%, #000), color-mix(in oklch, var(--g1) 75%, #fff));
}
.feature__icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.feature h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }
.feature p { color: var(--ink-2); font-size: 15px; text-wrap: pretty; }

.split { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.panel {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: clamp(24px, 3vw, 36px);
  border-radius: 28px;
  background: var(--surface);
  backdrop-filter: blur(18px);
  box-shadow: inset 0 0 0 1px var(--line);
}
.panel--ink { background: var(--ink); color: var(--bg); box-shadow: none; }
.panel h3 { font-size: clamp(24px, 2.6vw, 32px); font-weight: 600; letter-spacing: -0.04em; line-height: 1.1; }
.panel__price { font: 500 12px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.65; }
.ticks { display: grid; gap: 11px; margin: 0; padding: 0; list-style: none; }
.ticks li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: start; font-size: 15.5px; }
.ticks li::before {
  content: "";
  width: 7px;
  height: 7px;
  margin: 8px 0 0 4px;
  rotate: 45deg;
  background: currentColor;
  opacity: 0.55;
}
.panel__note { font-size: 14px; opacity: 0.65; }

.facts { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); }
.fact { padding: 26px 24px 30px 0; border-bottom: 1px solid var(--line); }
.fact + .fact { padding-left: 24px; border-left: 1px solid var(--line); }
.fact b {
  display: block;
  margin-bottom: 10px;
  font-size: clamp(24px, 2.8vw, 36px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.045em;
}
.fact p { color: var(--ink-2); font-size: 15px; text-wrap: pretty; }
.fineprint { margin-top: 28px; font-size: 13.5px; color: var(--ink-3); max-width: 70ch; }

/* ---------- Small screens ---------- */

@media (max-width: 940px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; }
  .card--feature { grid-row: auto; min-height: 280px; }

  .p-hero { grid-template-columns: 1fr; padding-top: 16px; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .facts { grid-template-columns: 1fr; }
  .fact, .fact + .fact { padding: 22px 0 24px; border-left: 0; }
}

@media (max-width: 600px) {
  .cards { grid-template-columns: minmax(0, 1fr); }
  .card--feature, .card--wide { grid-column: auto; }
  .raids { display: flex; flex-wrap: wrap; }
  .features, .split { grid-template-columns: 1fr; }
  .nav__link { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
  .hero__inner { animation: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
