/* ==========================================================================
   Astalapan (astalapan.id) - Editorial Studio Design System
   Palet Elemen Logam & Air: Putih, Titanium/Abu Metalik, Biru Tua, Aksen Emas
   ========================================================================== */

:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f7;
  --bg-dark: #0a192f;
  --bg-dark-elevated: #10233f;

  --text-primary: #1d1d1f;
  --text-secondary: #48484a;
  --text-muted: #6e6e73;
  --text-on-dark: #f5f5f7;
  --text-on-dark-muted: #a1a1a6;

  --accent-blue: #0066cc;
  --accent-gold: #9a6e04;
  --accent-gold-light: #e5c158;

  --border-subtle: #d2d2d7;
  --border-hairline: rgb(0 0 0 / 0.08);
  --border-dark: rgb(255 255 255 / 0.14);

  --glass-bg: rgb(255 255 255 / 0.82);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-pill: 999px;
  --max-width: 1080px;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  text-align: start;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-inline-size: 100%;
}

a {
  color: var(--accent-blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

/* Typography */
h1,
h2,
h3 {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  letter-spacing: -0.025em;
  line-height: 1.14;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
  overflow-wrap: break-word;
}

.container {
  max-inline-size: var(--max-width);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* ==========================================================================
   Scroll Progress Indicator
   ========================================================================== */
.scroll-progress {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  block-size: 2px;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-blue));
  transform-origin: 0 50%;
  transform: scaleX(0);
  z-index: 60;
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    @keyframes progress-grow {
      from { transform: scaleX(0); }
      to { transform: scaleX(1); }
    }
    .scroll-progress {
      animation: progress-grow auto linear;
      animation-timeline: scroll(root);
    }
  }
}

/* ==========================================================================
   Site Navigation Bar (Modern Web Guidance: single nav + popover + is-wide)
   ========================================================================== */
.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 50;
  background: var(--glass-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-block-end: 1px solid var(--border-hairline);
}

