/* ==========================================================================
   Emerald Machines — Baumaschinen · Baustoffe · Vertrieb
   Design tokens
   ========================================================================== */
:root {
  --font-main: -apple-system, "system-ui", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;

  /* --- brand ------------------------------------------------------------ */
  --primary: #2b443c;   /* emerald — brand mark, coloured panels and cards */
  --accent:  #6ada9f;   /* mint — highlights, fills, rules */

  /* The mint is too light to carry small text on a pale background, so this
     darkened variant is used whenever the accent has to be legible as type. */
  --accent-text: #2e7d5a;

  /* Near-black carries the buttons and the big dark bands; the emerald is
     reserved for the coloured surfaces so both stay distinguishable. */
  --ink: #1a1815;
  --ink-soft: #5f635c;

  /* --- neutrals, tinted a touch towards the brand green ------------------ */
  --cream: #f6f8f4;
  --cream-deep: #e9efe9;
  --sand: #cfdcd2;
  --sand-deep: #b7cabd;
  --olive: var(--primary);
  --signal: var(--accent);
  --white: #ffffff;

  --line: rgba(26, 24, 21, 0.15);
  --line-soft: rgba(26, 24, 21, 0.07);
  --line-invert: rgba(255, 255, 255, 0.22);

  --radius: 18px;
  --radius-lg: 26px;
  --radius-pill: 100px;

  --container: 1180px;
  --container-wide: 1300px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-inout: cubic-bezier(0.65, 0, 0.35, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; }

body {
  margin: 0;
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-soft);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.container-wide {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0 0 1rem;
}
h1 { font-size: clamp(2.1rem, 4vw + 1rem, 3.5rem); }
h2 { font-size: clamp(1.8rem, 2.6vw + 1rem, 2.9rem); }
h3 { font-size: clamp(1.2rem, 1.2vw + 1rem, 1.6rem); }

p { margin: 0 0 1rem; }

.text-center { text-align: center; }
.small { font-size: 0.9rem; }

/* a serif line paired with the sans headline, as in the reference layout */
.display-serif {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-style: normal;
  letter-spacing: -0.01em;
}

.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 1.25rem;
}

.section-head {
  max-width: 720px;
  margin: 0 auto 3.5rem;
  text-align: center;
}
.section-head p { margin: 0; font-size: 1.02rem; }
.section-head h2 { margin-bottom: 1rem; }

/* ==========================================================================
   Interaction primitives — transform/opacity only, no scaling, no glow
   ========================================================================== */

/* A solid layer wipes up from the bottom edge and the label inverts with it. */
.btn {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  background: var(--ink);
  color: var(--cream);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 14px 13px 26px;
  border: 1px solid var(--ink);
  border-radius: var(--radius-pill);
  overflow: hidden;
  cursor: pointer;
  transition: color 0.45s var(--ease-out);
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--signal);
  transform: translateY(101%);
  transition: transform 0.55s var(--ease-out);
}
.btn:hover,
.btn:focus-visible { color: var(--ink); }
.btn:hover::before,
.btn:focus-visible::before { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* round arrow chip that sits inside the pill button */
.btn__chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--cream);
  color: var(--ink);
  transition: background-color 0.45s var(--ease-out), color 0.45s var(--ease-out);
}
.btn:hover .btn__chip { background: var(--ink); color: var(--signal); }
.btn__chip .arrow-swap { width: 15px; height: 15px; }

.btn--plain { padding: 13px 26px; }

.btn--light {
  background: var(--cream);
  border-color: var(--cream);
  color: var(--ink);
}
.btn--light .btn__chip { background: var(--ink); color: var(--cream); }
.btn--light:hover .btn__chip { background: var(--ink); color: var(--signal); }

.btn-group { display: flex; justify-content: center; gap: 1rem; margin: 1.75rem 0; }

/* Two stacked arrows in a masked box: the first leaves top-right while the
   second enters from bottom-left. */
