/* ==========================================================================
   Dual Diagnosis Ireland — rebuild for AISites.ie
   Brand-derived palette: deep burgundy + warm gold, calm sage support.
   System fonts only (no external requests — fast, GDPR-clean).
   ========================================================================== */

:root {
  --burgundy:      #7b2d2d;
  --burgundy-dark: #5a1f1f;
  --burgundy-soft: #f3e8e6;
  --gold:          #bd8a2c;
  --gold-soft:     #f6edd8;
  --sage:          #4a7c6f;
  --sage-soft:     #e8f0ed;
  --cream:         #fbf8f3;
  --paper:         #ffffff;
  --ink:           #2a2422;
  --muted:         #6b635e;
  --line:          #e8e0d4;
  --line-strong:   #d9cfbe;

  --shadow-sm: 0 1px 3px rgba(42, 36, 34, .06), 0 1px 2px rgba(42, 36, 34, .04);
  --shadow-md: 0 6px 20px rgba(42, 36, 34, .08), 0 2px 6px rgba(42, 36, 34, .05);
  --shadow-lg: 0 18px 50px rgba(42, 36, 34, .14);

  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --container: 1140px;
  --radius: 14px;
  --radius-lg: 22px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; height: auto; }
a { color: var(--burgundy); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--burgundy-dark); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; line-height: 1.18; color: var(--ink); letter-spacing: -.01em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 1.5rem; }
.section { padding-block: clamp(3.5rem, 7vw, 6rem); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.narrow { max-width: 760px; }
.center { text-align: center; }
.eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .9rem;
}
.section h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin-bottom: 1rem; }
.lead { font-size: 1.2rem; color: var(--muted); line-height: 1.7; }
.section p + p { margin-top: 1.1rem; }
.prose p { margin-top: 1.1rem; color: #423a36; }
.prose p:first-child { margin-top: 0; }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: 1rem; top: -3rem;
  background: var(--burgundy); color: #fff; padding: .6rem 1rem;
  border-radius: 8px; z-index: 200; transition: top .15s ease;
}
.skip-link:focus { top: 1rem; color:#fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--sans); font-weight: 600; font-size: 1rem;
  padding: .8rem 1.5rem; border-radius: 999px; cursor: pointer;
  border: 2px solid transparent; transition: all .18s ease; line-height: 1;
}
.btn--primary { background: var(--burgundy); color: #fff; }
.btn--primary:hover { background: var(--burgundy-dark); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn--gold { background: var(--gold); color: #3a2a08; }
.btn--gold:hover { background: #a8791f; color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn--ghost { background: transparent; color: var(--burgundy); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--burgundy); background: var(--paper); color: var(--burgundy); }
.btn--lg { padding: 1rem 1.9rem; font-size: 1.05rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .65rem; }
.brand { display: flex; align-items: center; }
.brand img { height: 46px; width: auto; }
.nav { display: flex; align-items: center; gap: .35rem; }
.nav a {
  font-family: var(--sans); font-weight: 600; font-size: .95rem;
  color: var(--ink); padding: .5rem .8rem; border-radius: 8px;
}
.nav a:hover { background: var(--burgundy-soft); color: var(--burgundy); }
.nav a.active { color: var(--burgundy); }
.nav a.active::after { content:""; display:block; height:2px; background:var(--gold); border-radius:2px; margin-top:3px; }
.nav .btn { margin-left: .4rem; padding: .55rem 1.1rem; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: .4rem; }
.nav-toggle span { display:block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: .2s; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(189,138,44,.18), transparent 60%),
    linear-gradient(160deg, #fffdf9 0%, #f6ece5 100%);
  border-bottom: 1px solid var(--line);
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; padding-block: clamp(3rem, 6vw, 5.5rem); }
.hero h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); line-height: 1.08; margin-bottom: 1.2rem; }
.hero h1 .accent { color: var(--burgundy); }
.hero .lead { font-size: 1.22rem; max-width: 34rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 1.8rem; }
.hero-figure { position: relative; }
.hero-figure img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; object-fit: cover; aspect-ratio: 5/4; }
.hero-badge {
  position: absolute; bottom: -1.2rem; left: -1.2rem;
  background: var(--burgundy); color: #fff; padding: 1rem 1.3rem;
  border-radius: var(--radius); box-shadow: var(--shadow-md); max-width: 15rem;
}
.hero-badge strong { font-family: var(--serif); font-size: 1.9rem; display: block; line-height: 1; }
.hero-badge span { font-size: .82rem; opacity: .9; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.stat {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem 1.4rem; box-shadow: var(--shadow-sm); border-top: 3px solid var(--gold);
}
.stat .num { font-family: var(--serif); font-size: clamp(2rem, 4vw, 2.7rem); color: var(--burgundy); line-height: 1; }
.stat .label { margin-top: .6rem; font-size: .92rem; color: var(--muted); }

/* ---------- Generic cards / grids ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.8rem; box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card h3 { font-size: 1.25rem; margin-bottom: .6rem; color: var(--burgundy); }
.card .icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: var(--burgundy-soft); color: var(--burgundy); margin-bottom: 1.1rem; font-size: 1.4rem;
}
.card p { color: var(--muted); font-size: .98rem; }

.media-img { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); width: 100%; object-fit: cover; }

/* ---------- Tinted band ---------- */
.band { background: var(--paper); border-block: 1px solid var(--line); }
.band--burgundy { background: linear-gradient(160deg, var(--burgundy) 0%, var(--burgundy-dark) 100%); color: #fff; }
.band--burgundy h2, .band--burgundy h3 { color: #fff; }
.band--burgundy .lead, .band--burgundy p { color: rgba(255,255,255,.9); }
.band--burgundy .eyebrow { color: var(--gold-soft); }
.band--sage { background: var(--sage-soft); }
.band--cream { background: var(--cream); }

/* ---------- Pull quote ---------- */
.pullquote {
  font-family: var(--serif); font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.4;
  color: var(--ink); border-left: 4px solid var(--gold); padding-left: 1.6rem; font-style: italic;
}
.pullquote cite { display: block; font-size: 1rem; font-style: normal; color: var(--muted); margin-top: .9rem; font-family: var(--sans); }

/* ---------- Stories ---------- */
.story-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.75rem; }
.story {
  display: flex; flex-direction: column; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease;
}
.story:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.story-thumb { aspect-ratio: 16/10; overflow: hidden; background: var(--burgundy-soft); }
.story-thumb img { width: 100%; height: 100%; object-fit: cover; }
.story-body { padding: 1.5rem 1.6rem 1.7rem; }
.story-body h3 { font-size: 1.3rem; color: var(--burgundy); margin-bottom: .5rem; }
.story .tag {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--gold); margin-bottom: .6rem;
}
.story p { color: var(--muted); font-size: .98rem; }

/* ---------- Team ---------- */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.team-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow-sm); }
.team-card img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; margin-bottom: 1rem; border: 3px solid var(--gold-soft); }
.team-card h3 { font-size: 1.1rem; color: var(--burgundy); margin-bottom: .15rem; }
.team-card .role { font-size: .85rem; color: var(--gold); font-weight: 600; margin-bottom: .7rem; }
.team-card p { font-size: .92rem; color: var(--muted); }
.team-list { list-style: none; padding: 0; display: grid; gap: .6rem; }
.team-list li { padding-left: 1.4rem; position: relative; color: #423a36; }
.team-list li::before { content:"›"; position:absolute; left:0; color: var(--gold); font-weight:700; }
.team-list strong { color: var(--ink); }

/* ---------- Feature list ---------- */
.checklist { list-style: none; padding: 0; display: grid; gap: .85rem; }
.checklist li { padding-left: 2rem; position: relative; color: #423a36; }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: .05rem;
  width: 1.4rem; height: 1.4rem; border-radius: 50%;
  background: var(--sage-soft); color: var(--sage); font-size: .8rem;
  display: grid; place-items: center; font-weight: 700;
}

/* ---------- Cost table ---------- */
.cost-table { width: 100%; border-collapse: collapse; background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.cost-table th, .cost-table td { text-align: left; padding: .95rem 1.2rem; border-bottom: 1px solid var(--line); font-size: .96rem; }
.cost-table th { background: var(--burgundy-soft); font-family: var(--sans); color: var(--burgundy); font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; }
.cost-table td.num { font-family: var(--serif); color: var(--burgundy); font-weight: 700; white-space: nowrap; }
.cost-table tr:last-child td { border-bottom: 0; }
.cost-table tr.total td { background: var(--gold-soft); font-weight: 700; }

/* ---------- CTA band ---------- */
.cta-final { text-align: center; }
.cta-final h2 { font-size: clamp(2rem, 4vw, 2.8rem); }
.cta-final .lead { margin: 1rem auto 2rem; max-width: 38rem; }
.cta-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Page header (interior) ---------- */
.page-head {
  background:
    radial-gradient(900px 400px at 90% -20%, rgba(189,138,44,.16), transparent 60%),
    linear-gradient(160deg, #fffdf9 0%, #f4ebe4 100%);
  border-bottom: 1px solid var(--line); padding-block: clamp(2.8rem, 5vw, 4.5rem);
}
.page-head h1 { font-size: clamp(2.1rem, 4.5vw, 3.1rem); margin-bottom: .8rem; }
.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: 1rem; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--burgundy); }

/* ---------- Contact ---------- */
.contact-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 2.2rem; box-shadow: var(--shadow-md);
}
.contact-row { display: flex; gap: 1rem; align-items: flex-start; padding-block: 1rem; border-bottom: 1px solid var(--line); }
.contact-row:last-child { border-bottom: 0; }
.contact-row .ic { font-size: 1.3rem; color: var(--burgundy); flex: none; width: 2.2rem; height: 2.2rem; display:grid; place-items:center; background: var(--burgundy-soft); border-radius: 10px; }
.contact-row .k { font-weight: 700; font-size: .95rem; }
.contact-row .v { color: var(--muted); font-size: .95rem; }

