/* =============================================================
   Ucartz: company profile site
   Design language: Anthropic-style editorial layout on Ucartz's
   own palette: warm off-white ground, blue-black ink, Aurogen-blue
   accent. Serif display (Fraunces) + grotesk body (Hanken Grotesk).
   No images: all visuals are CSS / inline SVG / canvas.
   To re-theme, edit only the colour tokens below.
   ============================================================= */

/* ---------- Tokens ---------- */
:root {
  --ivory:       #F3F1EC;   /* page background (warm off-white) */
  --ivory-deep:  #E9E6DE;   /* alternating section background */
  --paper:       #FBFAF7;   /* cards / inputs */
  --ink:         #16181D;   /* primary text (blue-black) */
  --ink-soft:    #3E4149;   /* body text */
  --ink-faint:   #5B5E67;   /* muted / labels; darkened for WCAG AA contrast on --ivory-deep */
  --line:        rgba(22,24,29, 0.12);
  --line-strong: rgba(22,24,29, 0.24);
  --accent:      #1E5FD8;   /* Ucartz blue */
  --accent-deep: #1A4FB0;   /* hover / links */
  --accent-wash: #DCE6FB;   /* tints */
  --warm-2:      #C98A4B;   /* sand: avatar variety only */

  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans:  "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --wrap:      1180px;
  --wrap-tight: 780px;
  --gutter:    clamp(1.25rem, 5vw, 4rem);
  --section-y: clamp(4rem, 9vw, 8.5rem);
  --radius:    12px;
  --radius-sm: 8px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink-soft);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-optical-sizing: auto;
  color: var(--ink);
  font-weight: 460;
  line-height: 1.12;
  letter-spacing: -0.018em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 6vw, 4.7rem); line-height: 1.04; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.85rem, 3.6vw, 2.9rem); }
h3 { font-size: clamp(1.2rem, 1.6vw, 1.4rem); font-weight: 500; letter-spacing: -0.01em; }
h4 { font-family: var(--font-sans); font-size: 0.8rem; font-weight: 600;
     text-transform: uppercase; letter-spacing: 0.13em; color: var(--ink-faint); }

/* Small uppercase label look, for headings that must stay correctly nested
   (h3, not h4) but read as a minor label rather than a heading. */
.h-label {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--ink-faint);
}

p { text-wrap: pretty; }
a { color: var(--accent-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

strong { color: var(--ink); font-weight: 600; }

svg { display: block; }

::selection { background: var(--accent); color: var(--ivory); }

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

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

.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;
}

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-deep);
  display: inline-block;
  margin-bottom: 1.1rem;
}

.lead {
  font-size: clamp(1.15rem, 1.7vw, 1.35rem);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: min(46ch, 100%);
}

.muted { color: var(--ink-faint); }

/* Placeholder marker: anything still needing real Aurogen content.
   Kept subtle so layout still reads true; find them all with
   grep 'class="todo"' or search TODO across the repo. */
.todo {
  border-bottom: 1px dashed color-mix(in srgb, currentColor 38%, transparent);
  cursor: help;
}

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--ivory);
  --btn-bd: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  border: 1px solid var(--btn-bd);
  background: var(--btn-bg);
  color: var(--btn-fg);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn:hover { transform: translateY(-2px); color: var(--btn-fg); }
.btn::after { content: "\2192"; font-weight: 400; transition: transform 0.2s var(--ease); }
.btn:hover::after { transform: translateX(3px); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-bd: var(--line-strong);
}
.btn--ghost:hover { --btn-bg: rgba(22,24,29,0.05); }

.btn--accent { --btn-bg: var(--accent); --btn-fg: #fff; --btn-bd: var(--accent); }
.btn--accent:hover { --btn-bg: var(--accent-deep); --btn-bd: var(--accent-deep); }

.btn--sm { padding: 0.6rem 1.05rem; font-size: 0.9rem; }
.btn--sm::after { content: none; }

.btn--invert { --btn-bg: var(--ivory); --btn-fg: var(--ink); --btn-bd: var(--ivory); }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 2rem; }

