:root {
  color-scheme: light;
  --bg: #F2EFE9;
  --surface: #FAF8F4;
  --surface-alt: #E6E1D8;
  --band-bg: #141413;
  --band-ink: #F2EFE9;
  --band-muted: #B8B2A8;
  --band-border: #2D2C29;
  --ink: #141413;
  --ink-muted: #474540;
  --border: #141413;
  --border-soft: #C9C3B8;
  --accent: #C2410C;
  --accent-hover: #9A3412;
  --accent-ink: #FFFFFF;
  --danger: #B91C1C;
  --shadow-offset: 4px 4px 0 #141413;
  --radius-sm: 4px;
  --radius-md: 8px;
  --font-display: "Bricolage Grotesque", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121211;
  --surface: #1C1B19;
  --surface-alt: #252420;
  --band-bg: #1C1B19;
  --band-ink: #F2EFE9;
  --band-muted: #B5B0A6;
  --band-border: #36342F;
  --ink: #F2EFE9;
  --ink-muted: #B5B0A6;
  --border: #4A4740;
  --border-soft: #302E2A;
  --accent: #FB923C;
  --accent-hover: #F97316;
  --accent-ink: #121211;
  --danger: #F87171;
  --shadow-offset: 4px 4px 0 #000000;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg);
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* Base interaction affordances (R-39 & R-32) */
a[href],
button,
summary,
select,
label[for] {
  cursor: pointer;
}

button:disabled,
[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.55;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -64px;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  top: 16px;
}

.mono {
  font-family: var(--font-mono);
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--surface-alt);
  padding: 2px 6px;
  border-radius: 3px;
}

.wrap {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  border-bottom: 1.5px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 30;
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 16px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
}

.wordmark-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--accent);
}

.release-tag {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.desktop-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 12px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-sm);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.desktop-nav a:hover {
  background: var(--surface-alt);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-theme,
.btn-menu {
  min-height: 44px;
  padding: 0 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.12s ease, background-color 0.15s ease;
}

.btn-theme:hover,
.btn-menu:hover {
  background: var(--surface-alt);
}

.btn-theme:active,
.btn-menu:active {
  transform: translateY(1px);
}

.theme-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--ink);
}

html[data-theme="dark"] .theme-indicator {
  background: var(--accent);
  border-color: var(--accent);
}

.btn-menu {
  display: none;
}

.mobile-drawer {
  border-top: 1.5px solid var(--border);
  background: var(--surface);
}

.mobile-drawer-inner {
  display: flex;
  flex-direction: column;
  padding-top: 8px;
  padding-bottom: 12px;
}

.mobile-drawer a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  min-height: 48px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-soft);
}

.mobile-drawer a:last-child {
  border-bottom: 0;
}

/* Section 1: Hero */
.hero-section {
  padding: 56px 0 72px;
}

.hero-headline-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 24px;
  margin-bottom: 32px;
  border-bottom: 1.5px solid var(--border);
}

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.35rem, 6vw, 4.5rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-weight: 800;
}

.hero-index {
  margin: 0;
  font-size: 13px;
  color: var(--ink-muted);
  white-space: nowrap;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 44px;
  align-items: start;
}

.hero-lead {
  margin: 0 0 32px;
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: 48ch;
}

.cta-block {
  margin-bottom: 36px;
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: stretch;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  min-height: 64px;
  padding: 14px 24px;
  text-decoration: none;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-offset);
  transition: transform 0.12s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.12s ease, background-color 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--border);
}

.btn-secondary:hover {
  background: var(--surface-alt);
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--border);
}

.btn-primary:active,
.btn-secondary:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--border);
}

.btn-primary-label,
.btn-secondary-label {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.btn-primary-meta,
.btn-secondary-meta {
  font-size: 12px;
  font-weight: 500;
}

.btn-secondary-meta {
  color: var(--ink-muted);
}

.release-notice,
.release-error {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--ink-muted);
  max-width: 54ch;
}

