/* ==========================================================================
   Otaku Dojo Portal
   Brand portal stylesheet — no framework, design tokens + CSS Grid.
   ========================================================================== */

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/space-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --------------------------------------------------------------------------
   Tokens
   -------------------------------------------------------------------------- */

:root {
  --font-cjk-tc: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", "Heiti TC", system-ui, sans-serif;
  --font-cjk-jp: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  --font-cjk: var(--font-cjk-tc);
  --font-sans: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, var(--font-cjk);
  --font-display: "Space Grotesk", -apple-system, "Segoe UI", Roboto, Arial, var(--font-cjk);
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Consolas, monospace;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --header-h: 64px;
  --container: 1200px;
  --gutter: 16px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  --brand-orange: #ec7623;
  --brand-orange-soft: #ef9551;
  --brand-indigo: #8b9cff;

  /* Dark (default) */
  color-scheme: dark;
  --bg: #0a0b10;
  --bg-elev: #0e1016;
  --surface: #12151d;
  --surface-2: #181c26;
  --surface-hover: #1c2130;
  --surface-glass: rgba(18, 21, 29, .72);
  --border: rgba(255, 255, 255, .08);
  --border-strong: rgba(255, 255, 255, .15);
  --text: #f2f3f7;
  --text-2: #a7adbb;
  --text-3: #858c9c;
  --primary: #f39248;
  --primary-strong: #ec7623;
  --primary-soft: rgba(243, 146, 72, .13);
  --on-primary: #1a0d03;
  --secondary: #8b9cff;
  --secondary-soft: rgba(139, 156, 255, .12);
  --grid-line: rgba(255, 255, 255, .05);
  --glow-primary: rgba(236, 118, 35, .22);
  --glow-secondary: rgba(139, 156, 255, .14);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, .7);
  --shadow-pop: 0 30px 80px -20px rgba(0, 0, 0, .75);
  --title-gradient: linear-gradient(180deg, #ffffff 20%, #b9bfcc 100%);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #fafaf8;
  --bg-elev: #ffffff;
  --surface: #ffffff;
  --surface-2: #f3f2ee;
  --surface-hover: #f6f5f1;
  --surface-glass: rgba(255, 255, 255, .78);
  --border: rgba(17, 19, 27, .09);
  --border-strong: rgba(17, 19, 27, .17);
  --text: #12141b;
  --text-2: #4b5261;
  --text-3: #646b7a;
  --primary: #c2550d;
  --primary-strong: #ec7623;
  --primary-soft: rgba(236, 118, 35, .1);
  --on-primary: #1a0d03;
  --secondary: #4f5fe0;
  --secondary-soft: rgba(79, 95, 224, .08);
  --grid-line: rgba(17, 19, 27, .055);
  --glow-primary: rgba(236, 118, 35, .16);
  --glow-secondary: rgba(79, 95, 224, .09);
  --shadow-sm: 0 1px 2px rgba(17, 19, 27, .06);
  --shadow: 0 22px 50px -26px rgba(17, 19, 27, .28);
  --shadow-pop: 0 26px 70px -24px rgba(17, 19, 27, .32);
  --title-gradient: linear-gradient(180deg, #12141b 30%, #3b4150 100%);
}

/* 沒有 JS 時依系統設定 */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    color-scheme: light;
    --bg: #fafaf8;
    --bg-elev: #ffffff;
    --surface: #ffffff;
    --surface-2: #f3f2ee;
    --surface-hover: #f6f5f1;
    --surface-glass: rgba(255, 255, 255, .78);
    --border: rgba(17, 19, 27, .09);
    --border-strong: rgba(17, 19, 27, .17);
    --text: #12141b;
    --text-2: #4b5261;
    --text-3: #646b7a;
    --primary: #c2550d;
    --primary-soft: rgba(236, 118, 35, .1);
    --secondary: #4f5fe0;
    --secondary-soft: rgba(79, 95, 224, .08);
    --grid-line: rgba(17, 19, 27, .055);
    --glow-primary: rgba(236, 118, 35, .16);
    --glow-secondary: rgba(79, 95, 224, .09);
    --shadow-sm: 0 1px 2px rgba(17, 19, 27, .06);
    --shadow: 0 22px 50px -26px rgba(17, 19, 27, .28);
    --shadow-pop: 0 26px 70px -24px rgba(17, 19, 27, .32);
    --title-gradient: linear-gradient(180deg, #12141b 30%, #3b4150 100%);
  }
}

:root:lang(ja) {
  --font-cjk: var(--font-cjk-jp);
  --font-sans: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, var(--font-cjk-jp);
  --font-display: "Space Grotesk", -apple-system, "Segoe UI", Roboto, Arial, var(--font-cjk-jp);
}

