/* =========================================================
   Patrimonial (patrimonial.uy)
   Architectural Editorial Design System
   Strict 2-font pairing (Newsreader + Plus Jakarta Sans)
   Strict 3-size body scale below hero
   ========================================================= */

:root {
  /* Color system: Cool Architectural Limestone + Deep Marine Ink + Sovereign Satin Brass */
  --bg-page: #F5F6F3;
  --bg-surface: #ECEFE9;
  --bg-marine: #0A1525;
  --bg-marine-soft: #112138;

  --ink-primary: #0D1B2A;
  --ink-muted: #4A5A6A;
  --ink-on-dark: #F3F5F8;
  --ink-on-dark-muted: #B6C2D1;

  --accent-dark: #7C5D1C;
  --accent-brass: #C8A24B;
  --accent-gold: #E4C571;

  --rule: rgba(13, 27, 42, 0.14);
  --rule-strong: rgba(13, 27, 42, 0.28);
  --rule-dark: rgba(243, 245, 248, 0.16);

  /* Typography: 2 families max */
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* 3-size body scale below hero */
  --text-heading: clamp(2rem, 3.6vw, 3.125rem);
  --text-body: 1rem;
  --text-sm: 0.875rem;

  /* Layout & Motion */
  --maxw: 1240px;
  --pad-x: clamp(1.25rem, 4vw, 3rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-marine);
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.62;
  color: var(--ink-primary);
  background-color: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

/* =========================================================
   HEADER (Borderless over hero, solid marine on scroll)
   ========================================================= */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  color: var(--ink-on-dark);
  background-color: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 220ms var(--ease), border-color 220ms var(--ease);
}

.site-header.is-scrolled,
.site-header.is-solid {
  background-color: rgba(10, 21, 37, 0.95);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--rule-dark);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 78px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

/* Wordmark exempt from 3-size body limit: clearly larger & stronger than links */
.brand-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1;
  color: var(--ink-on-dark);
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: clamp(0.85rem, 1.45vw, 1.65rem);
}

.nav-desktop a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink-on-dark-muted);
  position: relative;
  padding-block: 0.25rem;
  white-space: nowrap;
  transition: color 180ms var(--ease);
}

.nav-desktop a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background-color: var(--accent-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms var(--ease);
}

.nav-desktop a:hover,
.nav-desktop a:focus-visible {
  color: var(--ink-on-dark);
  outline: none;
}

.nav-desktop a:hover::after,
.nav-desktop a:focus-visible::after {
  transform: scaleX(1);
}

.nav-desktop a.nav-cross {
  padding-left: 1rem;
  border-left: 1px solid rgba(243, 245, 248, 0.22);
  color: var(--ink-on-dark);
}

.nav-desktop a.nav-cross-secondary {
  color: var(--ink-on-dark);
}

