/* ==========================================================
   Smart Income Guide — Main Stylesheet
   ========================================================== */

:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --surface-alt: #f2efe8;
  --text: #1d1f23;
  --muted: #5b6070;
  --border: #e3dfd5;
  --primary: #0f6b4f;
  --primary-dark: #0a4f3a;
  --primary-soft: #e3f2ec;
  --accent: #e8a33d;
  --danger: #b4412f;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(20, 24, 31, 0.07);
  --max: 1120px;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--primary-dark); }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.2;
  margin: 0 0 0.6em;
  font-weight: 600;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.35rem; }
p  { margin: 0 0 1.1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 780px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--primary); color: #fff; padding: 10px 16px; z-index: 1000;
}
.skip-link:focus { left: 10px; top: 10px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251, 250, 247, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo {
  font-family: var(--font-head); font-weight: 700; font-size: 1.3rem;
  color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 10px;
}
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--primary); color: #fff;
  display: grid; place-items: center; font-size: 1rem; font-family: var(--font-body);
}
.nav-links { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--text); text-decoration: none; font-weight: 500; font-size: 0.97rem; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--primary); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--border); border-radius: 10px;
  width: 44px; height: 44px; cursor: pointer; color: var(--text);
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 20px; height: 2px; background: currentColor; margin: 0 auto;
  position: relative; transition: transform .2s ease;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after  { top: 6px; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--bg);
    border-bottom: 1px solid var(--border); display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 14px 20px; border-top: 1px solid var(--border); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; font-weight: 600; font-size: 0.97rem;
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: background .2s ease, transform .15s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-outline { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary-soft); }
.btn-sm { padding: 9px 16px; font-size: 0.9rem; }

/* ---------- Hero ---------- */
.hero { padding: 80px 0 60px; }
.hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 50px; align-items: center; }
.eyebrow {
  display: inline-block; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--primary); background: var(--primary-soft);
  padding: 6px 12px; border-radius: 999px; margin-bottom: 18px;
}
.hero p.lead { font-size: 1.18rem; color: var(--muted); max-width: 600px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.hero-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 28px;
}
.hero-card h3 { font-size: 1.1rem; }
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { padding-left: 30px; position: relative; margin-bottom: 12px; }
.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  width: 20px; height: 20px; border-radius: 50%; background: var(--primary-soft);
  color: var(--primary); font-size: 0.75rem; font-weight: 700; display: grid; place-items: center;
  margin-top: 4px;
}
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .hero { padding: 50px 0 40px; } }

/* ---------- Notice ---------- */
.notice {
  background: #fff8ea; border: 1px solid #f1dcae; border-left: 4px solid var(--accent);
  border-radius: 10px; padding: 16px 20px; font-size: 0.95rem; color: #5a4520;
}
.notice strong { color: #3f2f12; }

/* ---------- Sections ---------- */
.section { padding: 70px 0; }
.section-alt { background: var(--surface-alt); }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head p { color: var(--muted); font-size: 1.08rem; }

/* ---------- Table of contents cards ---------- */
.toc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.toc-card {
  display: block; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; text-decoration: none; color: var(--text);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.toc-card:hover { border-color: var(--primary); box-shadow: var(--shadow); color: var(--text); }
.toc-card .num { font-family: var(--font-head); color: var(--primary); font-size: 1.4rem; font-weight: 700; }
.toc-card h3 { font-size: 1.08rem; margin: 6px 0 4px; }
.toc-card p { color: var(--muted); font-size: 0.92rem; margin: 0; }

/* ---------- Method blocks ---------- */
.method {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 38px; margin-bottom: 30px; scroll-margin-top: 90px;
}
.method-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.method-tag {
  font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted);
}
.meta-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 22px; }
.pill {
  font-size: 0.82rem; padding: 5px 12px; border-radius: 999px;
  background: var(--surface-alt); border: 1px solid var(--border); color: var(--muted);
}
.pill strong { color: var(--text); font-weight: 600; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin: 20px 0; }
.box { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 20px; }
.box h4 { font-family: var(--font-body); font-size: 0.95rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }
.box ul { margin: 0; padding-left: 20px; }
.box li { margin-bottom: 6px; }
.box.pros h4 { color: var(--primary); }
.box.cons h4 { color: var(--danger); }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 10px 0 24px; }
.steps li { counter-increment: step; position: relative; padding-left: 46px; margin-bottom: 14px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: #fff;
  font-weight: 700; font-size: 0.88rem; display: grid; place-items: center;
}
.link-row { display: flex; flex-wrap: wrap; gap: 10px; border-top: 1px solid var(--border); padding-top: 22px; }
.link-note { font-size: 0.85rem; color: var(--muted); margin-top: 12px; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } .method { padding: 24px; } }

