/* ============================================================
   RTOH — Rakennustoimisto O. Hämäläinen Oy
   Modern nordic redesign · chalk & ink + patina accent
   ============================================================ */

:root {
  --paper: #F4F3EF;
  --paper-2: #EAE8E1;
  --ink: #15171B;
  --ink-2: #3E4148;
  --muted: #6F727A;
  --line: rgba(21, 23, 27, .14);

  --accent: #2E7D68;
  --accent-deep: #1E5A4A;
  --accent-tint: #E2EBE5;
  --accent-bright: #6FBFA6;

  --dark: #0F1215;
  --dark-2: #14181C;
  --paper-on-dark: #ECEBE5;
  --muted-on-dark: #9AA0A4;
  --line-on-dark: rgba(236, 235, 229, .16);

  --font-sans: 'Archivo', 'Helvetica Neue', sans-serif;
  --font-mono: 'Fragment Mono', 'Courier New', monospace;

  --ease: cubic-bezier(.16, 1, .3, 1);
  --pad: clamp(20px, 4.5vw, 64px);
  --max: 1440px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; background: none; border: 0; cursor: pointer; color: inherit; }

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

/* ---------- Typography ---------- */
.display-1, .display-2, .display-3, h1, h2, h3 {
  font-weight: 640;
  font-variation-settings: 'wdth' 116;
  letter-spacing: -0.028em;
  line-height: 1.02;
  text-wrap: balance;
}
.display-1 { font-size: clamp(2.1rem, 7.6vw, 6.6rem); }
.display-2 { font-size: clamp(2.1rem, 4.8vw, 4rem); }
.display-3 { font-size: clamp(1.5rem, 3vw, 2.4rem); line-height: 1.12; }

.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 34em;
}
.body-muted { color: var(--muted); }

.kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
.kicker::before {
  content: "";
  width: 34px;
  height: 1px;
  background: var(--accent);
  flex: none;
}
.on-dark .kicker { color: var(--muted-on-dark); }

.accent { color: var(--accent); }

/* ---------- Layout ---------- */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: var(--pad);
}
section { position: relative; }
.section-pad { padding-block: clamp(88px, 11vw, 170px); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px 48px;
  margin-bottom: clamp(44px, 6vw, 84px);
}
.section-head .kicker { margin-bottom: 22px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 30px;
  font-size: 15px;
  font-weight: 560;
  letter-spacing: .01em;
  border-radius: 3px;
  transition: background .35s var(--ease), color .35s var(--ease),
              border-color .35s var(--ease), transform .35s var(--ease);
}
.btn .arrow { transition: transform .35s var(--ease); }
.btn:hover .arrow { transform: translateX(5px); }

.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: var(--accent-deep); color: #fff; }

.btn-ghost { border: 1px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-deep); }

.on-dark .btn-solid { background: var(--paper-on-dark); color: var(--ink); }
.on-dark .btn-solid:hover { background: var(--accent-bright); color: var(--dark); }
.on-dark .btn-ghost { border-color: var(--line-on-dark); color: var(--paper-on-dark); }
.on-dark .btn-ghost:hover { border-color: var(--accent-bright); color: var(--accent-bright); }

.link-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 6px;
  transition: color .3s var(--ease), gap .3s var(--ease);
}
.link-line:hover { color: var(--accent-deep); gap: 16px; }

/* ---------- Nav ---------- */
.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background .4s var(--ease), border-color .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-nav .container {
  max-width: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
}
.logo { display: flex; align-items: center; }
.logo img {
  height: 34px;
  width: auto;
  transition: filter .4s var(--ease);
}
.site-nav:not(.scrolled) .logo img { filter: invert(1); }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 44px);
}
.nav-links a:not(.btn) {
  font-size: 15px;
  font-weight: 520;
  color: var(--paper-on-dark);
  position: relative;
  transition: color .3s var(--ease);
}
.nav-links a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease);
}
.nav-links a:not(.btn):hover::after,
.nav-links a.active:not(.btn)::after { transform: scaleX(1); }

.site-nav .btn { padding: 11px 22px; font-size: 14px; }
.site-nav:not(.scrolled) .btn-solid { background: var(--paper-on-dark); color: var(--ink); }
.site-nav:not(.scrolled) .btn-solid:hover { background: var(--accent-bright); }

.site-nav.scrolled {
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(14px);
  border-color: var(--line);
}
.site-nav.scrolled .nav-links a:not(.btn) { color: var(--ink); }