.release-error {
  color: var(--danger);
  font-weight: 600;
}

.quick-specs {
  margin: 0;
  padding-top: 24px;
  border-top: 1px solid var(--border-soft);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.quick-spec-item dt {
  font-size: 12px;
  color: var(--ink-muted);
  margin-bottom: 4px;
}

.quick-spec-item dd {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

/* Tactile Spec Sheet */
.spec-sheet {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-offset);
  padding: 22px;
}

.spec-sheet-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1.5px solid var(--border);
}

.spec-sheet-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
}

.spec-sheet-code {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
}

.spec-list {
  margin: 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.spec-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 14px;
}

.spec-line dt {
  color: var(--ink-muted);
}

.spec-line dd {
  margin: 0;
  font-weight: 500;
  text-align: right;
  word-break: break-all;
}

.release-notes-box {
  border-top: 1px solid var(--border-soft);
  padding-top: 14px;
}

.notes-heading {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
}

.notes-list {
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
  color: var(--ink-muted);
}

.notes-list li + li {
  margin-top: 4px;
}

/* Section 2: High-Contrast Carbon Band */
.contrast-band {
  background: var(--band-bg);
  color: var(--band-ink);
  border-top: 1.5px solid var(--border);
  border-bottom: 1.5px solid var(--border);
  padding: 72px 0;
}

.band-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 48px;
  align-items: start;
}

.section-index {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 10px;
}

.contrast-band .section-index {
  color: #FB923C;
}

.band-intro h2 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.band-intro p {
  margin: 0;
  color: var(--band-muted);
  max-width: 38ch;
}

.ledger {
  border-top: 1px solid var(--band-border);
}

.ledger-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--band-border);
  align-items: baseline;
}

.ledger-key {
  font-size: 12px;
  font-weight: 600;
  color: #FB923C;
}

.ledger-val h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  color: var(--band-ink);
}

.ledger-val p {
  margin: 0;
  font-size: 15px;
  color: var(--band-muted);
}

/* Section 3: Panduan Pasang */
.guide-section {
  padding: 76px 0 84px;
}

.guide-header {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 36px;
  align-items: end;
  margin-bottom: 44px;
}

.guide-title-col h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.security-note {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}

.security-note h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
}

.security-note p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-muted);
}

.install-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1.5px solid var(--border);
}

.install-step {
  padding: 24px 20px 24px 0;
  border-right: 1px solid var(--border-soft);
}

.install-step:not(:first-child) {
  padding-left: 20px;
}

.install-step:last-child {
  border-right: 0;
  padding-right: 0;
}

.install-num {
  display: block;
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
  margin-bottom: 16px;
}

.install-step h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
}

.install-step p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-muted);
}

/* Footer */
.site-footer {
  border-top: 1.5px solid var(--border);
  background: var(--surface);
  padding: 32px 0;
}

.footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-left p {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--ink-muted);
}

.footer-wordmark {
  font-size: 18px;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.back-top {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

/* Motion 2: Purposeful scroll reveal (disabled under reduced-motion) */
@media (prefers-reduced-motion: no-preference) {
  [data-reveal] {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
  }

  [data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive State 2: Tablet & Small Laptop (<= 960px) */
@media (max-width: 960px) {
  .hero-grid,
  .band-grid,
  .guide-header {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-headline-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .install-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 0;
    gap: 16px;
  }

  .install-step,
  .install-step:not(:first-child),
  .install-step:last-child {
    padding: 20px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
  }
}

/* Responsive State 3: Mobile (<= 640px) */
@media (max-width: 640px) {
  .wrap {
    padding: 0 16px;
  }

  .desktop-nav {
    display: none;
  }

  .btn-menu {
    display: inline-flex;
  }

  .hero-section {
    padding: 32px 0 48px;
  }

  .contrast-band,
  .guide-section {
    padding: 48px 0;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    align-items: center;
    text-align: center;
  }

  .quick-specs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ledger-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .install-steps {
    grid-template-columns: 1fr;
  }

  .footer-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}
