/* ============================================================
   Vuka Africa Ribane Housing Developments — public site
   Design system by Vertex Automations
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  /* Palette — derived from logo, elevated */
  --ink:         #0B1B3F;          /* deep navy, primary */
  --ink-soft:    #1A2A52;
  --ink-line:    rgba(11,27,63,.14);
  --terracotta:  #C85A2A;          /* warm accent, from logo orange but richer */
  --terracotta-deep: #A54619;
  --terracotta-light: #E8A578;
  --ivory:       #F7F2EA;          /* warm background */
  --ivory-deep:  #EFE8DC;
  --paper:       #FBF8F2;
  --stone:       #8C8579;          /* muted */
  --stone-soft:  #B8B0A1;
  --charcoal:    #1B1D22;          /* body text */
  --charcoal-soft: #3A3D45;
  --white:       #FFFFFF;
  --green-ok:    #2B6A4A;
  --red-warn:    #A93226;

  /* Type */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body:    'Instrument Sans', -apple-system, system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'SF Mono', Consolas, monospace;

  /* Scale — fluid type */
  --step--2: clamp(0.75rem, 0.72rem + 0.15vw, 0.82rem);
  --step--1: clamp(0.85rem, 0.82rem + 0.18vw, 0.94rem);
  --step-0:  clamp(0.95rem, 0.92rem + 0.2vw, 1.05rem);
  --step-1:  clamp(1.1rem, 1.05rem + 0.3vw, 1.25rem);
  --step-2:  clamp(1.35rem, 1.25rem + 0.6vw, 1.65rem);
  --step-3:  clamp(1.7rem, 1.5rem + 1vw, 2.15rem);
  --step-4:  clamp(2.2rem, 1.85rem + 1.8vw, 3rem);
  --step-5:  clamp(2.9rem, 2.3rem + 3vw, 4.5rem);
  --step-6:  clamp(3.8rem, 2.8rem + 5vw, 6.5rem);
  --step-7:  clamp(5rem, 3.5rem + 7.5vw, 9rem);

  /* Space */
  --sp-1: 0.35rem;
  --sp-2: 0.7rem;
  --sp-3: 1.1rem;
  --sp-4: 1.6rem;
  --sp-5: 2.4rem;
  --sp-6: 3.5rem;
  --sp-7: 5rem;
  --sp-8: 7rem;
  --sp-9: 9rem;

  /* Radii */
  --r-sm: 4px;
  --r-md: 10px;
  --r-lg: 18px;

  /* Layout */
  --container: 1320px;
  --container-narrow: 880px;
  --gutter: clamp(1.25rem, 3vw, 2.5rem);
  --header-h: 84px;

  /* Motion */
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ---------- Reset-ish base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--charcoal);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: var(--ink); text-decoration: none; transition: color .2s var(--ease-out); }
a:hover { color: var(--terracotta); }

button { font-family: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
input, textarea, select, button { font-family: inherit; font-size: inherit; }

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

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--ivory);
  padding: 0.75rem 1.25rem; z-index: 999; text-decoration: none;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: normal;
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 var(--sp-3);
  font-variation-settings: "opsz" 144, "SOFT" 50;
}
h1 { font-size: var(--step-6); font-weight: 300; letter-spacing: -0.025em; }
h2 { font-size: var(--step-5); font-weight: 350; letter-spacing: -0.02em; }
h3 { font-size: var(--step-4); font-weight: 400; }
h4 { font-size: var(--step-3); font-weight: 400; }
h5 { font-size: var(--step-1); font-weight: 500; }

p { margin: 0 0 var(--sp-3); }
.lede { font-size: var(--step-2); line-height: 1.4; color: var(--charcoal-soft); font-weight: 300; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--terracotta);
  display: inline-flex;
  align-items: center;
  gap: 0.8em;
}
.eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--terracotta);
  display: inline-block;
}

.display-italic { font-style: italic; font-variation-settings: "opsz" 144, "SOFT" 100; color: var(--terracotta-deep); }