/* Mobile menu */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 10px 0;
  z-index: 120;
}
.menu-toggle span {
  width: 30px; height: 2px;
  background: var(--paper-on-dark);
  transition: transform .4s var(--ease), opacity .3s, background .4s;
}
.site-nav.scrolled .menu-toggle span { background: var(--ink); }
body.menu-open .menu-toggle span { background: var(--paper-on-dark); }
body.menu-open .menu-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
body.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
body.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: var(--dark);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--pad);
  opacity: 0;
  pointer-events: none;
  transition: opacity .45s var(--ease);
}
body.menu-open .mobile-menu { opacity: 1; pointer-events: auto; }
.mobile-menu a {
  font-size: clamp(2.2rem, 9vw, 3.6rem);
  font-weight: 640;
  font-variation-settings: 'wdth' 116;
  letter-spacing: -0.02em;
  color: var(--paper-on-dark);
  padding-block: 14px;
  border-bottom: 1px solid var(--line-on-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .5s var(--ease), transform .5s var(--ease), color .3s;
}
.mobile-menu a:hover { color: var(--accent-bright); }
body.menu-open .mobile-menu a { opacity: 1; transform: none; }
body.menu-open .mobile-menu a:nth-of-type(1) { transition-delay: .08s; }
body.menu-open .mobile-menu a:nth-of-type(2) { transition-delay: .14s; }
body.menu-open .mobile-menu a:nth-of-type(3) { transition-delay: .20s; }
body.menu-open .mobile-menu a:nth-of-type(4) { transition-delay: .26s; }
body.menu-open .mobile-menu a:nth-of-type(5) { transition-delay: .32s; }
.mobile-menu .mono-tag { margin-bottom: 34px; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .menu-toggle { display: flex; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  color: var(--paper-on-dark);
  isolation: isolate;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transform: scale(1.06);
  animation: hero-zoom 2.6s var(--ease) forwards;
}
@keyframes hero-zoom { to { transform: scale(1); } }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to bottom, rgba(10, 13, 15, .62), rgba(10, 13, 15, 0) 28%),
    linear-gradient(to top, rgba(10, 13, 15, .88) 0%, rgba(10, 13, 15, .38) 45%, rgba(10, 13, 15, .30) 100%);
}
.hero .container {
  width: 100%;
  padding-bottom: clamp(56px, 8vh, 110px);
  padding-top: 140px;
}
.hero h1 { color: #fff; margin-block: 26px 28px; }
.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .line > span { display: inline-block; transform: translateY(110%); animation: rise 1s var(--ease) forwards; }
.hero h1 .line:nth-child(1) > span { animation-delay: .15s; }
.hero h1 .line:nth-child(2) > span { animation-delay: .27s; }
.hero h1 .line:nth-child(3) > span { animation-delay: .39s; }
@keyframes rise { to { transform: translateY(0); } }

.hero .lead { color: rgba(236, 235, 229, .82); max-width: 30em; }
.hero .kicker { color: rgba(236, 235, 229, .75); }
.hero .kicker::before { background: var(--accent-bright); }

.hero .fade-up {
  opacity: 0;
  transform: translateY(22px);
  animation: fade-up .9s var(--ease) forwards;
}
.hero .fade-up.d1 { animation-delay: .55s; }
.hero .fade-up.d2 { animation-delay: .7s; }
.hero .fade-up.d3 { animation-delay: .85s; }
@keyframes fade-up { to { opacity: 1; transform: none; } }

.hero-cta { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 40px; }

.hero-meta {
  margin-top: clamp(48px, 7vh, 84px);
  padding-top: 26px;
  border-top: 1px solid var(--line-on-dark);
  display: flex;
  flex-wrap: wrap;
  gap: 18px 56px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: rgba(236, 235, 229, .66);
}
.hero-meta a:hover { color: var(--accent-bright); }

/* Sub-page hero */
.page-hero {
  position: relative;
  min-height: clamp(420px, 58vh, 620px);
  display: flex;
  align-items: flex-end;
  color: var(--paper-on-dark);
  isolation: isolate;
  overflow: hidden;
}
.page-hero .hero-bg img { animation: none; transform: none; }
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to bottom, rgba(10, 13, 15, .62), rgba(10, 13, 15, 0) 30%),
    linear-gradient(to top, rgba(10, 13, 15, .9), rgba(10, 13, 15, .35));
}
.page-hero .container { width: 100%; padding-block: clamp(48px, 7vh, 80px) ; padding-top: 150px; }
.page-hero h1 { color: #fff; margin-top: 24px; }

/* ---------- Roofline motif ---------- */
.roofline {
  color: var(--line);
  width: min(520px, 60vw);
  height: auto;
  display: block;
}
.on-dark .roofline { color: var(--line-on-dark); }

/* ---------- About / statement ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.about-grid .statement { font-weight: 560; }
.about-copy p + p { margin-top: 1.2em; }

.about-media { position: relative; }
.about-media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.about-media figcaption {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
}

.values {
  margin-top: clamp(40px, 5vw, 64px);
  border-top: 1px solid var(--line);
}
.values li {
  display: grid;
  grid-template-columns: 64px 1fr 2fr;
  gap: 20px;
  padding-block: 22px;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.values .num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
}
.values h3 { font-size: 1.25rem; }
.values p { color: var(--muted); font-size: .98rem; }
@media (max-width: 640px) {
  .values li { grid-template-columns: 48px 1fr; }
  .values p { grid-column: 2; }
}

/* ---------- Stats (dark band) ---------- */
.band-dark {
  background: var(--dark);
  color: var(--paper-on-dark);
  position: relative;
}
.band-dark::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .05;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-left: 1px solid var(--line-on-dark);
}
.stat {
  border-right: 1px solid var(--line-on-dark);
  padding: clamp(28px, 3.5vw, 52px) clamp(20px, 2.5vw, 40px);
}
.stat .value {
  font-size: clamp(2.4rem, 4.6vw, 4.4rem);
  font-weight: 640;
  font-variation-settings: 'wdth' 116;
  letter-spacing: -0.03em;
  line-height: 1;
  color: #fff;
}
.stat .value small { font-size: .5em; color: var(--accent-bright); font-weight: 560; }
.stat .label {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted-on-dark);
}
@media (max-width: 860px) {
  .stats-grid { grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line-on-dark); }
  .stat { border-bottom: 1px solid var(--line-on-dark); }
}

