/* =========================================================================
   Despacho Díaz & Zeledón — Design System
   ---------------------------------------------------------------------
   Concept: "The Ledger" — the visual vocabulary of an audit ledger book.
   A precise ink-navy + paper palette, a verified-blue accent standing in
   for the auditor's checkmark, and a muted brass used only for the
   accreditation seal. Ruled "ledger lines" mark section rhythm the way
   ruled paper marks rows in a ledger; services are numbered like folio
   entries, because they genuinely are an itemised list of lines of work.
   ========================================================================= */

:root {
  /* Color */
  --ink: #0F2438;         /* primary dark navy */
  --ink-2: #16324A;       /* panel navy */
  --ink-3: #1D3F5C;       /* hover navy */
  --paper: #F5F6F3;       /* cool paper background (not warm cream) */
  --paper-2: #FFFFFF;
  --verified: #154177;    /* "verified / audited" accent blue */
  --verified-dark: #0F3560;
  --seal: #B08D3E;        /* muted brass — reserved for the seal motif */
  --text: #16232E;
  --text-muted: #57697A;
  --text-on-ink: #E9EDEF;
  --text-on-ink-muted: #A9B8C4;
  --line: rgba(15, 36, 56, 0.12);
  --line-on-ink: rgba(233, 237, 239, 0.16);

  /* Type */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Source Serif 4', Georgia, serif;
  --font-label: 'Montserrat', system-ui, sans-serif;

  /* Layout */
  --container-pad: 1.25rem;
  --radius: 10px;
  --radius-lg: 18px;
  --shadow-soft: 0 12px 32px -16px rgba(15, 36, 56, 0.28);
  --shadow-card: 0 2px 0 rgba(15, 36, 56, 0.05), 0 18px 40px -24px rgba(15, 36, 56, 0.35);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

html {
  overflow-x: hidden;
  width: 100%;
}

*,*::before,*::after{ box-sizing: border-box; }

body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--paper);
  font-size: 1.05rem;
  line-height: 1.7;
}

img, video, iframe, svg {
  max-width: 100%;
}

h1, h2, h3, h4, h5, h6,
.font-display {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.font-label, .eyebrow, .folio-number, .stat-number, .navbar-brand .brand-sub {
  font-family: var(--font-label);
}

a { color: var(--verified-dark); text-decoration-color: rgba(15,53,96,0.35); }
a:hover { color: var(--verified); }

.skip-link{
  position: fixed; top: -60px; left: 1rem; z-index: 2000;
  background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 6px;
  transition: top .2s ease;
}
.skip-link:focus{ top: 1rem; }

:focus-visible {
  outline: 3px solid var(--verified);
  outline-offset: 2px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--verified-dark);
  font-weight: 500;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--seal);
  display: inline-block;
}

/* =========================================================================
   Ledger-line signature motif
   A ruled horizontal rhythm with a tick + folio dot, standing in for the
   ruled rows of a ledger page. Used at section seams throughout the site.
   ========================================================================= */
.ledger-rule {
  position: relative;
  height: 1px;
  background: repeating-linear-gradient(
    to right,
    var(--line) 0, var(--line) 10px,
    transparent 10px, transparent 22px
  );
  margin: 0;
}
.ledger-rule--on-ink {
  background: repeating-linear-gradient(
    to right,
    var(--line-on-ink) 0, var(--line-on-ink) 10px,
    transparent 10px, transparent 22px
  );
}
.section-seam {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 0 2.5rem;
}
.section-seam .ledger-rule { flex: 1 1 auto; }
.section-seam .folio-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--verified); flex: none;
}

/* =========================================================================
   Header / Navbar
   ========================================================================= */
.site-header {
  position: sticky; top: 0; z-index: 1030;
  background: rgba(0, 0, 0, 0.5);
  transition: background-color .35s ease, box-shadow .35s ease, padding .25s ease;
}
.site-header.is-scrolled,
.site-header.is-inner {
  background: rgba(245, 246, 243, 0.5);
  backdrop-filter: saturate(140%) blur(10px);
  box-shadow: 0 1px 0 var(--line), 0 12px 24px -20px rgba(15,36,56,.4);
}
.navbar { padding: 1.1rem 0; transition: padding .25s ease; }
.site-header.is-scrolled .navbar,
.site-header.is-inner .navbar { padding: .7rem 0; }