/* ---------- Comparison table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 0.95rem; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--border); }
th { background: var(--surface-alt); font-weight: 600; }
tr:last-child td { border-bottom: none; }

/* ---------- Principles ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.feature .icon {
  width: 44px; height: 44px; border-radius: 12px; background: var(--primary-soft); color: var(--primary);
  display: grid; place-items: center; font-size: 1.3rem; margin-bottom: 14px;
}
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq details {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 18px 22px; margin-bottom: 12px;
}
.faq summary { cursor: pointer; font-weight: 600; list-style: none; position: relative; padding-right: 30px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: -2px; font-size: 1.4rem; color: var(--primary); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 12px 0 0; color: var(--muted); }

/* ---------- Legal / content pages ---------- */
.page-hero { padding: 60px 0 30px; border-bottom: 1px solid var(--border); }
.page-hero p { color: var(--muted); }
.legal { padding: 50px 0 70px; }
.legal h2 { font-size: 1.5rem; margin-top: 1.8em; }
.legal h3 { font-size: 1.15rem; margin-top: 1.4em; }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 8px; }
.updated { font-size: 0.9rem; color: var(--muted); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; padding: 50px 0 70px; }
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.95rem; }
.form-field input, .form-field textarea, .form-field select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px;
  font: inherit; background: var(--surface); color: var(--text);
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  outline: 2px solid var(--primary-soft); border-color: var(--primary);
}
.form-field textarea { min-height: 150px; resize: vertical; }
.form-check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.92rem; color: var(--muted); margin-bottom: 18px; }
.form-check input { margin-top: 6px; }
.error-msg { color: var(--danger); font-size: 0.85rem; margin-top: 4px; display: none; }
.form-field.invalid .error-msg { display: block; }
.form-field.invalid input, .form-field.invalid textarea { border-color: var(--danger); }
.form-status { margin-top: 14px; font-weight: 600; }
.form-status.ok { color: var(--primary); }
.form-status.err { color: var(--danger); }
.info-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: #15181d; color: #b9bec9; padding: 56px 0 26px; font-size: 0.93rem; }
.site-footer a { color: #e4e7ee; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 36px; }
.footer-grid h4 { color: #fff; font-family: var(--font-body); font-size: 0.9rem; text-transform: uppercase; letter-spacing: .07em; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-disclosure {
  border-top: 1px solid #2a2f37; margin-top: 36px; padding-top: 22px; font-size: 0.84rem; line-height: 1.6;
}
.footer-bottom { margin-top: 16px; font-size: 0.84rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 200;
  max-width: 720px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: 0 10px 40px rgba(0,0,0,.15); padding: 20px 22px;
  display: none; gap: 16px; align-items: center; flex-wrap: wrap; font-size: 0.92rem;
}
.cookie-banner.show { display: flex; }
.cookie-banner p { margin: 0; flex: 1 1 320px; }
.cookie-actions { display: flex; gap: 8px; }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; right: 18px; bottom: 18px; width: 44px; height: 44px; border-radius: 50%;
  background: var(--primary); color: #fff; border: none; cursor: pointer; font-size: 1.1rem;
  opacity: 0; pointer-events: none; transition: opacity .2s ease; z-index: 90;
}
.to-top.visible { opacity: 1; pointer-events: auto; }
