/* Ribeiro Accounting & Bookkeeping Solutions
   Colour and type settings are at the top. Contrast checked against each ground they're used on. */

/* Self-hosted fonts (Latin subset from Google Fonts, SIL Open Font License) */
@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("/assets/fonts/roboto-var.woff2") format("woff2");
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/public-sans-var.woff2") format("woff2");
}

:root {
  --brand: #034c75;         /* logo wordmark blue: headings, links, bands. White on it 9.2:1 */
  --brand-deep: #02324e;    /* footer, text on the ribbon (6.8:1) */
  --brand-soft: #dceaf0;    /* tints */
  --ribbon: #8dc1d1;        /* logo ribbon blue: decoration and the hero card tab, dark text only */
  --paper: #eef4f7;         /* page background */
  --white: #ffffff;         /* cards */
  --ink: #13212b;           /* body text: 14.8:1 on paper */
  --muted: #4a5b67;         /* secondary text: 6.3:1 on paper, 7.0:1 on white */
  --line: #c5d5de;
  --marigold: #f2b33d;      /* calls to action only, always with ink text (8.8:1) */
  --marigold-hover: #e09f22;
  --on-dark: #ffffff;
  --on-dark-muted: #c6dbe6; /* 6.4:1 on brand, 9.4:1 on brand-deep */

  --font-display: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display-weight: 700;
  --font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step--1: 0.9375rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.75rem, 1.4rem + 1.6vw, 2.375rem);
  --step-4: clamp(2.25rem, 1.6rem + 3.1vw, 3.75rem);

  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --radius-sm: 6px;
  --radius-lg: 14px;
  --header-h: 84px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 1rem); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--brand);
  text-wrap: balance;
}
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
p { margin: 0 0 1em; }
p, li { text-wrap: pretty; }
a { color: var(--brand); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
address { font-style: normal; }
img { max-width: 100%; height: auto; display: block; }

:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 2px; }
.final-cta :focus-visible, .site-footer :focus-visible, .trust :focus-visible { outline-color: var(--marigold); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--white); color: var(--brand); padding: 0.75rem 1rem; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 1rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm); border: 2px solid transparent;
  font: 700 var(--step-0)/1.2 var(--font-body);
  text-decoration: none; text-align: center; cursor: pointer;
}
.btn-cta { background: var(--marigold); color: var(--ink); }
.btn-cta:hover { background: var(--marigold-hover); }
.btn-lg { min-height: 56px; padding-inline: 1.75rem; font-size: var(--step-1); }
.btn-outline { border-color: var(--brand); color: var(--brand); background: transparent; }
.btn-outline:hover { background: var(--brand); color: var(--on-dark); }
.btn-call { background: var(--brand); color: var(--on-dark); }

.text-link { font-weight: 700; display: inline-block; padding-block: 0.6rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(238, 244, 247, 0.96);
  border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(8px)) {
  .site-header { background: rgba(238, 244, 247, 0.86); backdrop-filter: blur(8px); }
}
.header-inner { display: flex; align-items: center; gap: 1rem; min-height: var(--header-h); }
.brand { display: flex; align-items: center; min-height: 44px; margin-right: auto; padding-block: 0.4rem; }
.brand-logo { height: 68px; width: auto; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.25rem; }
.site-nav a {
  display: flex; align-items: center; min-height: 44px; padding: 0 0.75rem;
  text-decoration: none; color: var(--ink); font-weight: 600; border-radius: var(--radius-sm);
}
.site-nav a:hover { background: var(--brand-soft); }
.site-nav a[aria-current="page"] { color: var(--brand); box-shadow: inset 0 -3px 0 var(--marigold); border-radius: 0; }

.header-actions { display: flex; align-items: center; gap: 0.75rem; }
.header-phone {
  display: inline-flex; align-items: center; gap: 0.4rem; min-height: 44px; padding: 0 0.25rem;
  font-weight: 700; color: var(--brand); text-decoration: none; white-space: nowrap;
}
.header-phone:hover span { text-decoration: underline; }
.menu-toggle { display: none; }