.nav-desktop a.nav-cross:hover,
.nav-desktop a.nav-cross:focus-visible,
.nav-desktop a.nav-cross-secondary:hover,
.nav-desktop a.nav-cross-secondary:focus-visible {
  color: var(--accent-gold);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

/* Connected segmented language switch (non-button cluster) */
.lang-switch {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(243, 245, 248, 0.22);
  border-radius: 6px;
  padding: 2px;
  background-color: rgba(10, 21, 37, 0.35);
}

.lang-switch button {
  border: 0;
  background: transparent;
  color: var(--ink-on-dark-muted);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 0.3rem 0.625rem;
  border-radius: 4px;
  cursor: pointer;
  line-height: 1.2;
  transition: background-color 180ms var(--ease), color 180ms var(--ease);
}

.lang-switch button:hover {
  color: var(--ink-on-dark);
}

.lang-switch button.is-active {
  background-color: var(--accent-gold);
  color: var(--bg-marine);
}

.btn-header {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 0.56rem 1.15rem;
  border-radius: 6px;
  background-color: var(--accent-gold);
  color: var(--bg-marine);
  white-space: nowrap;
  transition: background-color 180ms var(--ease), transform 180ms var(--ease);
}

.btn-header:hover {
  background-color: #EFE0A9;
  transform: translateY(-1px);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  position: relative;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(243, 245, 248, 0.24);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.menu-line {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 1.5px;
  margin-left: -9px;
  margin-top: -0.75px;
  background-color: var(--ink-on-dark);
  transform-origin: center;
  transition: transform 200ms var(--ease), opacity 200ms var(--ease);
}

.menu-line:first-child {
  transform: translateY(-4px);
}

.menu-line:last-child {
  transform: translateY(4px);
}

.menu-toggle[aria-expanded="true"] .menu-line:first-child {
  transform: translateY(0) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-line:last-child {
  transform: translateY(0) rotate(-45deg);
}

@media (min-width: 1025px) {
  .mobile-nav {
    display: none !important;
  }
}

.mobile-nav {
  background-color: var(--bg-marine);
  border-top: 1px solid var(--rule-dark);
  border-bottom: 1px solid var(--rule-dark);
  padding-block: 1.5rem 2rem;
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-nav-inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.mobile-nav nav {
  display: flex;
  flex-direction: column;
}

.mobile-nav nav a {
  padding-block: 0.85rem;
  border-bottom: 1px solid var(--rule-dark);
  color: var(--ink-on-dark);
  font-size: var(--text-body);
  font-weight: 500;
}

.mobile-nav nav a.nav-cross-mobile {
  color: var(--accent-gold);
}

.mobile-nav-cta {
  width: 100%;
}

/* =========================================================
   PRIMARY BUTTONS (Max 1 primary CTA per content section)
   ========================================================= */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.75rem;
  border-radius: 6px;
  border: 1px solid transparent;
  background-color: var(--bg-marine);
  color: var(--ink-on-dark);
  font-size: var(--text-body);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 180ms var(--ease), color 180ms var(--ease), transform 180ms var(--ease);
}

.btn-primary:hover {
  background-color: #172B47;
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-hero,
.btn-on-dark {
  background-color: var(--accent-gold);
  color: var(--bg-marine);
}

.btn-hero:hover,
.btn-on-dark:hover {
  background-color: #EFE0A9;
}

.btn-full {
  width: 100%;
}

/* =========================================================
   HERO: Full-bleed photographic takeover from y = 0
   ========================================================= */

.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
  padding-block: 8rem clamp(4.5rem, 9vh, 7rem);
  background-color: var(--bg-marine);
  color: var(--ink-on-dark);
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 55% 42%;
}

/* Balanced architectural gradient: keeps real Montevideo daylight crisp while preserving high contrast on nav & left headline */
.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 21, 37, 0.64) 0%, rgba(10, 21, 37, 0.14) 22%, rgba(10, 21, 37, 0.24) 52%, rgba(10, 21, 37, 0.84) 100%),
    linear-gradient(90deg, rgba(10, 21, 37, 0.82) 0%, rgba(10, 21, 37, 0.5) 48%, rgba(10, 21, 37, 0.08) 78%);
}

.hero-stage {
  position: relative;
  z-index: 1;
}

.hero-copy {
  max-width: min(46rem, 60vw);
}