@media (min-width: 640px) {
  :root { --gutter: 24px; }
}

@media (min-width: 1024px) {
  :root { --gutter: 32px; }
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  outline: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

p,
h1,
h2,
h3,
ul,
ol,
figure,
blockquote {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.015em;
  text-wrap: balance;
}

:lang(zh-Hant) h1,
:lang(zh-Hant) h2,
:lang(ja) h1,
:lang(ja) h2 {
  letter-spacing: 0;
  line-height: 1.28;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection {
  background: var(--primary-soft);
  color: var(--text);
}

.icon {
  width: 1.125em;
  height: 1.125em;
  flex: none;
}

.chunk {
  display: inline-block;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: .6rem 1rem;
  border-radius: 999px;
  background: var(--primary-strong);
  color: var(--on-primary);
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform .2s var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: calc(780px + var(--gutter) * 2);
}

/* --------------------------------------------------------------------------
   Primitives
   -------------------------------------------------------------------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--primary);
}

.eyebrow__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary-strong);
  box-shadow: 0 0 0 4px var(--primary-soft), 0 0 14px var(--primary-strong);
}

.eyebrow__dot--pulse {
  animation: pulse 2.4s var(--ease) infinite;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 44px;
  padding: .7rem 1.2rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 600;
  font-size: .975rem;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .2s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease), color .2s var(--ease);
}

.button .icon {
  transition: transform .2s var(--ease);
}

.button:hover .icon {
  transform: translateX(2px);
}

.button--lg {
  min-height: 50px;
  padding: .85rem 1.5rem;
  font-size: 1rem;
}

.button--primary {
  background: linear-gradient(180deg, #f6a463 0%, #ec7623 100%);
  color: var(--on-primary);
  box-shadow: 0 0 0 1px rgba(236, 118, 35, .45), 0 10px 30px -10px rgba(236, 118, 35, .7), inset 0 1px 0 rgba(255, 255, 255, .35);
}

.button--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(236, 118, 35, .6), 0 16px 36px -10px rgba(236, 118, 35, .8), inset 0 1px 0 rgba(255, 255, 255, .4);
}

.button--ghost {
  background: var(--surface-glass);
  border-color: var(--border-strong);
  color: var(--text);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.button--ghost:hover {
  border-color: var(--text-3);
  background: var(--surface-hover);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .2rem .6rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge .icon {
  width: 1em;
  height: 1em;
}

.badge--soon {
  color: var(--secondary);
  background: var(--secondary-soft);
  border: 1px dashed color-mix(in srgb, var(--secondary) 45%, transparent);
}

.badge--sm {
  padding: .05rem .45rem;
  font-size: .625rem;
}

.badge--lg {
  padding: .45rem .9rem;
  font-size: .75rem;
}

.tag-list,
.lang-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: .2rem .65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: .75rem;
  line-height: 1.6;
  white-space: nowrap;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--text-2);
  font-weight: 600;
  font-size: .95rem;
  white-space: nowrap;
  transition: color .2s var(--ease);
}

.text-link:hover {
  color: var(--primary);
}

.text-link .icon {
  transition: transform .2s var(--ease);
}

.text-link:hover .icon {
  transform: translateX(3px);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
}

/* 模糊背景放在偽元素上：backdrop-filter 會讓 fixed 子元素（行動版選單）以 Header 為定位基準 */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin-right: auto;
  border-radius: 10px;
}

.brand__mark {
  width: 30px;
  height: 30px;
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -.01em;
  white-space: nowrap;
}

.brand__alt {
  display: none;
  padding-left: .6rem;
  border-left: 1px solid var(--border-strong);
  color: var(--text-3);
  font-size: .8125rem;
  letter-spacing: .08em;
  white-space: nowrap;
}

@media (min-width: 480px) {
  .brand__alt { display: inline; }
}

.site-nav {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: .25rem;
}

.site-nav__tools {
  display: flex;
  align-items: center;
  gap: .25rem;
  margin-left: .5rem;
  padding-left: .75rem;
  border-left: 1px solid var(--border);
}

.site-nav__link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 40px;
  padding: .45rem .8rem;
  border-radius: 999px;
  color: var(--text-2);
  font-weight: 500;
  font-size: .9375rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}

.site-nav__link::-webkit-details-marker {
  display: none;
}

.site-nav__link:hover,
.site-nav__link.is-active,
details[open] > .site-nav__link {
  color: var(--text);
  background: var(--surface-2);
}

.site-nav__link.is-active {
  box-shadow: inset 0 0 0 1px var(--border);
}

.icon--chevron {
  width: 14px;
  height: 14px;
  opacity: .7;
  transition: transform .2s var(--ease);
}

details[open] > summary .icon--chevron {
  transform: rotate(180deg);
}