.muted { color: var(--stone); }
.small { font-size: var(--step--1); }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container--narrow { max-width: var(--container-narrow); }
.section { padding: var(--sp-8) 0; }
.section--tight { padding: var(--sp-7) 0; }
.section--hero { padding: 0; }
.section--dark { background: var(--ink); color: var(--ivory); }
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4, .section--dark h5 { color: var(--ivory); }
.section--paper { background: var(--paper); }
.section--ivory-deep { background: var(--ivory-deep); }

.grid { display: grid; gap: var(--sp-5); }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 1rem 1.8rem;
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 2px;
  text-decoration: none;
  transition: all .25s var(--ease-out);
  cursor: pointer;
  border: 1px solid transparent;
  line-height: 1;
  white-space: nowrap;
}
.btn--primary {
  background: var(--ink);
  color: var(--ivory);
}
.btn--primary:hover { background: var(--terracotta); color: var(--ivory); }
.btn--outline {
  border-color: var(--ink);
  color: var(--ink);
  background: transparent;
}
.btn--outline:hover { background: var(--ink); color: var(--ivory); }
.btn--ghost-light {
  border-color: rgba(247,242,234,.4);
  color: var(--ivory);
  background: transparent;
}
.btn--ghost-light:hover { background: var(--ivory); color: var(--ink); }
.btn--terracotta { background: var(--terracotta); color: var(--ivory); }
.btn--terracotta:hover { background: var(--terracotta-deep); }
.btn--sm { padding: 0.65rem 1.2rem; font-size: var(--step--1); }
.btn--lg { padding: 1.2rem 2.2rem; font-size: var(--step-1); }
.btn--block { width: 100%; justify-content: center; }

/* Link with arrow */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-weight: 500;
  font-size: var(--step-0);
  color: var(--ink);
  position: relative;
  padding-bottom: 0.2em;
}
.link-arrow::after {
  content: '→';
  transition: transform .3s var(--ease-out);
}
.link-arrow:hover::after { transform: translateX(6px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 242, 234, 0.85);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--ink-line);
  transition: background .3s var(--ease-out);
}
.site-header.is-scrolled {
  background: rgba(247, 242, 234, 0.95);
}
.site-header__bar {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}
.site-header__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink);
}
.site-header__brand img { height: 44px; width: auto; }
.site-header__wordmark { display: flex; flex-direction: column; line-height: 1; }
.site-header__wordmark-top {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 3px;
}
.site-header__wordmark-main {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  font-style: italic;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.site-nav { display: none; }
@media (min-width: 1080px) { .site-nav { display: block; } }
.site-nav__list { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--sp-5); }
.site-nav__list a {
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--ink);
  position: relative;
  padding: 0.4rem 0;
  transition: color .2s;
}
.site-nav__list a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--terracotta);
  transition: right .3s var(--ease-out);
}
.site-nav__list a:hover, .site-nav__list a.is-active { color: var(--terracotta); }
.site-nav__list a:hover::after, .site-nav__list a.is-active::after { right: 0; }