/* ---------- Services ---------- */
.service-list { border-top: 1px solid var(--line); }
.service-row {
  display: grid;
  grid-template-columns: 90px minmax(0, 5fr) minmax(0, 4fr);
  gap: clamp(24px, 4vw, 72px);
  padding-block: clamp(36px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.service-row .num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  align-self: start;
  padding-top: 10px;
}
.service-row h3 { font-size: clamp(1.6rem, 2.8vw, 2.4rem); margin-bottom: 16px; }
.service-row p { color: var(--ink-2); max-width: 30em; }
.service-row .link-line { margin-top: 26px; }
.service-media { overflow: hidden; }
.service-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 1s var(--ease);
}
.service-row:hover .service-media img { transform: scale(1.045); }
@media (max-width: 860px) {
  .service-row { grid-template-columns: 1fr; gap: 22px; }
  .service-row .num { padding-top: 0; }
}

/* Service detail (palvelut.html) */
.service-detail {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(40px, 6vw, 100px);
  align-items: center;
  padding-block: clamp(56px, 7vw, 110px);
}
.service-detail:not(:last-child) { border-bottom: 1px solid var(--line); }
.service-detail.flip .sd-media { order: -1; }
.service-detail h2 { font-size: clamp(1.9rem, 3.6vw, 3.1rem); margin-block: 18px 20px; }
.service-detail p + p { margin-top: 1em; }
.sd-media img { width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover; }
.steps { margin-top: 30px; border-top: 1px solid var(--line); }
.steps li {
  display: flex;
  gap: 18px;
  align-items: baseline;
  padding-block: 14px;
  border-bottom: 1px solid var(--line);
  font-weight: 540;
}
.steps .num { font-family: var(--font-mono); font-size: 11.5px; color: var(--accent); }
.steps small { margin-left: auto; font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); text-align: right;}
@media (max-width: 860px) {
  .service-detail { grid-template-columns: 1fr; }
  .service-detail.flip .sd-media { order: 0; }
}

/* ---------- References table ---------- */
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 34px;
}
.chip {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--muted);
  transition: all .3s var(--ease);
}
.chip:hover { border-color: var(--accent); color: var(--accent-deep); }
.chip.active { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.ref-table { border-top: 1px solid var(--ink); }
.ref-head, .ref-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 5fr) minmax(0, 5fr) minmax(0, 3fr);
  gap: clamp(16px, 2.5vw, 40px);
  align-items: baseline;
}
.ref-head {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  padding-block: 14px;
  border-bottom: 1px solid var(--line);
}
.ref-row {
  padding: 20px 12px;
  margin-inline: -12px;
  border-bottom: 1px solid var(--line);
  transition: background .3s var(--ease);
}
.ref-row:hover { background: var(--accent-tint); }
.ref-row .year { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); }
.ref-row .kohde { font-weight: 580; }
.ref-row .tyo { color: var(--ink-2); font-size: .97rem; }
.ref-row .muoto {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent-deep);
}
.ref-row.hidden { display: none; }
@media (max-width: 760px) {
  .ref-head { display: none; }
  .ref-row { grid-template-columns: 1fr 1fr; gap: 6px 16px; }
  .ref-row .kohde { grid-column: 1 / -1; }
  .ref-row .tyo { grid-column: 1 / -1; }
}

