:root {
  --bg: var(--theme-bg);
  --surface: var(--theme-panel);
  --surface-raised: var(--theme-panel-raised);
  --recessed: var(--theme-panel-soft);
  --line: var(--theme-line);
  --line-strong: var(--theme-line-strong);
  --text: var(--theme-text);
  --muted: var(--theme-muted);
  --faint: var(--theme-faint);
  --accent: var(--theme-accent);
  --accent-strong: var(--theme-accent-strong);
  --accent-ink: var(--theme-accent-ink);
  --focus: var(--theme-focus);
  --display: var(--theme-display);
  --body: var(--theme-body);
  --mono: var(--theme-mono);
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body { min-width: 320px; margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; }
code, pre { font-family: var(--mono); }
::selection { background: rgb(216 117 79 / 0.32); color: var(--text); }

.skip-link { position: fixed; z-index: 60; top: 10px; left: 10px; padding: 9px 12px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-weight: 700; text-decoration: none; transform: translateY(-160%); }
.skip-link:focus { transform: none; }

.site-header, main, footer { width: min(1280px, calc(100% - 48px)); margin-inline: auto; }
.site-header { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 28px; border-bottom: 1px solid var(--line); }
.wordmark { flex: 0 0 auto; font: 680 0.94rem var(--display); letter-spacing: -0.02em; text-decoration: none; white-space: nowrap; }
.wordmark b { color: var(--muted); font-weight: 500; }
.site-header nav { min-width: 0; display: flex; align-items: center; gap: clamp(12px, 2vw, 26px); }
.site-header nav a { color: var(--muted); font-size: 0.78rem; font-weight: 620; text-decoration: none; }
.site-header nav a:hover, .site-header nav a:focus-visible, .site-header nav a[aria-current="page"] { color: var(--text); }
.site-header a:focus-visible, .primary-action:focus-visible, .text-action:focus-visible, .product-action:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }

.kicker, .product-kind { margin: 0; color: var(--accent-strong); font: 650 0.68rem var(--mono); letter-spacing: 0.1em; text-transform: uppercase; }
h1, h2, h3 { font-family: var(--display); text-wrap: balance; }
.hero { min-height: min(700px, calc(100dvh - 72px)); display: grid; grid-template-columns: minmax(0, 0.86fr) minmax(500px, 1.14fr); align-items: stretch; border-bottom: 1px solid var(--line); }
.hero-copy { position: relative; z-index: 2; align-self: center; max-width: 610px; padding: 64px 48px 72px 0; }
.hero h1 { margin: 22px 0 24px; font-size: clamp(3.5rem, 6vw, 6.2rem); font-weight: 620; line-height: 0.9; letter-spacing: -0.06em; }
.lede { max-width: 54ch; margin: 0; color: var(--muted); font-size: clamp(1rem, 1.3vw, 1.12rem); line-height: 1.65; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; margin-top: 30px; }
.primary-action { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; border: 1px solid var(--accent); border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-size: 0.78rem; font-weight: 740; text-decoration: none; white-space: nowrap; transition: background-color 220ms cubic-bezier(0.16, 1, 0.3, 1), border-color 220ms cubic-bezier(0.16, 1, 0.3, 1), transform 220ms cubic-bezier(0.16, 1, 0.3, 1); }
.primary-action:hover { border-color: var(--accent-strong); background: var(--accent-strong); }
.primary-action:active { transform: translateY(1px) scale(0.98); }
.text-action { display: inline-flex; align-items: center; gap: 7px; color: var(--text); font-size: 0.78rem; font-weight: 680; text-decoration-color: rgb(216 117 79 / 0.58); text-underline-offset: 5px; }
.text-action:hover { color: var(--accent-strong); }
.site-icon-arrow-up-right { --site-icon: url("https://cdn.jsdelivr.net/npm/heroicons@2/24/outline/arrow-up-right.svg"); }
.site-icon-arrow-right { --site-icon: url("https://cdn.jsdelivr.net/npm/heroicons@2/24/outline/arrow-right.svg"); }
.hero-art { position: relative; min-width: 0; margin: 0; overflow: hidden; }
.hero-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--bg), transparent 30%), linear-gradient(0deg, var(--bg), transparent 22%); pointer-events: none; }
.hero-art img { width: 100%; height: 100%; display: block; object-fit: cover; filter: saturate(0.72) contrast(1.08); }