.dropdown {
  position: relative;
}

.dropdown__panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  z-index: 60;
  min-width: 200px;
  padding: .5rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  box-shadow: var(--shadow-pop);
  animation: pop .18s var(--ease);
  transform-origin: top left;
}

.dropdown__panel--wide {
  width: 420px;
  left: 50%;
  transform: translateX(-50%);
  animation-name: pop-center;
  transform-origin: top center;
}

.dropdown__panel--end {
  left: auto;
  right: 0;
  transform-origin: top right;
}

.explore-all {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .85rem;
  padding: .85rem;
  border-radius: var(--radius);
  background: linear-gradient(120deg, var(--primary-soft), transparent 80%);
  border: 1px solid color-mix(in srgb, var(--primary) 22%, transparent);
  transition: border-color .2s var(--ease);
}

.explore-all:hover {
  border-color: color-mix(in srgb, var(--primary) 55%, transparent);
}

.explore-all__icon,
.explore-item__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--primary);
}

.explore-all__icon {
  background: var(--primary-soft);
}

.explore-all__title,
.explore-item__name {
  display: block;
  font-weight: 600;
  font-size: .9375rem;
  line-height: 1.35;
  color: var(--text);
}

.explore-all__hint,
.explore-item__desc {
  display: block;
  font-size: .8125rem;
  line-height: 1.45;
  color: var(--text-3);
}

.explore-all__arrow {
  color: var(--primary);
}

.explore-list {
  display: grid;
  gap: .125rem;
  margin-top: .5rem;
}

.explore-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .85rem;
  padding: .6rem .85rem;
  border-radius: var(--radius);
  transition: background-color .2s var(--ease);
}

a.explore-item:hover {
  background: var(--surface-2);
}

.explore-item__arrow {
  color: var(--text-3);
  opacity: 0;
  transform: translate(-3px, 3px);
  transition: opacity .2s var(--ease), transform .2s var(--ease);
}

a.explore-item:hover .explore-item__arrow,
a.explore-item:focus-visible .explore-item__arrow {
  opacity: 1;
  transform: none;
}

.explore-item.is-disabled {
  cursor: default;
}

.explore-item.is-disabled .explore-item__icon,
.explore-item.is-disabled .explore-item__text {
  opacity: .6;
}

.lang-current {
  font-size: .875rem;
}

.lang-list {
  display: grid;
  gap: .125rem;
}

.lang-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: .55rem .8rem;
  border-radius: 10px;
  color: var(--text-2);
  font-size: .9375rem;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}

.lang-item:hover {
  background: var(--surface-2);
  color: var(--text);
}

.lang-item[aria-current] {
  color: var(--text);
  font-weight: 600;
}

.lang-item__check {
  color: var(--primary);
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}

.theme-toggle:hover {
  color: var(--text);
  background: var(--surface-2);
}

.theme-toggle__moon,
:root[data-theme="light"] .theme-toggle__sun {
  display: none;
}

:root[data-theme="light"] .theme-toggle__moon {
  display: block;
}

.nav-toggle {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-right: -8px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
}

.nav-toggle .icon {
  width: 22px;
  height: 22px;
}

.nav-toggle__close,
.nav-toggle[aria-expanded="true"] .nav-toggle__open {
  display: none;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__close {
  display: block;
}

/* 行動版：導覽改成下拉抽屜（需要 JS；沒有 JS 時直接展開在 Header 下方） */
@media (max-width: 860px) {
  .js .nav-toggle {
    display: grid;
  }

  .site-header__inner {
    flex-wrap: wrap;
    height: auto;
    min-height: var(--header-h);
  }

  .site-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    padding-bottom: 1rem;
  }

  .js .site-nav {
    display: none;
    position: fixed;
    inset: var(--header-h) 0 0 0;
    z-index: 49;
    padding: 1rem var(--gutter) 2rem;
    overflow-y: auto;
    background: var(--bg);
    border-top: 1px solid var(--border);
  }

  .js .site-nav[data-open] {
    display: flex;
    animation: fade-in .2s var(--ease);
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: .25rem;
  }

  .site-nav__link {
    justify-content: space-between;
    width: 100%;
    min-height: 52px;
    padding: .75rem 1rem;
    border-radius: var(--radius);
    font-size: 1.0625rem;
    color: var(--text);
  }

  .site-nav__tools {
    justify-content: space-between;
    margin: 1rem 0 0;
    padding: 1rem 0 0;
    border-left: 0;
    border-top: 1px solid var(--border);
  }

  .dropdown__panel,
  .dropdown__panel--wide,
  .dropdown__panel--end {
    position: static;
    width: auto;
    margin-top: .25rem;
    transform: none;
    border: 0;
    box-shadow: none;
    background: transparent;
    padding: 0 0 .5rem;
    animation: fade-in .2s var(--ease);
  }

  .dropdown--lang .dropdown__panel {
    position: absolute;
    bottom: calc(100% + 8px);
    top: auto;
    left: 0;
    right: auto;
    padding: .5rem;
    border: 1px solid var(--border-strong);
    background: var(--bg-elev);
    box-shadow: var(--shadow-pop);
  }

  .dropdown--lang > .site-nav__link {
    width: auto;
    min-height: 44px;
    font-size: .9375rem;
  }

  body.nav-open {
    overflow: hidden;
  }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(3.5rem, 7vw, 6.5rem) clamp(3.5rem, 6vw, 5.5rem);
}