.arrow-swap {
  position: relative;
  display: inline-block;
  width: 17px;
  height: 17px;
  overflow: hidden;
  flex: none;
}
.arrow-swap svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: transform 0.5s var(--ease-out);
}
.arrow-swap svg:last-child { transform: translate(-130%, 130%); }
a:hover .arrow-swap svg:first-child,
button:hover .arrow-swap svg:first-child { transform: translate(130%, -130%); }
a:hover .arrow-swap svg:last-child,
button:hover .arrow-swap svg:last-child { transform: translate(0, 0); }

/* Text link whose rule retracts to the right and re-enters from the left. */
.link-wipe {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  padding-bottom: 4px;
}
.link-wipe::after,
.link-wipe::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
}
.link-wipe::after {
  transform: scaleX(1);
  transform-origin: right center;
  transition: transform 0.45s var(--ease-inout);
}
.link-wipe:hover::after { transform: scaleX(0); transition-duration: 0.25s; }
.link-wipe::before {
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.45s var(--ease-inout) 0.15s;
}
.link-wipe:hover::before { transform: scaleX(1); }

/* ==========================================================================
   Header — nav left, wordmark centred, actions right
   ========================================================================== */
.site-header {
  position: relative;
  z-index: 50;
  padding: 22px 0;
}
.site-header .container-wide {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
}
.site-brand {
  justify-self: center;
  display: inline-flex;
  align-items: center;
}
/* the wordmark carries the name, so no text label sits beside it */
.site-brand img { height: 30px; width: auto; }
@media (max-width: 520px) {
  .site-brand img { height: 24px; }
}

.main-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
}
.main-nav a {
  position: relative;
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  padding-bottom: 4px;
}
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.4s var(--ease-inout);
}
.main-nav a:hover::after,
.main-nav a:focus-visible::after { transform: scaleX(1); transform-origin: left center; }
.main-nav a.active::after { transform: scaleX(1); }

.nav-actions { justify-self: end; display: flex; align-items: center; gap: 1.75rem; }
.nav-actions .btn { padding: 9px 10px 9px 20px; font-size: 0.85rem; }
.nav-actions .btn__chip { width: 26px; height: 26px; }

.nav-toggle {
  display: none;
  justify-self: end;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  border-radius: 2px;
}

@media (max-width: 1040px) {
  .site-header .container-wide { grid-template-columns: auto 1fr auto; }
  .site-brand { justify-self: start; order: -1; }
  .nav-toggle { display: block; }
  .nav-actions { display: none; }
  .main-nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(330px, 86vw);
    background: var(--cream);
    border-left: 1px solid var(--line);
    transform: translateX(100%);
    transition: transform 0.45s var(--ease-out);
    padding: 100px 32px 32px;
    z-index: 60;
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav ul { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
  .main-nav a { font-size: 1.15rem; font-weight: 600; }
}

/* ==========================================================================
   Hero / gallery  — layout and motion kept exactly as built
   ========================================================================== */
.hero {
  padding: 3rem 0 0;
  text-align: center;
}
.hero p { max-width: 620px; margin: 0 auto 1.5rem; }

.gallery-wrapper {
  display: grid;
  place-items: center;
  width: 100vw;
  margin-top: 2rem;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  height: 430px;
  overflow: hidden;
  perspective: 2300px;
}
.gallery {
  position: relative;
  width: 300px;
  height: 400px;
  transform-style: preserve-3d;
  animation: spin-ring var(--gallery-spin, 90s) linear infinite;
}
@keyframes spin-ring {
  from { transform: rotateY(0deg); }
  to { transform: rotateY(360deg); }
}
.gallery span {
  position: absolute;
  inset: 0;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(26, 24, 21, 0.15);
  /* Cards on the far half of the ring turn their back to the camera; hiding
     backfaces keeps them from swinging through the foreground as it spins. */
  backface-visibility: hidden;
  /* transform (rotateY + negative translateZ) is set inline per-item by
     layoutGallery() in main.js — the ring curves away from the viewer, so we
     see it from inside: center cards recede, edge cards come closer and
     angle toward us */
}
.gallery span img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  backface-visibility: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .gallery { animation: none; }
}