.mods-directory, .local-first, .closing-cta { padding-block: clamp(80px, 9vw, 124px); border-bottom: 1px solid var(--line); }
.section-intro { max-width: 760px; margin-bottom: 64px; }
.section-intro h2, .local-first h2, .closing-cta h2 { margin: 18px 0 0; font-size: clamp(2.6rem, 4.8vw, 4.9rem); font-weight: 610; line-height: 0.96; letter-spacing: -0.05em; }

/* Mod Row Directory Layout */
.mods-list { display: flex; flex-direction: column; }
.mod-entry { display: grid; grid-template-columns: 240px 1fr; border-top: 1px solid var(--line); padding-block: 64px; gap: 48px; }
.mod-entry:first-child { border-top: 0; padding-top: 24px; }
.mod-meta { display: flex; flex-direction: column; gap: 8px; }
.mod-index { font-family: var(--mono); font-size: 0.86rem; color: var(--accent); font-weight: 700; }
.mod-category { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); }
.mod-body { display: flex; flex-direction: column; }
.mod-body h3 { margin: 0 0 16px; font-size: clamp(2.2rem, 4vw, 3.6rem); font-weight: 620; letter-spacing: -0.04em; }
.mod-description { max-width: 65ch; margin: 0 0 40px; color: var(--muted); font-size: 1.05rem; line-height: 1.65; }
.mod-specifications { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; margin-bottom: 48px; }
.spec-col h4 { font-family: var(--mono); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); margin: 0 0 20px; }
.spec-col ul, .spec-col ol { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.spec-col li { font-size: 0.86rem; color: var(--muted); line-height: 1.5; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.spec-col li:last-child { border-bottom: 0; }
.spec-col ol { counter-reset: item; }
.spec-col ol li { position: relative; padding-left: 28px; }
.spec-col ol li::before { content: counter(item) "."; counter-increment: item; position: absolute; left: 0; color: var(--accent); font-family: var(--mono); font-weight: 700; }
.mod-actions { display: flex; gap: 16px; align-items: center; }
.action-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 22px; border-radius: 999px; text-decoration: none; font-size: 0.78rem; font-weight: 650; transition: border-color 220ms cubic-bezier(0.16, 1, 0.3, 1), background-color 220ms cubic-bezier(0.16, 1, 0.3, 1), color 220ms cubic-bezier(0.16, 1, 0.3, 1), transform 220ms cubic-bezier(0.16, 1, 0.3, 1); }
.action-btn.primary { background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); font-weight: 700; }
.action-btn.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); transform: translateY(-1px); }
.action-btn.secondary { border: 1px solid var(--line-strong); color: var(--muted); background: transparent; }
.action-btn.secondary:hover { border-color: var(--accent); color: var(--text); transform: translateY(-1px); }