/* Small screens: menu button, phone as an icon button, bottom bar carries Book */
@media (max-width: 899px) {
  .header-book { display: none; }
  .js .menu-toggle {
    display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; padding: 0 0.75rem;
    background: transparent; border: 2px solid var(--brand); border-radius: var(--radius-sm);
    color: var(--brand); font: 700 var(--step--1) var(--font-body); cursor: pointer;
  }
  .menu-bars, .menu-bars::before, .menu-bars::after {
    display: block; width: 18px; height: 2px; background: currentColor; position: relative;
  }
  .menu-bars::before, .menu-bars::after { content: ""; position: absolute; left: 0; }
  .menu-bars::before { top: -6px; }
  .menu-bars::after { top: 6px; }
  .menu-toggle[aria-expanded="true"] .menu-bars { background: transparent; }
  .menu-toggle[aria-expanded="true"] .menu-bars::before { top: 0; transform: rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .menu-bars::after { top: 0; transform: rotate(-45deg); }

  .header-inner { flex-wrap: wrap; }
  .site-nav { order: 3; width: 100%; }
  .site-nav ul { flex-wrap: wrap; padding-bottom: 0.5rem; }
  .js .site-nav { display: none; }
  .js .site-nav.is-open { display: block; }
  .js .site-nav ul { flex-direction: column; padding-bottom: 1rem; }
  .js .site-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--marigold); }
}
@media (max-width: 559px) {
  .header-inner { gap: 0.5rem; }
  .brand { flex: 1 1 0; min-width: 0; }
  .brand-logo { height: 50px; }
  .js .menu-toggle { width: 44px; padding: 0; justify-content: center; }
  .menu-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .header-actions { gap: 0.5rem; flex: none; }
  .header-phone span { display: none; }
  .header-phone {
    width: 44px; justify-content: center; border: 2px solid var(--brand); border-radius: var(--radius-sm);
  }
}

/* Hero */
.hero { padding-block: clamp(2rem, 5vw, 4.5rem) clamp(2.5rem, 6vw, 5rem); }
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 4rem; } }
.hero h1 { font-size: var(--step-4); line-height: 1.06; letter-spacing: -0.02em; max-width: 16ch; margin-bottom: 0.45em; }
.hero-sub { font-size: var(--step-1); color: var(--muted); max-width: 38rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 1.75rem; }
.hero-call { display: inline-flex; flex-direction: column; text-decoration: none; color: var(--brand); min-height: 56px; justify-content: center; }
.hero-call-label { font-size: var(--step--1); font-weight: 600; color: var(--muted); }
.hero-call-number { font-family: var(--font-display); font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2rem); line-height: 1.1; }
.hero-call:hover .hero-call-number { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.15em; }
@media (max-width: 559px) {
  .hero { padding-top: 1.5rem; }
  .hero h1 { font-size: 2.1rem; }
  .hero-sub { font-size: var(--step-0); }
  .hero-actions { margin-top: 1.25rem; gap: 0.75rem 1.25rem; }
  .hero-actions .btn { width: 100%; }
}
.hero-trust { list-style: none; padding: 0; margin: 1.75rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; font-size: var(--step--1); font-weight: 600; color: var(--muted); }
.hero-trust li { display: flex; align-items: center; gap: 0.45rem; }
.hero-trust li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); flex: none; }

/* Office card: a folder whose tab is the logo's ribbon */
.office-card { position: relative; margin-top: 1.5rem; max-width: 34rem; }
.office-tab {
  position: absolute; top: 0; left: 0; transform: translateY(-100%);
  margin: 0; padding: 0.5rem 2rem 0.4rem 1.1rem;
  background: var(--ribbon); color: var(--brand-deep);
  font-size: var(--step--1); font-weight: 700;
  border-radius: var(--radius-lg) 0 0 0;
  clip-path: polygon(0 0, 100% 0, calc(100% - 0.75rem) 50%, 100% 100%, 0 100%);
}
.office-body {
  background: var(--white); border: 1px solid var(--line); border-top: 6px solid var(--brand);
  border-radius: 0 var(--radius-lg) var(--radius-lg) var(--radius-lg);
  padding: 1.5rem;
  box-shadow: 0 1px 0 var(--line), 0 18px 40px -24px rgba(3, 76, 117, 0.45);
}
.office-person { display: flex; gap: 1rem; align-items: center; margin-bottom: 1.25rem; }
.office-name { font-family: var(--font-display); font-size: var(--step-2); color: var(--brand); margin: 0; line-height: 1.2; }
.office-role { font-size: var(--step--1); color: var(--muted); margin: 0.25rem 0 0; line-height: 1.45; }
.office-status {
  display: inline-flex; align-items: center; gap: 0.5rem; margin: 0 0 1rem;
  font-weight: 700; font-size: var(--step--1); color: var(--brand);
}
.office-status::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #2f8a5b; }
.office-status.is-closed { color: var(--muted); }
.office-status.is-closed::before { background: #8797a3; }

.hours { margin: 0 0 0.5rem; font-size: var(--step--1); }
.hours div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.5rem 0; border-top: 1px solid var(--line); }
.hours dt { font-weight: 700; }
.hours dd { margin: 0; text-align: right; }