.hero__backdrop,
.page-hero__backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.hero__backdrop::before,
.page-hero__backdrop::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 60% 30%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 60% 30%, #000 30%, transparent 75%);
}

.hero__backdrop::after,
.page-hero__backdrop::after {
  content: "";
  position: absolute;
  inset: -20% -10% auto;
  height: 120%;
  background:
    radial-gradient(42% 46% at 72% 38%, var(--glow-primary), transparent 70%),
    radial-gradient(34% 38% at 18% 8%, var(--glow-secondary), transparent 70%);
}

.hero__inner {
  display: grid;
  gap: 3rem;
  align-items: center;
}

.hero__content {
  max-width: 640px;
}

.hero__eyebrow {
  margin-bottom: 1.5rem;
}

.hero__title {
  font-size: clamp(2.375rem, 1.35rem + 3.6vw, 4.25rem);
  line-height: 1.08;
  letter-spacing: -.035em;
  background: var(--title-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__title:lang(zh-Hant),
.hero__title:lang(ja) {
  line-height: 1.22;
  letter-spacing: .01em;
}

.hero__title:lang(ja) {
  font-size: clamp(2rem, 1.2rem + 2.8vw, 3.25rem);
  letter-spacing: 0;
}

.hero__description {
  margin-top: 1.5rem;
  max-width: 34em;
  color: var(--text-2);
  font-size: clamp(1.0625rem, 1rem + .3vw, 1.1875rem);
  line-height: 1.8;
}

.hero__keywords {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .9rem;
  margin-top: 1.5rem;
  font-family: var(--font-mono);
  font-size: .8125rem;
  letter-spacing: .08em;
  color: var(--text-3);
}

.hero__keywords li {
  display: inline-flex;
  align-items: center;
  gap: .9rem;
}

.hero__keywords li + li::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--primary-strong);
  opacity: .8;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 2.25rem;
}

.hero__actions--center {
  justify-content: center;
}

.hero__visual {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin-inline: auto;
}

.network {
  width: 100%;
  height: auto;
  overflow: visible;
}

.network__rings circle {
  fill: none;
  stroke: var(--border-strong);
  stroke-width: 1;
}

.network__ring--main {
  stroke-dasharray: 1 0;
}

.network__ring--outer {
  stroke-dasharray: 2 7;
  transform-box: view-box;
  transform-origin: 280px 262px;
  animation: spin 120s linear infinite;
}

.network__dots circle {
  fill: var(--text-3);
  opacity: .55;
}

.network__links line {
  stroke-width: 1.5;
  stroke-linecap: round;
}

.network__links .is-live {
  stroke: url(#network-link);
  stroke-dasharray: 3 7;
  animation: dash-flow 1.4s linear infinite;
}

.network__links .is-soon {
  stroke: var(--text-3);
  stroke-dasharray: 2 6;
  opacity: .5;
}

.network__core > rect {
  fill: var(--surface);
  stroke: color-mix(in srgb, var(--primary) 40%, var(--border-strong));
  stroke-width: 1;
  filter: drop-shadow(0 10px 30px rgba(236, 118, 35, .25));
}

.network__node > rect {
  fill: var(--surface);
  stroke: var(--border-strong);
  stroke-width: 1;
}

.network__node text {
  fill: var(--text);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
}

.network__icon {
  color: var(--primary);
}

.network__node.is-soon > rect {
  fill: var(--bg);
  stroke-dasharray: 4 4;
}

.network__node.is-soon text {
  fill: var(--text-3);
}

.network__node.is-soon .network__icon {
  color: var(--text-3);
}

@media (min-width: 1024px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: 2rem;
  }

  .hero__visual {
    margin-right: -1rem;
  }
}