/* ---------- Quote band ---------- */
.quote-band { background: var(--paper-2); }
.quote-band blockquote {
  font-size: clamp(1.9rem, 4.6vw, 3.9rem);
  font-weight: 620;
  font-variation-settings: 'wdth' 114;
  letter-spacing: -0.025em;
  line-height: 1.12;
  max-width: 22em;
  text-wrap: balance;
}
.quote-band .btn { margin-top: 44px; }

/* ---------- Rekry teaser ---------- */
.split-band {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 560px;
}
.split-band .sb-media { position: relative; overflow: hidden; }
.split-band .sb-media img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.split-band .sb-content {
  padding: clamp(48px, 6vw, 110px) var(--pad);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 24px;
}
@media (max-width: 860px) {
  .split-band { grid-template-columns: 1fr; }
  .split-band .sb-media { min-height: 340px; }
}

/* ---------- Rekry page ---------- */
.job-card {
  border: 1px solid var(--line);
  background: #fff;
  padding: clamp(32px, 4.5vw, 64px);
}
.job-card .mono-tag { color: var(--accent-deep); }
.job-card h2 { font-size: clamp(1.7rem, 3.2vw, 2.7rem); margin-block: 14px 18px; }
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  margin-top: clamp(40px, 5vw, 64px);
}
.check-list li {
  position: relative;
  padding: 14px 0 14px 34px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 22px;
  width: 16px; height: 9px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}
.two-col h3 { font-size: 1.15rem; margin-bottom: 10px; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }

.mono-tag {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(48px, 6vw, 110px);
  align-items: start;
}
.contact-cards { margin-top: 44px; display: grid; gap: 0; border-top: 1px solid var(--line); }
.contact-cards > div {
  padding-block: 24px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 18px;
  align-items: baseline;
}
.contact-cards .mono-tag { color: var(--accent-deep); }
.contact-cards a { font-weight: 580; transition: color .3s; }
.contact-cards a:hover { color: var(--accent-deep); }
.contact-cards .big { font-size: clamp(1.2rem, 2vw, 1.6rem); font-weight: 620; letter-spacing: -0.01em; }

.contact-form { background: #fff; border: 1px solid var(--line); padding: clamp(28px, 3.5vw, 52px); }
.contact-form h3 { font-size: 1.3rem; margin-bottom: 26px; }
.form-field { margin-bottom: 22px; }
.form-field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.form-field input, .form-field textarea {
  width: 100%;
  font: inherit;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--paper);
  color: var(--ink);
  transition: border-color .3s;
}
.form-field input:focus, .form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.contact-form .btn { width: 100%; justify-content: center; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- CTA band ---------- */
.cta-band { text-align: left; }
.cta-band .display-2 { max-width: 18em; margin-block: 24px 36px; color: #fff; }
.cta-band .lead { color: var(--muted-on-dark); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--dark);
  color: var(--paper-on-dark);
  position: relative;
  overflow: hidden;
}
.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 5fr) repeat(2, minmax(0, 3fr));
  gap: clamp(36px, 5vw, 90px);
  padding-block: clamp(64px, 8vw, 120px) clamp(44px, 5vw, 72px);
}
.footer-top h4 {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted-on-dark);
  margin-bottom: 22px;
}
.footer-top li { padding-block: 6px; }
.footer-top a { color: var(--paper-on-dark); transition: color .3s; }
.footer-top a:hover { color: var(--accent-bright); }
.footer-brand p { color: var(--muted-on-dark); max-width: 26em; margin-top: 18px; }
.footer-brand img { height: 40px; filter: invert(1); opacity: .95; }

.footer-word {
  font-size: clamp(4rem, 16vw, 15rem);
  font-weight: 700;
  font-variation-settings: 'wdth' 122;
  letter-spacing: -0.02em;
  line-height: .78;
  color: transparent;
  -webkit-text-stroke: 1px rgba(236, 235, 229, .18);
  user-select: none;
  text-align: center;
  transform: translateY(14%);
}
.footer-bottom {
  border-top: 1px solid var(--line-on-dark);
  padding-block: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 40px;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted-on-dark);
}
@media (max-width: 760px) { .footer-top { grid-template-columns: 1fr; } }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .1s; }
.reveal.d2 { transition-delay: .2s; }
.reveal.d3 { transition-delay: .3s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .hero h1 .line > span { transform: none; }
  .hero .fade-up { opacity: 1; transform: none; }
}