/* Photo slots */
.photo-slot {
  display: grid; place-items: center; text-align: center; flex: none;
  background: repeating-linear-gradient(135deg, var(--brand-soft) 0 10px, #e7f0f4 10px 20px);
  border: 2px dashed #8fb3c4; color: var(--muted); font-size: 0.8125rem; font-weight: 700;
}
.photo-slot-sm { width: 76px; height: 76px; border-radius: 50%; padding: 0.5rem; line-height: 1.15; }
.photo-slot-lg { width: 100%; aspect-ratio: 4 / 5; max-width: 22rem; border-radius: var(--radius-lg); font-size: var(--step-0); }

/* Trust strip */
.trust { background: var(--brand); color: var(--on-dark); padding-block: 2.25rem; }
.trust-grid { display: grid; gap: 1.75rem; }
@media (min-width: 900px) { .trust-grid { grid-template-columns: auto 1fr; gap: 4rem; align-items: start; } }
.trust-title { color: var(--on-dark); font-size: var(--step-2); margin-bottom: 0.75rem; }
.trust-subtitle { font-family: var(--font-body); font-size: var(--step--1); font-weight: 700; color: var(--on-dark-muted); margin: 0.35rem 0 0.75rem; }
.credentials { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; font-weight: 600; }
.badges { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.badges li {
  border: 1px solid rgba(255, 255, 255, 0.35); border-radius: var(--radius-sm);
  padding: 0.45rem 0.8rem; font-size: var(--step--1); line-height: 1.35;
}

/* Sections */
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section-tight { padding-top: 0; }
.section-head { max-width: 44rem; margin-bottom: 2rem; }
.section-head p { color: var(--muted); }

.featured { display: grid; gap: 1.25rem; }
@media (min-width: 800px) { .featured { grid-template-columns: 1fr 1fr; gap: 1.5rem; } }
.feature {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  display: flex; flex-direction: column;
}
.feature h3 { font-size: var(--step-3); }
.feature h3 a { text-decoration: none; }
.feature h3 a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.feature > p { color: var(--muted); }
.feature .text-link { margin-top: auto; }
.checks { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.checks li { position: relative; padding: 0.55rem 0 0.55rem 1.9rem; border-top: 1px solid var(--line); }
.checks li::before {
  content: ""; position: absolute; left: 0.2rem; top: 0.95rem; width: 0.9rem; height: 0.5rem;
  border-left: 2.5px solid var(--brand); border-bottom: 2.5px solid var(--brand); transform: rotate(-45deg);
}

.service-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0 2.5rem; }
@media (min-width: 720px) { .service-list { grid-template-columns: 1fr 1fr; } }
.service-list li { border-top: 2px solid var(--brand); padding: 1.25rem 0 1.5rem; }
.service-list h3 { font-size: var(--step-2); margin-bottom: 0.35rem; }
.service-list h3 a { text-decoration: none; display: inline-block; padding-block: 0.5rem; }
.service-list h3 a:hover { text-decoration: underline; }
.service-list p { color: var(--muted); margin: 0; }
.aside-line { margin-top: 1.5rem; font-weight: 600; }

/* Reviews */
.reviews { background: var(--white); border-block: 1px solid var(--line); }
.review-list { display: grid; gap: 1.25rem; margin-bottom: 1rem; }
@media (min-width: 800px) { .review-list { grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); } }
.review { margin: 0; padding: 1.5rem; background: var(--paper); border-radius: var(--radius-lg); display: flex; flex-direction: column; }
.review blockquote { margin: 0; }
.review blockquote p { font-size: var(--step-1); line-height: 1.5; margin: 0; }
.review.is-clamped blockquote p { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.review figcaption { margin-top: 1rem; font-weight: 700; }
.review-meta { display: block; font-weight: 400; color: var(--muted); font-size: var(--step--1); }
.review-stars { color: var(--marigold); -webkit-text-stroke: 0.6px #b47a00; font-size: 1.15rem; letter-spacing: 0.1em; margin-bottom: 0.6rem; }
.review-more {
  align-self: flex-start; margin-top: 0.5rem; min-height: 44px; padding: 0;
  background: none; border: 0; color: var(--brand); font: 700 var(--step--1) var(--font-body);
  text-decoration: underline; text-underline-offset: 0.18em; cursor: pointer;
}
.review.is-placeholder { border: 2px dashed #b4801d; background: #fdf6e7; }
.placeholder-label {
  align-self: flex-start; margin-bottom: 0.75rem; padding: 0.15rem 0.5rem;
  background: #7a4f00; color: var(--white); border-radius: 4px; font-size: 0.8125rem; font-weight: 700;
}

/* About teaser */
.about-grid { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 800px) { .about-grid { grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); gap: 4rem; } }
.about-grid p { max-width: 38rem; }

/* FAQ */
.faq { padding-top: 0; }
.faq-grid { display: grid; gap: 1rem; }
@media (min-width: 900px) { .faq-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 4rem; } }
.faq-list details { border-top: 1px solid var(--line); }
.faq-list details:last-child { border-bottom: 1px solid var(--line); }
.faq-list summary {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  min-height: 56px; padding: 0.85rem 0; cursor: pointer; list-style: none;
  font-weight: 700; font-size: var(--step-0);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: ""; flex: none; width: 0.6rem; height: 0.6rem; margin-right: 0.3rem;
  border-right: 2.5px solid var(--brand); border-bottom: 2.5px solid var(--brand); transform: rotate(45deg) translateY(-3px);
}
.faq-list details[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.faq-list details p { color: var(--muted); max-width: 40rem; }

/* Visit strip */
.visit { border-top: 1px solid var(--line); padding-block: 2.5rem; }
.visit-grid { display: grid; gap: 1rem 2.5rem; align-items: center; }
@media (min-width: 900px) { .visit-grid { grid-template-columns: auto 1fr 1fr auto; } }
.visit h2 { font-size: var(--step-2); margin: 0; }
.visit-item { margin: 0; }
.visit .btn { justify-self: start; }

/* Final CTA */
.final-cta { background: var(--brand); color: var(--on-dark); padding-block: clamp(3rem, 7vw, 5rem); }
.final-cta h2 { color: var(--on-dark); font-size: var(--step-4); max-width: 18ch; }
.final-cta p { color: var(--on-dark-muted); font-size: var(--step-1); }
.hero-call-light { color: var(--on-dark); }
.hero-call-light .hero-call-label { color: var(--on-dark-muted); }

/* Footer */
.site-footer { background: var(--brand-deep); color: var(--on-dark-muted); padding-block: 3rem 1.5rem; font-size: var(--step--1); }
.site-footer a { color: var(--on-dark); }
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr 0.7fr; } }
.footer-name { font-family: var(--font-display); font-size: var(--step-1); color: var(--on-dark); line-height: 1.3; }
.footer-title { font-family: var(--font-body); font-size: var(--step--1); font-weight: 700; color: var(--on-dark); margin-bottom: 0.75rem; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer address a { display: inline-flex; align-items: center; min-height: 44px; }
.hours-footer div { border-color: rgba(255, 255, 255, 0.15); }
.footer-base { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, 0.15); }
.footer-base p { margin: 0; }

/* Inner page hero */
.page-hero { padding-block: clamp(1.5rem, 4vw, 3rem) clamp(2rem, 5vw, 3.5rem); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.25rem); line-height: 1.08; max-width: 22ch; }
.lede { font-size: var(--step-1); color: var(--muted); max-width: 40rem; }
.page-hero .hero-actions { margin-top: 1.25rem; }
@media (max-width: 559px) {
  .lede { font-size: var(--step-0); }
  .page-hero .hero-actions .btn { width: 100%; }
}

