/* ============================================================
   BANDARSLOTGACOR.COM — SHARED STYLESHEET
   v1.0 — Phase 1 Foundation
   Editorial-with-character | Vogue Asia × Bloomberg
   ============================================================ */

/* --- RESET --- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
img, picture, video, canvas, svg { max-width: 100%; height: auto; display: block; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* --- DESIGN TOKENS --- */
:root {
  /* Color — Emerald Spine */
  --c-emerald-900: #0F3D2E;
  --c-emerald-700: #1A5A42;
  --c-emerald-500: #2A7F5F;
  --c-emerald-300: #4FA37D;
  --c-emerald-100: #B8DCC8;

  /* Color — Gold Accent */
  --c-gold-700: #9A7E3F;
  --c-gold-500: #C9A961;
  --c-gold-300: #DDC68A;
  --c-gold-100: #F0E5C4;

  /* Color — Charcoal Base */
  --c-ink-900: #0E0E12;
  --c-ink-800: #1A1A1F;
  --c-ink-700: #25252B;
  --c-ink-600: #34343B;
  --c-ink-500: #4A4A52;
  --c-ink-400: #6B6B73;
  --c-ink-300: #9A9AA0;

  /* Color — Cream Text */
  --c-cream-100: #F5F2E8;
  --c-cream-200: #E8E3D3;
  --c-cream-300: #C9C3AE;
  --c-cream-500: #8A8674;

  /* Color — Semantic */
  --c-warn: #C48A4A;
  --c-danger: #B85C3C;
  --c-ok: #5E8C61;
  --c-info: #4A8FA5;

  /* Typography */
  --f-display: 'Fraunces', 'Editorial New', 'Tiempos Headline', 'Hoefler Text', Georgia, serif;
  --f-body: 'Manrope', 'Söhne', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Type Scale */
  --t-xs: 0.78rem;
  --t-sm: 0.875rem;
  --t-base: 1rem;
  --t-md: 1.125rem;
  --t-lg: 1.375rem;
  --t-xl: 1.75rem;
  --t-2xl: 2.25rem;
  --t-3xl: 3rem;
  --t-4xl: 4.25rem;
  --t-5xl: 5.5rem;

  /* Space */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;
  --s-10: 8rem;
  --s-11: 12rem;

  /* Layout */
  --w-text: 68ch;
  --w-narrow: 720px;
  --w-content: 1140px;
  --w-wide: 1340px;
  --w-full: 1480px;

  /* Border & Radius */
  --b-hair: 1px solid var(--c-ink-700);
  --b-line: 1px solid var(--c-ink-600);
  --b-gold: 1px solid var(--c-gold-700);
  --r-sm: 2px;
  --r-md: 4px;
  --r-lg: 8px;

  /* Motion */
  --e-out: cubic-bezier(0.16, 1, 0.3, 1);
  --e-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --d-fast: 180ms;
  --d-base: 320ms;
  --d-slow: 600ms;
}

/* --- BASE --- */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--c-ink-800);
  color: var(--c-cream-100);
  font-family: var(--f-body);
  font-size: var(--t-base);
  line-height: 1.65;
  font-feature-settings: "ss01", "cv11", "ss03";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--f-display);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--c-cream-100);
  font-variation-settings: "opsz" 144, "SOFT" 50;
}

h1 { font-size: clamp(2.5rem, 6vw, var(--t-5xl)); font-variation-settings: "opsz" 144, "SOFT" 30, "wght" 380; }
h2 { font-size: clamp(1.875rem, 4vw, var(--t-3xl)); font-variation-settings: "opsz" 96, "wght" 400; }
h3 { font-size: clamp(1.375rem, 2.5vw, var(--t-xl)); font-variation-settings: "opsz" 36, "wght" 450; }
h4 { font-size: var(--t-lg); font-variation-settings: "opsz" 18, "wght" 500; }

p { max-width: var(--w-text); }
.lead { font-size: var(--t-md); color: var(--c-cream-200); line-height: 1.55; }

strong, b { font-weight: 600; color: var(--c-cream-100); }
em, i { font-style: italic; }