/* Hero H1 exempt from 3-size body discipline: architectural scale */
.hero-copy h1 {
  font-family: var(--font-display);
  font-size: clamp(3.15rem, 6.6vw, 6rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.032em;
  color: var(--ink-on-dark);
  margin-bottom: 1.75rem;
  animation: hero-rise 680ms var(--ease) both;
}

.hero-sub {
  font-size: var(--text-body);
  line-height: 1.65;
  color: var(--ink-on-dark-muted);
  max-width: 48ch;
  margin-bottom: 2.25rem;
  animation: hero-rise 680ms 90ms var(--ease) both;
}

.btn-hero {
  animation: hero-rise 680ms 160ms var(--ease) both;
}

@keyframes hero-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================================
   SECTIONS & SHARED TYPOGRAPHY (3-size discipline)
   ========================================================= */

.section {
  padding-block: clamp(4.75rem, 8.5vw, 7.5rem);
  scroll-margin-top: 78px;
}

.section-light {
  background-color: var(--bg-page);
  color: var(--ink-primary);
}

.section-surface {
  background-color: var(--bg-surface);
  color: var(--ink-primary);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.section-marine {
  background-color: var(--bg-marine);
  color: var(--ink-on-dark);
}

.section h2 {
  font-family: var(--font-display);
  font-size: var(--text-heading);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.025em;
  max-width: 28ch;
}

.section-intro {
  font-size: var(--text-body);
  color: var(--ink-muted);
  max-width: 58ch;
  margin-top: 1.15rem;
}

.section-header-left {
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

/* =========================================================
   SCOPE OVERVIEW (Asymmetric Editorial Split)
   ========================================================= */

.scope-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.82fr);
  gap: clamp(2.5rem, 5vw, 5.5rem);
  align-items: start;
}

.scope-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem 2.5rem;
  margin-top: 3rem;
}

.scope-item {
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}

.scope-icon {
  width: 22px;
  height: 22px;
  color: var(--accent-dark);
  margin-bottom: 0.85rem;
}

.scope-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.scope-item h3 {
  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-weight: 600;
  color: var(--ink-primary);
  margin-bottom: 0.4rem;
}

.scope-item p {
  font-size: var(--text-sm);
  color: var(--ink-muted);
  line-height: 1.6;
}

.scope-figure {
  position: sticky;
  top: 108px;
}

.scope-image-frame {
  overflow: hidden;
  border-radius: 6px;
  background-color: var(--bg-surface);
  aspect-ratio: 3 / 4;
}

.scope-image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
}

.scope-figure figcaption {
  font-size: var(--text-sm);
  color: var(--ink-muted);
  margin-top: 0.9rem;
  line-height: 1.55;
  max-width: 42ch;
}

/* =========================================================
   SERVICES LEDGER (Interactive Tariff Index)
   ========================================================= */

.catalog-header {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 0;
}

.catalog-controls {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem 1.5rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 0.75rem;
}

/* Clean underline tab strip (non-button cluster) */
.filter-tabs {
  display: flex;
  align-items: center;
  gap: 0.75rem 1.75rem;
  flex-wrap: wrap;
}

.tab-btn {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
  border: 0;
  background: transparent;
  padding: 0.45rem 0 0.75rem;
  margin-bottom: -0.8rem;
  font-size: var(--text-body);
  font-weight: 500;
  color: var(--ink-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 180ms var(--ease), border-color 180ms var(--ease);
}

.tab-btn:hover {
  color: var(--ink-primary);
}

.tab-btn.is-active {
  color: var(--ink-primary);
  font-weight: 600;
  border-bottom-color: var(--accent-dark);
}

.tab-count {
  font-size: var(--text-sm);
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.catalog-search-wrap {
  position: relative;
  width: min(100%, 320px);
}

.search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  stroke: var(--ink-muted);
  stroke-width: 1.8;
  pointer-events: none;
}

.catalog-search-wrap input {
  width: 100%;
  padding: 0.58rem 0.9rem 0.58rem 2.45rem;
  font-size: var(--text-sm);
  background-color: var(--bg-page);
  border: 1px solid var(--rule-strong);
  border-radius: 6px;
  color: var(--ink-primary);
  transition: border-color 180ms var(--ease), background-color 180ms var(--ease);
}

.catalog-search-wrap input::placeholder {
  color: var(--ink-muted);
}

.catalog-search-wrap input:focus {
  outline: none;
  border-color: var(--bg-marine);
  background-color: #FFFFFF;
}

/* Ledger table/rows */
.ledger {
  border-top: 0;
}

.ledger-row {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(165px, 0.6fr) auto;
  align-items: center;
  gap: 1rem 1.75rem;
  padding: 1.35rem 0.75rem;
  border-bottom: 1px solid var(--rule);
  transition: background-color 180ms var(--ease), box-shadow 240ms var(--ease);
}

.ledger-row:hover {
  background-color: rgba(13, 27, 42, 0.035);
}

.ledger-row.is-highlighted {
  background-color: rgba(200, 162, 75, 0.14);
  box-shadow: inset 3px 0 0 var(--accent-dark);
}

.ledger-main {
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
  min-width: 0;
}

.ledger-icon {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-page);
  border: 1px solid rgba(13, 27, 42, 0.16);
  color: var(--bg-marine);
  transition: border-color 180ms var(--ease), color 180ms var(--ease), background-color 180ms var(--ease);
}