/* Scaled-down copy of the same geometry: card size and perspective shrink by
   the same factor, so the arc keeps its shape (JS derives the radius from the
   card width, see buildGallery). */
@media (max-width: 900px) {
  .gallery-wrapper { height: 340px; perspective: 1800px; }
  .gallery { width: 235px; height: 313px; }
  .gallery span { border-radius: 18px; }
}
@media (max-width: 600px) {
  .gallery-wrapper { height: 250px; perspective: 1300px; }
  .gallery { width: 170px; height: 227px; }
  .gallery span { border-radius: 14px; }
}

/* ==========================================================================
   USP row directly under the hero
   ========================================================================== */
.usp {
  max-width: var(--container);
  margin: 0 auto;
  padding: 2.5rem 24px 5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  text-align: center;
}
.usp > div { padding: 0 1.5rem; }
.usp > div + div { border-left: 1px solid var(--line); }
.usp h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.usp p { margin: 0; font-size: 0.9rem; }

@media (max-width: 820px) {
  .usp { grid-template-columns: 1fr; gap: 2rem; padding-bottom: 3.5rem; }
  .usp > div + div { border-left: none; border-top: 1px solid var(--line); padding-top: 2rem; }
}

/* ==========================================================================
   Bento grid
   ========================================================================== */
.bento-section { padding: 4rem 0 6rem; }
.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.25rem;
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 24px;
}
.bento__cell {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 320px;
  padding: 2rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--cream-deep);
  color: var(--ink-soft);
}
.bento__cell--wide { grid-column: span 7; }
.bento__cell--narrow { grid-column: span 5; }
.bento__cell--half { grid-column: span 6; }
.bento__cell--third { grid-column: span 4; min-height: 260px; }
.bento__cell--sand { background: var(--sand); }
.bento__cell h3 { margin-bottom: 0.5rem; }
.bento__cell p { margin: 0; max-width: 44ch; font-size: 0.92rem; }

/* photo cells: the image sits behind a scrim so the caption stays readable */
.bento__cell--photo { color: rgba(255, 255, 255, 0.85); }
.bento__cell--photo h3 { color: var(--white); }
.bento__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.bento__media img { width: 100%; height: 100%; object-fit: cover; }
.bento__cell--photo::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, rgba(20, 18, 15, 0.88) 0%, rgba(20, 18, 15, 0.35) 45%, rgba(20, 18, 15, 0.1) 100%);
}
.bento__cell--photo { isolation: isolate; }
.bento__cell--olive::after {
  background: linear-gradient(to top, rgba(43, 68, 60, 0.9) 0%, rgba(43, 68, 60, 0.45) 50%, rgba(43, 68, 60, 0.15) 100%);
}

/* the caption rises slightly and a rule draws under the title */
.bento__cell .bento__title {
  position: relative;
  display: inline-block;
  padding-bottom: 6px;
}
.bento__cell .bento__title::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--signal);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.55s var(--ease-out);
}
.bento__cell:hover .bento__title::after { transform: scaleX(1); }

@media (max-width: 1000px) {
  .bento__cell--third { grid-column: span 6; }
}
@media (max-width: 900px) {
  .bento__cell--wide,
  .bento__cell--narrow,
  .bento__cell--half,
  .bento__cell--third { grid-column: span 12; }
  .bento__cell { min-height: 260px; }
}

/* ==========================================================================
   Wide media band — gives sub-pages the visual anchor the home page gets
   from the rotating gallery
   ========================================================================== */