.site-header__actions { display: flex; align-items: center; gap: var(--sp-3); }
.site-header__menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
}
@media (min-width: 1080px) { .site-header__menu-toggle { display: none; } }
.menu-icon { display: inline-flex; flex-direction: column; gap: 4px; width: 22px; }
.menu-icon span { width: 22px; height: 2px; background: var(--ink); transition: all .3s var(--ease-out); transform-origin: center; }
[aria-expanded="true"] .menu-icon span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
[aria-expanded="true"] .menu-icon span:nth-child(2) { opacity: 0; }
[aria-expanded="true"] .menu-icon span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Mobile drawer ---------- */
.mobile-drawer {
  position: fixed;
  inset: 0;
  background: var(--ink);
  color: var(--ivory);
  z-index: 45;
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s var(--ease-out), visibility 0s linear .35s;
  overflow-y: auto;
}
.mobile-drawer.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity .35s var(--ease-out);
}
.mobile-drawer__inner {
  padding: calc(var(--header-h) + 2rem) var(--gutter) var(--sp-5);
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}
.mobile-drawer__head { display: flex; justify-content: space-between; align-items: center; }
.mobile-drawer__label {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--terracotta-light);
}
.mobile-drawer__close {
  font-size: 2rem;
  line-height: 1;
  color: var(--ivory);
  width: 44px;
  height: 44px;
}
.mobile-drawer__nav ol { list-style: none; padding: 0; margin: 0 0 var(--sp-5); }
.mobile-drawer__nav li { border-top: 1px solid rgba(247,242,234,0.1); }
.mobile-drawer__nav li:last-child { border-bottom: 1px solid rgba(247,242,234,0.1); }
.mobile-drawer__nav a {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
  color: var(--ivory);
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-weight: 300;
}
.mobile-drawer__nav .idx {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--terracotta-light);
}
.mobile-drawer__foot p { margin: 0.4rem 0; font-size: var(--step--1); }
.mobile-drawer__foot a { color: var(--ivory); }
.mobile-drawer__foot .muted { color: var(--stone-soft); }
body.drawer-open { overflow: hidden; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  background: var(--ink);
  color: var(--ivory);
  margin-top: calc(-1 * var(--header-h));
  padding-top: var(--header-h);
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__media video,
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(11,27,63,0.55) 0%,
    rgba(11,27,63,0.35) 30%,
    rgba(11,27,63,0.65) 80%,
    rgba(11,27,63,0.85) 100%);
  z-index: 1;
}
.hero__content {
  position: relative;
  z-index: 2;
  padding: var(--sp-6) 0 var(--sp-7);
}
.hero__eyebrow {
  color: var(--terracotta-light);
  margin-bottom: var(--sp-4);
}
.hero__eyebrow::before { background: var(--terracotta-light); }
.hero h1 {
  color: var(--ivory);
  margin-bottom: var(--sp-4);
  font-weight: 300;
  font-size: var(--step-7);
  letter-spacing: -0.03em;
  line-height: 0.95;
  max-width: 14ch;
}
.hero h1 .line { display: block; }
.hero h1 em {
  font-style: italic;
  color: var(--terracotta-light);
  font-variation-settings: "opsz" 144, "SOFT" 100;
}
.hero__subtext {
  max-width: 52ch;
  font-size: var(--step-1);
  color: rgba(247,242,234,0.85);
  font-weight: 300;
  margin-bottom: var(--sp-5);
  line-height: 1.5;
}
.hero__ctas { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.hero__meta {
  position: absolute;
  bottom: var(--sp-4);
  right: var(--gutter);
  z-index: 3;
  display: none;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(247,242,234,0.6);
}
@media (min-width: 900px) { .hero__meta { display: flex; } }
.hero__scroll {
  position: absolute;
  left: var(--gutter);
  bottom: var(--sp-4);
  z-index: 3;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(247,242,234,0.6);
  display: none;
}
@media (min-width: 900px) { .hero__scroll { display: block; } }
.hero__scroll::after {
  content: '';
  display: block;
  width: 1px;
  height: 60px;
  background: rgba(247,242,234,0.4);
  margin: 1rem auto 0;
}

/* ---------- Value / stats strip ---------- */
.stats-strip {
  border-top: 1px solid var(--ink-line);
  border-bottom: 1px solid var(--ink-line);
  padding: var(--sp-5) 0;
  background: var(--paper);
}
.stats-strip__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-4);
}
@media (min-width: 900px) { .stats-strip__grid { grid-template-columns: repeat(4, 1fr); } }
.stats-strip__item { border-left: 1px solid var(--ink-line); padding-left: var(--sp-4); }
.stats-strip__num {
  font-family: var(--font-display);
  font-size: var(--step-4);
  font-weight: 300;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 0.4rem;
  letter-spacing: -0.02em;
}
.stats-strip__num em { font-style: italic; color: var(--terracotta); }
.stats-strip__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stone);
}

/* ---------- Editorial heading pattern ---------- */
.section-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}
@media (min-width: 900px) {
  .section-head { grid-template-columns: 1fr 1.3fr; gap: var(--sp-6); align-items: end; }
}
.section-head__title h2 {
  margin: 0;
  font-weight: 300;
  letter-spacing: -0.025em;
}
.section-head__body { max-width: 55ch; }

