/* ==========================================================================
   Bertina Tubaro — Family Report Writer
   ========================================================================== */

:root {
  --ink: #1d2b2a;
  --ink-soft: #46524f;
  --muted: #6b7673;
  --bg: #faf7f2;
  --bg-alt: #f2ece2;
  --surface: #ffffff;
  --line: #e4ddd1;
  --brand: #24504a;        /* deep teal */
  --brand-dark: #173733;
  --brand-tint: #e3ece9;
  --accent: #b86b4b;       /* warm terracotta */
  --accent-tint: #f5e6de;
  --radius: 14px;
  --radius-lg: 24px;
  --shadow: 0 1px 2px rgba(29, 43, 42, .04), 0 8px 24px rgba(29, 43, 42, .06);
  --max: 1160px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--accent); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 .6em;
  color: var(--ink);
}
h1 { font-size: clamp(2.3rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1.1em; }
.lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 40em; }

.container { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.narrow { max-width: 760px; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--brand); color: #fff; padding: .6rem 1rem; z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .85rem 1.5rem;
  border-radius: 999px;
  font-weight: 600; font-size: .98rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
  cursor: pointer;
  font-family: inherit;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-ghost { border-color: var(--brand); color: var(--brand); background: transparent; }
.btn-ghost:hover { background: var(--brand); color: #fff; }
.btn-light { background: #fff; color: var(--brand-dark); }
.btn-light:hover { background: var(--accent-tint); color: var(--brand-dark); }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }

/* ---------- Logo (text wordmark) ---------- */
.logo {
  display: inline-flex; flex-direction: column;
  text-decoration: none; color: var(--ink); line-height: 1;
}
.logo:hover { color: var(--ink); }
.logo-name {
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.logo-name em { font-style: italic; color: var(--brand); font-weight: 400; }
.logo-tag {
  margin-top: .38rem;
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex; align-items: center; gap: .5rem;
}
.logo-tag::before { content: ""; width: 18px; height: 1.5px; background: currentColor; }
.logo--light, .logo--light:hover { color: #fff; }
.logo--light .logo-name em { color: #bfe0d8; }
.logo--light .logo-tag { color: #e9b9a3; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 247, 242, .88);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 84px; gap: 1rem;
}
.nav ul { list-style: none; display: flex; align-items: center; gap: 2rem; margin: 0; padding: 0; }
.nav a { text-decoration: none; color: var(--ink-soft); font-weight: 500; font-size: .98rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--brand); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); padding-bottom: 4px; }
.nav .btn { color: #fff; padding: .65rem 1.25rem; }
.nav .btn[aria-current="page"] { box-shadow: none; padding-bottom: .65rem; }

.nav-toggle {
  display: none;
  background: none; border: 0; padding: .5rem; cursor: pointer; color: var(--ink);
}
.nav-toggle svg { width: 28px; height: 28px; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: .5rem 1.25rem 1.25rem; }
  .nav li a { display: block; padding: .9rem 0; border-bottom: 1px solid var(--line); }
  .nav a[aria-current="page"] { box-shadow: none; padding-bottom: .9rem; }
  .nav li:last-child a { border: 0; margin-top: 1rem; justify-content: center; }
}

/* ---------- Sections ---------- */
section { padding: clamp(4rem, 8vw, 6.5rem) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 680px; margin-bottom: 3rem; }
.section-head.center { margin-inline: auto; text-align: center; }

/* ---------- Hero ---------- */
.hero { padding: clamp(3rem, 7vw, 6rem) 0 clamp(4rem, 8vw, 7rem); position: relative; overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
}
.hero h1 em { font-style: italic; color: var(--brand); }
.hero-points {
  list-style: none; padding: 0; margin: 2rem 0 0;
  display: flex; flex-wrap: wrap; gap: .6rem 1.6rem;
  font-size: .95rem; color: var(--ink-soft);
}
.hero-points li { display: flex; align-items: center; gap: .5rem; }
.hero-points svg { width: 18px; height: 18px; color: var(--brand); flex: none; }

.hero-card {
  position: relative;
  background: var(--brand);
  color: #eaf2f0;
  border-radius: var(--radius-lg);
  padding: 2.4rem;
  box-shadow: 0 30px 60px -20px rgba(23, 55, 51, .45);
}
.hero-card::before {
  content: ""; position: absolute; inset: -18px -18px auto auto;
  width: 120px; height: 120px; border-radius: 50%;
  background: var(--accent-tint); z-index: -1;
}
.hero-card::after {
  content: ""; position: absolute; left: -26px; bottom: -26px;
  width: 90px; height: 90px; border-radius: 22px;
  background: var(--brand-tint); z-index: -1; transform: rotate(12deg);
}
.hero-card blockquote {
  margin: 0 0 1.6rem;
  font-family: var(--serif); font-size: 1.45rem; line-height: 1.35; font-weight: 400; color: #fff;
}
.hero-card .sig { font-size: .9rem; color: #bfd6d1; }
.hero-card .sig strong { display: block; color: #fff; font-weight: 600; font-size: 1rem; }
.hero-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
  margin-top: 2rem; padding-top: 1.6rem; border-top: 1px solid rgba(255,255,255,.18);
}
.hero-stats b { display: block; font-family: var(--serif); font-size: 1.6rem; font-weight: 500; color: #fff; }
.hero-stats span { font-size: .8rem; color: #bfd6d1; line-height: 1.35; display: block; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-card { margin: 0 1rem; }
}

/* ---------- Page header (inner pages) ---------- */
.page-hero { padding: clamp(3rem, 6vw, 5rem) 0 clamp(2.5rem, 5vw, 4rem); border-bottom: 1px solid var(--line); }
.page-hero h1 { max-width: 16em; }
.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: 1.2rem; }
.breadcrumb a { color: var(--muted); }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(29,43,42,.05), 0 18px 40px rgba(29,43,42,.09); }
.card h3 { margin-bottom: .5rem; }
.card p { color: var(--ink-soft); font-size: 1rem; margin-bottom: 0; }
.card .icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--brand-tint); color: var(--brand);
  margin-bottom: 1.3rem;
}
.card .icon svg { width: 26px; height: 26px; }
.card .more { display: inline-block; margin-top: 1.1rem; font-weight: 600; font-size: .95rem; text-decoration: none; }
.card .more::after { content: " →"; }

/* ---------- Split / feature ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.portrait {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,.35), transparent 45%),
    linear-gradient(160deg, var(--brand-tint), #cfdcd8 55%, var(--accent-tint));
  display: grid; place-items: center;
  position: relative; overflow: hidden;
  border: 1px solid var(--line);
}
.portrait .monogram {
  font-family: var(--serif); font-size: clamp(5rem, 14vw, 9rem); font-style: italic;
  color: var(--brand); opacity: .85; letter-spacing: -0.04em;
}
.portrait .note {
  position: absolute; bottom: 1rem; left: 1rem; right: 1rem;
  font-size: .8rem; color: var(--ink-soft); text-align: center;
  background: rgba(255,255,255,.7); border-radius: 10px; padding: .5rem;
}

.check-list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .9rem; }
.check-list li { display: flex; gap: .8rem; align-items: flex-start; }
.check-list svg { width: 22px; height: 22px; flex: none; color: var(--accent); margin-top: .2rem; }

/* ---------- Process steps ---------- */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; list-style: none; padding: 0; margin: 0; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .steps { grid-template-columns: 1fr; } }
.steps li {
  counter-increment: step;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.8rem; position: relative;
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--serif); font-size: 2.2rem; font-style: italic; color: var(--accent);
  display: block; line-height: 1; margin-bottom: .9rem;
}
.steps h3 { font-size: 1.2rem; }
.steps p { color: var(--ink-soft); font-size: .98rem; margin: 0; }

