/* DramaCase public site — "Bioskop Malam" tokens mirrored from the app
   (lib/core/theme/dramacase_colors.dart). */
:root {
  --canvas: #0a0908;
  --surface: #161412;
  --elevated: #221e1a;
  --border: #2e2822;
  --text: #f5f1ea;
  --muted: #9b9287;
  --gold: #e2a84b;
  --on-gold: #14100a;
  --gold-soft: #2a2114;

  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --measure: 68ch;
  --radius-pill: 999px;
  --radius-frame: 28px;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
}

a {
  color: var(--gold);
  text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

img {
  max-width: 100%;
  display: block;
}

/* Language switching: Indonesian is the default and the no-JS fallback. */
[data-lang="en"] {
  display: none;
}
html.lang-en [data-lang="id"] {
  display: none;
}
html.lang-en [data-lang="en"] {
  display: revert;
}

/* ---------- Header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 700;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

.lang-toggle {
  display: inline-flex;
  padding: 3px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
}

.lang-toggle button {
  min-width: 48px;
  min-height: 36px;
  padding: 0 0.9rem;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--muted);
  font: 600 0.85rem var(--sans);
  cursor: pointer;
}

.lang-toggle button[aria-pressed="true"] {
  background: var(--gold);
  color: var(--on-gold);
}

/* ---------- Home hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 3rem;
  max-width: 72rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.hero h1 {
  margin: 0 0 1.25rem;
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5.2vw, 4.2rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
  max-width: 14ch;
}

.hero p.lead {
  margin: 0 0 2rem;
  max-width: 46ch;
  color: var(--muted);
  font-size: 1.125rem;
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.store-badge {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-height: 52px;
  padding: 0.45rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  line-height: 1.2;
}

.store-badge small {
  color: var(--muted);
  font-size: 0.72rem;
}

.store-badge strong {
  font-size: 1rem;
}

/* The one bold element: a 9:16 "now playing" frame, the shape of the product. */
.frame {
  position: relative;
  justify-self: center;
  width: min(100%, 320px);
  aspect-ratio: 9 / 16;
  border-radius: var(--radius-frame);
  overflow: hidden;
  border: 1px solid var(--border);
  background:
    radial-gradient(120% 70% at 30% 20%, #3a2a16 0%, transparent 60%),
    radial-gradient(90% 60% at 80% 85%, #2a1810 0%, transparent 65%),
    linear-gradient(170deg, #1c1611 0%, #0d0b09 70%);
  box-shadow: 0 40px 80px -30px rgba(226, 168, 75, 0.25);
}

.frame::after {
  /* gentle top/bottom scrim, like the player chrome */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.45) 0%,
    transparent 22%,
    transparent 58%,
    rgba(0, 0, 0, 0.75) 100%
  );
}

.frame-top,
.frame-caption,
.frame-rail {
  position: absolute;
  z-index: 1;
}

.frame-top {
  top: 1rem;
  left: 1rem;
  right: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.75;
  font-family: var(--serif);
  font-weight: 700;
}

.frame-top span {
  padding: 2px 8px;
  border: 1px solid rgba(226, 168, 75, 0.4);
  border-radius: var(--radius-pill);
  color: var(--gold);
  font: 600 0.62rem var(--sans);
}

.frame-subtitle {
  position: absolute;
  z-index: 1;
  left: 1.25rem;
  right: 1.25rem;
  top: 40%;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
}

.frame-caption {
  left: 1rem;
  right: 4rem;
  bottom: 1.4rem;
}

.frame-caption .ep {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
}

.frame-caption .title {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.2;
}

.frame-caption .bar {
  height: 3px;
  margin-top: 0.75rem;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--gold) 0 38%, rgba(245, 241, 234, 0.25) 38%);
}

.frame-rail {
  right: 0.9rem;
  bottom: 4.2rem;
  display: grid;
  gap: 1rem;
}

.frame-rail i {
  display: block;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(245, 241, 234, 0.14);
  border: 1px solid rgba(245, 241, 234, 0.2);
}

.frame-rail i:first-child {
  background: rgba(226, 168, 75, 0.35);
  border-color: rgba(226, 168, 75, 0.6);
}

/* ---------- Home facts ---------- */
.facts {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem;
  border-top: 1px solid var(--border);
  padding-top: 3rem;
}

.facts h2 {
  margin: 0 0 0.5rem;
  font-family: var(--serif);
  font-size: 1.35rem;
}

.facts p {
  margin: 0;
  color: var(--muted);
}

/* ---------- Document pages (privacy, terms, …) ---------- */
.doc {
  max-width: calc(var(--measure) + 3rem);
  margin: 0 auto;
  padding: 1.5rem 1.5rem 5rem;
}

.doc h1 {
  margin: 1rem 0 0.25rem;
  font-family: var(--serif);
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  line-height: 1.15;
}

.doc .updated {
  margin: 0 0 2.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.doc h2 {
  margin: 2.5rem 0 0.75rem;
  font-family: var(--serif);
  font-size: 1.4rem;
  line-height: 1.3;
}

.doc h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.05rem;
}

.doc p,
.doc li {
  color: #ddd6cc;
}

.doc ul,
.doc ol {
  padding-left: 1.25rem;
}

.doc li + li {
  margin-top: 0.4rem;
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.95rem;
}

.doc th,
.doc td {
  text-align: left;
  vertical-align: top;
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

.doc th {
  color: var(--text);
  font-weight: 600;
}

.doc td {
  color: #ddd6cc;
}

.callout {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--gold);
  background: var(--gold-soft);
  border-radius: 0 12px 12px 0;
}

.callout p {
  margin: 0;
}

.callout-warning {
  border-left-color: #e5735c;
  background: #2a1512;
}

.callout-warning strong {
  color: #ffb4a6;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 1.4rem;
  border-radius: var(--radius-pill);
  background: var(--gold);
  color: var(--on-gold);
  font-weight: 700;
  text-decoration: none;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer .inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
  max-width: 72rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 2.5rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.site-footer a {
  color: var(--text);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--gold);
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding-top: 1rem;
  }

  .frame {
    width: min(100%, 260px);
  }

  .facts {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .doc table,
  .doc thead,
  .doc tbody,
  .doc tr,
  .doc th,
  .doc td {
    display: block;
  }

  .doc thead {
    display: none;
  }

  .doc tr {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
  }

  .doc td {
    border: 0;
    padding: 0.2rem 0;
  }

  .doc td:first-child {
    color: var(--text);
    font-weight: 600;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .frame {
    animation: frame-in 700ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  @keyframes frame-in {
    from {
      opacity: 0;
      transform: translateY(16px) scale(0.98);
    }
  }
}