/* ---------- House card ---------- */
.properties-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-5);
}
@media (min-width: 720px) { .properties-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .properties-grid { grid-template-columns: repeat(3, 1fr); } }

.house-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--white);
  transition: transform .45s var(--ease-out), box-shadow .4s var(--ease-out);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
}
.house-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px -20px rgba(11,27,63,0.18);
}
.house-card__image {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--ivory-deep);
}
.house-card__image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .9s var(--ease-out);
}
.house-card:hover .house-card__image img { transform: scale(1.04); }
.house-card__placeholder {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--ivory-deep) 0%, var(--ivory) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--stone);
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--step-2);
}
.house-card__cat {
  position: absolute;
  top: var(--sp-3);
  left: var(--sp-3);
  background: rgba(247,242,234,0.95);
  color: var(--ink);
  padding: 0.4rem 0.8rem;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.house-card__body {
  padding: var(--sp-4);
  flex: 1;
  display: flex;
  flex-direction: column;
}
.house-card__name {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0 0 0.4rem;
  color: var(--ink);
}
.house-card__tagline {
  font-style: italic;
  color: var(--terracotta-deep);
  font-family: var(--font-display);
  font-weight: 300;
  margin: 0 0 var(--sp-3);
  font-size: var(--step-0);
}
.house-card__specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  margin-top: auto;
  padding-top: var(--sp-3);
  border-top: 1px solid var(--ink-line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone);
}
.house-card__price {
  margin-top: var(--sp-3);
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 400;
  color: var(--ink);
}
.house-card__price .from {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--stone);
  display: block;
  margin-bottom: 0.2rem;
}
.house-card__price em { font-style: italic; color: var(--terracotta); font-weight: 300; }

/* ---------- Process steps ---------- */
.process-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--sp-4);
}
.process-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--sp-4);
  padding: var(--sp-5) 0;
  border-top: 1px solid var(--ink-line);
  align-items: start;
}
.process-step:last-child { border-bottom: 1px solid var(--ink-line); }
.process-step__num {
  font-family: var(--font-display);
  font-size: var(--step-5);
  font-weight: 300;
  font-style: italic;
  color: var(--terracotta);
  line-height: 0.9;
  font-variation-settings: "opsz" 144, "SOFT" 100;
  min-width: 4ch;
}
.process-step__title {
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-weight: 400;
  margin: 0 0 var(--sp-2);
  letter-spacing: -0.015em;
}
.process-step__body { max-width: 60ch; color: var(--charcoal-soft); }

/* ---------- Values / pillars ---------- */
.pillars {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
  border-top: 1px solid var(--ink-line);
}
@media (min-width: 720px) { .pillars { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .pillars { grid-template-columns: repeat(3, 1fr); } }
.pillar {
  padding: var(--sp-5) var(--sp-4);
  border-bottom: 1px solid var(--ink-line);
}
@media (min-width: 720px) { .pillar:nth-child(odd) { border-right: 1px solid var(--ink-line); } }
@media (min-width: 1080px) {
  .pillar { border-right: 1px solid var(--ink-line); }
  .pillar:nth-child(3n) { border-right: none; }
  .pillar:nth-child(odd) { border-right: 1px solid var(--ink-line); }
  .pillar:nth-child(3n) { border-right: none; }
}
.pillar__num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: var(--sp-3);
}
.pillar__title {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 400;
  margin: 0 0 var(--sp-2);
}
.pillar__body { color: var(--charcoal-soft); margin: 0; font-size: var(--step-0); }

/* ---------- Pull quote / scripture card ---------- */
.scripture {
  padding: var(--sp-7) var(--sp-4);
  text-align: center;
  background: var(--ink);
  color: var(--ivory);
}
.scripture__quote {
  font-family: var(--font-display);
  font-size: var(--step-4);
  font-style: italic;
  font-weight: 300;
  line-height: 1.25;
  max-width: 24ch;
  margin: 0 auto var(--sp-3);
  font-variation-settings: "opsz" 144, "SOFT" 100;
  color: var(--ivory);
}
.scripture__quote::before { content: '\201C'; color: var(--terracotta); font-size: 1.2em; line-height: 0; vertical-align: -0.2em; margin-right: 0.05em; }
.scripture__quote::after { content: '\201D'; color: var(--terracotta); font-size: 1.2em; line-height: 0; vertical-align: -0.2em; margin-left: 0.05em; }
.scripture__attr {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--terracotta-light);
}