@media (max-width: 1023px) {
  .hero__visual {
    max-width: 480px;
  }
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section {
  position: relative;
  padding-block: clamp(4rem, 8vw, 6.5rem);
}

.section + .section,
.hero + .section {
  padding-top: 0;
}

.page-hero + .section {
  padding-top: clamp(2.5rem, 5vw, 4rem);
}

main > .section:last-child {
  padding-bottom: clamp(4rem, 8vw, 6rem);
}

.section-header {
  display: grid;
  gap: .9rem;
  max-width: 720px;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section-header--center {
  margin-inline: auto;
  text-align: center;
  justify-items: center;
}

.section-title {
  font-size: clamp(1.875rem, 1.25rem + 2.2vw, 2.75rem);
  letter-spacing: -.025em;
}

.section-subtitle {
  color: var(--text-2);
  font-size: 1.0625rem;
  line-height: 1.75;
}

.section-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section-header-row .section-header {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Site preview (browser frame)
   -------------------------------------------------------------------------- */

.preview {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.preview__bar {
  display: flex;
  align-items: center;
  gap: .75rem;
  height: 30px;
  padding: 0 .75rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.preview__dots {
  display: inline-flex;
  gap: 5px;
}

.preview__dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-strong);
}

.preview__url {
  flex: 1;
  max-width: 260px;
  margin-inline: auto;
  padding: .05rem .75rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: .6875rem;
  line-height: 1.6;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview__screen {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.preview__screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform .6s var(--ease);
}

.preview__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(60% 60% at 50% 40%, var(--secondary-soft), transparent 70%),
    repeating-linear-gradient(-45deg, transparent 0 12px, var(--grid-line) 12px 13px);
}

.preview__placeholder-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  border: 1px dashed color-mix(in srgb, var(--secondary) 50%, transparent);
  background: var(--surface);
  color: var(--secondary);
}

.preview__placeholder-icon .icon {
  width: 28px;
  height: 28px;
}

.preview__placeholder-grid {
  position: absolute;
  inset: 16% 12%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  opacity: .5;
}

.preview__placeholder-grid i {
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
}

.preview__badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  background: var(--surface);
}

/* --------------------------------------------------------------------------
   Site cards (home)
   -------------------------------------------------------------------------- */

.site-grid {
  display: grid;
  gap: 1.25rem;
}

.site-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0;
  padding: .5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}

.site-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(80% 60% at 50% 0%, var(--glow-primary), transparent 70%);
  opacity: 0;
  transition: opacity .3s var(--ease);
}

.site-card:not(.is-soon):hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
  box-shadow: var(--shadow);
}

.site-card:not(.is-soon):hover::before {
  opacity: 1;
}

.site-card:not(.is-soon):hover .preview__screen img {
  transform: scale(1.035);
}

.site-card:has(.site-card__link:focus-visible) {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.site-card__body {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  padding: 1.1rem .85rem .85rem;
}

.site-card__meta,
.site-detail__meta {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--text-3);
}

.site-card__category {
  letter-spacing: .12em;
  text-transform: uppercase;
}

.site-card__icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--primary-soft);
  color: var(--primary);
}

.site-card__icon .icon {
  width: 16px;
  height: 16px;
}

.site-card__name {
  font-size: 1.375rem;
  letter-spacing: -.02em;
}

.site-card__link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: var(--radius-lg);
}

.site-card__link:focus-visible {
  outline: none;
}

.site-card__tagline {
  color: var(--text);
  font-weight: 600;
  font-size: .975rem;
  line-height: 1.5;
}

.site-card__summary {
  color: var(--text-2);
  font-size: .9375rem;
  line-height: 1.7;
}

.site-card .tag-list {
  margin-top: .25rem;
}

.site-card__cta {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-top: auto;
  padding-top: .9rem;
  border-top: 1px solid var(--border);
  color: var(--primary);
  font-weight: 600;
  font-size: .9375rem;
}

.site-card__cta .icon {
  transition: transform .25s var(--ease);
}

.site-card:hover .site-card__cta .icon {
  transform: translate(2px, -2px);
}

.site-card.is-soon {
  border-style: dashed;
  border-color: var(--border-strong);
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  box-shadow: none;
}

.site-card.is-soon .site-card__cta {
  color: var(--secondary);
}

.site-card.is-soon .site-card__icon {
  background: var(--secondary-soft);
  color: var(--secondary);
}

@media (min-width: 640px) {
  .site-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 640px) and (max-width: 1023px) {
  .site-grid > .site-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    grid-template-rows: none;
    align-items: stretch;
  }

  .site-grid > .site-card:last-child:nth-child(odd) .preview {
    display: flex;
    flex-direction: column;
  }

  .site-grid > .site-card:last-child:nth-child(odd) .preview__screen {
    flex: 1;
    aspect-ratio: auto;
    min-height: 200px;
  }

  .site-grid > .site-card:last-child:nth-child(odd) .site-card__body {
    padding: .75rem 1rem .5rem 1.25rem;
  }
}

