/* ==========================================================================
   THE STAR EMBASSY - Shared Article Stylesheet
   Lightweight, responsive, SEO/Core-Web-Vitals friendly.
   One file shared by every static HTML article. Edit colours here once.
   System font stack = zero web-font requests = faster LCP.
   ========================================================================== */

:root {
  /* Brand palette (tune these to match the WordPress theme exactly) */
  --bg:            #0b0e1a;   /* deep cosmic navy            */
  --bg-soft:       #12152400; /* transparent (set below)     */
  --surface:       #141931;   /* content card / panels       */
  --surface-2:     #1b2142;   /* table rows, code, dividers  */
  --text:          #e9ecf5;   /* primary body text           */
  --text-soft:     #b9c0d8;   /* secondary text              */
  --muted:         #8a93b2;   /* captions, meta              */
  --gold:          #d8b56b;   /* primary accent              */
  --gold-soft:     #f0d99a;   /* hover / highlight           */
  --link:          #9ec1ff;   /* in-text links               */
  --link-hover:    #c5dbff;
  --border:        #2a3157;
  --max:           980px;     /* reading column width        */
  --radius:        14px;
  --shadow:        0 10px 40px rgba(0, 0, 0, .35);
  --font-body: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;
  --font-head: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;
}

/* ----------------------------- Reset ---------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 18px;          /* desktop body text 18px */
  line-height: 1.75;
  overflow-x: hidden;       /* guard against full-bleed hero scroll */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* Mobile: scale body text down for comfortable reading */
@media (max-width: 680px) { body { font-size: 16px; } }
@media (min-width: 681px) and (max-width: 980px) { body { font-size: 17px; } }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }

/* --------------------------- Skip link -------------------------------- */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 999;
  background: var(--gold); color: #1a1300; padding: .6rem 1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ----------------------------- Header --------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 14, 26, .85);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav {
  max-width: 1120px; margin: 0 auto; padding: .65rem 1.1rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand { display: flex; align-items: center; gap: .55rem; font-family: var(--font-head);
  font-size: 1.15rem; color: var(--text); font-weight: 700; letter-spacing: .3px; }
.brand:hover { text-decoration: none; color: var(--gold-soft); }
.brand-mark { width: 28px; height: 28px; }
.nav-links { display: flex; gap: 1.3rem; flex-wrap: wrap; }
.nav-links a { color: var(--text-soft); font-size: .95rem; }
.nav-links a:hover { color: var(--gold); text-decoration: none; }
@media (max-width: 680px) { .nav-links { display: none; } }

/* --------------------------- Layout ----------------------------------- */
main { display: block; }
.article-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1.15rem 3rem;
}