/* ---------- Applications / forms / inputs ---------- */
.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
}
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="number"],
.field input[type="date"],
.field input[type="password"],
.field select,
.field textarea {
  width: 100%;
  padding: 1rem 1.1rem;
  border: 1px solid var(--ink-line);
  border-radius: 2px;
  background: var(--white);
  color: var(--charcoal);
  font-size: var(--step-0);
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(11,27,63,0.08);
}
.field textarea { min-height: 140px; resize: vertical; }
.field__hint { font-size: var(--step--1); color: var(--stone); }
.field--error input, .field--error select, .field--error textarea { border-color: var(--red-warn); }
.field__error { color: var(--red-warn); font-size: var(--step--1); }

/* Radio/check cards */
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--sp-2); }
.choice {
  border: 1px solid var(--ink-line);
  padding: var(--sp-3);
  cursor: pointer;
  transition: all .2s;
  background: var(--white);
  border-radius: 2px;
  position: relative;
}
.choice input { position: absolute; opacity: 0; }
.choice:hover { border-color: var(--ink); }
.choice.is-selected { border-color: var(--terracotta); background: rgba(200,90,42,0.05); }
.choice__title { font-weight: 500; font-size: var(--step-0); color: var(--ink); margin-bottom: 0.2rem; }
.choice__sub { font-size: var(--step--1); color: var(--stone); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--ivory); margin-top: var(--sp-8); }
.site-footer h5 {
  color: var(--ivory);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin: 0 0 var(--sp-3);
  font-weight: 500;
  color: var(--terracotta-light);
}
.site-footer__top {
  overflow: hidden;
  border-bottom: 1px solid rgba(247,242,234,0.1);
}
.site-footer__marquee {
  display: flex;
  gap: 2.5rem;
  align-items: center;
  padding: var(--sp-3) 0;
  white-space: nowrap;
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--step-3);
  font-weight: 300;
  color: var(--ivory);
  animation: marquee 40s linear infinite;
}
.site-footer__marquee span[aria-hidden="true"] { color: var(--terracotta); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.site-footer__main {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--sp-6) var(--gutter);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-5);
}
@media (min-width: 900px) { .site-footer__main { grid-template-columns: 1.2fr 2fr; gap: var(--sp-6); } }
.site-footer__tagline {
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-weight: 300;
  font-style: italic;
  color: var(--ivory);
  line-height: 1.2;
  margin: 0 0 var(--sp-4);
  max-width: 18ch;
}
.site-footer__contact { font-style: normal; font-size: var(--step--1); color: var(--stone-soft); line-height: 1.8; }
.site-footer__contact a { color: var(--ivory); }
.site-footer__contact a:hover { color: var(--terracotta-light); }
.site-footer__cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-5);
}
@media (min-width: 720px) { .site-footer__cols { grid-template-columns: repeat(4, 1fr); } }
.site-footer__cols ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.site-footer__cols a { color: var(--ivory); font-size: var(--step-0); }
.site-footer__cols a:hover { color: var(--terracotta-light); }
.site-footer__base {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--sp-4) var(--gutter);
  border-top: 1px solid rgba(247,242,234,0.1);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-4);
  justify-content: space-between;
  font-size: var(--step--2);
  color: var(--stone-soft);
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.site-footer__base a { color: var(--ivory); }
.site-footer__legal { display: flex; gap: 1rem; }
.site-footer__credit em { color: var(--terracotta-light); font-style: italic; font-family: var(--font-display); text-transform: none; letter-spacing: 0; }

/* ---------- Calculator ---------- */
.calc-card {
  background: var(--white);
  padding: clamp(1.5rem, 3vw, 3rem);
  border-radius: 4px;
  box-shadow: 0 40px 80px -30px rgba(11,27,63,0.15);
  border: 1px solid var(--ink-line);
}
.calc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-5);
  align-items: start;
}
@media (min-width: 900px) { .calc-grid { grid-template-columns: 1.1fr 1fr; gap: var(--sp-6); } }

