/* styles.css — financial literacy (Ireland). Custom palette: deep shamrock, warm parchment, slate ink, copper accent. */
:root {
  --ink: #14241d;
  --ink-soft: #2e4a3d;
  --parchment: #f5f1e6;
  --paper: #fbf8f1;
  --green: #1b5e3f;
  --green-deep: #0f3a26;
  --green-soft: #e6efe9;
  --copper: #b8651b;
  --copper-soft: #f0e2d2;
  --slate: #4a5a52;
  --line: #d8e0db;
  --white: #ffffff;
  --maxw: 1180px;
  --radius: 10px;
  --shadow: 0 2px 18px rgba(15, 58, 38, 0.08);
  --shadow-lg: 0 12px 40px rgba(15, 58, 38, 0.14);
  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--green); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--copper); }

h1, h2, h3, h4 { font-family: var(--font-head); color: var(--green-deep); line-height: 1.15; margin: 0 0 0.5em; font-weight: 600; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1.1em; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ===== Header / nav ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 248, 241, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 0; }
.brand-mark { font-family: var(--font-head); font-weight: 700; font-size: 1.35rem; color: var(--green-deep); text-decoration: none; letter-spacing: -0.02em; }
.brand-mark .leaf { color: var(--green); }
.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 0; padding: 0; }
.site-nav a { text-decoration: none; color: var(--ink-soft); font-weight: 500; font-size: 0.97rem; padding: 6px 2px; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--green-deep); border-color: var(--copper); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; cursor: pointer; font-size: 1rem; color: var(--ink); }

/* ===== Hero ===== */
.hero { position: relative; overflow: hidden; background: var(--green-deep); color: var(--parchment); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: stretch; min-height: 460px; }
.hero-text { padding: 64px 0; display: flex; flex-direction: column; justify-content: center; }
.hero-text h1 { color: var(--parchment); }
.hero-text p { font-size: 1.15rem; color: rgba(245, 241, 230, 0.9); max-width: 38ch; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-body); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--copper-soft); margin-bottom: 18px; }
.hero-eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--copper); }
.hero-img { position: relative; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; }
.hero-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15,58,38,0.55) 0%, rgba(15,58,38,0) 35%); }
.btn { display: inline-block; padding: 13px 26px; border-radius: 999px; font-weight: 600; text-decoration: none; font-size: 1rem; transition: transform 0.15s ease, box-shadow 0.15s ease; border: 2px solid transparent; cursor: pointer; }
.btn-primary { background: var(--copper); color: var(--paper); }
.btn-primary:hover { color: var(--paper); background: #9c5418; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--parchment); border-color: rgba(245,241,230,0.5); }
.btn-ghost:hover { color: var(--parchment); border-color: var(--parchment); }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }

/* ===== Sections ===== */
.section { padding: 64px 0; }
.section.tight { padding: 44px 0; }
.section.alt { background: var(--green-soft); }
.section.parchment { background: var(--parchment); }
.section-title { max-width: 60ch; margin-bottom: 8px; }
.section-lead { max-width: 60ch; color: var(--slate); font-size: 1.08rem; margin-bottom: 36px; }

/* Disclaimer banner */
.disclaimer { background: var(--copper-soft); border-left: 4px solid var(--copper); padding: 14px 18px; border-radius: 0 var(--radius) var(--radius) 0; font-size: 0.95rem; color: #6a3a10; margin-bottom: 28px; }
.disclaimer strong { color: #5a2f0c; }

/* Feature blocks (asymmetric editorial layout, not 3 equal cards) */
.editorial { display: grid; grid-template-columns: repeat(12, 1fr); gap: 28px; align-items: start; }
.editorial .col-text { grid-column: span 6; }
.editorial .col-aside { grid-column: span 6; }
.editorial .col-wide { grid-column: span 12; }
.editorial .col-narrow { grid-column: span 5; }
.editorial .col-mid { grid-column: span 7; }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 36px 0; }
.stat { padding: 24px; background: var(--white); border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); }
.stat .num { font-family: var(--font-head); font-size: 2.4rem; color: var(--green); line-height: 1; display: block; margin-bottom: 6px; }
.stat .label { color: var(--slate); font-size: 0.92rem; }

/* List of guides */
.guides-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; list-style: none; padding: 0; margin: 0; }
.guides-list li a { display: block; padding: 26px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform 0.15s ease, border-color 0.15s ease; }
.guides-list li a:hover { transform: translateY(-2px); border-color: var(--copper); color: var(--ink); }
.guides-list .guide-kicker { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--copper); font-weight: 600; }
.guides-list h3 { margin: 8px 0 8px; font-size: 1.2rem; }
.guides-list .guide-desc { color: var(--slate); font-size: 0.95rem; margin: 0; }