@media (min-width: 1024px) {
  .site-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1.5rem;
  }

  .site-grid > .site-card {
    grid-column: span 2;
  }

  /* 第二列兩張卡片改為橫式，讓 3 + 2 的排列看起來是刻意的 */
  .site-grid > .site-card:nth-child(n + 4) {
    grid-column: span 3;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    grid-template-rows: none;
    align-items: stretch;
  }

  .site-grid > .site-card:nth-child(n + 4) .site-card__body {
    padding: .75rem 1rem .5rem 1.4rem;
  }

  .site-grid > .site-card:nth-child(n + 4) .preview {
    display: flex;
    flex-direction: column;
  }

  .site-grid > .site-card:nth-child(n + 4) .preview__screen {
    flex: 1;
    aspect-ratio: auto;
    min-height: 220px;
  }
}

/* --------------------------------------------------------------------------
   What We Build
   -------------------------------------------------------------------------- */

.section--build {
  overflow: hidden;
}

.feature-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 860px) {
  .feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
  }
}

.feature-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .9rem;
  min-height: 300px;
  padding: 1.75rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(100% 70% at 100% 0%, var(--primary-soft), transparent 60%),
    var(--surface);
}

.feature-card--tools {
  background:
    radial-gradient(100% 70% at 100% 0%, var(--secondary-soft), transparent 60%),
    var(--surface);
}

.feature-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .5rem;
}

.feature-card__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(246, 164, 99, .25), rgba(236, 118, 35, .08));
  border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent);
  color: var(--primary);
}

.feature-card__icon .icon {
  width: 22px;
  height: 22px;
}

.feature-card__label {
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-3);
}

.feature-card__index {
  color: var(--primary);
}

.feature-card__title {
  font-size: 1.375rem;
}

.feature-card__text {
  position: relative;
  z-index: 1;
  color: var(--text-2);
  font-size: .975rem;
  line-height: 1.75;
}

.feature-card__art {
  margin-top: auto;
  padding-top: 1rem;
}

.art-table {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 6px;
}

.art-table i {
  height: 12px;
  border-radius: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.art-table i:nth-child(1),
.art-table i:nth-child(5),
.art-table i:nth-child(9) {
  background: var(--primary-soft);
  border-color: color-mix(in srgb, var(--primary) 30%, transparent);
}

.art-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 48px;
}

.art-bars i {
  flex: 1;
  height: var(--h);
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--secondary) 55%, transparent), var(--secondary-soft));
}

.art-bars i:nth-child(4) {
  background: linear-gradient(180deg, var(--primary-strong), var(--primary-soft));
}

.art-orbit {
  position: relative;
  display: block;
  height: 48px;
}

.art-orbit i {
  position: absolute;
  top: 50%;
  left: 24px;
  border-radius: 50%;
  border: 1px dashed var(--border-strong);
  transform: translate(-50%, -50%);
}

.art-orbit i:nth-child(1) { width: 18px; height: 18px; background: var(--primary-strong); border: 0; box-shadow: 0 0 18px var(--primary-strong); }
.art-orbit i:nth-child(2) { width: 46px; height: 46px; }
.art-orbit i:nth-child(3) { width: 74px; height: 74px; left: 24px; }

.art-orbit::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 80px;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--border-strong), transparent);
}

/* --------------------------------------------------------------------------
   Explore Topics
   -------------------------------------------------------------------------- */

.topic-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 560px) {
  .topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 860px) {
  .topic-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1140px) {
  .topic-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.topic-card {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  padding: 1.4rem 1.3rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  transition: border-color .25s var(--ease), background-color .25s var(--ease);
}

.topic-card:hover {
  border-color: var(--border-strong);
  background: var(--surface);
}

.topic-card__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: .4rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--primary);
}

.topic-card__icon .icon {
  width: 20px;
  height: 20px;
}

.topic-card__title {
  font-size: 1.125rem;
}

.topic-card__text {
  color: var(--text-2);
  font-size: .9rem;
  line-height: 1.7;
}

.topic-card__sites {
  margin-top: auto;
  padding-top: .75rem;
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .02em;
  color: var(--text-3);
}

/* --------------------------------------------------------------------------
   More to Explore
   -------------------------------------------------------------------------- */

.more-panel {
  position: relative;
  display: grid;
  gap: 2rem;
  padding: clamp(1.75rem, 4vw, 3.5rem);
  overflow: hidden;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(50% 80% at 0% 0%, var(--glow-primary), transparent 70%),
    radial-gradient(40% 70% at 100% 100%, var(--glow-secondary), transparent 70%),
    var(--bg-elev);
}

.more-panel__intro {
  display: grid;
  gap: .9rem;
  align-content: start;
}

