/* =========================================================
   RIHAZUDIN.COM — styles.css (CLEAN + STABLE)
   - Matches index.html: .site-header .container.navbar .nav-links .btn etc
   - Full-page dark mode via html[data-theme="dark"]
   - Premium subtle animations (respects reduced motion)
   - Accessibility-first (focus rings, readable spacing)
========================================================= */

/* === OpenDyslexic Font (Accessibility-First Default) === */
@font-face{
  font-family:"OpenDyslexic";
  src:url("/assets/fonts/OpenDyslexic-Regular.otf") format("opentype");
  font-weight:400;
  font-style:normal;
  font-display:swap;
}
@font-face{
  font-family:"OpenDyslexic";
  src:url("/assets/fonts/OpenDyslexic-Bold.otf") format("opentype");
  font-weight:700;
  font-style:normal;
  font-display:swap;
}
@font-face{
  font-family:"OpenDyslexic";
  src:url("/assets/fonts/OpenDyslexic-Italic.otf") format("opentype");
  font-weight:400;
  font-style:italic;
  font-display:swap;
}

/* =========================
   VARIABLES (LIGHT DEFAULT)
========================= */
:root{
  --rihaz-blue:#012C4E;
  --rihaz-gold:#EAD292;

  --bg:#ffffff;
  --ink:#0B1220;
  --muted:#5b6475;
  --soft:#f7f7f7;
  --line:#d8dbe2;

  --radius:18px;
  --maxw:1040px;
  --shadow: 0 10px 22px rgba(0,0,0,.08);
  --shadow-soft: 0 6px 18px rgba(1,44,78,.18);

  --focus: 3px solid rgba(234,210,146,.95);

  color-scheme: light;
}

/* =========================
   BASE
========================= */
*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  font-family:"OpenDyslexic", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height:1.65;
  color:var(--ink);
  background:var(--bg);
}

img{ max-width:100%; height:auto; }
a{ color:inherit; }
a:focus, button:focus, input:focus, select:focus, textarea:focus{
  outline:var(--focus);
  outline-offset:2px;
}

/* Skip link */
.skip-link{
  position:absolute; left:-9999px; top:auto;
  width:1px; height:1px; overflow:hidden;
}
.skip-link:focus{
  left:12px; top:12px;
  width:auto; height:auto;
  padding:10px 12px;
  background:var(--rihaz-gold);
  border-radius:12px;
  z-index:9999;
}

/* =========================
   LAYOUT
========================= */
.container{
  width:min(var(--maxw), calc(100% - 48px));
  margin:0 auto;
  padding:0 16px;
}
.main{ min-height:60vh; }

.section{ padding:56px 0; }
.section.soft{
  background:var(--soft);
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
}

/* =========================
   HEADER + NAV (matches .container.navbar)
========================= */
.site-header{
  position:sticky;
  top:0;
  z-index:50;
  background:rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line);
}

/* IMPORTANT: your HTML uses: <div class="container navbar"> */
.container.navbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:18px 0;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
}
.brand-mark{
  width:40px;
  height:40px;
  border-radius:12px;
  background:var(--rihaz-blue);
  box-shadow:var(--shadow);
  display:inline-block;
}
.brand-text{
  font-weight:800;
  letter-spacing:.08em;
}

.nav-links{
  display:flex;
  gap:18px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.nav-link{
  text-decoration:none;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid transparent;
  color:var(--muted);
  font-weight:600;
  letter-spacing:.02em;
  transition: background .2s ease, border-color .2s ease, transform .2s ease, color .2s ease;
}
.nav-link:hover{
  border-color:var(--line);
  background:#fff;
  color:var(--ink);
  transform: translateY(-1px);
}

.nav-ctas{
  display:flex;
  gap:10px;
  align-items:center;
}

.icon-btn{
  border:1px solid var(--line);
  background:#fff;
  color:var(--ink);
  border-radius:999px;
  padding:10px 12px;
  cursor:pointer;
  font-weight:700;
}

/* =========================
   TYPOGRAPHY HELPERS
========================= */
h1,h2,h3{ line-height:1.18; margin:0 0 12px; }
p{ margin:0 0 12px; }

.lead{
  font-size:1.35rem;
  max-width:620px;
}
.body{ color:var(--ink); }
.micro{
  color:var(--muted);
  font-size:.98rem;
}

/* =========================
   HERO
========================= */
.hero{ padding:80px 0; }
.hero .container.grid-2{
  display:grid;
  grid-template-columns: 1fr 1.2fr;
  gap:28px;
  align-items:center;
}
.cover-placeholder{
  width:100%;
  min-height:340px;
  border-radius:22px;
  border:1px dashed var(--line);
  background: linear-gradient(135deg, rgba(1,44,78,.08), rgba(234,210,146,.12));
  box-shadow: var(--shadow);
}

/* =========================
   CTA BUTTONS
========================= */
.cta-row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:16px;
}
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:12px 16px;
  border-radius:999px;
  text-decoration:none;
  border:2px solid var(--rihaz-blue);
  font-weight:800;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}