.ledger-icon svg {
  width: 24px;
  height: 24px;
  display: block;
}

.ledger-row:hover .ledger-icon {
  border-color: rgba(124, 93, 28, 0.45);
  color: var(--accent-dark);
  background-color: #FFFFFF;
}

.ledger-info {
  min-width: 0;
}

.ledger-info h3 {
  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-weight: 600;
  color: var(--ink-primary);
  margin-bottom: 0.2rem;
}

.ledger-desc {
  font-size: var(--text-sm);
  color: var(--ink-muted);
  max-width: 60ch;
}

.ledger-more-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.45rem;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--accent-dark);
  text-decoration: underline;
  text-decoration-color: rgba(124, 93, 28, 0.38);
  text-underline-offset: 3px;
  transition: color 180ms var(--ease), text-decoration-color 180ms var(--ease);
}

.ledger-more-link:hover,
.ledger-more-link:focus-visible {
  color: var(--ink-primary);
  text-decoration-color: var(--ink-primary);
  outline: none;
}

.ledger-cat {
  display: inline-block;
  font-size: var(--text-sm);
  color: var(--accent-dark);
  font-weight: 500;
  margin-bottom: 0.2rem;
}

.ledger-price-col {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.ledger-price {
  display: block;
  font-size: var(--text-body);
  font-weight: 700;
  color: var(--ink-primary);
  white-space: nowrap;
}

.ledger-unit {
  display: block;
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

.ledger-action {
  justify-self: end;
}

.row-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.58rem 1.15rem;
  border-radius: 6px;
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  border: 1px solid var(--bg-marine);
  background-color: var(--bg-marine);
  color: var(--ink-on-dark);
  transition: background-color 180ms var(--ease), color 180ms var(--ease), border-color 180ms var(--ease);
}

.row-cta:hover {
  background-color: var(--accent-dark);
  border-color: var(--accent-dark);
}

.row-cta.is-quote {
  background-color: transparent;
  color: var(--ink-primary);
  border-color: var(--rule-strong);
}

.row-cta.is-quote:hover {
  border-color: var(--ink-primary);
  background-color: rgba(13, 27, 42, 0.05);
}

.ledger-empty {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--ink-muted);
  font-size: var(--text-body);
  border-bottom: 1px solid var(--rule);
}

.ledger-footnote {
  margin-top: 1.5rem;
  font-size: var(--text-sm);
  color: var(--ink-muted);
  max-width: 65ch;
}

/* =========================================================
   ABOUT / WHITE-LABEL (Deep Marine Stage)
   ========================================================= */

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}

.about-lead h2 {
  color: var(--ink-on-dark);
}

.about-prose {
  font-size: var(--text-body);
  color: var(--ink-on-dark-muted);
  max-width: 52ch;
  margin-top: 1.25rem;
  margin-bottom: 2.25rem;
}

.about-pillars {
  border-top: 1px solid var(--rule-dark);
}

.pillar-row {
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--rule-dark);
}

.pillar-row h3 {
  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-weight: 600;
  color: var(--accent-gold);
  margin-bottom: 0.4rem;
}

.pillar-row p {
  font-size: var(--text-body);
  color: var(--ink-on-dark-muted);
  max-width: 58ch;
}

/* =========================================================
   PROCESS (4 Sequential Steps)
   ========================================================= */

.process-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
}

.process-step {
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule-strong);
}

