/* ==========================================================================
   Braghiroli Financial Services — styles.css
   Mobile-first. Colors and fonts live in :root so they are easy to change.
   ========================================================================== */

:root {
  --plum: #3B2A4A;        /* primary */
  --plum-dark: #2C1F38;
  --plum-tint: #EFEBF2;
  --navy: #1C2B3A;        /* secondary */
  --gold: #F2B66D;        /* accent */
  --gold-tint: #FCEBD3;
  --bg: #F7F6F2;          /* soft off-white */
  --white: #FFFFFF;
  --text: #1C2B3A;        /* body text */
  --muted: #4A5563;
  --line: #E3E0D7;

  --font-head: "DM Serif Display", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(28, 43, 58, .05), 0 10px 30px rgba(28, 43, 58, .07);
  --container: 1140px;
  --header-h: 72px;
}

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

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

img { max-width: 100%; height: auto; display: block; }
a { color: var(--plum); text-underline-offset: 3px; }
a:hover { color: var(--navy); }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 400;
  color: var(--plum);
  line-height: 1.15;
  margin: 0 0 .5em;
  letter-spacing: -.005em;
}
h1 { font-size: clamp(2.15rem, 4.2vw + 1rem, 3.6rem); }
h2 { font-size: clamp(1.75rem, 2.4vw + 1rem, 2.6rem); }
h3 { font-size: 1.3rem; }
h4 { font-family: var(--font-body); font-size: 1rem; font-weight: 600; margin: 0 0 .35em; color: var(--navy); }
p { margin: 0 0 1em; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 38rem; }