/* ---------- Site header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--ivory) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.wordmark-mark {
  display: block;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}
.wordmark-mark svg { display: block; width: 100%; height: 100%; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.site-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
}
.site-nav a:not(.btn):hover { color: var(--ink); }
/* the Contact button keeps its own colours inside the nav */
.site-nav a.btn,
.site-nav a.btn:hover { color: var(--btn-fg); }
.site-nav a:not(.btn).is-current,
.site-nav a:not(.btn)[aria-current="page"] { color: var(--ink); }
.site-nav a:not(.btn).is-current::after,
.site-nav a:not(.btn)[aria-current="page"]::after {
  content: "";
  display: block;
  height: 2px;
  background: var(--accent);
  margin-top: 2px;
}

.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  padding: 0;
  place-items: center;
}
.nav-toggle span:not(.sr-only) {
  display: block;
  width: 18px; height: 2px;
  background: var(--ink);
  margin: 2px auto;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Sections ---------- */
.section { padding-block: var(--section-y); border-top: 1px solid var(--line); }
.section:first-of-type { border-top: 0; }
.section--alt { background: var(--ivory-deep); }
.section--ink { background: var(--ink); color: rgba(244,241,234,0.72); border-top: 0; }
.section--ink h1, .section--ink h2, .section--ink h3 { color: var(--ivory); }
.section--ink .eyebrow { color: #E7A98F; }
.section--accent { background: var(--accent); color: rgba(255,255,255,0.85); border-top: 0; }
.section--accent h1, .section--accent h2 { color: #fff; }
.section--accent .eyebrow { color: rgba(255,255,255,0.8); }

.section-head { max-width: 42rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head p { margin-top: 1rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(4rem, 11vw, 9rem) var(--section-y);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.5rem, 6vw, 4.5rem);
  align-items: center;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 430px); }
}
.hero-inner { max-width: 40ch; }
.hero-inner h1 { margin-bottom: 1.5rem; }
.hero-inner .lead { max-width: 44ch; }

/* ---------- Hero figure: animated AI / service stack ---------- */
.hero-figure { width: 100%; max-width: 430px; margin-inline: auto; }
.hero-figure svg { width: 100%; height: auto; color: var(--ink); overflow: visible; }
@media (max-width: 719px) { .hero-figure { display: none; } }

.hf-struct { stroke: currentColor; stroke-opacity: 0.4; }
.hf-accent { stroke: var(--accent); }
.hf-accent-fill { fill: var(--accent); }
.hf-panel { fill: var(--paper); stroke: currentColor; stroke-opacity: 0.4; }
.hf-label {
  fill: var(--ink-faint);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.13em;
}

@keyframes hf-spin  { to { transform: rotate(360deg); } }
@keyframes hf-flow  { to { stroke-dashoffset: -20; } }
@keyframes hf-led   { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }
@keyframes hf-type  { 0%, 12% { transform: scaleX(0.05); } 55%, 100% { transform: scaleX(1); } }
@keyframes hf-rise1 { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translateY(-42px); opacity: 0; } }
@keyframes hf-rise2 { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translateY(-40px); opacity: 0; } }
@keyframes hf-pulse { 0%, 100% { transform: scale(1); opacity: 0.9; } 50% { transform: scale(1.18); opacity: 1; } }
@keyframes hf-climb { 0% { transform: translate(0, 0); opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { transform: translate(126px, -156px); opacity: 0; } }
@keyframes hf-scan  { 0% { transform: translateX(0); opacity: 0; } 10% { opacity: 0.5; } 90% { opacity: 0.5; } 100% { transform: translateX(272px); opacity: 0; } }

.hf-ring   { animation: hf-spin 24s linear infinite; transform-box: fill-box; transform-origin: center; }
.hf-flow   { stroke-dasharray: 3 6; animation: hf-flow 1s linear infinite; }
.hf-led    { animation: hf-led 2.6s ease-in-out infinite; }
.hf-line   { transform-box: fill-box; transform-origin: left center; animation: hf-type 4.2s ease-in-out infinite; }
.hf-rise1  { transform-box: fill-box; animation: hf-rise1 2.4s ease-in infinite; }
.hf-rise2  { transform-box: fill-box; animation: hf-rise2 2.4s ease-in infinite 1.2s; }
.hf-hub    { transform-box: fill-box; transform-origin: center; animation: hf-pulse 3s ease-in-out infinite; }
.hf-climb  { transform-box: fill-box; animation: hf-climb 5s ease-in-out infinite; }
.hf-scan   { transform-box: fill-box; animation: hf-scan 4.5s ease-in-out infinite; }

/* ---------- Stat band ---------- */
.stat-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat {
  background: var(--ivory);
  padding: 1.75rem 1.5rem;
  text-align: center;
}
.section--alt .stat { background: var(--ivory-deep); }
.stat-num {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 3.5vw, 2.7rem);
  color: var(--ink);
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat-label {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}

/* ---------- Grids ---------- */
.grid { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); }
.grid > * { min-width: 0; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------- Feature (icon motif + copy) ---------- */
.feature-icon {
  width: 46px; height: 46px;
  color: var(--accent);
  margin-bottom: 1.1rem;
}
.feature h3 { margin-bottom: 0.5rem; }
.feature p { font-size: 0.98rem; }

/* ---------- Cards ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 2.5vw, 2rem);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
a.card, .card--link { text-decoration: none; color: inherit; display: block; }
a.card:hover, .card--link:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: 0 16px 40px -22px rgba(22,24,29,0.35);
}
.card h3 { margin-bottom: 0.4rem; }
.card p { font-size: 0.96rem; }
.card-motif { width: 100%; height: 128px; color: var(--accent); margin-bottom: 1.25rem; }
.card-tag {
  font-size: 0.72rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--ink-faint);
}

/* ---------- Photo grid (real property photos, used sparingly) ---------- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.75rem, 2vw, 1.25rem);
  margin-top: 2rem;
}
.photo-grid figure { margin: 0; }
.photo-grid img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  display: block;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.photo-grid figcaption {
  margin-top: 0.6rem;
  font-size: 0.82rem;
  color: var(--ink-faint);
  text-align: center;
}
@media (max-width: 720px) { .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px) { .photo-grid { grid-template-columns: 1fr; } .photo-grid img { height: 260px; } }

/* ---------- Rate table (real, published rate cards) ---------- */
.table-wrap { overflow-x: auto; margin-top: 1.5rem; }
.rate-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.rate-table th, .rate-table td {
  text-align: left;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.rate-table th:first-child, .rate-table td:first-child { padding-left: 0; }
.rate-table th:last-child, .rate-table td:last-child { padding-right: 0; }
.rate-table th {
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
}
.rate-table td { font-size: 0.96rem; }
.rate-table td:first-child {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--ink);
  white-space: nowrap;
}
.rate-table td:last-child {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--ink);
  white-space: nowrap;
}
.rate-table td:last-child span {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---------- Timeline ---------- */
.timeline { position: relative; margin-top: 1rem; }
.timeline::before {
  content: "";
  position: absolute;
  left: 7px; top: 6px; bottom: 6px;
  width: 2px;
  background: var(--line-strong);
}
.timeline-item {
  position: relative;
  padding-left: 2.75rem;
  padding-bottom: 2.75rem;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: 0; top: 4px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--ivory);
  border: 3px solid var(--accent);
}
.timeline-year {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--ink);
}
.timeline-item h3 { margin: 0.15rem 0 0.35rem; }
.timeline-item p { font-size: 0.98rem; max-width: 54ch; }