.media-band {
  max-width: var(--container-wide);
  margin: 0 auto 5rem;
  padding: 0 24px;
}
.media-band__inner {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 21 / 8;
}
.media-band__inner img { width: 100%; height: 100%; object-fit: cover; }
/* scrim so the caption stays legible whatever the photo does underneath */
.media-band__inner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20, 18, 15, 0.75) 0%, rgba(20, 18, 15, 0.15) 35%, rgba(20, 18, 15, 0) 60%);
}
.media-band__caption {
  position: absolute;
  z-index: 1;
  left: 2.5rem;
  bottom: 2.25rem;
  right: 2.5rem;
  margin: 0;
  color: var(--white);
  font-size: 1.05rem;
  font-weight: 600;
}
@media (max-width: 760px) {
  .media-band__inner { aspect-ratio: 4 / 3; }
  .media-band__caption { left: 1.25rem; right: 1.25rem; bottom: 1.25rem; font-size: 0.95rem; }
}

/* ==========================================================================
   Reference / project cards
   ========================================================================== */
.projects { padding: 4rem 0 6rem; }
.projects__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 24px;
}
.project {
  display: flex;
  flex-direction: column;
}
.project__media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  margin-bottom: 1.25rem;
  background: var(--cream-deep);
}
.project__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* a sand veil lifts off the photo on hover instead of scaling it */
.project__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--sand);
  mix-blend-mode: multiply;
  opacity: 0.35;
  transition: opacity 0.55s var(--ease-out);
}
.project:hover .project__media::after { opacity: 0; }
.project h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.project p { margin: 0; font-size: 0.92rem; }

@media (max-width: 900px) {
  .projects__grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Figures strip
   ========================================================================== */
.figures {
  max-width: var(--container-wide);
  margin: 0 auto 6rem;
  padding: 3rem 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.figures div { text-align: center; }
.figures dt {
  font-size: clamp(2rem, 3vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1;
}
.figures dd {
  margin: 0.6rem 0 0;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
@media (max-width: 760px) {
  .figures { grid-template-columns: repeat(2, 1fr); gap: 2.5rem 1rem; }
}

/* ==========================================================================
   Split feature (image + copy)
   ========================================================================== */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  max-width: var(--container-wide);
  margin: 0 auto 6rem;
  padding: 0 24px;
}
.feature__media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 5 / 4;
}
.feature__media img { width: 100%; height: 100%; object-fit: cover; }
.feature ul {
  list-style: none;
  margin: 1.5rem 0 2rem;
  padding: 0;
}
.feature li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-weight: 500;
}
.feature li:first-child { border-top: 1px solid var(--line); }

@media (max-width: 900px) {
  .feature { grid-template-columns: 1fr; gap: 2.5rem; }
}

/* ==========================================================================
   Closing CTA
   ========================================================================== */
.cta {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.72);
  padding: 6rem 0;
}
.cta__inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem 5rem;
  align-items: end;
}
.cta h2 { color: var(--white); }
.cta .eyebrow { color: var(--signal); }
.cta p { margin: 0 0 2rem; max-width: 46ch; }

@media (max-width: 900px) {
  .cta { padding: 4rem 0; }
  .cta__inner { grid-template-columns: 1fr; align-items: start; }
}

/* ==========================================================================
   Sub-page hero A — asymmetric split (Baumaschinen)
   ========================================================================== */
.hero-split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 4.5rem;
  align-items: center;
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 2rem 24px 5rem;
}
.hero-split h1 { margin-bottom: 1.25rem; }
.hero-split p { max-width: 46ch; font-size: 1.05rem; }
.hero-split .btn-group { justify-content: flex-start; margin-bottom: 0; }
.hero-split__media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 5;
}
.hero-split__media img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 900px) {
  .hero-split { grid-template-columns: 1fr; gap: 2.5rem; padding-bottom: 3.5rem; }
  .hero-split__media { aspect-ratio: 4 / 3; order: -1; }
}