.header-inner {
  max-inline-size: var(--max-width);
  margin-inline: auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.header-inner > * {
  flex-shrink: 0;
  white-space: nowrap;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

.site-logo:hover {
  text-decoration: none;
}

.logo-mark {
  inline-size: 32px;
  block-size: 32px;
  flex: none;
}

.menu-button {
  anchor-name: --menu-button;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  cursor: pointer;
}

.site-menu {
  list-style: none;
  margin: 0;
  padding: 0.75rem;
  position: fixed;
  inset: auto;
  inset-block-start: 4rem;
  inset-block-start: anchor(--menu-button bottom);
  inset-inline-end: 1.25rem;
  inline-size: min(80dvw, 18rem);
  max-inline-size: calc(100dvw - 2rem);
  block-size: fit-content;
  max-block-size: calc(100dvh - 5rem);
  margin-block-start: 0.5rem;
  overflow: auto;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.12);
}

.site-menu a {
  display: block;
  padding: 0.55rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 8px;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.site-menu a:hover {
  color: var(--text-primary);
  background: var(--bg-secondary);
  text-decoration: none;
}

.site-menu a[aria-current="page"] {
  color: var(--text-primary);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--accent-gold);
  text-underline-offset: 5px;
  text-decoration-thickness: 2px;
}

.site-header.is-wide .menu-button {
  display: none;
}

.site-header.is-wide .site-menu {
  position: static;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  inline-size: auto;
  max-inline-size: none;
  block-size: auto;
  max-block-size: none;
  overflow: visible;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.site-header.is-wide .site-menu a {
  padding: 0.35rem 0.7rem;
  font-size: 0.85rem;
}

.site-header.is-wide .site-menu::backdrop {
  display: none;
}

.site-header.is-measuring * {
  transition: none !important;
}

/* ==========================================================================
   Hero Section (Editorial Left-Aligned Studio Statement)
   ========================================================================== */
.hero {
  padding-block: clamp(4.5rem, 9vw, 7.5rem) clamp(3.5rem, 7vw, 5.5rem);
  background-color: var(--bg-primary);
  border-block-end: 1px solid var(--border-hairline);
}

.hero-content {
  max-inline-size: 46rem;
}

.hero-kicker {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-gold);
  letter-spacing: 0.02em;
  margin-block-end: 1rem;
}

.hero h1 {
  font-size: clamp(2.25rem, 1.5rem + 3.2vw, 4rem);
  font-weight: 700;
  color: var(--text-primary);
  max-inline-size: 15ch;
}

.hero-sub {
  font-size: clamp(1.05rem, 0.95rem + 0.45vw, 1.25rem);
  color: var(--text-secondary);
  max-inline-size: 54ch;
  margin-block-start: 1.35rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  margin-block-start: 2.25rem;
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes hero-enter {
    from {
      opacity: 0;
      translate: 0 18px;
    }
    to {
      opacity: 1;
      translate: 0 0;
    }
  }

  .hero-kicker { animation: hero-enter 0.6s cubic-bezier(0.22, 1, 0.36, 1) both; }
  .hero h1 { animation: hero-enter 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both; }
  .hero-sub { animation: hero-enter 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.16s both; }
  .hero-actions { animation: hero-enter 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.24s both; }
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.55rem;
  border-radius: var(--radius-pill);
  background: var(--bg-dark);
  color: #ffffff;
  font-size: 0.94rem;
  font-weight: 500;
  transition: background-color 0.2s ease, translate 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-primary:hover {
  background: var(--bg-dark-elevated);
  text-decoration: none;
  translate: 0 -2px;
}

.btn-link {
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--text-primary);
  border-block-end: 1px solid var(--border-subtle);
  padding-block-end: 0.15rem;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.btn-link:hover {
  color: var(--accent-blue);
  border-color: var(--accent-blue);
  text-decoration: none;
}

/* ==========================================================================
   Sections & Editorial Rhythms
   ========================================================================== */
.section {
  padding-block: clamp(3.75rem, 7vw, 6rem);
}

.section--alt {
  background-color: var(--bg-secondary);
}

.section--dark {
  background-color: var(--bg-dark);
  color: var(--text-on-dark);
}

.section-header {
  max-inline-size: 40rem;
  margin-block-end: 2.5rem;
}

.section-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-block-end: 0.5rem;
}

.section--dark .section-label {
  color: var(--accent-gold-light);
}

.section-header h2 {
  font-size: clamp(1.75rem, 1.25rem + 1.8vw, 2.55rem);
  margin-block-end: 0.75rem;
}

.section-header p {
  font-size: 1.02rem;
  color: var(--text-secondary);
}

.section--dark .section-header p {
  color: var(--text-on-dark-muted);
}

/* 1. Asymmetric Bento (Filosofi) */
.bento-asymmetric {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 760px) {
  .bento-asymmetric {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: stretch;
  }
}

.bento-stack {
  display: grid;
  gap: 1.25rem;
}

.bento-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  padding: 2rem 1.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  transition:
    translate 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.3s ease;
}

.bento-card--lead {
  justify-content: space-between;
  padding: 2.35rem 2.15rem;
}

.bento-card--lead h3 {
  font-size: clamp(1.6rem, 1.35rem + 0.8vw, 2.05rem);
  margin-block-end: 0.9rem;
}

.bento-card--lead p {
  font-size: 1.05rem;
  line-height: 1.65;
}

.bento-card h3 {
  font-size: 1.22rem;
}

.bento-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.card-footnote {
  margin-block-start: 1.5rem;
  padding-block-start: 1rem;
  border-block-start: 1px solid var(--border-hairline);
  font-size: 0.82rem !important;
  color: var(--text-muted) !important;
}

@media (hover: hover) {
  .bento-card:hover {
    translate: 0 -4px;
    box-shadow: 0 14px 30px rgb(10 25 47 / 0.06);
    border-color: rgb(154 110 4 / 0.3);
  }
}

/* 2. Ecosystem Grid (Featured Wide + 2 Columns) */
.ecosystem-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 720px) {
  .ecosystem-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .eco-card--featured {
    grid-column: span 2;
  }
}

.eco-card {
  background: var(--bg-dark-elevated);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-lg);
  padding: 2rem 1.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  transition:
    translate 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.3s ease,
    box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.eco-card--featured {
  padding: 2.35rem 2.15rem;
}

.eco-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-on-dark-muted);
}

.status-dot {
  inline-size: 7px;
  block-size: 7px;
  border-radius: 50%;
  background: var(--text-on-dark-muted);
}

.status-dot--gold {
  background: var(--accent-gold-light);
}