.calc-inputs { display: flex; flex-direction: column; gap: var(--sp-3); }
.calc-result {
  background: var(--ink);
  color: var(--ivory);
  padding: var(--sp-5);
  border-radius: 4px;
  position: sticky;
  top: calc(var(--header-h) + 1rem);
}
.calc-result h3 { color: var(--ivory); margin-bottom: var(--sp-3); font-weight: 400; }
.calc-result__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: var(--sp-3) 0;
  border-bottom: 1px solid rgba(247,242,234,0.12);
  gap: 1rem;
}
.calc-result__row:last-of-type { border-bottom: none; }
.calc-result__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stone-soft);
}
.calc-result__value {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 400;
  color: var(--ivory);
  font-variant-numeric: tabular-nums;
}
.calc-result__value--large {
  font-size: var(--step-4);
  font-weight: 300;
  color: var(--terracotta-light);
  font-style: italic;
  line-height: 1;
  font-variation-settings: "opsz" 144, "SOFT" 100;
}
.calc-result__disclaimer {
  font-size: var(--step--2);
  color: var(--stone-soft);
  line-height: 1.5;
  margin-top: var(--sp-4);
  border-top: 1px solid rgba(247,242,234,0.12);
  padding-top: var(--sp-3);
}
.calc-result__cta { margin-top: var(--sp-4); }

.slider-row { display: flex; flex-direction: column; gap: 0.7rem; }
.slider-row__label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
}
.slider-row__value {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-style: italic;
  font-weight: 400;
  color: var(--terracotta);
  letter-spacing: -0.01em;
  text-transform: none;
}
input[type="range"].range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: var(--ivory-deep);
  border-radius: 0;
  outline: none;
}
input[type="range"].range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  background: var(--terracotta);
  border-radius: 50%;
  cursor: grab;
  border: 3px solid var(--white);
  box-shadow: 0 2px 10px rgba(11,27,63,0.25);
  transition: transform .2s;
}
input[type="range"].range::-moz-range-thumb {
  width: 22px;
  height: 22px;
  background: var(--terracotta);
  border-radius: 50%;
  cursor: grab;
  border: 3px solid var(--white);
  box-shadow: 0 2px 10px rgba(11,27,63,0.25);
}
input[type="range"].range:active::-webkit-slider-thumb { transform: scale(1.15); cursor: grabbing; }

.seg-control {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--ink-line);
  border-radius: 2px;
  overflow: hidden;
  background: var(--white);
}
.seg-control__btn {
  padding: 0.9rem 0.5rem;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all .2s;
  border-right: 1px solid var(--ink-line);
}
.seg-control__btn:last-child { border-right: none; }
.seg-control__btn:hover { background: var(--ivory-deep); }
.seg-control__btn.is-active { background: var(--ink); color: var(--ivory); }

/* ---------- Chatbot widget ---------- */
.chat-toggle {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--ivory);
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 30px -6px rgba(11,27,63,0.35);
  transition: transform .3s var(--ease-out), background .3s;
  cursor: pointer;
}
.chat-toggle:hover { transform: translateY(-3px); background: var(--terracotta); }
.chat-toggle svg { width: 24px; height: 24px; }
.chat-toggle__pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--terracotta);
  opacity: 0;
  animation: chatPulse 2.5s var(--ease-out) infinite;
}
@keyframes chatPulse {
  0% { opacity: 0.8; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.4); }
}

.chat-panel {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: min(400px, calc(100vw - 2rem));
  height: min(620px, calc(100svh - 3rem));
  background: var(--white);
  border-radius: 4px;
  box-shadow: 0 40px 80px -20px rgba(11,27,63,0.35);
  display: none;
  flex-direction: column;
  z-index: 41;
  overflow: hidden;
  border: 1px solid var(--ink-line);
}
.chat-panel.is-open { display: flex; animation: chatSlide .35s var(--ease-out); }
@keyframes chatSlide { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.chat-panel__head {
  padding: var(--sp-3) var(--sp-4);
  background: var(--ink);
  color: var(--ivory);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}
.chat-panel__title {
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0;
}
.chat-panel__sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--terracotta-light);
  margin-top: 3px;
}
.chat-panel__close { font-size: 1.5rem; line-height: 1; color: var(--ivory); width: 36px; height: 36px; }