/* ==========================================================================
   Sub-page hero B — full-bleed image with the headline on top (Baustoffe)
   ========================================================================== */
.hero-full {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  min-height: 68vh;
  padding: 4rem 0;
  color: rgba(255, 255, 255, 0.82);
}
.hero-full__media { position: absolute; inset: 0; z-index: -2; }
.hero-full__media img { width: 100%; height: 100%; object-fit: cover; }
.hero-full::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, rgba(20, 18, 15, 0.9) 0%, rgba(20, 18, 15, 0.55) 55%, rgba(20, 18, 15, 0.3) 100%);
}
.hero-full h1 { color: var(--white); max-width: 16ch; }
.hero-full .eyebrow { color: var(--signal); }
.hero-full p { max-width: 52ch; font-size: 1.05rem; }
.hero-full .btn-group { justify-content: flex-start; margin-bottom: 0; }
@media (max-width: 760px) { .hero-full { min-height: 0; padding: 3rem 0; } }

/* ==========================================================================
   Editorial rows — a list that reads like a price list, not a card grid
   ========================================================================== */
.rows {
  max-width: var(--container-wide);
  margin: 0 auto 5rem;
  padding: 0 24px;
}
.rows__inner { border-top: 1px solid var(--line); }
.row {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr) minmax(0, 1.15fr) auto;
  gap: 2rem;
  align-items: center;
  padding: 1.75rem 1.5rem;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  color: var(--ink-soft);
  transition: color 0.45s var(--ease-out);
}
/* the fill sweeps in from the left edge, the way a list selection would */
.row::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ink);
  transform: translateX(-101%);
  transition: transform 0.55s var(--ease-out);
}
.row:hover::before,
.row:focus-within::before { transform: translateX(0); }
.row__num {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--ink);
  transition: color 0.45s var(--ease-out);
}
.row__title {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  transition: color 0.45s var(--ease-out);
}
.row__text { margin: 0; font-size: 0.92rem; }
.row__go {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
  white-space: nowrap;
  transition: color 0.45s var(--ease-out);
}
.row:hover,
.row:focus-within { color: rgba(255, 255, 255, 0.7); }
.row:hover .row__num,
.row:hover .row__title,
.row:hover .row__go,
.row:focus-within .row__num,
.row:focus-within .row__title,
.row:focus-within .row__go { color: var(--white); }
.row:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }

@media (max-width: 860px) {
  .row {
    grid-template-columns: 3rem 1fr;
    gap: 0.4rem 1rem;
    padding: 1.5rem 1rem;
  }
  .row__num { grid-row: 1; }
  .row__title { grid-column: 2; }
  .row__text { grid-column: 2; }
  .row__go { grid-column: 2; margin-top: 0.5rem; }
}

/* ==========================================================================
   Two-column comparison
   ========================================================================== */
.compare {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  max-width: var(--container-wide);
  margin: 0 auto 6rem;
  padding: 0 24px;
}
.compare__col {
  padding: 3rem 2.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.compare__col--dark {
  background: var(--ink);
  border-color: var(--ink);
  color: rgba(255, 255, 255, 0.72);
}
.compare__col--dark h3 { color: var(--white); }
.compare__col--dark .compare__tag { background: var(--signal); color: var(--ink); }
.compare__tag {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  margin-bottom: 1.25rem;
  border-radius: var(--radius-pill);
  background: var(--cream-deep);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
}
.compare__col h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }
.compare__col ul { list-style: none; margin: 1.5rem 0 0; padding: 0; }
.compare__col li { padding: 0.8rem 0; border-top: 1px solid var(--line); font-size: 0.94rem; }
.compare__col--dark li { border-color: var(--line-invert); }
@media (max-width: 860px) {
  .compare { grid-template-columns: 1fr; }
  .compare__col { padding: 2.25rem 1.75rem; }
}