.btn-primary{
  background:var(--rihaz-blue);
  color:#fff;
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover{ transform: translateY(-2px); }

.btn-secondary{
  background:transparent;
  color:var(--rihaz-blue);
}
.btn-secondary:hover{ background:rgba(1,44,78,.06); }

.btn-ghost{
  border-color:var(--line);
  color:var(--ink);
  background:transparent;
}
.btn-ghost:hover{ background:var(--soft); }

/* =========================
   CONTENT BLOCKS
========================= */
.narrow{ max-width: 760px; }
.bullets{ margin:12px 0 0; padding-left:20px; }

.quote{
  border-left:6px solid var(--rihaz-gold);
  background:rgba(234,210,146,.18);
  padding:12px 14px;
  border-radius:14px;
}

.text-link{
  display:inline-block;
  margin-top:8px;
  font-weight:800;
  text-decoration:none;
  border-bottom:2px solid rgba(1,44,78,.25);
}
.text-link:hover{ border-bottom-color: var(--rihaz-blue); }

.buy-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
  gap:14px;
  margin-top:12px;
}
.buy-item{
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:18px;
  box-shadow:var(--shadow);
}

/* =========================
   FOOTER
========================= */
.footer{
  border-top:1px solid var(--line);
  background: linear-gradient(0deg, rgba(234,210,146,.14), rgba(234,210,146,.02));
  padding:26px 0;
}

/* =========================================================
   FULL-PAGE DARK MODE (FIXED)
   - Correctly overrides variables on html[data-theme="dark"]
========================================================= */
html[data-theme="dark"]{
  color-scheme: dark;

  --bg:#0b0f14;
  --ink:#f3f6fb;
  --muted:#b7c3d6;
  --soft:#111827;
  --line:#223047;
  --shadow: 0 10px 22px rgba(0,0,0,.35);
  --shadow-soft: 0 6px 18px rgba(0,0,0,.35);
}

html[data-theme="dark"] body{
  background:var(--bg);
  color:var(--ink);
}

html[data-theme="dark"] .site-header{
  background:rgba(11,15,20,.92);
  border-bottom:1px solid var(--line);
}

html[data-theme="dark"] .nav-link:hover{
  background:#0f172a;
  border-color:var(--line);
  color:var(--ink);
}

html[data-theme="dark"] .icon-btn{
  background:#0f172a;
  border-color:var(--line);
  color:var(--ink);
}

html[data-theme="dark"] .btn-secondary:hover{ background:rgba(234,210,146,.08); }
html[data-theme="dark"] .btn-ghost:hover{ background:#0f172a; }
html[data-theme="dark"] .buy-item{ background:#0f172a; border-color:var(--line); }
html[data-theme="dark"] .quote{ background:rgba(234,210,146,.12); }

/* ===== Premium subtle animations (respect reduced motion) ===== */
@media (prefers-reduced-motion: reduce){
  *{ transition:none !important; animation:none !important; scroll-behavior:auto !important; }
}

/* ===== Mobile refinement ===== */
@media (max-width: 980px){
  .container.navbar{ flex-wrap:wrap; gap:10px; }
  .nav-links{ width:100%; justify-content:flex-start; }
  .hero .container.grid-2{ grid-template-columns:1fr; }
  .hero{ padding:60px 0; }
  .cta-row{ flex-direction:column; align-items:flex-start; }
}