.breadcrumbs ol { list-style: none; margin: 0 0 0.75rem; padding: 0; display: flex; flex-wrap: wrap; font-size: var(--step--1); }
.breadcrumbs li { display: flex; align-items: center; }
.breadcrumbs li + li::before { content: "/"; margin-inline: 0.5rem; color: var(--muted); }
.breadcrumbs a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); }
.breadcrumbs a[aria-current="page"] { color: var(--ink); text-decoration: none; }

/* Long-form page content with a side card */
.content-grid { display: grid; gap: 2.5rem; padding-block: clamp(2.5rem, 6vw, 4.5rem); }
@media (min-width: 960px) { .content-grid { grid-template-columns: minmax(0, 1fr) 20rem; gap: 4.5rem; align-items: start; } }
.prose { max-width: 42rem; }
.prose > section + section { margin-top: 2.75rem; }
.prose h2 { margin-bottom: 0.6em; }
.prose h3 { font-size: var(--step-1); margin: 1.5em 0 0.4em; }
.prose ul { padding-left: 1.25rem; margin: 0 0 1em; }
.prose li { margin-bottom: 0.4em; }
.prose li::marker { color: var(--brand); }
.prose .checks { padding-left: 0; }
.note { padding: 1rem 1.25rem; background: var(--white); border-left: 4px solid var(--ribbon); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.callout { padding: clamp(1.25rem, 3vw, 1.75rem); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.callout h2 { font-size: var(--step-2); }

.side-card { position: sticky; top: calc(var(--header-h) + 1.5rem); }
.side-card .office-body { padding: 1.25rem 1.5rem; }
.side-card .btn { width: 100%; margin-bottom: 0.75rem; }
.side-card .side-phone { display: block; font-family: var(--font-display); font-size: var(--step-2); text-decoration: none; margin-bottom: 1rem; min-height: 44px; }
.side-card .side-phone:hover { text-decoration: underline; }
@media (max-width: 959px) { .side-card { position: static; } }

.page-faq { padding-top: 0; }

/* Closing CTA with hours */
.cta-grid { display: grid; gap: 2.5rem; }
@media (min-width: 900px) { .cta-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: end; gap: 4rem; } }
.cta-hours h3 { font-family: var(--font-body); color: var(--on-dark); font-size: var(--step--1); font-weight: 700; }
.cta-hours p { font-size: var(--step--1); margin-top: 0.75rem; }
.hours-dark div { border-color: rgba(255, 255, 255, 0.2); }

/* Services overview */
.overview { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
@media (min-width: 760px) { .overview { grid-template-columns: 1fr 1fr; } }
.overview > li { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.25rem, 3vw, 1.75rem); display: flex; flex-direction: column; }
.overview > li.is-main { border-top: 6px solid var(--brand); }
.overview h2 { font-size: var(--step-2); }
.overview h2 a { text-decoration: none; }
.overview h2 a:hover { text-decoration: underline; }
.overview p { color: var(--muted); }
.overview .text-link { margin-top: auto; }

/* Map: Google embed, lazy-loaded by the browser as it scrolls into view */
.map-wrap { display: grid; gap: 1.5rem; }
@media (min-width: 860px) { .map-wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); align-items: start; gap: 3rem; } }
.map-frame { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); background: var(--brand-soft); }
.map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.areas { columns: 2; padding-left: 1.25rem; }