.num, .data { font-family: var(--f-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.eyebrow {
  font-family: var(--f-body);
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 600;
  color: var(--c-gold-500);
}

a { color: var(--c-emerald-300); transition: color var(--d-fast) var(--e-soft); }
a:hover { color: var(--c-gold-300); }

.prose a { border-bottom: 1px solid var(--c-emerald-500); }
.prose a:hover { border-bottom-color: var(--c-gold-300); }
.prose p + p { margin-top: var(--s-5); }
.prose h2 { margin-top: var(--s-8); margin-bottom: var(--s-4); }
.prose h3 { margin-top: var(--s-6); margin-bottom: var(--s-3); }

::selection { background: var(--c-gold-500); color: var(--c-ink-900); }

/* --- LAYOUT PRIMITIVES --- */
.shell, .frame, .wrap, .container { width: 100%; padding-inline: var(--s-5); margin-inline: auto; }
.shell { max-width: var(--w-content); }
.frame { max-width: var(--w-wide); }
.wrap { max-width: var(--w-narrow); }
.container { max-width: var(--w-full); }

.stack > * + * { margin-top: var(--s-4); }
.stack-lg > * + * { margin-top: var(--s-6); }
.stack-xl > * + * { margin-top: var(--s-8); }

/* --- HEADER (BASE — pages may layer overrides) --- */
.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(14, 14, 18, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: var(--b-hair);
}
.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-6);
  padding-block: var(--s-4);
}
.brand {
  display: flex;
  align-items: baseline;
  gap: var(--s-2);
  font-family: var(--f-display);
  font-size: var(--t-lg);
  font-variation-settings: "opsz" 24, "wght" 500;
  color: var(--c-cream-100);
  letter-spacing: -0.01em;
}
.brand__mark {
  display: inline-block;
  width: 10px; height: 10px;
  background: var(--c-gold-500);
  border-radius: 50%;
  margin-right: var(--s-1);
  transform: translateY(-2px);
}
.brand__sub {
  font-family: var(--f-body);
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--c-cream-500);
  font-weight: 500;
}

.nav-primary { display: flex; gap: var(--s-5); align-items: center; }
.nav-primary a {
  font-size: var(--t-sm);
  color: var(--c-cream-200);
  font-weight: 500;
  position: relative;
  padding-block: var(--s-1);
}
.nav-primary a:hover { color: var(--c-cream-100); }
.nav-primary a[aria-current="page"]::after {
  content: "";
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 1px;
  background: var(--c-gold-500);
}

.nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav-primary { display: none; }
  .nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: var(--s-2);
  }
  .nav-toggle span {
    display: block; width: 22px; height: 1.5px; background: var(--c-cream-100);
  }
}

/* --- FOOTER (BASE) --- */
.colophon {
  margin-top: var(--s-10);
  background: var(--c-ink-900);
  border-top: var(--b-hair);
  padding-block: var(--s-8) var(--s-6);
  font-size: var(--t-sm);
  color: var(--c-cream-300);
}
.colophon__grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: var(--s-6);
  margin-bottom: var(--s-7);
}
@media (max-width: 760px) {
  .colophon__grid { grid-template-columns: 1fr 1fr; }
}
.colophon h5 {
  font-family: var(--f-body);
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--c-cream-500);
  margin-bottom: var(--s-3);
  font-weight: 600;
}
.colophon ul li { margin-bottom: var(--s-2); }
.colophon a:hover { color: var(--c-gold-300); }

.disclosure {
  border-top: var(--b-hair);
  padding-top: var(--s-5);
  font-size: var(--t-xs);
  color: var(--c-cream-500);
  line-height: 1.5;
}
.disclosure p + p { margin-top: var(--s-2); }
.partner-line { color: var(--c-cream-500); font-size: var(--t-xs); }
.partner-line strong { color: var(--c-cream-300); font-weight: 600; }

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-5);
  font-size: var(--t-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: var(--r-sm);
  transition: all var(--d-fast) var(--e-soft);
  text-decoration: none !important;
  border: 1px solid transparent;
}
.btn--gold {
  background: var(--c-gold-500);
  color: var(--c-ink-900);
}
.btn--gold:hover { background: var(--c-gold-300); transform: translateY(-1px); }
.btn--ghost {
  background: transparent;
  color: var(--c-cream-100);
  border-color: var(--c-ink-500);
}
.btn--ghost:hover { border-color: var(--c-gold-500); color: var(--c-gold-300); }
.btn--arrow::after {
  content: "→";
  transition: transform var(--d-fast) var(--e-soft);
}
.btn--arrow:hover::after { transform: translateX(3px); }