.chat-panel__body {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  background: var(--paper);
}

.chat-msg { max-width: 85%; }
.chat-msg--bot {
  align-self: flex-start;
  background: var(--white);
  padding: 0.9rem 1.1rem;
  border-radius: 2px 14px 14px 14px;
  font-size: var(--step-0);
  line-height: 1.5;
  border: 1px solid var(--ink-line);
}
.chat-msg--user {
  align-self: flex-end;
  background: var(--ink);
  color: var(--ivory);
  padding: 0.9rem 1.1rem;
  border-radius: 14px 2px 14px 14px;
  font-size: var(--step-0);
}
.chat-msg--typing .typing-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--stone);
  margin: 0 2px;
  animation: typingDot 1.2s infinite;
}
.chat-msg--typing .typing-dot:nth-child(2) { animation-delay: 0.15s; }
.chat-msg--typing .typing-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes typingDot { 0%, 60%, 100% { opacity: 0.3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-4px); } }

.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}
.chat-suggestion {
  background: var(--ivory-deep);
  border: 1px solid var(--ink-line);
  padding: 0.4rem 0.7rem;
  font-size: var(--step--1);
  border-radius: 100px;
  cursor: pointer;
  color: var(--ink);
  transition: all .2s;
}
.chat-suggestion:hover { background: var(--ink); color: var(--ivory); }

.chat-panel__foot {
  padding: var(--sp-3);
  border-top: 1px solid var(--ink-line);
  background: var(--white);
}
.chat-form { display: flex; gap: 0.5rem; align-items: end; }
.chat-input {
  flex: 1;
  resize: none;
  border: 1px solid var(--ink-line);
  padding: 0.7rem 0.9rem;
  border-radius: 2px;
  font-size: var(--step-0);
  min-height: 44px;
  max-height: 120px;
  background: var(--white);
}
.chat-input:focus { outline: none; border-color: var(--ink); }
.chat-send {
  width: 44px; height: 44px;
  background: var(--ink);
  color: var(--ivory);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  border-radius: 2px;
}
.chat-send:hover { background: var(--terracotta); }
.chat-send:disabled { opacity: 0.4; cursor: not-allowed; }

.chat-panel__footer-note {
  text-align: center;
  font-size: var(--step--2);
  color: var(--stone);
  margin: 0.4rem 0 0;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}

/* ---------- Multi-step application ---------- */
.apply-shell {
  max-width: 780px;
  margin: 0 auto;
}
.apply-progress {
  display: flex;
  gap: 0.4rem;
  margin-bottom: var(--sp-5);
}
.apply-progress__step {
  flex: 1;
  height: 3px;
  background: var(--ink-line);
  transition: background .3s;
  position: relative;
}
.apply-progress__step.is-done { background: var(--terracotta); }
.apply-progress__step.is-current { background: var(--ink); }
.apply-step { display: none; }
.apply-step.is-active { display: block; animation: stepFade .4s var(--ease-out); }
@keyframes stepFade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.apply-step__eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 0.6rem;
}
.apply-step__title {
  font-family: var(--font-display);
  font-size: var(--step-4);
  font-weight: 300;
  margin: 0 0 var(--sp-2);
  letter-spacing: -0.02em;
}
.apply-step__sub { color: var(--charcoal-soft); margin-bottom: var(--sp-5); max-width: 58ch; }
.apply-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-3); }
@media (min-width: 720px) { .apply-grid--2 { grid-template-columns: 1fr 1fr; } }
.apply-nav { display: flex; gap: var(--sp-3); margin-top: var(--sp-5); justify-content: space-between; }

