:root {
  color-scheme: dark;
  --night: #0b1009;
  --surface: #192317;
  --edge: #3b4b34;
  --light: #f3f7ee;
  --muted: #c0ceba;
  --lime: #baf36f;
  --ink: #172110;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  background: var(--night);
  color: var(--light);
  font-family: system-ui, sans-serif;
}

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

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 2rem clamp(1rem, 4vw, 3rem);
  background: radial-gradient(ellipse at 72% 100%, #192915, transparent 64%);
}

.hub {
  position: relative;
  isolation: isolate;
  width: min(100%, 1032px);
  display: grid;
  grid-template-columns: minmax(0, .98fr) minmax(0, 1.02fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
  padding: clamp(2rem, 5vw, 4.25rem);
  border: 1px solid #354432;
  border-radius: 38px 38px 38px 12px;
  background: #10180e;
  box-shadow: 0 26px 70px #0005;
}

.hub::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(ellipse at 90% 105%, #2b4223, transparent 59%);
}

.ambient {
  position: absolute;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}

.ambient::before {
  content: "";
  position: absolute;
  inset: -15%;
  opacity: .8;
  background:
    radial-gradient(ellipse 31% 33% at 42% 34%, #7cb85360, transparent),
    radial-gradient(ellipse 34% 33% at 65% 66%, #45856468, transparent);
}

.entry-wash { display: none; }

.identity { align-self: center; }

.identity h1 {
  width: clamp(175px, 21vw, 245px);
  margin: 0 0 clamp(1.3rem, 3vw, 2.1rem);
  line-height: 0;
  mix-blend-mode: screen;
}

.identity h1 svg { display: block; width: 100%; height: auto; }
.logo-arrow-right { --arrow-shift: 6px; }
.logo-arrow-left { --arrow-shift: -6px; }

.headline {
  margin: 0;
  font-size: clamp(2.75rem, 5.3vw, 4.5rem);
  font-weight: 750;
  line-height: 1.06;
  word-spacing: .02em;
}

.headline span { display: block; }

.description {
  max-width: 36ch;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: clamp(.9375rem, 1.4vw, 1.0625rem);
  line-height: 1.5;
}

.category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.15rem;
  border-block-start: 1px solid var(--edge);
}

.category-links a {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 44px;
  color: #d5eac8;
  font-size: .875rem;
  font-weight: 650;
  text-underline-offset: .22em;
}

.category-links a span { color: var(--lime); }
.category-links a:focus-visible { outline: 2px solid #d3fbac; outline-offset: 2px; }

.link-groups { display: grid; gap: 1.15rem; }

.link-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  margin-bottom: .45rem;
  padding-inline: .15rem;
}

.link-heading h2 { margin: 0; font-size: .95rem; line-height: 1.3; font-weight: 700; }
.profile-count {
  padding: .18rem .5rem;
  border: 1px solid #4a6340;
  border-radius: 999px;
  color: #d5eac8;
  font-size: .75rem;
  white-space: nowrap;
}

.links {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.action {
  --tile-light: #253420;
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) 2.35rem;
  align-items: center;
  gap: .85rem;
  min-height: 86px;
  padding: .8rem 1rem;
  border: 1px solid var(--edge);
  background: var(--surface);
  color: var(--light);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.links > li:first-child .action { border-radius: 18px 18px 0 0; }
.links > li:last-child .action { border-radius: 0 0 18px 18px; }
.links > li + li .action { border-block-start: 0; }

.action::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: var(--tile-light);
}

.shop-links .action {
  --tile-light: #d0fa9e;
  overflow: clip;
  border-color: #c2f586;
  background: linear-gradient(112deg, #c9fa91, var(--lime) 75%);
  color: var(--ink);
}

.action-icon {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 13px;
  background: #2b3b25;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: 1.35rem;
  line-height: 1;
}

.shop-links .action-icon { background: #263b1b; color: #e8ffcc; }
.action-icon svg { width: 1.45rem; }
.action-copy { display: grid; gap: .25rem; }
.action-copy strong {
  font-size: clamp(1.0625rem, 1.65vw, 1.1875rem);
  font-weight: 700;
  line-height: 1.25;
}
.action-copy > span { color: var(--muted); font-size: .875rem; line-height: 1.4; }
.shop-links .action-copy strong {
  font-size: clamp(1.125rem, 1.7vw, 1.3rem);
  font-weight: 750;
  line-height: 1.18;
}
.shop-links .action-copy > span { color: #304820; font-weight: 550; }

.launch {
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #2b3b25;
  color: #e1f7d3;
}

.shop-links .launch { background: var(--ink); color: var(--lime); }

.action-icon svg, .launch svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.85;
}

.launch svg { width: 1rem; }

.action:focus-visible { z-index: 1; outline: 3px solid #d3fbac; outline-offset: 4px; }
.action:is(:focus-visible, :active)::before { opacity: 1; }
.action:active { --tile-light: #30412a; }
.shop-links .action:active { --tile-light: #ace765; }

@media (hover: hover) and (pointer: fine) {
  .action:hover::before { opacity: 1; }
}

@media (prefers-reduced-motion: no-preference) {
  .ambient::before { animation: ambient-drift 14s linear infinite; }
  .logo-arrow { animation: logo-nudge 1.9s ease-in-out infinite alternate; }

  .entry-wash {
    display: block;
    position: absolute;
    z-index: 2;
    inset: 0;
    overflow: hidden;
    border-radius: inherit;
    pointer-events: none;
  }

  .entry-wash::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(var(--sweep-angle, 105deg), transparent 18%, #baf36f10 34%, #0b100953 68%);
    animation: entry-sweep 920ms 70ms cubic-bezier(.38, .13, .34, 1) both;
  }

  :is(.hub, .guide-hero):focus-within > .entry-wash { visibility: hidden; }

  .launch svg { transition: transform 190ms var(--ease-out); }
  .action::before { transition: opacity 190ms ease-out; }
  .action:focus-visible .launch svg { transform: translate(2px, -2px); }

  @media (hover: hover) and (pointer: fine) {
    .action:hover .launch svg { transform: translate(2px, -2px); }
  }
}

@keyframes ambient-drift {
  /* The counter-rotation keeps the light pattern upright as it travels. */
  from { transform: rotate(.5turn) translateX(9%) rotate(-.5turn); }
  to { transform: rotate(1.5turn) translateX(9%) rotate(-1.5turn); }
}

@keyframes logo-nudge {
  from { transform: translateX(0); }
  to { transform: translateX(var(--arrow-shift)); }
}

@keyframes entry-sweep {
  from { transform: translate(0); }
  to { transform: translate(var(--sweep-travel, 100%, 0)); }
}

@media (max-width: 720px), (max-width: 1000px) and (max-height: 480px) and (orientation: landscape) {
  .entry-wash { --sweep-angle: 180deg; --sweep-travel: 0, 100%; }

  body {
    padding: 0;
    background: var(--night);
  }

  .hub {
    width: min(100%, 490px);
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
    padding-block: 2.25rem;
    padding-block: clamp(2rem, 4.8svh, 2.75rem);
    padding-inline: max(1.25rem, env(safe-area-inset-left)) max(1.25rem, env(safe-area-inset-right));
    border: 0;
    border-radius: 0;
    background: var(--night);
    box-shadow: none;
  }

  .hub::before {
    background: radial-gradient(ellipse 50% 7rem at 50% 8.5rem, #263c20, transparent);
  }
  .ambient { mask-image: linear-gradient(transparent 1.25rem, #000 8.5rem, #000 86%, transparent); }
  .ambient::before {
    background:
      radial-gradient(ellipse 38% 23% at 48% 28%, #7cb85368, transparent),
      radial-gradient(ellipse 37% 30% at 62% 68%, #45856463, transparent);
  }
  .identity { text-align: center; }
  .identity h1 { width: clamp(164px, 46vw, 190px); margin: 0 auto 1.15rem; }
  .headline { font-size: clamp(1.8125rem, 7.8vw, 2.375rem); line-height: 1.12; text-wrap: balance; }
  .headline span { display: inline; }
  .description { max-width: 35ch; margin: .65rem auto 0; text-wrap: balance; }
  .link-groups { gap: 1rem; }
  .category-links { justify-content: center; }

  .action {
    grid-template-columns: 2.4rem minmax(0, 1fr) 2rem;
    gap: .7rem;
    min-height: 78px;
    padding: .67rem .9rem;
  }

  .action-icon { font-size: 1.2rem; border-radius: 10px; }
  .launch svg { width: .95rem; }
}

@media (max-width: 720px) and (max-height: 620px) {
  .hub {
    gap: 1.15rem;
    padding-block: 1.6rem;
  }
  .link-groups { gap: .9rem; }
  .action { min-height: 68px; padding-block: .6rem; }
}

@media (min-width: 540px) and (max-width: 1000px) and (max-height: 480px) and (orientation: landscape) {
  .hub { gap: .75rem; padding-block: max(.75rem, env(safe-area-inset-top)) max(.75rem, env(safe-area-inset-bottom)); }
  .identity h1 { width: 7.25rem; margin-bottom: .45rem; }
  .headline { font-size: 1.625rem; }
  .description { max-width: none; margin-top: .35rem; }
  .link-groups { gap: .75rem; }
  .action { min-height: 3.75rem; padding-block: .5rem; }
}

@media (max-width: 360px) {
  .hub { padding-inline: max(1rem, env(safe-area-inset-left)) max(1rem, env(safe-area-inset-right)); }
  .action {
    grid-template-columns: 2rem minmax(0, 1fr) 1.75rem;
    gap: .55rem;
    padding-inline: .7rem;
  }
}