/* ==========================================================================
   Numbered process steps
   ========================================================================== */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  max-width: var(--container-wide);
  margin: 0 auto 6rem;
  padding: 0 24px;
}
/* the mint carries the rule; the label itself uses the darkened variant so it
   stays legible against the pale background */
.step { padding-top: 2rem; border-top: 2px solid var(--accent); }
.step__num {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--accent-text);
  margin-bottom: 0.75rem;
}
.step h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.step p { margin: 0; font-size: 0.92rem; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* ==========================================================================
   Alternating image/copy rows
   ========================================================================== */
.zigzag {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
  max-width: var(--container-wide);
  margin: 0 auto 4.5rem;
  padding: 0 24px;
}
.zigzag__media { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 3 / 2; }
.zigzag__media img { width: 100%; height: 100%; object-fit: cover; }
.zigzag--flip .zigzag__media { order: 2; }
.zigzag h3 { font-size: clamp(1.4rem, 2vw + 1rem, 2rem); margin-bottom: 0.85rem; }
.zigzag p { margin: 0; }
@media (max-width: 860px) {
  .zigzag { grid-template-columns: 1fr; gap: 1.75rem; }
  .zigzag--flip .zigzag__media { order: 0; }
}

/* ==========================================================================
   Sub-page building blocks
   ========================================================================== */
.page-head {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 24px 3rem;
  text-align: center;
}
.page-head p { font-size: 1.05rem; margin-bottom: 0; }
.page-head .btn-group { margin-bottom: 0; }

.section-title {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 4rem 24px 2.5rem;
}
.section-title h2 { margin: 0; max-width: 20ch; }

/* Informational cells — a rule draws along the top edge, no fill, because
   these are not links and a fill would imply a click. */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: var(--container-wide);
  margin: 0 auto 4rem;
  padding: 0 24px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.card {
  position: relative;
  padding: 2.5rem 2rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background-color 0.5s var(--ease-out);
}
.card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--signal);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.55s var(--ease-out);
}
.card:hover::before { transform: scaleX(1); }
.card:hover { background-color: var(--cream-deep); }
.card h3 { font-size: 1.15rem; margin-bottom: 0.6rem; }
.card p { margin: 0; font-size: 0.94rem; }
.card.dark { background: var(--olive); color: rgba(255, 255, 255, 0.82); }
.card.dark h3 { color: var(--white); }
.card.dark:hover { background-color: var(--olive); }

@media (max-width: 900px) { .cards-grid { grid-template-columns: 1fr; } }
@media (min-width: 901px) and (max-width: 1200px) { .cards-grid { grid-template-columns: repeat(2, 1fr); } }

/* Wide dark band */
.panel {
  max-width: var(--container-wide);
  margin: 4rem auto;
  padding: 0 24px;
}
.panel-inner {
  padding: 4.5rem 4rem;
  border-radius: var(--radius-lg);
  background: var(--ink);
  color: rgba(255, 255, 255, 0.75);
}
.panel-inner .panel-content { max-width: 62ch; }
.panel-inner h2, .panel-inner h3 { color: var(--white); margin-bottom: 1.25rem; }
.panel-inner p { margin: 0; line-height: 1.75; }
.panel-inner strong { color: var(--white); }
@media (max-width: 800px) { .panel-inner { padding: 2.5rem 1.75rem; } }

/* Split pairs (contact blocks) */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: var(--container-wide);
  margin: 4rem auto;
  padding: 0 24px;
  align-items: stretch;
}
.split .panel-dark,
.split .panel-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3.5rem 3rem;
}
.split .panel-dark {
  background: var(--olive);
  color: rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}
.split .panel-dark h2, .split .panel-dark h3 { color: var(--white); }
.split .panel-form,
.split .panel-contact {
  border: 1px solid var(--line);
  border-left: none;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}
.split .panel-contact {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3.5rem 3rem;
}
.split .panel-form.center { align-items: center; text-align: center; }