/* ---------- Utility ---------- */
.flow > * + * { margin-top: var(--sp-3); }
.flow-lg > * + * { margin-top: var(--sp-5); }
.center { text-align: center; }
.hidden { display: none !important; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Entrance animations */
.fade-up { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.fade-up.is-visible { opacity: 1; transform: translateY(0); }
.stagger > * { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.stagger.is-visible > * { opacity: 1; transform: translateY(0); }
.stagger.is-visible > *:nth-child(1) { transition-delay: .05s; }
.stagger.is-visible > *:nth-child(2) { transition-delay: .12s; }
.stagger.is-visible > *:nth-child(3) { transition-delay: .19s; }
.stagger.is-visible > *:nth-child(4) { transition-delay: .26s; }
.stagger.is-visible > *:nth-child(5) { transition-delay: .33s; }
.stagger.is-visible > *:nth-child(6) { transition-delay: .4s; }

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-2);
}
@media (min-width: 720px) {
  .gallery-grid {
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: 160px;
  }
}
.gallery-item {
  overflow: hidden;
  position: relative;
  background: var(--ivory-deep);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-out); }
.gallery-item:hover img { transform: scale(1.05); }
@media (min-width: 720px) {
  .gallery-item:nth-child(8n+1) { grid-column: span 5; grid-row: span 2; }
  .gallery-item:nth-child(8n+2) { grid-column: span 4; grid-row: span 1; }
  .gallery-item:nth-child(8n+3) { grid-column: span 3; grid-row: span 1; }
  .gallery-item:nth-child(8n+4) { grid-column: span 4; grid-row: span 2; }
  .gallery-item:nth-child(8n+5) { grid-column: span 3; grid-row: span 1; }
  .gallery-item:nth-child(8n+6) { grid-column: span 5; grid-row: span 1; }
  .gallery-item:nth-child(8n+7) { grid-column: span 4; grid-row: span 2; }
  .gallery-item:nth-child(8n+8) { grid-column: span 8; grid-row: span 1; }
}

/* ---------- Team ---------- */
.team-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-5);
}
@media (min-width: 720px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .team-grid { grid-template-columns: repeat(3, 1fr); } }
.team-card__photo {
  aspect-ratio: 3/4;
  background: var(--ivory-deep);
  margin-bottom: var(--sp-3);
  overflow: hidden;
}
.team-card__photo img { width: 100%; height: 100%; object-fit: cover; }
.team-card__name {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 400;
  margin: 0 0 0.2rem;
  letter-spacing: -0.01em;
}
.team-card__role {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 0.6rem;
}
.team-card__bio { color: var(--charcoal-soft); font-size: var(--step-0); }

/* ---------- News / Articles ---------- */
.article-list { display: grid; gap: var(--sp-5); }
.article-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3);
  padding: var(--sp-4) 0;
  border-top: 1px solid var(--ink-line);
  text-decoration: none;
  color: inherit;
}
.article-card:last-child { border-bottom: 1px solid var(--ink-line); }
@media (min-width: 720px) {
  .article-card { grid-template-columns: 240px 1fr; gap: var(--sp-4); align-items: start; }
}
.article-card__image {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--ivory-deep);
}
.article-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.article-card:hover .article-card__image img { transform: scale(1.04); }
.article-card__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 0.4rem;
}
.article-card__title {
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-weight: 400;
  margin: 0 0 0.6rem;
  letter-spacing: -0.015em;
  color: var(--ink);
  transition: color .2s;
}
.article-card:hover .article-card__title { color: var(--terracotta); }
.article-card__excerpt { color: var(--charcoal-soft); margin: 0; max-width: 65ch; }

/* ---------- Cta block ---------- */
.cta-block {
  padding: var(--sp-7) var(--gutter);
  background: var(--ink);
  color: var(--ivory);
  text-align: center;
  margin: var(--sp-6) 0;
}
.cta-block h2 { color: var(--ivory); max-width: 16ch; margin: 0 auto var(--sp-4); font-weight: 300; }
.cta-block p { max-width: 50ch; margin: 0 auto var(--sp-4); color: rgba(247,242,234,0.8); }

/* ---------- Success / flash ---------- */
.flash {
  padding: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-4);
  border-left: 3px solid;
  background: var(--white);
  font-size: var(--step-0);
}
.flash--ok { border-color: var(--green-ok); color: var(--green-ok); }
.flash--err { border-color: var(--red-warn); color: var(--red-warn); }