.local-first { display: grid; grid-template-columns: 1fr 0.9fr; align-items: start; gap: clamp(50px, 9vw, 130px); }
.local-copy > p { max-width: 55ch; margin: 0; color: var(--muted); line-height: 1.7; }
.local-copy ul { margin: 30px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.local-copy li { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 0.84rem; }
.local-copy li:last-child { border-bottom: 0; }
.closing-cta { min-height: 420px; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 40px; }
.closing-cta h2 { max-width: 820px; }
footer { display: grid; grid-template-columns: 1fr 1.25fr auto; gap: 36px; padding-block: 32px 42px; color: var(--faint); font-size: 0.76rem; line-height: 1.55; }
footer p { margin: 0; }
.footer-brand { display: grid; gap: 3px; }
.footer-brand strong { color: var(--text); }
footer a { color: var(--muted); text-underline-offset: 4px; }

.legal-page { max-width: 760px; margin: 0 auto; padding: clamp(70px, 10vw, 130px) 0; }
.legal-page h1 { margin: 20px 0 70px; font-size: clamp(3rem, 7vw, 5.8rem); font-weight: 610; line-height: 0.94; letter-spacing: -0.055em; }
.legal-page section { padding: 28px 0; border-top: 1px solid var(--line); }
.legal-page h2 { margin: 0 0 14px; font-size: 1.15rem; font-weight: 650; letter-spacing: -0.02em; }
.legal-page p { margin: 0 0 14px; color: var(--muted); font-size: 0.94rem; line-height: 1.75; }
.legal-page strong { color: var(--text); }
.legal-page a { color: var(--accent-strong); text-underline-offset: 4px; }

@media (max-width: 900px) {
  .site-header, main, footer { width: min(100% - 32px, 1280px); }
  .site-header nav a:nth-child(3), .site-header nav a:nth-child(4) { display: none; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-copy { max-width: 720px; padding: 56px 0 34px; }
  .hero h1 { font-size: clamp(3.3rem, 12vw, 5.6rem); }
  .hero-art { min-height: 390px; }
  .hero-art::after { background: linear-gradient(180deg, var(--bg), transparent 28%), linear-gradient(0deg, var(--bg), transparent 18%); }
  .product-grid, .workflow, .local-first { grid-template-columns: 1fr; }
  .product-card { min-height: 430px; }
  .workflow-map { grid-column: auto; grid-row: auto; }
  .workflow-steps { grid-template-columns: 1fr 1fr; }
  .workflow-steps li:nth-child(2) { border-right: 0; }
  .workflow-steps li:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  footer { grid-template-columns: 1fr; padding-right: 76px; }
}

@media (max-width: 580px) {
  .site-header { min-height: 64px; }
  .site-header nav { gap: 8px; }
  .site-header nav a { display: none; }
  .support-trigger { padding-inline: 10px; }
  .hero-copy { padding-top: 48px; }
  .hero h1 { font-size: clamp(3rem, 15vw, 4.2rem); }
  .hero-art { min-height: 320px; }
  .product-section, .workflow, .local-first, .closing-cta { padding-block: 72px 82px; }
  .product-grid { grid-template-columns: 1fr; }
  .product-card { min-height: 0; grid-template-rows: auto 190px; }
  .product-copy { padding: 24px; }
  .workflow-steps { grid-template-columns: 1fr; }
  .workflow-steps li { min-height: 94px; grid-template-columns: 88px 1fr; gap: 10px; align-items: start; padding: 16px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .workflow-steps li:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .closing-cta { min-height: 360px; grid-template-columns: 1fr; align-content: end; }
  .closing-cta .primary-action { justify-self: start; }
  .legal-page h1 { margin-bottom: 52px; }
}

/* Rounded glass material pass */
.site-header {
  min-height: 64px;
  margin-top: 16px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: linear-gradient(145deg, var(--surface-raised), var(--surface));
  box-shadow: var(--theme-shadow);
}
.site-header nav { gap: 10px; }
.site-header nav > a:not(.discord-link) { padding: 9px 7px; }
.hero {
  min-height: min(680px, calc(100dvh - 108px));
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 30px;
  background: linear-gradient(145deg, var(--surface), color-mix(in srgb, var(--surface-raised) 76%, transparent));
  box-shadow: var(--theme-shadow);
}
.hero-copy { padding: 64px 52px; }
.primary-action { min-height: 48px; padding: 0 22px; border-radius: 999px; box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.18), 0 14px 34px rgb(0 0 0 / 0.18); }
.mods-directory, .local-first, .closing-cta {
  margin-top: 24px;
  padding: clamp(56px, 6vw, 84px);
  border: 1px solid var(--line-strong);
  border-radius: 30px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--surface-raised) 74%, transparent), var(--surface));
  box-shadow: var(--theme-shadow);
}
.local-copy ul { padding: 8px 22px; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(145deg, var(--surface-raised), var(--surface)); }
.legal-page { max-width: 860px; padding-block: clamp(64px, 8vw, 100px); }
.legal-page section { margin-top: 14px; padding: 26px 30px; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(145deg, var(--surface-raised), var(--surface)); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.05); }