.step-index {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--text-heading);
  line-height: 1;
  color: var(--accent-dark);
  margin-bottom: 1rem;
  font-variant-numeric: tabular-nums;
}

.process-step h3 {
  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-weight: 600;
  color: var(--ink-primary);
  margin-bottom: 0.5rem;
}

.process-step p {
  font-size: var(--text-body);
  color: var(--ink-muted);
}

/* =========================================================
   FAQ (Editorial Accordion)
   ========================================================= */

.faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.faq-intro {
  position: sticky;
  top: 108px;
}

.faq-list {
  border-top: 1px solid var(--rule-strong);
}

.faq-item {
  border-bottom: 1px solid var(--rule);
}

.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.4rem;
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
  font-size: var(--text-body);
  font-weight: 600;
  color: var(--ink-primary);
  transition: color 180ms var(--ease);
}

.faq-q:hover {
  color: var(--accent-dark);
}

.faq-icon {
  flex-shrink: 0;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--accent-dark);
  transition: transform 220ms var(--ease);
}

.faq-item.is-open .faq-icon {
  transform: rotate(45deg);
}

.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 240ms var(--ease);
}

.faq-item.is-open .faq-a {
  grid-template-rows: 1fr;
}

.faq-a-inner {
  overflow: hidden;
}

.faq-a p {
  padding-bottom: 1.45rem;
  font-size: var(--text-body);
  color: var(--ink-muted);
  max-width: 60ch;
}

/* =========================================================
   CONTACT (Asymmetric Consultation)
   ========================================================= */

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: start;
}

.contact-meta {
  margin-top: 2.5rem;
  border-top: 1px solid var(--rule);
}

.meta-row {
  padding-block: 1rem;
  border-bottom: 1px solid var(--rule);
}

.meta-row dt {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink-primary);
  margin-bottom: 0.2rem;
}

.meta-row dd {
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

.meta-row dd a {
  color: var(--ink-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-row-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.field label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink-primary);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.8rem 0.95rem;
  background-color: #FFFFFF;
  border: 1px solid var(--rule-strong);
  border-radius: 6px;
  font-size: var(--text-body);
  color: var(--ink-primary);
  transition: border-color 180ms var(--ease), box-shadow 180ms var(--ease);
}

.field select {
  cursor: pointer;
}

.field textarea {
  resize: vertical;
  min-height: 120px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--bg-marine);
  box-shadow: 0 0 0 3px rgba(13, 27, 42, 0.1);
}

.consent-check {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: var(--text-sm);
  color: var(--ink-muted);
  line-height: 1.5;
  cursor: pointer;
}

.consent-check input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin-top: 0.2rem;
  flex-shrink: 0;
  accent-color: var(--bg-marine);
  cursor: pointer;
}

.consent-check a {
  color: var(--ink-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.consent-check a:hover {
  color: var(--accent-dark);
}

.consent-check-modal {
  margin-top: 0.15rem;
}

.form-submit-row {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.form-sla-note {
  font-size: var(--text-sm);
  color: var(--ink-muted);
  text-align: center;
}

.contact-form[hidden],
.form-success-card[hidden] {
  display: none;
}

.form-success-card {
  padding: 2rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--rule-strong);
  border-top: 3px solid var(--accent-dark);
  border-radius: 6px;
}

.success-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: var(--bg-marine);
  color: var(--accent-gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.form-success-card h3 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 500;
  color: var(--ink-primary);
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.success-lead {
  font-size: var(--text-body);
  color: var(--ink-muted);
  margin-bottom: 1.25rem;
}

.success-summary {
  border-top: 1px solid var(--rule);
  margin-bottom: 1.15rem;
}

.success-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.55rem;
  border-bottom: 1px solid var(--rule);
  font-size: var(--text-sm);
}

.success-summary-row dt {
  color: var(--ink-muted);
  font-weight: 500;
}

.success-summary-row dd {
  color: var(--ink-primary);
  font-weight: 600;
  text-align: right;
}

.success-sla {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--accent-dark);
  margin-bottom: 1.25rem;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.72rem 1.35rem;
  border-radius: 6px;
  border: 1px solid var(--rule-strong);
  background-color: #FFFFFF;
  color: var(--ink-primary);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: border-color 180ms var(--ease), background-color 180ms var(--ease);
}

.btn-secondary:hover {
  border-color: var(--bg-marine);
  background-color: var(--bg-page);
}

/* =========================================================
   LEGAL VIEWS (Terms & Privacy)
   ========================================================= */

.legal-view {
  min-height: 75vh;
  padding-block: 8.5rem 5.5rem;
  background-color: var(--bg-page);
  color: var(--ink-primary);
}

.legal-view[hidden] {
  display: none;
}

.legal-container {
  max-width: 780px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 2rem;
  padding: 0;
  transition: color 180ms var(--ease);
}

.back-btn:hover {
  color: var(--ink-primary);
}

.legal-title {
  font-family: var(--font-display);
  font-size: var(--text-heading);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule-strong);
}