.navbar-brand { display: flex; align-items: center; gap: .75rem; white-space: normal; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  height: 42px; width: auto;
  flex: none;
}
.brand-mark img { height: 100%; width: auto; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-name {
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
  color: var(--ink);
}
.site-header:not(.is-scrolled):not(.is-inner) .brand-name,
.site-header:not(.is-scrolled):not(.is-inner) .nav-link {
  color: #fff;
}
.brand-sub { font-size: .62rem; letter-spacing: .04em; color: var(--text-muted); }
.site-header:not(.is-scrolled):not(.is-inner) .brand-sub { color: rgba(255,255,255,.75); }

.nav-link {
  color: var(--ink); font-weight: 500; font-size: .95rem;
  padding: .5rem .9rem !important; position: relative;
}
.nav-link.active, .nav-link:hover { color: var(--verified-dark); }
.site-header:not(.is-scrolled):not(.is-inner) .nav-link.active,
.site-header:not(.is-scrolled):not(.is-inner) .nav-link:hover { color: #fff; }
.site-header:not(.is-scrolled):not(.is-inner) .nav-link.active::after {
  content:""; position:absolute; left:.9rem; right:.9rem; bottom:.2rem; height:1px; background:#fff;
}
.nav-link.active:not(.btn)::after {
  content:""; position:absolute; left:.9rem; right:.9rem; bottom:.2rem; height:1px; background: var(--verified-dark);
}

.btn-cta {
  background: var(--verified); color: #fff !important; border: 1px solid var(--verified);
  border-radius: 999px; padding: .55rem 1.15rem !important; font-weight: 500; font-size: .92rem;
}
.btn-cta:hover { background: var(--verified-dark); border-color: var(--verified-dark); }

.dropdown-menu { border: 1px solid var(--line); box-shadow: var(--shadow-soft); border-radius: var(--radius); }
.dropdown-item:active, .dropdown-item:hover { background: var(--paper); color: var(--verified-dark); }

/* =========================================================================
   Hero — video background banner
   ========================================================================= */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--ink);
  margin-top: -84px; /* pull up under sticky header for full-bleed */
}
.hero-media {
  position: absolute; inset: 0; width: 100%; height: 100%;
  overflow: hidden;
}
.hero-media video,
.hero-media img.hero-fallback {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero-media::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(15,36,56,.78) 0%, rgba(15,36,56,.62) 38%, rgba(15,36,56,.88) 100%);
}
.hero-content { position: relative; z-index: 2; color: #fff; padding-top: 84px; }
.hero .eyebrow { color: #CFE0F2; }
.hero .eyebrow::before { background: var(--seal); }
.hero h1 {
  color: #fff;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.06;
  max-width: 15ch;
}
.hero .lede {
  color: rgba(255,255,255,.86);
  font-size: 1.15rem;
  max-width: 46ch;
  margin-top: 1.1rem;
}
.hero-actions { margin-top: 2.1rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.btn-outline-paper {
  border: 1px solid rgba(255,255,255,.55); color: #fff; border-radius: 999px;
  padding: .75rem 1.5rem; font-weight: 500;
}
.btn-outline-paper:hover { background: #fff; color: var(--ink); }
.btn-verified {
  background: var(--verified); border: 1px solid var(--verified); color: #fff;
  border-radius: 999px; padding: .75rem 1.5rem; font-weight: 500;
}
.btn-verified:hover { background: var(--verified-dark); border-color: var(--verified-dark); color:#fff; }

.hero-badge {
  position: absolute; right: clamp(1rem, 4vw, 4rem); bottom: 2.5rem; z-index: 2;
  display: none;
}
@media (min-width: 992px) { .hero-badge { display: block; } }

.scroll-cue {
  position: absolute; left: 50%; bottom: 1.6rem; transform: translateX(-50%);
  z-index: 2; color: rgba(255,255,255,.7); font-family: var(--font-label); font-size: .7rem;
  letter-spacing: .12em; text-transform: uppercase; display: flex; flex-direction: column;
  align-items: center; gap: .4rem;
}
.scroll-cue .stem { width: 1px; height: 26px; background: rgba(255,255,255,.4); animation: scrollpulse 1.8s ease-in-out infinite; }
@keyframes scrollpulse { 0%,100%{ transform: scaleY(1); opacity:.4;} 50%{ transform: scaleY(1.3); opacity:1; } }

/* Seal / verification badge component */
.seal-badge {
  width: 118px; height: 118px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.35);
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  color: #fff; text-align: center; position: relative;
  background: rgba(255,255,255,.03);
}
.seal-badge::before {
  content:""; position: absolute; inset: 8px; border-radius: 50%; border: 1px dashed rgba(255,255,255,.3);
}
.seal-badge .n { font-family: var(--font-label); font-size: 1.5rem; color: var(--seal); line-height:1; }
.seal-badge small { font-size: .58rem; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.8); margin-top: .2rem; }

/* Inner page header (non-video) */
.page-header {
  position: relative;
  background-color: var(--ink);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
  padding: 9.5rem 0 4rem;
  margin-top: -84px;
  overflow: hidden;
}
.page-header::before{
  content:"";
  position:absolute; inset:0;
  background: linear-gradient(180deg, rgba(15,36,56,.90) 0%, rgba(15,36,56,.78) 45%, rgba(15,36,56,.92) 100%);
}
.page-header .container { position: relative; z-index: 1; }
.page-header .eyebrow { color: #CFE0F2; }
.page-header h1 { color: #fff; font-size: clamp(2rem, 4vw, 2.9rem); }
.page-header p.lede { color: rgba(255,255,255,.82); max-width: 60ch; }
.page-header p.lede a { color: #fff; text-decoration-color: var(--seal); font-weight: 500; }
.page-header p.lede a:hover { color: var(--seal); }
.page-header .ledger-rule--on-ink { margin-top: 2rem; }

/* =========================================================================
   Sections & general layout
   ========================================================================= */
.section { padding: 5.5rem 0; }
.section-sm { padding: 3.5rem 0; }
.section-ink { background: var(--ink); color: var(--text-on-ink); }
.section-ink h2, .section-ink h3 { color: #fff; }
.section-ink p { color: var(--text-on-ink-muted); }
.section-ink .eyebrow { color: var(--text-on-ink); }
.section-paper-2 { background: var(--paper-2); }

.section-heading { max-width: 62ch; margin-bottom: 3rem; }
.section-heading h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-top: .6rem; }
.section-heading p { color: var(--text-muted); margin-top: .9rem; font-size: 1.05rem; }

/* =========================================================================
   Stats strip (ledger row of figures)
   ========================================================================= */
.stats-strip {
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat-item { padding: 2rem 1rem; text-align: center; border-left: 1px solid var(--line); }
.stat-item:first-child { border-left: none; }
.stat-number {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem); color: var(--ink); font-weight: 500; display: block; line-height: 1;
}
.stat-number .unit { color: var(--verified); }
.stat-label { color: var(--text-muted); font-size: .82rem; margin-top: .5rem; text-transform: uppercase; letter-spacing: .06em; }

/* =========================================================================
   Cards
   ========================================================================= */
.card-service {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card-service:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); border-color: rgba(21,65,119,.3); }
.card-service .icon-tile {
  width: 52px; height: 52px; border-radius: 12px;
  background: rgba(21,65,119,.09); color: var(--verified-dark);
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
  margin-bottom: 1.25rem;
}
.card-service h3 { font-size: 1.15rem; margin-bottom: .6rem; }
.card-service p { color: var(--text-muted); font-size: .96rem; margin-bottom: 1rem; }
.card-service .card-link { font-family: var(--font-label); font-size: .82rem; margin-top: auto; align-self: flex-start; }

.card-value {
  padding: 1.75rem;
  border-top: 2px solid var(--seal);
  background: var(--paper-2);
  height: 100%;
  border-radius: 4px;
}
.card-value h3 { font-size: 1.05rem; }
.card-value p { color: var(--text-muted); font-size: .94rem; margin-bottom: 0; }

/* =========================================================================
   Services accordion (folio-style)
   ========================================================================= */
.folio-accordion .accordion-item {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}
.folio-accordion .accordion-item:first-of-type,
.folio-accordion .accordion-item:last-of-type { border-radius: 0; }
.folio-accordion .accordion-button {
  background: transparent; box-shadow: none; padding: 1.5rem .25rem;
  font-family: var(--font-display); font-weight: 600; color: var(--ink); font-size: 1.08rem;
}
.folio-accordion .accordion-button:not(.collapsed) { color: var(--verified-dark); background: transparent; box-shadow: none; }
.folio-accordion .accordion-button::after { filter: none; }
.folio-accordion .accordion-body { padding: 0 .25rem 1.75rem 2.85rem; color: var(--text-muted); }
.folio-number {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.3rem; height: 2.3rem; margin-right: 1rem; flex: none;
  border: 1px solid var(--line); border-radius: 50%;
  font-size: .8rem; color: var(--verified-dark);
}
.folio-accordion .accordion-button:not(.collapsed) .folio-number {
  background: var(--verified); color: #fff; border-color: var(--verified);
}

/* =========================================================================
   Portfolio sectors
   ========================================================================= */
.sector-card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem;
  height: 100%;
}
.sector-card .sector-eyebrow { display:flex; align-items:center; justify-content:space-between; margin-bottom: 1.25rem;}
.sector-count {
  font-family: var(--font-label); font-size: .75rem; color: var(--seal);
  border: 1px solid var(--line); border-radius: 999px; padding: .2rem .65rem;
  white-space: nowrap;
}
.client-list { list-style: none; padding: 0; margin: 0; }
.client-list li {
  padding: .55rem 0; border-bottom: 1px dashed var(--line);
  font-size: .93rem; display: flex; gap: .6rem; color: var(--text);
}
.client-list li:last-child { border-bottom: none; }
.client-list li i { color: var(--verified); margin-top: .3rem; flex: none; font-size: .8rem; }

/* =========================================================================
   Logo wall (logos.php) — CSS grid, since 8-per-row exceeds Bootstrap's
   default row-cols-6 ceiling.
   ========================================================================= */
.logo-wall {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 1rem;
}
.logo-tile {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  aspect-ratio: 3 / 2;
  display: flex; align-items: center; justify-content: center;
  padding: .85rem;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.logo-tile:hover { border-color: rgba(21,65,119,.35); box-shadow: var(--shadow-card); }
.logo-tile img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  filter: grayscale(100%); opacity: .72;
  transition: filter .25s ease, opacity .25s ease;
}
.logo-tile:hover img { filter: grayscale(0%); opacity: 1; }

@media (max-width: 1199.98px) { .logo-wall { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 767.98px)  { .logo-wall { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 460px)     { .logo-wall { grid-template-columns: repeat(2, 1fr); } }

/* =========================================================================
   Partner / team card
   ========================================================================= */
.partner-card {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; height: 100%;
}
.partner-photo { aspect-ratio: 4/5; overflow: hidden; }
.partner-photo img { width: 100%; height: 100%; object-fit: cover; }
.partner-body { padding: 1.75rem; }
.partner-body h3 { margin-bottom: .15rem; }
.partner-role { color: var(--verified-dark); font-family: var(--font-label); font-size: .82rem; margin-bottom: 1rem; display:block;}
.partner-creds { list-style: none; padding: 0; margin: 1rem 0 0; font-size: .88rem; color: var(--text-muted);}
.partner-creds li { padding-left: 1.4rem; position: relative; margin-bottom: .5rem;}
.partner-creds li::before { content: "✓"; position:absolute; left:0; color: var(--verified); font-weight: 700;}

/* =========================================================================
   Team grid (socios.php)
   ========================================================================= */
.team-card { text-align: center; }
.team-photo {
  aspect-ratio: 1/1; overflow: hidden; border-radius: 50%;
  border: 1px solid var(--line); margin: 0 auto 1rem; max-width: 148px;
}
.team-photo img { width: 100%; /*height: 100%; object-fit: cover;*/ display: block; background-color: white;}
.team-name { font-family: var(--font-display); font-weight: 600; color: var(--ink); font-size: .98rem; margin-bottom: .15rem; }
.team-role { font-family: var(--font-label); color: var(--verified-dark); font-size: .74rem; letter-spacing: .02em; margin-bottom: 0; }

/* =========================================================================
   Timeline (about page)
   ========================================================================= */
.timeline { position: relative; padding-left: 2.5rem; }
.timeline::before { content:""; position:absolute; left: 7px; top:.4rem; bottom:.4rem; width:1px; background: var(--line); }
.timeline-item { position: relative; padding-bottom: 2.25rem; }
.timeline-item:last-child{ padding-bottom: 0;}
.timeline-item::before {
  content:""; position:absolute; left:-2.5rem; top:.35rem; width:15px; height:15px; border-radius:50%;
  background: var(--paper); border: 2px solid var(--verified);
}
.timeline-year { font-family: var(--font-label); color: var(--seal); font-size:.85rem; display:block; margin-bottom:.25rem;}

/* =========================================================================
   CTA band
   ========================================================================= */
.cta-band {
  background: var(--ink); color: #fff; border-radius: var(--radius-lg);
  padding: 3.25rem; position: relative; overflow: hidden;
}
.cta-band::before{
  content:""; position:absolute; inset:0;
  background-image: repeating-linear-gradient(to right, rgba(233,237,239,.06) 0, rgba(233,237,239,.06) 1px, transparent 1px, transparent 48px);
}
.cta-band h2 { color:#fff; position:relative; }
.cta-band p { color: var(--text-on-ink-muted); position: relative; }
.cta-band .btn-verified, .cta-band .btn-outline-paper { position: relative; }

/* =========================================================================
   Contact page
   ========================================================================= */
.contact-panel {
  background: var(--ink); color: #fff; border-radius: var(--radius-lg);
  padding: 2.5rem; height: 100%;
}
.contact-panel h3 { color: #fff; }
.contact-info-item { display:flex; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line-on-ink); overflow-wrap: anywhere; }
.contact-info-item:last-child{ border-bottom:none; }
.contact-info-item i { color: var(--seal); font-size: 1.1rem; margin-top: .15rem; }
.contact-info-item a { color: #fff; }
.contact-info-item small { display:block; color: var(--text-on-ink-muted); font-family: var(--font-label); font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom:.2rem;}

.form-card {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 2.5rem;
}
.form-label { font-weight: 600; font-size: .88rem; color: var(--ink); }
.form-control, .form-select {
  border-radius: 8px; border: 1px solid var(--line); padding: .65rem .9rem; font-family: var(--font-body);
}
.form-control:focus, .form-select:focus {
  border-color: var(--verified); box-shadow: 0 0 0 .2rem rgba(21,65,119,.15);
}
.form-check-input:checked { background-color: var(--verified); border-color: var(--verified); }
.form-check-input:focus { box-shadow: 0 0 0 .2rem rgba(21,65,119,.15); }

#formFeedback[data-state="success"] { color: var(--verified-dark); }
#formFeedback[data-state="error"] { color: #B3261E; }

.map-frame {
  border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; height: 320px;
  position: relative; z-index: 1; isolation: isolate; background: var(--paper-2);
}
.map-frame iframe { width: 100%; height: 100%; border: 0; filter: grayscale(.15); display: block; }

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer { background: var(--ink); color: var(--text-on-ink-muted); padding-top: 4rem; position: relative; z-index: 1; isolation: isolate; }
.footer-ledger {
  height: 6px;
  margin-bottom: 3rem;
  background: repeating-linear-gradient(to right, var(--seal) 0 22px, transparent 22px 44px);
  opacity: .55;
}
.footer-mark { text-decoration: none; margin-bottom: 1rem; display:inline-flex; }
.footer-mark.brand-mark { height: 56px; }
.footer-name { color: #fff; font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; }
.footer-desc { font-size: .92rem; max-width: 34ch; }
.footer-heading {
  font-family: var(--font-label); text-transform: uppercase; letter-spacing: .08em; font-size: .72rem;
  color: #fff; margin-bottom: 1.1rem;
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .65rem; font-size: .92rem; }
.footer-links a { color: var(--text-on-ink-muted); }
.footer-links a:hover { color: #fff; }
.footer-contact li { display:flex; gap:.6rem; align-items:flex-start; overflow-wrap: anywhere; }
.footer-contact i { color: var(--seal); margin-top: .25rem; }
.social-links { display:flex; gap: .75rem; margin-top: 1.25rem; }
.social-links a {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-on-ink);
  display:flex; align-items:center; justify-content:center; color: #fff;
}
.social-links a:hover { background: var(--verified); border-color: var(--verified); }
.footer-bottom {
  border-top: 1px solid var(--line-on-ink); padding: 1.5rem 0; margin-top: 2.5rem; font-size: .82rem;
}
.footer-bottom .folio { font-family: var(--font-label); font-size: .72rem; letter-spacing: .04em; }

.back-to-top {
  position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 1040;
  width: 46px; height: 46px; border-radius: 50%; border: none;
  background: var(--ink); color: #fff; box-shadow: var(--shadow-soft);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--verified); }

/* =========================================================================
   Reveal-on-scroll (progressive enhancement; content visible without JS)
   ========================================================================= */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
  .reveal.is-visible { opacity: 1; transform: translateY(0); }
}

/* =========================================================================
   Responsive tweaks
   ========================================================================= */
@media (max-width: 991.98px) {
  .hero, .page-header { margin-top: -76px; }
  .hero-content, .page-header { padding-top: 6.5rem; }
  .site-header.is-scrolled .navbar, .navbar { padding: .85rem 0; }
  .navbar-collapse {
    background: var(--paper-2); margin-top: 1rem; padding: 1rem 1.25rem; border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
  }
  .site-header:not(.is-scrolled):not(.is-inner) .nav-link { color: var(--ink); }
  .site-header:not(.is-scrolled):not(.is-inner) .nav-link.active::after { background: var(--verified-dark); }
  .stat-item { border-left: none; border-top: 1px solid var(--line); }
  .stat-item:first-child { border-top: none; }
}

@media (max-width: 575.98px) {
  .section { padding: 3.5rem 0; }
  .cta-band { padding: 2.25rem 1.5rem; }
}