/* Breadcrumb */
.breadcrumb { font-size: .85rem; color: var(--muted); margin: 1.4rem 0 .4rem; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb span[aria-current] { color: var(--text-soft); }

/* Title block */
.article-header h1 {
  font-family: var(--font-head);
  font-size: clamp(1.75rem, 4.5vw, 2.7rem);
  line-height: 1.18;
  margin: .3rem 0 .6rem;
  color: #fff;
  letter-spacing: .2px;
}
.article-meta {
  display: flex; flex-wrap: wrap; gap: .35rem 1rem;
  color: var(--muted); font-size: .9rem; margin-bottom: 1.3rem;
}
.article-meta .cat { color: var(--gold); font-weight: 600; }

/* Hero image - constrained to the content column (max 980px), height auto.
   Bordered + rounded + soft shadow on the image; caption sits below. */
.hero { margin: 0 0 1.8rem; }
.hero img {
  width: 100%; height: auto; display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero-caption {
  margin-top: .6rem; text-align: center;
  font-size: .85rem; color: var(--muted); font-style: italic;
}

/* Lead paragraph */
.lead { font-size: 1.2rem; color: var(--text); }

/* --------------------------- Typography ------------------------------- */
.article-body h2 {
  font-family: var(--font-head);
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  margin: 2.4rem 0 .8rem;
  color: #fff;
  padding-top: .4rem;
  border-top: 1px solid var(--border);
}
.article-body h3 {
  font-size: 1.25rem; margin: 1.8rem 0 .6rem; color: var(--gold-soft);
  font-family: var(--font-head);
}
.article-body h4 { font-size: 1.08rem; margin: 1.4rem 0 .5rem; color: var(--text); }
.article-body p { margin: 0 0 1.15rem; }
.article-body ul, .article-body ol { margin: 0 0 1.3rem; padding-left: 1.4rem; }
.article-body li { margin: 0 0 .55rem; }
.article-body strong { color: #fff; }
.article-body em { color: var(--text-soft); }
.article-body blockquote {
  margin: 1.6rem 0; padding: .8rem 1.2rem;
  border-left: 3px solid var(--gold);
  background: var(--surface); border-radius: 0 8px 8px 0;
  color: var(--text-soft); font-style: italic;
}

/* Callout / "Why it works" box */
.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: 10px;
  padding: 1rem 1.2rem;
  margin: 1.5rem 0;
}
.callout p:last-child { margin-bottom: 0; }

/* Table */
.table-scroll { overflow-x: auto; margin: 1.5rem 0; border-radius: 10px; border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; min-width: 480px; font-size: .98rem; }
caption { caption-side: bottom; color: var(--muted); font-size: .85rem; padding-top: .5rem; }
th, td { text-align: left; padding: .75rem .9rem; border-bottom: 1px solid var(--border); }
thead th { background: var(--surface-2); color: var(--gold-soft); font-family: var(--font-head); }
tbody tr:nth-child(even) { background: rgba(255,255,255,.02); }

/* --------------------------- FAQ (always visible) --------------------- */
.faq .faq-item {
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); margin-bottom: .8rem; padding: 1.1rem 1.3rem;
}
.faq .faq-q {
  margin: 0 0 .5rem; font-family: var(--font-head); font-weight: 600;
  color: #fff; font-size: 1.12rem;
}
.faq .faq-a { margin: 0; color: var(--text-soft); }

/* --------------------------- CTA -------------------------------------- */
.cta {
  margin: 2.4rem 0;
  background: linear-gradient(135deg, #1a2147, #0e1326);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem 1.4rem;
  text-align: center;
}
.cta h2 { border: 0; margin: 0 0 .5rem; }
.cta p { color: var(--text-soft); margin: 0 0 1.1rem; }
.btn {
  display: inline-block; background: var(--gold); color: #0b1226;
  font-weight: 700; padding: .8rem 1.6rem; border-radius: 999px;
  font-size: 1rem; transition: transform .12s ease, background .2s ease, color .2s ease;
}
.btn:hover, .btn:focus {
  background: var(--gold-soft); color: #0b1226;   /* keep dark navy text - readable on gold */
  text-decoration: none; transform: translateY(-1px);
}

/* Author box */
.author {
  display: flex; gap: 1rem; align-items: center;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 1.3rem 0; margin: 2.4rem 0;
}
.author img { width: 64px; height: 64px; border-radius: 50%; flex: 0 0 auto; border: 2px solid var(--gold); }
.author .name { font-family: var(--font-head); color: #fff; font-size: 1.1rem; }
.author .role { color: var(--muted); font-size: .9rem; }

/* Related */
.related h2 { font-family: var(--font-head); color: #fff; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.1rem; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  transition: transform .15s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--gold); }
.card img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.card .card-body { padding: .9rem 1rem 1.1rem; }
.card h3 { font-size: 1.02rem; margin: .15rem 0 .55rem; color: var(--text); line-height: 1.3; }
.card a { color: inherit; }
.card a:hover { color: var(--gold); text-decoration: none; }
.card-tag {
  display: inline-block; text-transform: uppercase; letter-spacing: .06em;
  font-size: .72rem; font-weight: 600; color: var(--gold);
}
.card-more { display: inline-block; font-size: .85rem; font-weight: 600; color: var(--gold); }
.card:hover .card-more { color: var(--gold-soft); }

/* --------------------------- Footer ----------------------------------- */
.site-footer {
  border-top: 1px solid var(--border); background: #080a14;
  color: var(--muted); font-size: .9rem;
}
.footer-inner { max-width: 1120px; margin: 0 auto; padding: 2rem 1.1rem;
  display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; }
.footer-inner a { color: var(--text-soft); }
.footer-inner a:hover { color: var(--gold); }
.footer-links { display: flex; gap: 1.2rem; flex-wrap: wrap; }

/* --------------------------- Utilities -------------------------------- */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