/* contact details, replacing the old mailto form */
.contact-list { margin: 0; }
.contact-list > div {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}
.contact-list > div:first-child { padding-top: 0; }
.contact-list dt {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.contact-list dd {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--ink);
}
.contact-list .link-wipe { font-weight: 600; }
.contact-cta { margin-top: 2rem; }

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .split .panel-dark { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .split .panel-form,
  .split .panel-contact {
    border-left: 1px solid var(--line);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  }
  .split .panel-dark,
  .split .panel-form,
  .split .panel-contact { padding: 2.5rem 1.75rem; }
}

/* ==========================================================================
   Forms — underline fields
   ========================================================================== */
.form-row { display: flex; gap: 1.5rem; margin-bottom: 1.75rem; }
.form-row > div { flex: 1; }
.form-group { margin-bottom: 1.75rem; }
label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 10px;
}
input[type="text"], input[type="email"], input[type="tel"], textarea, select {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 8px 0;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: transparent;
  transition: border-color 0.4s var(--ease-out);
}
input::placeholder, textarea::placeholder { color: rgba(26, 24, 21, 0.35); }
textarea { min-height: 120px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-bottom-color: var(--ink); }
.form-submit { margin-top: 2rem; }

/* ==========================================================================
   Contact info
   ========================================================================== */
.contact-info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: var(--container-wide);
  margin: 3rem auto;
  padding: 0 24px;
  border-top: 1px solid var(--line);
}
.contact-info > div { padding: 2.5rem 2rem 2.5rem 0; }
.contact-info h3 {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.contact-info p { margin: 0; font-size: 1.05rem; color: var(--ink); line-height: 1.9; }
.contact-info a { position: relative; }
.contact-info a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.4s var(--ease-inout);
}
.contact-info a:hover::after { transform: scaleX(1); transform-origin: left center; }
@media (max-width: 800px) {
  .contact-info { grid-template-columns: 1fr; }
  .contact-info > div { padding: 2rem 0; border-bottom: 1px solid var(--line); }
}

/* ==========================================================================
   Legal
   ========================================================================== */
.legal { max-width: 760px; margin: 2rem auto 7rem; padding: 0 24px; }
.legal h1 { margin-bottom: 2.5rem; }
.legal h2 {
  font-size: 1.15rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.legal h3 {
  font-size: 0.98rem;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}
.legal ul { margin: 0 0 1rem; padding-left: 1.25rem; }
.legal li { margin-bottom: 0.4rem; }
.legal strong { color: var(--ink); }
.legal a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 4rem 0 2.5rem;
  margin-top: 2rem;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 2.5rem;
  padding-bottom: 3rem;
}
.footer-brand { display: inline-flex; align-items: center; }
.footer-brand img { height: 26px; width: auto; }
.footer-top p { margin: 1rem 0 0; max-width: 34ch; font-size: 0.9rem; }
.footer-col h4 {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.footer-col a { position: relative; font-size: 0.92rem; }
.footer-col a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.4s var(--ease-inout);
}
.footer-col a:hover::after { transform: scaleX(1); transform-origin: left center; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
}
.footer-bottom a { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 860px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { justify-content: center; text-align: center; }
}

/* ==========================================================================
   Scroll reveal — the hidden start state is scoped to .js-reveal, which
   main.js only sets once it has a working observer.
   ========================================================================== */
.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s var(--ease-out);
}
.js-reveal [data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js-reveal [data-reveal] { opacity: 1; transform: none; transition: none; }
  .btn, .btn::before, .btn__chip, .arrow-swap svg,
  .link-wipe::before, .link-wipe::after,
  .main-nav a::after, .footer-col a::after, .contact-info a::after,
  .card, .card::before, .bento__title::after, .project__media::after,
  .row, .row::before, .row__num, .row__title, .row__go {
    transition: none;
  }
}

.spacer-sm { height: 3rem; }
.spacer-md { height: 6rem; }
.spacer-lg { height: 9rem; }