.history-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: stretch;
}
.history-aside {
  display: flex;
  align-items: center;
  justify-content: center;
}
.history-aside svg {
  width: 100%;
  height: auto;
  max-height: 100%;
  color: var(--ink);
}
@media (max-width: 900px) {
  .history-grid { grid-template-columns: 1fr; }
  .history-aside { display: none; }
}

/* ---------- People ---------- */
.person { text-align: left; }
.avatar {
  --a1: #E6D4BD;          /* warm sand: JS overrides per person */
  --a2: var(--warm-2);
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--a1), var(--a2));
  color: #fff;
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
  user-select: none;
}
.person-name { font-family: var(--font-serif); font-size: 1.2rem; color: var(--ink); }
.person-role { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent-deep); margin-top: 0.15rem; }
.person-bio { font-size: 0.95rem; margin-top: 0.6rem; }

/* ---------- Quotes ---------- */
.quote {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.quote-text {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.5;
  color: var(--ink);
}
.quote-text::before { content: "\201C"; }
.quote-text::after  { content: "\201D"; }
.quote-attr { margin-top: 1rem; font-size: 0.9rem; color: var(--ink-faint); }
.quote-attr strong { display: block; color: var(--ink); font-family: var(--font-sans); }

/* ---------- Venture rows ---------- */
.venture-row {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) auto;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  padding-block: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
}
.venture-row:last-child { border-bottom: 1px solid var(--line); }
.venture-motif { width: 100%; height: 120px; color: var(--accent); }
.venture-body h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); margin-bottom: 0.4rem; }
.venture-body .card-tag { margin-bottom: 0.6rem; display: block; }