/* ---------- Footer ---------- */
.site-footer { background: #2a2422; color: #d9d2cc; padding-block: 3rem 1.5rem; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; }
.site-footer h4 { color: #fff; font-family: var(--sans); font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 1rem; }
.site-footer a { color: #d9d2cc; }
.site-footer a:hover { color: var(--gold); }
.footer-links { list-style: none; padding: 0; display: grid; gap: .6rem; }
.footer-brand p { color: #a89f98; margin-top: 1rem; max-width: 22rem; }
.footer-logo { background:#fff; display:inline-block; padding:.5rem .7rem; border-radius:10px; }
.footer-logo img { height: 40px; }
.footer-bottom { margin-top: 2.5rem; padding-top: 1.4rem; border-top: 1px solid rgba(255,255,255,.12); display: flex; justify-content: space-between; flex-wrap: wrap; gap: .6rem; color: #a89f98; font-size: .85rem; }

/* ---------- Help banner ---------- */
.help-banner { background: var(--sage); color: #fff; text-align: center; padding: .65rem 1rem; font-size: .92rem; }
.help-banner a { color: #fff; text-decoration: underline; font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.2rem; }
  .hero-figure { order: -1; max-width: 30rem; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid-3, .team-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .nav { position: fixed; inset: 0 0 auto 0; top: 61px; flex-direction: column; align-items: stretch;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: 1rem 1.5rem; gap: .2rem;
    box-shadow: var(--shadow-md); transform: translateY(-130%); transition: transform .25s ease; }
  .nav.open { transform: translateY(0); }
  .nav a { padding: .8rem .5rem; border-bottom: 1px solid var(--line); }
  .nav a.active::after { display:none; }
  .nav .btn { margin: .6rem 0 0; justify-content: center; }
  .nav-toggle { display: block; }
  .grid-2, .story-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .grid-3, .team-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .hero-badge { left: 1rem; bottom: 1rem; }
}
@media (max-width: 420px) {
  .stats { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

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