/* About */
.about-hero-grid { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 860px) { .about-hero-grid { grid-template-columns: minmax(0, 1fr) 18rem; gap: 4rem; } }
.badge-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
@media (min-width: 640px) { .badge-grid { grid-template-columns: 1fr 1fr; } }
.badge-grid li {
  display: flex; align-items: center; gap: 0.9rem; min-height: 4.5rem;
  padding: 0.85rem 1rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); font-weight: 600;
}
.badge-slot { flex: none; width: 3rem; height: 3rem; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-family: var(--font-display); font-size: 1.1rem; }

/* Contact */
.contact-grid { display: grid; gap: 2.5rem; padding-block: clamp(2rem, 5vw, 3.5rem); }
@media (min-width: 960px) { .contact-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 4rem; align-items: start; } }
.contact-list { margin: 0 0 1.5rem; }
.contact-list > div { padding: 1rem 0; border-top: 1px solid var(--line); }
.contact-list dt { font-weight: 700; font-size: var(--step--1); color: var(--muted); }
.contact-list dd { margin: 0.2rem 0 0; }
.big-phone { font-family: var(--font-display); font-size: clamp(1.9rem, 1.4rem + 2vw, 2.5rem); text-decoration: none; display: inline-flex; min-height: 48px; align-items: center; }
.big-phone:hover { text-decoration: underline; }
.contact-list .hours { margin: 0.25rem 0 0; }
.contact-list .hours div:first-child { border-top: 0; }