.partner-stays {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 2rem;
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.partner-stays p { flex: 1 1 260px; font-size: 0.95rem; }
.partner-stays .btn-row { margin-top: 0; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.form-field { margin-bottom: 1.25rem; }
.form-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  margin-bottom: 0.4rem;
}
.form-field input,
.form-field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.8rem 0.95rem;
}
.form-field textarea { min-height: 150px; resize: vertical; }
.form-field input:focus,
.form-field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }

.contact-detail { margin-bottom: 1.6rem; }
.contact-detail h2, .contact-detail h3 { margin-bottom: 0.35rem; }
.contact-detail a, .contact-detail p { font-size: 0.98rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ivory-deep);
  border-top: 1px solid var(--line);
  padding-block: clamp(3rem, 6vw, 5rem) 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 2.5rem;
}
.footer-brand p { font-size: 0.92rem; margin-top: 1rem; max-width: 30ch; }
.footer-col { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-col h3 { margin-bottom: 0.4rem; }
.footer-col a { font-size: 0.92rem; color: var(--ink-soft); text-decoration: none; }
.footer-col a:hover { color: var(--ink); }
.footer-legal {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--ink-faint);
}

/* ---------- Modal (concept preview) ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}
.modal[hidden] { display: none; }
.modal.is-open { opacity: 1; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(22, 24, 29, 0.62);
  -webkit-backdrop-filter: blur(3px);
          backdrop-filter: blur(3px);
}
.modal-panel {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0.75rem;
  max-width: min(90vw, 460px);
  box-shadow: 0 30px 80px -30px rgba(22, 24, 29, 0.55);
  transform: translateY(8px) scale(0.985);
  transition: transform 0.25s var(--ease);
}
.modal.is-open .modal-panel { transform: none; }
.modal-panel img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  max-height: 76vh;
  width: auto;
  height: auto;
  border-radius: calc(var(--radius) - 4px);
}
.modal-cap {
  font-size: 0.85rem;
  color: var(--ink-faint);
  text-align: center;
  padding: 0.6rem 0.25rem 0.15rem;
}
.modal-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--ivory);
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.modal-close:hover { background: var(--ivory-deep); }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- WhatsApp float button (property pages) ---------- */
.whatsapp-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 150;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.15rem 0.85rem 0.85rem;
  background: #25D366;
  color: #fff;
  border-radius: 999px;
  box-shadow: 0 10px 30px -8px rgba(22, 24, 29, 0.45);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.whatsapp-float:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -8px rgba(22, 24, 29, 0.52); }
.whatsapp-float svg { width: 26px; height: 26px; flex-shrink: 0; }
.whatsapp-float span { white-space: nowrap; }
@media (max-width: 640px) {
  .whatsapp-float { right: 14px; bottom: 14px; padding: 0.8rem; }
  .whatsapp-float span { display: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid--2 { grid-template-columns: 1fr; gap: 2rem; }
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .stat-band { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .venture-row { grid-template-columns: 120px minmax(0, 1fr); }
  .venture-row .btn { grid-column: 2; justify-self: start; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .nav-toggle { display: grid; }
  .site-nav {
    position: fixed;
    inset: 68px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--ivory);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem var(--gutter) 1.5rem;
    transform: translateY(-120%);
    transition: transform 0.3s var(--ease);
  }
  .site-nav.is-open { transform: none; }
  .site-nav a { padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
  .site-nav a.btn { margin-top: 1rem; justify-content: center; border-bottom: 1px solid var(--ink); }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .footer-legal { flex-direction: column; }
}

/* ---------- Motion / print ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  /* Freeze the hero figure in a clean resting state */
  .hf-ring, .hf-flow, .hf-led, .hf-line, .hf-rise1, .hf-rise2, .hf-hub, .hf-climb, .hf-scan {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .hf-scan { opacity: 0 !important; }
}