.legal-prose h3 {
  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-weight: 700;
  color: var(--ink-primary);
  margin-top: 2rem;
  margin-bottom: 0.55rem;
}

.legal-prose p,
.legal-prose li {
  font-size: var(--text-body);
  color: var(--ink-muted);
  max-width: 65ch;
  margin-bottom: 0.75rem;
}

.legal-prose ul {
  padding-left: 1.35rem;
  margin-bottom: 1rem;
}

.legal-prose b,
.legal-prose strong {
  color: var(--ink-primary);
  font-weight: 600;
}

/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
  background-color: var(--bg-marine);
  color: var(--ink-on-dark);
  padding-block: 4.5rem 2.5rem;
  border-top: 1px solid var(--rule-dark);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2.5rem;
}

.footer-tagline {
  font-size: var(--text-sm);
  color: var(--ink-on-dark-muted);
  margin-top: 1rem;
  max-width: 34ch;
}

.footer-col h3 {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink-on-dark);
  margin-bottom: 1rem;
}

.footer-col a {
  display: block;
  font-size: var(--text-sm);
  color: var(--ink-on-dark-muted);
  margin-bottom: 0.65rem;
  transition: color 180ms var(--ease);
}

.footer-col a:hover {
  color: var(--accent-gold);
}

.footer-bottom {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule-dark);
  font-size: var(--text-sm);
  color: var(--ink-on-dark-muted);
}

.footer-bottom a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* =========================================================
   CHECKOUT MODAL
   ========================================================= */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background-color: rgba(10, 21, 37, 0.74);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.modal-overlay[hidden] {
  display: none;
}

.modal-dialog {
  width: 100%;
  max-width: 560px;
  max-height: calc(100dvh - 2.5rem);
  overflow-y: auto;
  background-color: var(--bg-page);
  color: var(--ink-primary);
  border-radius: 8px;
  padding: 1.55rem 1.85rem;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
}

.modal-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.modal-title {
  font-family: var(--font-display);
  font-size: var(--text-heading);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.modal-service-name {
  font-size: var(--text-body);
  color: var(--ink-muted);
  margin-top: 0.25rem;
}

.modal-close {
  border: 0;
  background: transparent;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--ink-muted);
  cursor: pointer;
  padding: 0.15rem 0.4rem;
  transition: color 180ms var(--ease);
}

.modal-close:hover {
  color: var(--ink-primary);
}

.modal-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  margin-block: 1.05rem;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule-strong);
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

.modal-price {
  font-size: var(--text-body);
  font-weight: 700;
  color: var(--ink-primary);
  font-variant-numeric: tabular-nums;
}

#checkout-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

#checkout-form .field input,
#checkout-form .field textarea {
  padding: 0.68rem 0.85rem;
}

#checkout-form .field textarea {
  min-height: 76px;
}

.modal-pay-heading {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink-primary);
  margin-top: 0.2rem;
}