/* Consultation form */
.form-card { background: var(--white); border: 1px solid var(--line); border-top: 6px solid var(--brand); border-radius: var(--radius-lg); padding: clamp(1.25rem, 4vw, 2.25rem); }
.form-card h2 { margin-bottom: 0.35em; }
.progress { display: flex; gap: 0.5rem; list-style: none; margin: 0 0 1.5rem; padding: 0; font-size: var(--step--1); font-weight: 700; color: var(--muted); }
.progress li { flex: 1; padding-top: 0.6rem; border-top: 4px solid var(--line); }
.progress li.is-current, .progress li.is-done { border-color: var(--brand); color: var(--brand); }
html:not(.js) .progress { display: none; }
fieldset { border: 0; margin: 0 0 1.5rem; padding: 0; min-width: 0; }
legend { font-family: var(--font-display); font-size: var(--step-2); color: var(--brand); margin-bottom: 0.75rem; padding: 0; }
.choice-grid { display: grid; gap: 0.6rem; }
@media (min-width: 560px) { .choice-grid { grid-template-columns: 1fr 1fr; } }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice span {
  display: flex; align-items: center; min-height: 56px; padding: 0.75rem 1rem;
  border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); font-weight: 600; line-height: 1.3;
}
.choice input:hover + span { border-color: var(--brand); }
.choice input:checked + span { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.choice input:checked + span::after { content: ""; margin-left: auto; width: 0.85rem; height: 0.45rem; border-left: 2.5px solid var(--brand); border-bottom: 2.5px solid var(--brand); transform: rotate(-45deg) translateY(-2px); flex: none; }
.choice input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: 2px; }
.choice-inline { grid-template-columns: 1fr 1fr; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 700; margin-bottom: 0.35rem; }
.field .hint { font-weight: 400; color: var(--muted); }
.field input, .field textarea {
  width: 100%; min-height: 48px; padding: 0.7rem 0.85rem;
  font: inherit; color: var(--ink); background: var(--white);
  border: 2px solid #8296a3; border-radius: var(--radius-sm);
}
.field textarea { min-height: 7.5rem; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.field [aria-invalid="true"] { border-color: #a4231b; }
.error { color: #a4231b; font-weight: 600; font-size: var(--step--1); margin: 0.35rem 0 0; }
.privacy { padding: 0.9rem 1rem; background: #fff7e6; border-left: 4px solid var(--marigold); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: var(--step--1); }
.form-nav { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.btn-back { background: transparent; border-color: var(--brand); color: var(--brand); }
.js .form-step[hidden] { display: none; }
html:not(.js) .js-only { display: none; }
.form-success h2 { margin-bottom: 0.4em; }

/* 404 */
.not-found { padding-block: clamp(3rem, 8vw, 6rem); }
.not-found ul { padding-left: 1.25rem; }

/* Mobile bottom bar */
.mobile-bar { display: none; }
@media (max-width: 899px) {
  .mobile-bar {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: 0.5rem var(--gutter) calc(0.5rem + env(safe-area-inset-bottom));
    background: var(--white); border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px -16px rgba(2, 50, 78, 0.5);
    transition: transform 0.2s ease;
  }
  .mobile-bar .btn { padding-inline: 0.5rem; font-size: 1rem; white-space: nowrap; }
  .mobile-bar.is-hidden { transform: translateY(110%); }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

.overview + .callout { margin-top: 2rem; }
.field-legend { font-family: var(--font-body); font-size: var(--step-0); font-weight: 700; color: var(--ink); margin-bottom: 0.35rem; }
.section-head-sub { color: var(--muted); }
@media (max-width: 959px) { .contact-grid > .form-card { order: -1; } }

/* Heading font on non-heading elements */
legend, .hero-call-number, .office-name, .footer-name, .side-phone, .big-phone, .badge-slot { font-weight: var(--display-weight); }

/* Proudly Portuguese */
.callout-pt { border-top: 6px solid var(--ribbon); }
.callout-pt p:last-child { margin-bottom: 0; }
.callout-pt h2 { font-size: var(--step-3); }

/* Review rating line and Show all button */
.review-summary { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; font-weight: 700; font-size: var(--step-1); color: var(--ink); margin: -0.75rem 0 0; }
.review-summary .review-stars { margin: 0; }
.review-show-all { margin: 0.25rem 0 1rem; }
.review[hidden] { display: none; }