.eco-card h3 {
  font-size: 1.35rem;
  color: var(--text-on-dark);
}

.eco-card--featured h3 {
  font-size: 1.65rem;
}

.eco-card p {
  font-size: 0.95rem;
  color: var(--text-on-dark-muted);
  max-inline-size: 62ch;
}

@media (hover: hover) {
  .eco-card:hover {
    translate: 0 -4px;
    border-color: rgb(229 193 88 / 0.45);
    box-shadow: 0 16px 36px rgb(0 0 0 / 0.32);
  }
}

/* 3. Split Layout + Hairline List (Keamanan & Privasi) */
.split-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 820px) {
  .split-layout {
    grid-template-columns: 0.85fr 1.15fr;
    gap: 3.5rem;
    align-items: start;
  }

  .split-aside {
    position: sticky;
    inset-block-start: 5.5rem;
  }
}

.split-aside h2 {
  font-size: clamp(1.65rem, 1.2rem + 1.5vw, 2.3rem);
  margin-block-end: 0.85rem;
}

.split-aside p {
  color: var(--text-secondary);
  font-size: 1rem;
}

.hairline-list {
  display: grid;
}

.hairline-row {
  padding-block: 1.5rem;
  border-block-start: 1px solid var(--border-hairline);
}

.hairline-row:last-child {
  border-block-end: 1px solid var(--border-hairline);
}

.hairline-row h3 {
  font-size: 1.12rem;
  margin-block-end: 0.4rem;
}

.hairline-row p {
  font-size: 0.94rem;
  color: var(--text-secondary);
}

/* 4. Corporate Spec Sheet */
.corp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  border-block-start: 1px solid var(--border-subtle);
  padding-block-start: 2rem;
}

.corp-item dt {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
  margin-block-end: 0.25rem;
}

.corp-item dd {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* ==========================================================================
   Scroll Reveal Choreography (Reliable IntersectionObserver + Stagger)
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  [data-reveal].is-pending {
    opacity: 0;
    translate: 0 26px;
  }

  [data-reveal] {
    transition:
      opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1) var(--delay, 0ms),
      translate 0.7s cubic-bezier(0.22, 1, 0.36, 1) var(--delay, 0ms);
  }

  [data-reveal].is-visible {
    opacity: 1;
    translate: 0 0;
  }
}

/* ==========================================================================
   Legal Document Layout (Editorial 2-Column TOC + Hairline Sections)
   ========================================================================== */
.legal-header {
  padding-block: clamp(3rem, 6vw, 4.5rem) 2.5rem;
  border-block-end: 1px solid var(--border-hairline);
}

.legal-header h1 {
  font-size: clamp(2rem, 1.4rem + 2.2vw, 3rem);
  margin-block-end: 0.65rem;
}

.legal-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.legal-lead {
  max-inline-size: 58ch;
  font-size: 1.08rem;
  color: var(--text-secondary);
  margin-block-start: 1.25rem;
}

.legal-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding-block: 2.5rem 5rem;
}

@media (min-width: 820px) {
  .legal-shell {
    grid-template-columns: 220px 1fr;
    gap: 4rem;
    align-items: start;
  }

  .legal-toc {
    position: sticky;
    inset-block-start: 5.5rem;
  }
}

.legal-toc-title {
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-block-end: 0.75rem;
}

.legal-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.legal-toc a {
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.legal-toc a:hover {
  color: var(--text-primary);
}

.legal-article {
  max-inline-size: 64ch;
}

.legal-section {
  padding-block: 1.75rem;
  border-block-start: 1px solid var(--border-hairline);
}

.legal-section:first-child {
  padding-block-start: 0;
  border-block-start: 0;
}

.legal-section h2 {
  font-size: 1.22rem;
  margin-block-end: 0.75rem;
  scroll-margin-block-start: 5.5rem;
}

.legal-section p,
.legal-section li {
  font-size: 0.96rem;
  color: var(--text-secondary);
  margin-block-end: 0.85rem;
}

.legal-section ul {
  padding-inline-start: 1.25rem;
  margin-block: 0.5rem 0.85rem;
}

/* Footer */
.site-footer {
  background: var(--bg-primary);
  border-block-start: 1px solid var(--border-hairline);
  padding-block: 2.25rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer-links a {
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--text-primary);
}