.pay-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.pay-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.85rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--rule-strong);
  background-color: #FFFFFF;
  cursor: pointer;
  transition: border-color 180ms var(--ease), transform 180ms var(--ease), background-color 180ms var(--ease);
}

.pay-option:hover {
  border-color: var(--bg-marine);
  background-color: var(--bg-surface);
  transform: translateY(-1px);
}

.pay-brand {
  font-size: var(--text-body);
  font-weight: 700;
  color: var(--ink-primary);
}

.pay-dlocal span {
  color: var(--accent-dark);
}

.pay-paypal span {
  color: #005EA6;
}

.pay-sub {
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

.modal-terms {
  font-size: var(--text-sm);
  color: var(--ink-muted);
  text-align: center;
  margin-top: 0.35rem;
}

.modal-b2b-alt {
  margin-top: 0.65rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--rule);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.modal-b2b-alt p {
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

.modal-b2b-btn {
  border: 0;
  background: transparent;
  padding: 0.25rem 0.5rem;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color 180ms var(--ease);
}

.modal-b2b-btn:hover {
  color: var(--ink-primary);
}

/* =========================================================
   TOAST
   ========================================================= */

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%) translateY(calc(100% + 2.5rem));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 300;
  background-color: var(--bg-marine);
  color: var(--ink-on-dark);
  border: 1px solid rgba(228, 197, 113, 0.5);
  border-radius: 6px;
  padding: 0.85rem 1.35rem;
  font-size: var(--text-sm);
  font-weight: 600;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
  transition: transform 240ms var(--ease), opacity 200ms var(--ease), visibility 200ms var(--ease);
  max-width: calc(100vw - 2rem);
  text-align: center;
}

.toast.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* =========================================================
   SCROLL REVEAL (Always legible at rest if JS slow/disabled)
   ========================================================= */

.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 480ms var(--ease), transform 480ms var(--ease);
}

.js-ready .reveal {
  opacity: 0;
  transform: translateY(18px);
}

.js-ready .reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   RESPONSIVE BREAKPOINTS
   ========================================================= */

@media (max-width: 1024px) {
  .nav-desktop,
  .btn-header {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .scope-layout,
  .about-layout,
  .faq-layout,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .scope-figure,
  .faq-intro {
    position: static;
  }

  .scope-image-frame {
    max-width: 480px;
  }

  .process-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .header-inner {
    height: 70px;
    gap: 0.75rem;
  }

  .brand-name {
    font-size: 1.35rem;
  }

  .hero {
    min-height: 100dvh;
    padding-block: 7rem 3.75rem;
  }

  .hero-copy {
    max-width: 100%;
  }

  .hero-photo {
    object-position: 50% 32%;
  }

  .hero-veil {
    background:
      linear-gradient(180deg, rgba(10, 21, 37, 0.66) 0%, rgba(10, 21, 37, 0.18) 28%, rgba(10, 21, 37, 0.58) 52%, rgba(10, 21, 37, 0.94) 84%, rgba(10, 21, 37, 0.97) 100%);
  }

  .scope-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .catalog-controls {
    align-items: stretch;
    padding-bottom: 1rem;
  }

  .filter-tabs {
    gap: 0.5rem 1.15rem;
  }

  .tab-btn {
    padding: 0.35rem 0 0.45rem;
    margin-bottom: 0;
  }

  .catalog-search-wrap {
    width: 100%;
  }

  .ledger-row {
    grid-template-columns: 1fr;
    gap: 0.85rem;
    padding: 1.25rem 0.25rem;
  }

  .ledger-icon {
    width: 46px;
    height: 46px;
  }

  .ledger-icon svg {
    width: 21px;
    height: 21px;
  }

  .ledger-price-col {
    text-align: left;
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
  }

  .ledger-action {
    justify-self: start;
    width: 100%;
  }

  .row-cta {
    width: 100%;
  }

  .process-grid,
  .form-row-two,
  .pay-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .modal-dialog {
    padding: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js-ready .reveal {
    opacity: 1;
    transform: none;
  }
}