/* ---------- Audience band ---------- */
.audience { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.audience div { background: var(--surface); padding: 1.8rem; }
.audience h3 { font-size: 1.1rem; margin-bottom: .4rem; }
.audience p { font-size: .95rem; color: var(--ink-soft); margin: 0; }
@media (max-width: 900px) { .audience { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .audience { grid-template-columns: 1fr; } }

/* ---------- Service detail blocks ---------- */
.service {
  display: grid; grid-template-columns: 280px 1fr; gap: 2.5rem;
  padding: 2.8rem 0; border-top: 1px solid var(--line);
}
.service:first-of-type { border-top: 0; padding-top: 0; }
.service h2 { font-size: 1.75rem; }
.service .tag { font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.service ul { padding-left: 1.2rem; color: var(--ink-soft); }
.service li { margin-bottom: .4rem; }
@media (max-width: 760px) { .service { grid-template-columns: 1fr; gap: .5rem; } }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: .8rem; }
.faq details {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0 1.5rem;
}
.faq summary {
  cursor: pointer; list-style: none;
  padding: 1.25rem 0; font-weight: 600; font-size: 1.05rem;
  display: flex; justify-content: space-between; gap: 1rem; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-family: var(--serif); font-size: 1.6rem; color: var(--accent); line-height: 1;
  transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding-bottom: 1.3rem; color: var(--ink-soft); }
.faq details > div p:last-child { margin: 0; }

/* ---------- Quote / values ---------- */
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
@media (max-width: 800px) { .values { grid-template-columns: 1fr; } }
.values h3 { font-size: 1.2rem; display: flex; gap: .6rem; align-items: baseline; }
.values h3 span { font-style: italic; color: var(--accent); }
.values p { color: var(--ink-soft); font-size: 1rem; }

.pull-quote {
  font-family: var(--serif); font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.35;
  font-weight: 400; font-style: italic; color: var(--brand-dark);
  border-left: 3px solid var(--accent); padding-left: 1.5rem; margin: 2rem 0;
}

.credentials { display: grid; gap: 0; border-top: 1px solid var(--line); margin-top: 1.5rem; }
.credentials div { display: grid; grid-template-columns: 180px 1fr; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.credentials dt { font-weight: 600; font-size: .9rem; color: var(--muted); }
.credentials dd { margin: 0; }
@media (max-width: 560px) { .credentials div { grid-template-columns: 1fr; gap: .2rem; } }

/* ---------- CTA band ---------- */
.cta {
  background: var(--brand-dark); color: #dfe9e6;
  border-radius: var(--radius-lg);
  padding: clamp(2.5rem, 6vw, 4rem);
  display: grid; grid-template-columns: 1.4fr auto; gap: 2rem; align-items: center;
  position: relative; overflow: hidden;
}
.cta::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px;
  border-radius: 50%; border: 40px solid rgba(255,255,255,.05);
}
.cta h2 { color: #fff; margin-bottom: .4rem; }
.cta p { margin: 0; color: #bfd6d1; }
@media (max-width: 760px) { .cta { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.3fr .9fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.5rem, 4vw, 2.5rem); box-shadow: var(--shadow); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.field { margin-bottom: 1.15rem; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .4rem; }
.field label .opt { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--bg); border: 1.5px solid var(--line); border-radius: 10px;
  padding: .8rem .95rem; transition: border-color .2s, background .2s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); background: #fff; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: .85rem; color: var(--muted); margin-top: 1rem; }
.form-status { margin-top: 1rem; padding: .9rem 1.1rem; border-radius: 10px; font-size: .95rem; display: none; }
.form-status.ok { display: block; background: var(--brand-tint); color: var(--brand-dark); }
.form-status.err { display: block; background: var(--accent-tint); color: #7a3a22; }

.info-list { list-style: none; padding: 0; margin: 0 0 2rem; display: grid; gap: 1.4rem; }
.info-list li { display: flex; gap: 1rem; }
.info-list .icon { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-tint); color: var(--brand); display: grid; place-items: center; flex: none; }
.info-list .icon svg { width: 22px; height: 22px; }
.info-list small { display: block; color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; }
.info-list a, .info-list span { font-weight: 500; text-decoration: none; color: var(--ink); }

.notice { background: var(--accent-tint); border-radius: var(--radius); padding: 1.4rem 1.5rem; font-size: .95rem; color: #5d3020; }
.notice strong { display: block; margin-bottom: .3rem; color: #4a2416; }
.notice p { margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #b8c3c0; padding: 4.5rem 0 2rem; margin-top: 0; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 2.5rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { font-family: var(--sans); font-size: .78rem; text-transform: uppercase; letter-spacing: .16em; color: #fff; font-weight: 600; margin-bottom: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.site-footer a { color: #b8c3c0; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-about { max-width: 26rem; margin-top: 1.2rem; }
.footer-bottom {
  margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.1);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-size: .82rem; color: #8b9794;
}

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
.no-js .reveal { opacity: 1; transform: none; }