@media (max-width: 900px) {
  .hero-copy { padding: 54px 30px 38px; }
  .mods-directory, .local-first, .closing-cta { padding: 48px 30px; }
}

@media (max-width: 580px) {
  .site-header { width: calc(100% - 20px); margin-top: 10px; padding: 0 12px; }
  .site-header nav { gap: 6px; }
  .site-header nav .discord-link { display: inline-flex; }
  .discord-link, .support-trigger { min-height: 36px; padding-inline: 12px; font-size: 0.72rem; }
  .hero { margin-top: 12px; border-radius: 24px; }
  .hero-copy { padding: 44px 20px 32px; }
  .mods-directory, .local-first, .closing-cta { margin-top: 14px; padding: 40px 20px; border-radius: 24px; }
  .mod-entry { grid-template-columns: 1fr; padding-block: 40px; gap: 32px; }
  .mod-specifications { grid-template-columns: 1fr; gap: 32px; }
  .legal-page section { padding: 22px 20px; border-radius: 18px; }
}

/* Editorial rhythm and motivated motion */
.hero { grid-template-columns: minmax(0, 1.06fr) minmax(440px, 0.94fr); }
.hero-copy { max-width: none; }
.hero h1 { max-width: 14ch; font-size: clamp(3.2rem, 4.8vw, 5.4rem); line-height: 0.92; text-wrap: balance; }
.mods-directory .section-intro { max-width: 820px; }
.mod-entry { transition: border-color 320ms cubic-bezier(0.16, 1, 0.3, 1); }
.mod-entry:hover { border-color: color-mix(in srgb, var(--accent) 38%, var(--line)); }
.local-first { background: radial-gradient(circle at 92% 0%, rgb(216 117 79 / 0.12), transparent 36%), linear-gradient(145deg, color-mix(in srgb, var(--surface-raised) 74%, transparent), var(--surface)); }
.closing-cta { position: relative; isolation: isolate; min-height: 470px; overflow: hidden; color: #f0f1ee; background: linear-gradient(90deg, rgb(5 8 9 / 0.92), rgb(5 8 9 / 0.38)), url("assets/pallaw-terrain-hero.jpg") center 48% / cover; }
.closing-cta::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(0deg, rgb(5 8 9 / 0.7), transparent 58%); pointer-events: none; }
.closing-cta .primary-action { color: #1f100a; }

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .mods-directory, .local-first, .closing-cta {
      animation: chapter-enter both cubic-bezier(0.16, 1, 0.3, 1);
      animation-timeline: view();
      animation-range: entry 8% cover 30%;
    }
  }
}
@keyframes chapter-enter { from { opacity: 0.32; transform: translateY(34px) scale(0.985); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-transparency: reduce) {
  .site-header, .mods-directory, .local-first, .legal-page section { background: var(--surface-raised); }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero h1 { max-width: 13ch; }
  .mod-entry { grid-template-columns: 1fr; padding-block: 48px; gap: 36px; }
  .mod-specifications { gap: 40px; }
}

@media (max-width: 580px) {
  .hero h1 { max-width: 12ch; font-size: clamp(3rem, 14vw, 4rem); }
  .closing-cta { min-height: 390px; }
}

/* Product feature layout */
.products { padding-block: clamp(72px, 8vw, 112px); }
.products .section-intro { margin-bottom: clamp(36px, 5vw, 64px); }
.products .section-intro p, .product-name, .promise-heading p { margin: 0; color: var(--accent-strong); font: 650 0.68rem var(--mono); letter-spacing: 0.1em; text-transform: uppercase; }
.products .section-intro h2, .promise-heading h2 { margin: 16px 0 0; font-size: clamp(2.6rem, 4.8vw, 4.9rem); font-weight: 610; line-height: 0.96; letter-spacing: -0.05em; }
.product-feature {
  min-width: 0;
  min-height: 560px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 30px;
  background: linear-gradient(145deg, var(--surface-raised), var(--surface));
  box-shadow: var(--theme-shadow);
}
.product-feature + .product-feature { margin-top: 24px; }
.product-copy { min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: clamp(38px, 6vw, 76px); }
.product-copy h3 { max-width: 13ch; margin: 18px 0 22px; font-size: clamp(2.5rem, 4vw, 4.6rem); font-weight: 610; line-height: 0.94; letter-spacing: -0.05em; }
.product-copy > p:not(.product-name) { max-width: 52ch; margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.7; }
.outcome-list { display: grid; gap: 0; margin: 30px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.outcome-list li { padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 0.82rem; }
.ops-outcomes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.ops-outcomes span { padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font: 650 0.7rem var(--mono); }
.product-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; margin-top: 32px; }
.product-actions .product-action { margin-top: 0; }
.product-action { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; margin-top: 32px; color: var(--text); font-size: 0.8rem; font-weight: 700; text-decoration-color: rgb(216 117 79 / 0.58); text-underline-offset: 5px; }
.product-action:hover { color: var(--accent-strong); }
.map-visual, .ops-visual { position: relative; min-width: 0; min-height: 0; margin: 0; overflow: hidden; background: var(--recessed); }
.map-mosaic { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(4, minmax(0, 1fr)); filter: saturate(0.68) contrast(1.06); }
.map-mosaic img { width: 100%; height: 100%; display: block; object-fit: cover; }
.map-visual::after, .ops-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(12 14 15 / 0.18), transparent 42%), linear-gradient(0deg, rgb(12 14 15 / 0.62), transparent 48%); pointer-events: none; }
.map-visual figcaption { position: absolute; z-index: 1; right: 20px; bottom: 18px; color: rgb(239 240 235 / 0.72); font: 0.66rem var(--mono); }
.ops-visual img { width: 100%; height: 100%; display: block; object-fit: cover; filter: saturate(0.76) contrast(1.08); }
.operator-promise { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(42px, 8vw, 110px); margin-top: 24px; padding: clamp(48px, 6vw, 80px); border: 1px solid var(--line-strong); border-radius: 30px; background: linear-gradient(145deg, color-mix(in srgb, var(--surface-raised) 74%, transparent), var(--surface)); box-shadow: var(--theme-shadow); }
.promise-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0; }
.promise-facts div { padding: 8px 22px 8px 0; border-right: 1px solid var(--line); }
.promise-facts div + div { padding-left: 22px; }
.promise-facts div:last-child { padding-right: 0; border-right: 0; }
.promise-facts dt { color: var(--text); font-size: 0.82rem; font-weight: 700; }
.promise-facts dd { margin: 10px 0 0; color: var(--muted); font-size: 0.78rem; line-height: 1.6; }

@media (max-width: 900px) {
  .product-feature, .operator-promise { grid-template-columns: 1fr; }
  .product-copy { padding: 46px 30px; }
  .map-visual, .ops-visual { min-height: 420px; }
  .product-ops .product-copy { order: 1; }
  .product-ops .ops-visual { order: 2; }
}

@media (max-width: 580px) {
  .products { padding-block: 58px; }
  .product-feature, .operator-promise { border-radius: 24px; }
  .product-feature { min-height: 0; }
  .product-copy { padding: 38px 20px; }
  .product-copy h3 { font-size: clamp(2.35rem, 13vw, 3.5rem); }
  .map-visual, .ops-visual { min-height: 290px; }
  .operator-promise { padding: 40px 20px; }
  .promise-facts { grid-template-columns: 1fr; }
  .promise-facts div, .promise-facts div + div { padding: 18px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .promise-facts div:last-child { border-bottom: 0; }
}