/* --- CARD --- */
.card {
  background: var(--c-ink-700);
  border: var(--b-hair);
  padding: var(--s-5);
  position: relative;
  transition: border-color var(--d-base) var(--e-soft), transform var(--d-base) var(--e-soft);
}
.card:hover { border-color: var(--c-emerald-500); }
.card__eyebrow {
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--c-cream-500);
  margin-bottom: var(--s-3);
}
.card__title {
  font-family: var(--f-display);
  font-size: var(--t-xl);
  line-height: 1.2;
  margin-bottom: var(--s-3);
  font-variation-settings: "opsz" 36, "wght" 420;
}
.card__meta {
  font-size: var(--t-xs);
  color: var(--c-cream-500);
  font-family: var(--f-mono);
}

/* --- BADGE --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  padding: 2px var(--s-2);
  font-family: var(--f-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid currentColor;
  color: var(--c-gold-500);
}
.badge--ok { color: var(--c-emerald-300); }
.badge--warn { color: var(--c-warn); }
.badge--alert { color: var(--c-danger); }
.badge--info { color: var(--c-info); }

/* --- DATA TABLE --- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--t-sm);
}
.data-table th, .data-table td {
  padding: var(--s-3) var(--s-4);
  text-align: left;
  border-bottom: var(--b-hair);
}
.data-table th {
  font-family: var(--f-body);
  font-weight: 600;
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--c-cream-500);
  border-bottom: 1px solid var(--c-ink-500);
}
.data-table td.num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.data-table tr:hover td { background: rgba(42, 127, 95, 0.05); }

/* --- CALLOUT --- */
.callout {
  border-left: 2px solid var(--c-gold-500);
  background: rgba(201, 169, 97, 0.04);
  padding: var(--s-5) var(--s-6);
  margin-block: var(--s-6);
}
.callout--method {
  border-left-color: var(--c-emerald-500);
  background: rgba(42, 127, 95, 0.05);
}
.callout__label {
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--c-gold-500);
  margin-bottom: var(--s-2);
  font-weight: 600;
}
.callout--method .callout__label { color: var(--c-emerald-300); }

/* --- BREADCRUMB --- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--t-xs);
  color: var(--c-cream-500);
  font-family: var(--f-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--s-5);
}
.breadcrumb a:hover { color: var(--c-cream-200); }
.breadcrumb__sep { color: var(--c-ink-500); }

/* --- AUTHOR BYLINE --- */
.byline {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-5);
  background: var(--c-ink-700);
  border: var(--b-hair);
  margin-block: var(--s-7);
}
.byline__avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--c-ink-600);
  border: 1px solid var(--c-gold-700);
  flex-shrink: 0;
  overflow: hidden;
}
.byline__name {
  font-family: var(--f-display);
  font-size: var(--t-md);
  font-variation-settings: "opsz" 18, "wght" 500;
}
.byline__role {
  font-size: var(--t-xs);
  color: var(--c-cream-500);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: 2px;
}
.byline__date {
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  color: var(--c-cream-500);
}

/* --- SECTION RHYTHM --- */
.section { padding-block: var(--s-9); }
.section--tight { padding-block: var(--s-7); }
.section--loose { padding-block: var(--s-10); }
.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-5);
  margin-bottom: var(--s-6);
  padding-bottom: var(--s-4);
  border-bottom: var(--b-hair);
}
.section__head h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.section__head a { font-size: var(--t-sm); color: var(--c-gold-500); }

/* --- UTILS --- */
.muted { color: var(--c-cream-500); }
.text-center { text-align: center; }
.flow > * + * { margin-top: 1em; }
.hide-mobile { }
@media (max-width: 760px) {
  .hide-mobile { display: none; }
}
.skip-link {
  position: absolute;
  top: -40px;
  left: var(--s-4);
  background: var(--c-gold-500);
  color: var(--c-ink-900);
  padding: var(--s-2) var(--s-4);
  z-index: 100;
}
.skip-link:focus { top: var(--s-2); }

/* --- ACCESSIBILITY --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
:focus-visible {
  outline: 2px solid var(--c-gold-500);
  outline-offset: 2px;
}

/* --- PRINT --- */
@media print {
  .masthead, .colophon, .nav-primary { display: none; }
  body { background: white; color: black; }
}