:focus-visible { outline: 3px solid var(--plum); outline-offset: 3px; border-radius: 4px; }
.on-dark :focus-visible, .site-footer :focus-visible { outline-color: var(--gold); }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px; text-decoration: none;
}
.skip-link:focus { top: 12px; color: #fff; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.section-white { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 44rem; margin-bottom: 36px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .lead { margin-left: auto; margin-right: auto; }
@media (min-width: 900px) { .section { padding: 96px 0; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--plum); margin-bottom: 16px;
}
.eyebrow::before { content: ""; width: 28px; height: 3px; border-radius: 2px; background: var(--gold); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 24px;
  font: 600 1rem/1.2 var(--font-body);
  border-radius: 999px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: #EFA651; color: var(--navy); }
.btn-plum { background: var(--plum); color: #fff; }
.btn-plum:hover { background: var(--plum-dark); color: #fff; }
.btn-outline { border-color: var(--plum); color: var(--plum); background: transparent; }
.btn-outline:hover { background: var(--plum); color: #fff; }
.btn-lg { min-height: 56px; padding: 16px 32px; font-size: 1.075rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.text-link { font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.text-link:hover { text-decoration: underline; }

/* ---------- Placeholders (things Sandra still needs to provide) ---------- */
.placeholder-note {
  border: 2px dashed var(--gold);
  background: #FFF8EC;
  color: var(--navy);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: .95rem;
}
.placeholder-note strong { color: var(--plum); }
.ph { /* inline placeholder text, e.g. [Client Name] */
  background: #FFF3DF; border: 1px dashed #D99A4E; border-radius: 6px; padding: 0 6px;
  font-family: var(--font-body);
}

/* ---------- Logo (markup is generated by js/logo.js) ---------- */
.brand { display: inline-flex; align-items: center; text-decoration: none; color: var(--plum); }
.logo { display: inline-flex; align-items: center; gap: 12px; font-family: var(--font-head); font-size: 1.35rem; color: var(--plum); }
.logo-mark { width: 44px; height: 44px; flex: none; }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-name { font-family: var(--font-head); font-size: 1.6rem; color: var(--plum); line-height: 1; }
.logo-sub { font-family: var(--font-body); font-size: .62rem; font-weight: 600; letter-spacing: .32em; text-transform: uppercase; color: var(--navy); margin-top: 5px; }
.logo-sub { white-space: nowrap; }
@media (max-width: 380px) { .logo-sub { letter-spacing: .14em; font-size: .58rem; } .logo-name { font-size: 1.45rem; } }
.logo-tagline { font-family: var(--font-body); font-size: .8rem; color: var(--muted); margin-top: 8px; letter-spacing: .02em; }

/* ---------- Header & navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 246, 242, .94);
  -webkit-backdrop-filter: saturate(150%) blur(8px); backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 16px; }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--white); cursor: pointer; color: var(--plum);
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 22px; height: 2px; border-radius: 2px; background: currentColor;
  position: relative; transition: transform .25s, opacity .25s;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after { top: 7px; }
.nav-open .nav-toggle-bars { background: transparent; }
.nav-open .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

.site-nav {
  display: none;
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--bg); border-bottom: 1px solid var(--line);
  padding: 8px 20px 24px; box-shadow: 0 16px 30px rgba(28, 43, 58, .08);
}
.nav-open .site-nav { display: block; }
.no-js .site-nav { display: block; position: static; box-shadow: none; border: 0; padding: 0 0 16px; }
.no-js .nav-toggle { display: none; }
.no-js .header-inner { flex-wrap: wrap; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav li a {
  display: block; padding: 14px 4px; border-bottom: 1px solid var(--line);
  text-decoration: none; color: var(--navy); font-weight: 500; font-size: 1.05rem;
}
.site-nav li a[aria-current="page"] { color: var(--plum); font-weight: 700; }
.site-nav .btn { width: 100%; margin-top: 20px; }

@media (min-width: 1000px) {
  .nav-toggle { display: none; }
  .site-nav, .no-js .site-nav {
    display: flex !important; align-items: center; gap: 28px;
    position: static; background: none; border: 0; box-shadow: none; padding: 0;
  }
  .site-nav ul { display: flex; gap: 26px; }
  .site-nav li a { padding: 6px 0; border: 0; font-size: .98rem; position: relative; }
  .site-nav li a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
    background: var(--gold); transform: scaleX(0); transition: transform .2s; transform-origin: left;
  }
  .site-nav li a:hover::after, .site-nav li a[aria-current="page"]::after { transform: scaleX(1); }
  .site-nav .btn { width: auto; margin: 0; min-height: 44px; padding: 10px 20px; }
}

/* ---------- Hero ---------- */
.hero { padding: 48px 0 64px; }
.hero-grid { display: grid; gap: 40px; align-items: center; }
.hero h1 { margin-bottom: .4em; }
.hero-media { position: relative; }
.hero-media img { border-radius: var(--radius); box-shadow: var(--shadow); }
.hero-media::before {
  content: ""; position: absolute; inset: 18px -12px -12px 18px; z-index: -1;
  border-radius: var(--radius); background: var(--gold-tint);
}
@media (min-width: 900px) {
  .hero { padding: 80px 0 104px; }
  .hero-grid { grid-template-columns: 1.08fr .92fr; gap: 64px; }
}

/* Page hero (inner pages) */
.page-hero { padding: 56px 0 24px; }
.page-hero .lead { margin-bottom: 0; }
@media (min-width: 900px) { .page-hero { padding: 88px 0 32px; } }

/* ---------- Split (image + text) ---------- */
.split { display: grid; gap: 36px; align-items: center; }
.split-media img { border-radius: var(--radius); box-shadow: var(--shadow); }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; gap: 64px; }
  .split.reverse .split-media { order: 2; }
}

.story p { font-size: 1.1rem; }
.story p:first-of-type::first-letter {
  font-family: var(--font-head); float: left; font-size: 3.4rem; line-height: .9;
  padding: 4px 10px 0 0; color: var(--plum);
}

/* ---------- Cards & grids ---------- */
.grid { display: grid; gap: 20px; }
@media (min-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; height: 100%;
}
.card h3 { margin-bottom: .35em; }
.card p { color: var(--muted); margin: 0; }

a.card { display: block; text-decoration: none; color: inherit; transition: transform .2s, box-shadow .2s, border-color .2s; }
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #D7D1C4; color: inherit; }
a.card .card-more { margin-top: 16px; font-weight: 600; color: var(--plum); font-size: .95rem; display: inline-flex; gap: 6px; align-items: center; }

.icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--gold-tint); color: var(--plum); margin-bottom: 18px; flex: none;
}
.icon svg { width: 26px; height: 26px; }
.icon-sm { width: 42px; height: 42px; border-radius: 12px; margin-bottom: 0; }
.icon-sm svg { width: 22px; height: 22px; }

/* Featured service cards (website & branding) */
.card-featured { padding: 32px; border-top: 4px solid var(--gold); }
.card-featured h3 { font-size: 1.5rem; }

/* Business services (second tier) */
.subhead {
  display: flex; align-items: center; gap: 14px; margin: 48px 0 18px;
  font: 600 .82rem/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--navy);
}
.subhead::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.card-compact { display: flex; gap: 14px; align-items: center; padding: 18px 20px; }
.card-compact h3 { font-family: var(--font-body); font-size: 1rem; font-weight: 600; color: var(--navy); margin: 0; line-height: 1.35; }

.center-actions { text-align: center; margin-top: 40px; }

/* ---------- Why work with Sandra ---------- */
.why-item { display: flex; gap: 16px; align-items: flex-start; }
.why-item .icon { margin: 0; }
.why-item h3 { font-size: 1.25rem; margin-bottom: .25em; }
.why-item p { color: var(--muted); margin: 0; }

/* ---------- Before & after ---------- */
.before-after { display: grid; gap: 20px; }
@media (min-width: 760px) { .before-after { grid-template-columns: 1fr 1fr; } }
.ba-figure { margin: 0; position: relative; }
.ba-figure img { border-radius: var(--radius); border: 1px solid var(--line); }
.ba-label {
  position: absolute; top: 14px; left: 14px;
  font: 700 .75rem/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase;
  padding: 8px 12px; border-radius: 999px; background: var(--navy); color: #fff;
}
.ba-figure.after .ba-label { background: var(--gold); color: var(--navy); }
.ba-figure figcaption { margin-top: 10px; font-size: .92rem; color: var(--muted); }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: var(--plum); color: #fff; border-radius: 24px;
  padding: 48px 28px; text-align: center; position: relative; overflow: hidden;
}
.cta-banner::after { /* small gold corner accent, not a gradient */
  content: ""; position: absolute; width: 140px; height: 140px; border-radius: 50%;
  border: 18px solid var(--gold); opacity: .9; right: -60px; top: -60px;
}
.cta-banner h2 { color: #fff; }
.cta-banner p { color: #E9E3EE; max-width: 34rem; margin: 0 auto 28px; font-size: 1.1rem; }
@media (min-width: 900px) { .cta-banner { padding: 72px 48px; } }

/* ---------- Services page ---------- */
.feature-band { background: var(--plum); color: #fff; }
.feature-band h2, .feature-band .eyebrow { color: #fff; }
.feature-band .lead { color: #E9E3EE; }
.feature-band .card { border: 0; }
.feature-band .split-media img { box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.service-list { display: grid; gap: 16px; margin-top: 40px; }
@media (min-width: 760px) { .service-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .service-list { grid-template-columns: repeat(3, 1fr); } }
.service-list .card h3 { font-size: 1.35rem; }

.business-list { display: grid; gap: 14px; margin-top: 8px; }
@media (min-width: 640px) { .business-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .business-list { grid-template-columns: repeat(4, 1fr); } }
.business-list .card-compact span.small { display: block; font-size: .88rem; font-weight: 400; color: var(--muted); margin-top: 2px; }

/* ---------- About page ---------- */
.about-grid { display: grid; gap: 36px; align-items: start; }
.about-photo img { border-radius: var(--radius); box-shadow: var(--shadow); }
@media (min-width: 900px) { .about-grid { grid-template-columns: .8fr 1.2fr; gap: 64px; } }
.about-copy p { font-size: 1.1rem; }

/* ---------- Portfolio ---------- */
.portfolio-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.portfolio-card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; border-bottom: 1px solid var(--line); }
.portfolio-card .card-body { padding: 22px 24px 26px; }
.portfolio-card h3 { font-size: 1.3rem; margin-bottom: .3em; }
.portfolio-type { font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--plum); margin-bottom: 10px; display: block; }

/* ---------- Contact page ---------- */
.contact-grid { display: grid; gap: 32px; align-items: start; }
@media (min-width: 960px) { .contact-grid { grid-template-columns: .9fr 1.1fr; gap: 48px; } }
.contact-list { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 14px; }
.contact-list li { display: flex; gap: 14px; align-items: center; }
.contact-list .label { display: block; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.contact-list a { font-weight: 600; font-size: 1.1rem; text-decoration: none; word-break: break-word; }
.contact-list a:hover { text-decoration: underline; }

.book-card { background: var(--plum); color: #fff; border-radius: var(--radius); padding: 32px 28px; }
.book-card h2 { color: #fff; font-size: 1.8rem; }
.book-card p { color: #E9E3EE; }
.book-card .btn { width: 100%; }
.book-card .placeholder-note { margin-top: 16px; color: var(--navy); }

.form-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 22px; }
@media (min-width: 640px) { .form-card { padding: 36px; } }
.form-row { display: grid; gap: 18px; }
@media (min-width: 640px) { .form-row.two { grid-template-columns: 1fr 1fr; } }
.field { margin-bottom: 18px; }
.form-row .field { margin-bottom: 0; }
.form-row { margin-bottom: 18px; }
label, legend { display: block; font-weight: 600; font-size: .95rem; color: var(--navy); margin-bottom: 6px; }
.optional { font-weight: 400; color: var(--muted); }
input[type="text"], input[type="email"], input[type="tel"], textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text);
  background: var(--bg); border: 1.5px solid #CFCAC0; border-radius: var(--radius-sm);
  padding: 12px 14px; min-height: 48px;
}
textarea { min-height: 140px; resize: vertical; }
input:focus, textarea:focus { outline: 3px solid rgba(59, 42, 74, .25); border-color: var(--plum); }
fieldset { border: 0; padding: 0; margin: 0 0 18px; }
.checks { display: grid; gap: 10px; }
@media (min-width: 520px) { .checks { grid-template-columns: 1fr 1fr; } }
.check {
  display: flex; align-items: center; gap: 10px; font-weight: 500; margin: 0;
  background: var(--bg); border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px; cursor: pointer;
}
.check input { width: 20px; height: 20px; accent-color: var(--plum); flex: none; margin: 0; }
.check:has(input:checked) { border-color: var(--plum); background: var(--plum-tint); }
.hp { position: absolute; left: -9999px; }
.form-status { margin-top: 16px; padding: 14px 16px; border-radius: var(--radius-sm); font-weight: 500; }
.form-status:empty { display: none; }
.form-status.success { background: #E7F4EC; color: #14532D; border: 1px solid #A7D7B8; }
.form-status.error { background: #FDECEC; color: #7F1D1D; border: 1px solid #F3B4B4; }
.form-fallback { font-size: .95rem; color: var(--muted); margin-top: 14px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #D5DCE4; margin-top: 0; padding: 64px 0 28px; font-size: .97rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--gold); text-decoration: underline; }
.site-footer .logo-name { color: #fff; }
.site-footer .logo-sub { color: var(--gold); }
.footer-grid { display: grid; gap: 36px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer-tagline { margin-top: 18px; max-width: 22rem; color: #C3CCD6; }
.footer-title { font: 600 .78rem/1 var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin: 0 0 16px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-social-ph { border: 1px dashed rgba(242, 182, 109, .7); border-radius: 8px; padding: 10px 12px; font-size: .88rem; color: #E6D5BE; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 48px; padding-top: 22px; font-size: .88rem; color: #AEB8C4; }

/* ---------- Services page: business service groups ---------- */
.section-tight-bottom { padding-bottom: 0; }
.section-tight-top { padding-top: 0; }
@media (min-width: 900px) { .section-tight-bottom { padding-bottom: 8px; } .section-tight-top { padding-top: 56px; } }
.center-actions .lead { margin: 0 auto 20px; }
.jump-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.jump-links a { display: inline-block; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); color: var(--plum); font-weight: 600; font-size: .95rem; text-decoration: none; }
.jump-links a:hover, .jump-links a:focus-visible { border-color: var(--plum); background: var(--plum-tint); }
.group-list { display: grid; gap: 12px; margin-top: 24px; }
.group-list .card-compact span.small { display: block; font-size: .88rem; font-weight: 400; color: var(--muted); margin-top: 2px; }
#bookkeeping, #business-setup, #insurance-investments { scroll-margin-top: var(--header-h); }
.grid .card-compact span.small { display: block; font-size: .88rem; font-weight: 400; color: var(--muted); margin-top: 2px; }

/* ---------- Web & Digital Support offering ---------- */
@media (min-width: 760px) { .service-list { grid-template-columns: repeat(2, 1fr); } .service-list .card-wide { grid-column: 1 / -1; } }
@media (min-width: 1000px) { .service-list { grid-template-columns: repeat(2, 1fr); } }
.offer-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.offer-list li { position: relative; padding-left: 26px; color: var(--text); }
.offer-list li::before { content: ""; position: absolute; left: 0; top: .5em; width: 14px; height: 8px; border-left: 2.5px solid var(--gold); border-bottom: 2.5px solid var(--gold); transform: rotate(-45deg); transform-origin: center; margin-top: -4px; }
@media (min-width: 760px) { .card-wide .offer-list { grid-template-columns: repeat(2, 1fr); column-gap: 32px; } }
#web-digital { scroll-margin-top: calc(var(--header-h) + 16px); }