.more-list {
  display: grid;
  gap: .75rem;
}

@media (min-width: 560px) {
  .more-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .more-panel {
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    align-items: center;
    gap: 3rem;
  }
}

.more-item {
  display: flex;
  gap: .9rem;
  padding: 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-glass);
}

.more-item__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px dashed var(--border-strong);
  color: var(--text-2);
}

.more-item__title {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.4;
}

.more-item__text {
  display: block;
  margin-top: .2rem;
  color: var(--text-3);
  font-size: .875rem;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Inner pages
   -------------------------------------------------------------------------- */

.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(3.5rem, 7vw, 6rem) clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--border);
}

.page-hero--compact {
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
  border-bottom: 0;
}

.page-title {
  margin-top: 1.1rem;
  font-size: clamp(2.25rem, 1.5rem + 2.8vw, 3.75rem);
  letter-spacing: -.03em;
  background: var(--title-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.page-lead {
  margin-top: 1.25rem;
  max-width: 42em;
  color: var(--text-2);
  font-size: clamp(1.0625rem, 1rem + .25vw, 1.1875rem);
  line-height: 1.85;
}

.page-lead--strong {
  color: var(--text);
  font-weight: 500;
}

.jump-list {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 2rem;
}

.jump-chip {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 40px;
  padding: .4rem .95rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface-glass);
  color: var(--text-2);
  font-size: .9rem;
  font-weight: 500;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}

.jump-chip .icon {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

.jump-chip:hover {
  color: var(--text);
  border-color: var(--text-3);
}

/* Sites page */

.site-list {
  display: grid;
  gap: 0;
}

.site-detail {
  display: grid;
  gap: 2rem;
  align-items: center;
  padding-block: clamp(2.5rem, 5vw, 4.5rem);
  border-bottom: 1px solid var(--border);
  scroll-margin-top: var(--header-h);
}

.site-detail:first-child {
  padding-top: 0;
}

.site-detail:last-child {
  border-bottom: 0;
}

.site-detail__media .preview {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.site-detail__body {
  display: flex;
  flex-direction: column;
  gap: .9rem;
}

.site-detail__name {
  font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
  letter-spacing: -.025em;
}

.site-detail__tagline {
  color: var(--primary);
  font-weight: 600;
  font-size: 1.0625rem;
}

.site-detail.is-soon .site-detail__tagline {
  color: var(--secondary);
}

.site-detail__description {
  color: var(--text-2);
  font-size: 1rem;
  line-height: 1.85;
}

.site-detail__label {
  margin-top: .6rem;
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-3);
}

.check-list {
  display: grid;
  gap: .45rem 1.25rem;
}

@media (min-width: 480px) {
  .check-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  color: var(--text);
  font-size: .95rem;
  line-height: 1.55;
}

.check-list .icon {
  width: 18px;
  height: 18px;
  margin-top: .1rem;
  padding: 2px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
}

.site-detail__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem 1rem;
  margin-top: 1rem;
}

.site-detail__note {
  color: var(--text-3);
  font-size: .9rem;
}

@media (min-width: 960px) {
  .site-detail {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: clamp(2.5rem, 5vw, 4.5rem);
  }

  .site-detail:nth-child(even) .site-detail__media {
    order: 2;
  }
}

/* About page */

.about-intro {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .about-intro {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
    gap: 4rem;
  }
}

.motto {
  position: relative;
  overflow: hidden;
  padding: 2.25rem 2rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(80% 80% at 100% 0%, var(--glow-primary), transparent 70%),
    var(--surface);
  box-shadow: var(--shadow);
}

.motto__mark {
  position: absolute;
  right: -40px;
  bottom: -50px;
  width: 220px;
  height: 220px;
  opacity: .12;
}

.motto__text {
  position: relative;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  font-weight: 700;
  line-height: 1.35;
}

.motto__text::before {
  content: "“";
  display: block;
  height: .6em;
  color: var(--primary);
  font-size: 3em;
  line-height: 1;
}

.motto__caption {
  position: relative;
  margin-top: 1.5rem;
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .08em;
  color: var(--text-3);
}

.direction-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .direction-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .direction-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .direction-card {
    grid-column: span 2;
  }

  .direction-card:nth-child(n + 4) {
    grid-column: span 3;
  }
}

.direction-card {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  padding: 1.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.direction-card .feature-card__icon {
  margin-bottom: .6rem;
}

.direction-card__label {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-3);
}

.direction-card__title {
  font-size: 1.25rem;
}

.direction-card__text {
  color: var(--text-2);
  font-size: .95rem;
  line-height: 1.75;
}

.principle-list {
  display: grid;
  gap: 1.25rem;
  counter-reset: none;
}

@media (min-width: 860px) {
  .principle-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
  }
}

