/* ============================================================
   article.css  –  Shared stylesheet for ALL savings.rip articles
   ============================================================ */

/* Cinzel via Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600&display=swap');

/* Local fonts */
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-VariableFont_slnt,wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Forum';
  src: url('../fonts/Forum-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Full-page background on body so it covers EVERYTHING ─────────────────
   background-attachment:fixed means it stays put even behind the fixed nav  */
html, body {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  font-family: 'Inter', sans-serif;
  /* Warm sky fallback — prevents white/grey flash before image loads */
  background-color: #c8d8e8;
  background-image: url('../images/bg_heaven-opt.webp');
  background-size: cover;
  background-position: top center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

/* Upgrade to high-res JPEG on wide screens */
@media (min-width: 1024px) {
  html, body { background-image: url('../images/bg-clouds.jpeg'); }
}

/* ── App container ── */
#app-container {
  width: 100%;
  min-height: 100vh;
  background: transparent;          /* bg lives on body now */
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 100px;
  padding-bottom: 60px;
}

/* ── Article content wrapper — glassmorphism ── */
.article-wrapper {
  max-width: 800px;
  width: 90%;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 16px;
  padding: 40px;
  margin-bottom: 60px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  color: #1a1a1a;
  position: relative;
  z-index: 10;
}

/* ── Typography ── */
h1 {
  font-family: 'Forum', serif;
  font-size: 2.6rem;
  color: #7a5000;
  margin-bottom: 24px;
  line-height: 1.15;
  text-align: center;
}
h2 {
  font-family: 'Forum', serif;
  font-size: 1.5rem;
  color: #6b4500;
  margin-top: 32px;
  margin-bottom: 14px;
}
h3 {
  font-size: 1.2rem;
  color: #8a5f00;
  margin-bottom: 14px;
}
p {
  font-size: 1.08rem;
  line-height: 1.75;
  color: #2c2c2c;
  margin-bottom: 18px;
}
ul, ol {
  margin: 0 0 18px 24px;
  color: #2c2c2c;
  line-height: 1.75;
}

/* ── Hero image ── */
.hero-img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin-bottom: 32px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* ── Back button ── */
.btn-back {
  display: inline-block;
  padding: 9px 18px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.45);
  color: #333;
  text-decoration: none;
  border-radius: 6px;
  margin-bottom: 24px;
  font-size: 0.9rem;
  transition: background 0.2s;
}
.btn-back:hover { background: rgba(255, 255, 255, 0.75); }

/* ── Calculator box ── */
.calc-box {
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(201, 169, 110, 0.35);
  border-radius: 10px;
  padding: 28px;
  margin: 30px 0;
}
.form-group { margin-bottom: 14px; }
.form-group label {
  display: block;
  font-size: 0.88rem;
  color: #555;
  margin-bottom: 5px;
  font-weight: 500;
}
.form-group input {
  width: 100%;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.12);
  color: #111;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
}
button.calc-btn {
  width: 100%;
  padding: 14px;
  background: #b8860b;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.25s, box-shadow 0.25s;
  margin-top: 10px;
}
button.calc-btn:hover {
  background: #daa520;
  box-shadow: 0 0 18px rgba(218, 165, 32, 0.5);
}
.calc-result {
  margin-top: 20px;
  display: none;
  padding: 16px;
  background: rgba(201, 169, 110, 0.12);
  border-left: 4px solid #b8860b;
  border-radius: 6px;
}
.calc-result h4 { color: #1a1a1a; font-size: 1.1rem; margin-bottom: 6px; }
.calc-result p  { margin-bottom: 6px; font-size: 0.98rem; color: #333; }

/* Score table (credit scores article) */
.score-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.95rem;
}
.score-table th {
  background: rgba(201,169,110,0.25);
  color: #5a3a00;
  padding: 10px 14px;
  text-align: left;
  font-family: 'Cinzel', serif;
  letter-spacing: 1px;
  font-size: 0.85rem;
  text-transform: uppercase;
}
.score-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(0,0,0,0.07);
  color: #2c2c2c;
}
.score-table tr:hover td { background: rgba(255,255,255,0.4); }

/* ── Page footer ── */
.article-footer {
  width: 100%;
  text-align: center;
  color: #ffffff;
  font-size: 0.78rem;
  line-height: 1.6;
  padding: 16px 0 24px;
  margin-top: auto;
  text-shadow:
    -1px -1px 0 rgba(0,0,0,0.8),
     1px -1px 0 rgba(0,0,0,0.8),
    -1px  1px 0 rgba(0,0,0,0.8),
     1px  1px 0 rgba(0,0,0,0.8),
     0 2px 6px rgba(0,0,0,0.5);
}
.article-footer a {
  color: #ffffff;
  text-decoration: underline;
  margin: 0 6px;
  text-shadow: inherit;
}
.article-footer a:hover { color: #ffe0a0; }

/* ── Drift clouds overlay ── */
#app-container::before {
  content: '';
  position: fixed;
  inset: 0;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="400" height="400"><circle cx="50" cy="50" r="30" fill="rgba(255,255,255,0.025)"/><circle cx="200" cy="80" r="60" fill="rgba(255,255,255,0.018)"/><circle cx="350" cy="40" r="45" fill="rgba(255,255,255,0.022)"/></svg>') repeat;
  pointer-events: none;
  z-index: 0;
  animation: driftClouds 90s linear infinite;
}
@keyframes driftClouds {
  from { background-position: 0 0; }
  to   { background-position: 400px 200px; }
}
