/*
Theme Name: MODAL777 Atlas 1bgngZOf
Theme URI: https://modal777login.asia/
Author: MODAL777 Panduan Indonesia
Description: Tema editorial independen bergaya midnight modular brand atlas.
Version: 1.0.1
Text Domain: modal777-atlas
*/

:root {
  --bg: #07121f;
  --bg-soft: #0d1d30;
  --panel: #132943;
  --panel-strong: #183754;
  --text: #f6f8fc;
  --muted: #b9c8d9;
  --line: #315374;
  --cyan: #55d9f4;
  --violet: #9896ff;
  --coral: #ff987c;
  --focus: #a9efff;
  --content: 1220px;
  --reading: 780px;
  --radius: 18px;
  --shadow: 0 16px 44px rgba(0,0,0,.26);
}

* { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 84% 8%, rgba(85,217,244,.11), transparent 25rem),
    radial-gradient(circle at 7% 35%, rgba(152,150,255,.09), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: "Noto Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.72;
  overflow-wrap: anywhere;
}

a { color: var(--cyan); text-decoration-thickness: .09em; text-underline-offset: .17em; }
a:hover { color: #b7f3ff; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
  border-radius: 5px;
}
img { display: block; max-width: 100%; height: auto; }

.skip-link {
  position: fixed;
  z-index: 1000;
  left: 18px;
  top: 12px;
  transform: translateY(-180%);
  background: var(--text);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 8px;
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  background: rgba(7,18,31,.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.header-inner {
  width: min(calc(100% - 48px), var(--content));
  min-height: 72px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  align-items: center;
  gap: 24px;
}
.site-branding a { display: inline-flex; align-items: center; min-height: 48px; }
.custom-logo { width: 270px; max-height: 58px; object-fit: contain; object-position: left center; }
.brand-fallback { color: var(--text); font-weight: 800; text-decoration: none; }
.menu-toggle {
  display: none;
  min-width: 66px;
  min-height: 48px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  white-space: nowrap;
  flex: 0 0 auto;
}
.primary-nav ul, .footer-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}
.primary-nav ul { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.primary-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 8px 7px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.primary-nav a:hover, .primary-nav .current-menu-item > a { border-color: var(--cyan); color: var(--cyan); }

.site-main { width: min(calc(100% - 48px), var(--content)); margin: 0 auto; padding: clamp(42px, 7vw, 92px) 0 clamp(72px, 9vw, 112px); }
.entry-header, .entry-content > p, .entry-content > h1, .entry-content > h2, .entry-content > h3,
.entry-content > ul, .entry-content > ol, .entry-content > blockquote, .entry-content > details {
  width: min(100%, var(--reading));
  margin-left: auto;
  margin-right: auto;
}
.entry-content > h1, .entry-title {
  font-size: clamp(2.25rem, 5.1vw, 4.2rem);
  line-height: 1.04;
  letter-spacing: -.035em;
  margin-top: 0;
  margin-bottom: 28px;
}
.entry-content > h2 {
  margin-top: clamp(58px, 8vw, 96px);
  margin-bottom: 18px;
  font-size: clamp(1.7rem, 3.4vw, 2.75rem);
  line-height: 1.14;
  letter-spacing: -.024em;
}
.entry-content > h3 { margin-top: 36px; font-size: 1.32rem; line-height: 1.25; }
.entry-content > p { margin-top: 0; margin-bottom: 22px; color: #eaf0f7; }
.entry-content > p:first-of-type { font-size: 1.14em; color: var(--text); }
.entry-content > table, .entry-content > .wp-block-table, .entry-content > figure, .entry-content > .asset-panel {
  width: min(100%, 1100px);
  margin: 36px auto;
}
.entry-content table { border-collapse: collapse; background: var(--bg-soft); border: 1px solid var(--line); box-shadow: var(--shadow); }
.entry-content th, .entry-content td { padding: 14px 16px; text-align: left; vertical-align: top; border: 1px solid var(--line); }
.entry-content th { color: var(--cyan); background: #10253b; }
.entry-content ol, .entry-content ul { padding-left: 1.4em; }
.entry-content li { margin-bottom: 12px; }

.home .site-main { padding-top: 36px; }
.home-hero {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(320px, 5fr);
  gap: 32px;
  align-items: center;
  min-height: 640px;
  padding: 48px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(19,41,67,.96), rgba(13,29,48,.82));
  box-shadow: var(--shadow);
}
.home-hero h1 { margin: 0 0 22px; font-size: clamp(2.35rem, 5.2vw, 4.1rem); line-height: 1.04; }
.home-hero p { margin: 0 0 18px; color: #edf3fa; }
.home-hero figure { margin: 0; }
.home-section {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
  margin-top: clamp(70px, 9vw, 112px);
  scroll-margin-top: 100px;
}
.home-section .section-copy { grid-column: 2 / span 7; min-width: 0; }
.home-section figure { grid-column: 9 / span 4; align-self: center; margin: 0; min-width: 0; }
.home-section:nth-of-type(even) .section-copy { grid-column: 5 / span 7; }
.home-section:nth-of-type(even) figure { grid-column: 1 / span 4; grid-row: 1; }
.home-section.no-image .section-copy { grid-column: 3 / span 8; }
.home-section h2 { margin: 0 0 18px; font-size: clamp(1.75rem, 3.3vw, 2.75rem); line-height: 1.14; }
.home-section p { margin: 0 0 22px; color: #eaf0f7; }
.editorial-image { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); }
.editorial-image img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.home-hero .editorial-image img { aspect-ratio: 16 / 9; }
.editorial-image figcaption { padding: 12px 15px 15px; color: var(--muted); font-size: .79rem; line-height: 1.5; }
.faq-block { width: min(100%, 900px); margin: 84px auto 0; }
.faq-block h2 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); }
.faq-item { margin: 14px 0; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-soft); }
.faq-item summary { min-height: 54px; padding: 15px 52px 15px 18px; cursor: pointer; color: var(--text); font-weight: 750; }
.faq-item p { margin: 0; padding: 0 18px 20px; color: #e4edf6; }

.site-footer { border-top: 1px solid var(--line); background: #06101c; }
.footer-inner { width: min(calc(100% - 48px), var(--content)); margin: 0 auto; padding: 56px 0; }
.footer-title { margin: 0 0 10px; font-size: 1.25rem; font-weight: 800; }
.footer-note { max-width: 760px; margin: 0 0 26px; color: var(--muted); }
.footer-menu { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.footer-menu a { display: inline-flex; align-items: center; min-height: 48px; color: var(--text); }
.footer-contact { margin: 22px 0 0; color: var(--muted); }

@media (max-width: 1199px) {
  .header-inner { min-height: 72px; display: flex; justify-content: space-between; }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .primary-nav { position: absolute; left: 24px; right: 24px; top: 74px; display: none; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #091727; box-shadow: var(--shadow); }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); align-items: stretch; }
  .primary-nav a { justify-content: flex-start; padding: 10px 12px; font-size: 16px; text-align: left; border: 0; }
}

@media (max-width: 839px) {
  body { font-size: 17px; }
  .site-main, .header-inner, .footer-inner { width: min(calc(100% - 32px), var(--content)); }
  .home-hero { grid-template-columns: 1fr; min-height: 0; padding: 24px; }
  .home-section, .home-section:nth-of-type(even) { display: block; }
  .home-section .section-copy, .home-section:nth-of-type(even) .section-copy { width: 100%; }
  .home-section figure, .home-section:nth-of-type(even) figure { width: 100%; margin: 32px 0 0; }
  .home-section.no-image .section-copy { width: 100%; }
  .entry-content > table, .entry-content > .wp-block-table { display: block; overflow-x: auto; }
}

@media (max-width: 599px) {
  body { font-size: 16px; }
  .site-branding { min-width: 0; }
  .custom-logo { width: 205px; max-height: 52px; }
  .primary-nav { left: 16px; right: 16px; }
  .primary-nav ul { grid-template-columns: 1fr; }
  .site-main { padding-top: 34px; }
  .home-hero { padding: 20px; border-radius: 14px; }
  .editorial-image { border-radius: 12px; }
  .entry-content th, .entry-content td { min-width: 180px; padding: 12px; }
  .footer-menu { display: grid; gap: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