.principle {
  display: grid;
  gap: .6rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-strong);
}

.principle__index {
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(180deg, var(--primary-strong), color-mix(in srgb, var(--primary-strong) 20%, transparent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.principle__title {
  font-size: 1.25rem;
}

.principle__text {
  color: var(--text-2);
  line-height: 1.75;
}

.cta-band {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 2rem;
  padding: clamp(2rem, 5vw, 3.5rem);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--primary) 35%, var(--border));
  border-radius: var(--radius-xl);
  background:
    radial-gradient(60% 120% at 0% 50%, var(--glow-primary), transparent 70%),
    radial-gradient(40% 100% at 100% 0%, var(--glow-secondary), transparent 70%),
    var(--surface);
}

.cta-band__title {
  font-size: clamp(1.625rem, 1.2rem + 1.5vw, 2.25rem);
  letter-spacing: -.02em;
}

/* Legal */

.legal-doc {
  padding-block: 2.5rem;
  border-top: 1px solid var(--border);
  scroll-margin-top: var(--header-h);
}

.legal-doc:first-child {
  padding-top: 0;
  border-top: 0;
}

.legal-doc__header {
  margin-bottom: 1.5rem;
}

.legal-doc__header h2 {
  font-size: 1.75rem;
}

.legal-doc__updated {
  margin-top: .4rem;
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--text-3);
}

.legal-doc__section + .legal-doc__section {
  margin-top: 1.75rem;
}

.legal-doc__section h3 {
  margin-bottom: .5rem;
  font-size: 1.125rem;
}

.legal-doc__section p {
  color: var(--text-2);
  line-height: 1.85;
}

.legal-doc__section p + p {
  margin-top: .75rem;
}

/* 404 */

.not-found {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: calc(100vh - var(--header-h) - 240px);
  padding-block: 5rem;
  overflow: hidden;
  text-align: center;
}

.not-found__inner {
  display: grid;
  justify-items: center;
}

.not-found__code {
  font-family: var(--font-display);
  font-size: clamp(6rem, 18vw, 10rem);
  font-weight: 700;
  line-height: .9;
  letter-spacing: -.05em;
  background: linear-gradient(180deg, var(--primary-strong) 0%, color-mix(in srgb, var(--primary-strong) 5%, transparent) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.not-found .page-title {
  margin-top: 1.5rem;
}

.not-found .page-lead {
  margin-inline: auto;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  padding-top: clamp(3rem, 6vw, 4.5rem);
  border-top: 1px solid var(--border);
  background: var(--bg-elev);
}

.site-footer__grid {
  display: grid;
  gap: 2.5rem 2rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.site-footer__brand {
  grid-column: 1 / -1;
  display: grid;
  gap: .9rem;
  align-content: start;
  max-width: 400px;
}

.brand--footer .brand__mark {
  width: 34px;
  height: 34px;
}

.brand--footer .brand__name {
  letter-spacing: .14em;
  font-size: 1rem;
}

.site-footer__tagline {
  font-family: var(--font-display);
  color: var(--text);
  font-weight: 500;
}

.site-footer__disclaimer {
  color: var(--text-3);
  font-size: .8125rem;
  line-height: 1.7;
}

.site-footer__heading {
  margin-bottom: 1rem;
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-3);
}

.site-footer__col ul {
  display: grid;
  gap: .6rem;
}

.site-footer__col a,
.site-footer__col .is-muted {
  color: var(--text-2);
  font-size: .9375rem;
  transition: color .2s var(--ease);
}

.site-footer__col a:hover,
.site-footer__col a[aria-current] {
  color: var(--text);
}

.site-footer__col .is-muted {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--text-3);
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem 1.5rem;
  margin-top: 3rem;
  padding-block: 1.5rem 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-3);
  font-size: .8125rem;
}

.site-footer__domain {
  font-family: var(--font-mono);
}

@media (min-width: 860px) {
  .site-footer__grid {
    grid-template-columns: minmax(0, 1.8fr) repeat(3, minmax(0, 1fr));
  }

  .site-footer__brand {
    grid-column: auto;
  }
}

/* --------------------------------------------------------------------------
   Motion
   -------------------------------------------------------------------------- */

@keyframes pop {
  from { opacity: 0; transform: translateY(-6px) scale(.98); }
  to { opacity: 1; transform: none; }
}

@keyframes pop-center {
  from { opacity: 0; transform: translate(-50%, -6px) scale(.98); }
  to { opacity: 1; transform: translateX(-50%); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px var(--primary-soft), 0 0 14px var(--primary-strong); }
  50% { box-shadow: 0 0 0 7px transparent, 0 0 22px var(--primary-strong); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes dash-flow {
  to { stroke-dashoffset: -20; }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