/* Article layout */
.article-layout { display: grid; grid-template-columns: 1fr 320px; gap: 48px; align-items: start; }
.article-body { font-size: 1.05rem; }
.article-body h2 { margin-top: 1.8em; }
.article-body p, .article-body li { color: var(--ink-soft); }
.article-body .lead { font-size: 1.2rem; color: var(--ink); }
.article-figure { margin: 32px 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.article-figure img { width: 100%; }
.article-figure figcaption { padding: 10px 16px; font-size: 0.88rem; color: var(--slate); background: var(--parchment); }
.callout { background: var(--green-soft); border-left: 4px solid var(--green); padding: 20px 24px; border-radius: 0 var(--radius) var(--radius) 0; margin: 28px 0; }
.callout h3 { margin-top: 0; color: var(--green-deep); }

/* Sidebar / TOC */
.toc { position: sticky; top: 90px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.toc h4 { font-family: var(--font-body); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.78rem; color: var(--slate); margin-bottom: 12px; }
.toc ul { list-style: none; padding: 0; margin: 0; }
.toc li { margin-bottom: 8px; }
.toc a { text-decoration: none; color: var(--ink-soft); font-size: 0.92rem; }
.toc a:hover { color: var(--copper); }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq-item summary { font-family: var(--font-head); font-size: 1.12rem; color: var(--green-deep); cursor: pointer; font-weight: 600; padding: 4px 0; }
.faq-item summary:hover { color: var(--copper); }
.faq-item p { color: var(--ink-soft); margin: 12px 0 4px; }

/* Contacts */
.contacts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: start; }
.contact-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.contact-card h2 { margin-top: 0; }
.contact-detail { display: flex; gap: 12px; align-items: baseline; margin-bottom: 14px; }
.contact-detail .k { font-weight: 600; color: var(--green-deep); min-width: 90px; }

/* Form */
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--green-deep); font-size: 0.95rem; }
.form-field input, .form-field textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; font-family: inherit; font-size: 1rem; background: var(--paper); color: var(--ink); }
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(27,94,63,0.15); }
.form-field input[aria-invalid="true"], .form-field textarea[aria-invalid="true"] { border-color: #c0392b; }
.form-field textarea { min-height: 130px; resize: vertical; }
.consent-row { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 18px; }
.consent-row input { margin-top: 4px; }
.consent-row label { font-size: 0.92rem; color: var(--ink-soft); font-weight: 400; }
.form-status { margin-top: 12px; padding: 12px 16px; border-radius: 8px; font-size: 0.95rem; }
.form-status.error { background: #fbe9e7; color: #a93226; border: 1px solid #f0c4be; }
.form-status.success { background: var(--green-soft); color: var(--green-deep); border: 1px solid var(--green); }

/* Legal pages */
.legal h2 { margin-top: 1.6em; }
.legal h2:first-of-type { margin-top: 0; }
.legal p, .legal li { color: var(--ink-soft); }
.legal .updated { color: var(--slate); font-size: 0.9rem; margin-bottom: 28px; }

/* About */
.about-hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.about-hero img { border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.value { padding: 24px; background: var(--white); border-top: 4px solid var(--green); border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--shadow); }
.value h3 { color: var(--green-deep); }
.value p { color: var(--slate); font-size: 0.96rem; margin: 0; }

/* CTA strip */
.cta-strip { background: var(--green-deep); color: var(--parchment); border-radius: var(--radius); padding: 40px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-strip h2 { color: var(--parchment); margin: 0; }
.cta-strip p { margin: 6px 0 0; color: rgba(245,241,230,0.85); }

/* Footer */
.site-footer { background: var(--ink); color: rgba(245,241,230,0.78); padding: 48px 0 28px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.footer-grid h4 { color: var(--parchment); font-family: var(--font-body); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.78rem; margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: rgba(245,241,230,0.78); text-decoration: none; font-size: 0.94rem; }
.footer-grid a:hover { color: var(--copper); }
.footer-brand { font-family: var(--font-head); font-size: 1.3rem; color: var(--parchment); margin-bottom: 10px; }
.footer-bottom { border-top: 1px solid rgba(245,241,230,0.15); padding-top: 18px; font-size: 0.86rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* 404 */
.not-found { text-align: center; padding: 100px 0; }
.not-found .code { font-family: var(--font-head); font-size: 6rem; color: var(--green); line-height: 1; margin-bottom: 12px; }

/* ===== Responsive ===== */
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-img { order: -1; min-height: 280px; }
  .hero-text { padding: 40px 0; }
  .article-layout { grid-template-columns: 1fr; }
  .toc { position: static; }
  .contacts-grid { grid-template-columns: 1fr; }
  .about-hero { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .editorial .col-text, .editorial .col-aside, .editorial .col-narrow, .editorial .col-mid { grid-column: span 12; }
  .values { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .site-nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: 0 20px 16px; box-shadow: var(--shadow-lg); max-height: 0; overflow: hidden; transition: max-height 0.25s ease; }
  .site-nav.open { max-height: 540px; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav li { width: 100%; border-bottom: 1px solid var(--line); }
  .site-nav a { display: block; padding: 12px 0; }
  .guides-list { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr; }
  .cta-strip { flex-direction: column; text-align: center; }
}

@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
  body { font-size: 16px; }
}

/* Accessibility: focus visible */
:focus-visible { outline: 3px solid var(--copper); outline-offset: 2px; border-radius: 4px; }

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