:root {
  --bg: #f6f1e8;
  --bg-2: #efe6d8;
  --elev: #fffdf8;
  --card: #ffffff;
  --ink: #1f1a14;
  --muted: #6d6458;
  --line: rgba(31, 26, 20, 0.1);
  --copper: #c67a2e;
  --copper-2: #9a5d26;
  --copper-3: #e0a85a;
  --shadow: 0 18px 50px rgba(55, 38, 18, 0.08);
  --radius: 22px;
  --wrap: 1180px;
  --font: "Outfit", system-ui, sans-serif;
  --serif: "Cormorant Garamond", Georgia, serif;
  --header: 76px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
}

body.nav-open { overflow: hidden; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(16px, 4.2vw, 28px);
  box-sizing: border-box;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--copper);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 600;
}

h1, h2, h3 { margin: 0; line-height: 1.08; letter-spacing: -0.03em; }

h1 {
  font-family: var(--serif);
  font-size: clamp(3rem, 7vw, 5.8rem);
  font-weight: 500;
}

h2 {
  font-family: var(--serif);
  font-size: clamp(2.1rem, 4.6vw, 3.6rem);
  font-weight: 500;
}

h2 em, h1 em {
  font-style: italic;
  color: var(--copper);
}

h3 { font-size: 1.25rem; font-weight: 600; }

.section { padding: 100px 0; }
.section-alt { background: var(--bg-2); }
.section-head { max-width: 680px; margin-bottom: 44px; }
.section-head p { color: var(--muted); }

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100%;
  z-index: 50;
  height: var(--header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(16px, 4.2vw, 28px);
  box-sizing: border-box;
  transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
  border-bottom: 1px solid transparent;
}

.header.is-scrolled {
  background: rgba(246, 241, 232, 0.88);
  backdrop-filter: blur(18px);
  border-bottom-color: var(--line);
  box-shadow: 0 8px 30px rgba(55, 38, 18, 0.05);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 2;
}

.brand img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 0;
  border: 0;
  background: transparent;
}

.brand strong {
  display: block;
  letter-spacing: 0.16em;
  font-size: 0.92rem;
}

.brand small {
  display: block;
  color: var(--copper);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.62rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 0.92rem;
}

.nav a { color: var(--muted); transition: color 0.2s; }
.nav a:hover { color: var(--copper); }

.nav-cta {
  padding: 10px 16px;
  border: 1px solid rgba(198, 122, 46, 0.45);
  border-radius: 999px;
  color: #fffdf8 !important;
  background: var(--copper);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  position: relative;
  z-index: 2;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  margin: 6px auto;
  transition: transform 0.3s;
}

/* Hero — masonry centered, 21st.dev spirit */
.hero {
  padding: calc(var(--header) + 48px) clamp(16px, 4.2vw, 28px) 40px;
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  box-sizing: border-box;
}

.hero-copy {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 40px;
}

.hero [data-reveal] {
  opacity: 1;
  transform: none;
  animation: heroIn 0.85s ease both;
}

.hero [data-reveal]:nth-child(1) { animation-delay: 0.05s; }
.hero [data-reveal]:nth-child(2) { animation-delay: 0.16s; }
.hero [data-reveal]:nth-child(3) { animation-delay: 0.28s; }
.hero [data-reveal]:nth-child(4) { animation-delay: 0.4s; }

@keyframes heroIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

.hero-lead {
  max-width: 540px;
  margin: 20px auto 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.hero-masonry {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 92px;
  gap: 12px;
}

.hero-tile {
  margin: 0;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: var(--shadow);
  animation: floaty 8s ease-in-out infinite;
}

.hero-tile:nth-child(2) { animation-delay: -2s; }
.hero-tile:nth-child(3) { animation-delay: -4s; }
.hero-tile:nth-child(5) { animation-delay: -1.5s; }

.hero-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-tile:nth-child(1) { grid-column: 1; grid-row: 1 / span 4; }
.hero-tile:nth-child(2) { grid-column: 2; grid-row: 1 / span 2; }
.hero-tile:nth-child(3) { grid-column: 3; grid-row: 1 / span 2; }
.hero-tile:nth-child(4) { grid-column: 2 / span 2; grid-row: 3 / span 2; }
.hero-tile:nth-child(5) { grid-column: 4; grid-row: 1 / span 2; }
.hero-tile:nth-child(6) { grid-column: 4; grid-row: 3 / span 3; }

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #e8c49a, #c9894a 45%, #b87333);
  color: #2a1a0c;
  font-weight: 600;
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.45), transparent 65%);
  transform: translateX(-130%);
}

.btn-primary:hover::after { animation: shine 0.8s ease; }

@keyframes shine {
  to { transform: translateX(130%); }
}

.btn-ghost {
  border-color: rgba(198, 122, 46, 0.45);
  background: var(--card);
  color: var(--copper-2);
}

/* Trust */
.trust {
  border-block: 1px solid var(--line);
  background: var(--elev);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.trust article {
  padding: 28px 8px;
  text-align: center;
}

.trust strong {
  display: block;
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--copper);
}

.trust span { color: var(--muted); font-size: 0.92rem; }

/* Marquee — 21st.dev */
.marquee {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--elev);
}

.marquee-track {
  display: flex;
  gap: 12px;
  width: max-content;
  padding: 18px 0;
  animation: marquee 42s linear infinite;
}

.marquee:hover .marquee-track { animation-play-state: paused; }

.marquee-track span {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--bg);
  white-space: nowrap;
}

.marquee-fade {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, var(--elev), transparent 12%, transparent 88%, var(--elev));
}

.marquee-cards {
  background: transparent;
  border: 0;
  margin-top: 8px;
}

.marquee-cards .marquee-track { padding: 8px 0 4px; gap: 16px; animation-duration: 48s; }

.marquee-cards .marquee-fade {
  background: linear-gradient(90deg, var(--bg-2), transparent 10%, transparent 90%, var(--bg-2));
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* Bento */
.bento {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 16px;
}

.bento-card {
  position: relative;
  isolation: isolate;
  padding: 26px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.35s ease, border-color 0.35s ease;
  --mx: 50%;
  --my: 30%;
}

.magic-spot {
  pointer-events: none;
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.2s ease;
  background: radial-gradient(
    240px circle at var(--mx) var(--my),
    rgba(255, 232, 196, 0.62),
    rgba(184, 115, 51, 0.18) 40%,
    transparent 68%
  );
}

.magic-spot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: radial-gradient(
    170px circle at var(--mx) var(--my),
    #f3d7b0 0%,
    var(--copper) 32%,
    transparent 58%
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.bento-card:hover .magic-spot,
.form:hover .magic-spot,
.bento-card.is-hot .magic-spot,
.form.is-hot .magic-spot {
  opacity: 1;
}

.bento-card:hover {
  transform: translateY(-5px);
  border-color: rgba(184, 115, 51, 0.4);
}

.bento-card p { color: var(--muted); margin: 10px 0 0; }
.card-icon { width: 44px; height: 44px; color: var(--copper); margin-bottom: 14px; }
.card-icon svg { width: 100%; height: 100%; }

.bento-card.is-feature {
  grid-row: 1 / span 2;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.bento-card.is-feature img {
  position: relative;
  z-index: 1;
  height: 280px;
  object-fit: cover;
  object-position: center 35%;
}

.bento-card.is-feature div { position: relative; z-index: 1; padding: 26px; }

.bento-card.is-wide {
  grid-column: 2 / span 2;
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.bento-card.is-wide .card-icon { margin: 0; }

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  list-style: none;
  margin: 36px 0 0;
  padding: 0;
}

.roof-map {
  margin-top: 40px;
  max-width: 780px;
}

.roof-map__head { max-width: 560px; margin-bottom: 14px; }

.roof-map__head h3 {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  font-weight: 500;
}

.roof-map__stage {
  position: relative;
  aspect-ratio: 736 / 531;
  border-radius: var(--radius);
  overflow: hidden;
  background: #d8cbb8;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.roof-map__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 45%;
}

.roof-map__photo--base { z-index: 0; }

.roof-map__photo--variant {
  z-index: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.roof-map__stage.is-preview .roof-map__photo--variant {
  opacity: 1;
}

.roof-map__stage.is-preview .roof-map__photo--variant[hidden] {
  display: block;
}

.roof-map__stage > .border-beam { z-index: 3; border-radius: inherit; }

.roof-map__stage > .border-beam::before {
  padding: 2px;
  animation-duration: 5s;
  background: conic-gradient(
    from var(--beam, 0deg),
    transparent 0 62%,
    rgba(232, 184, 109, 0.2) 72%,
    var(--copper) 82%,
    transparent 92%
  );
}

.roof-map__pins {
  position: absolute;
  inset: 0;
  z-index: 5;
}

.roof-map__stage.has-active .roof-pin:not(.is-active) { opacity: 0.55; }

.roof-pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transform: translate(-50%, -50%);
  font: inherit;
  color: inherit;
}

.roof-pin__dot {
  position: relative;
  z-index: 2;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--copper);
  box-shadow:
    0 0 0 3px #fffdf8,
    0 3px 10px rgba(55, 38, 18, 0.35);
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.roof-pin__pulse {
  position: absolute;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid rgba(198, 122, 46, 0.7);
  animation: roof-pin-pulse 2.8s ease-out infinite;
}

.roof-pin.is-active .roof-pin__dot,
.roof-pin:focus-visible .roof-pin__dot {
  transform: scale(1.2);
  background: var(--copper-3);
  box-shadow:
    0 0 0 3px #fffdf8,
    0 0 0 6px var(--copper),
    0 4px 14px rgba(198, 122, 46, 0.45);
}

.roof-pin.is-active .roof-pin__pulse {
  width: 44px;
  height: 44px;
  border-color: var(--copper);
  animation: roof-pin-halo 1.8s ease-out infinite;
}

.roof-pin__tag {
  position: absolute;
  left: 50%;
  bottom: calc(100% - 2px);
  transform: translateX(-50%) translateY(4px);
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--copper);
  color: #fffdf8;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 4px 14px rgba(55, 38, 18, 0.2);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.roof-pin:hover .roof-pin__tag,
.roof-pin:focus-visible .roof-pin__tag,
.roof-pin.is-active .roof-pin__tag {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

@keyframes roof-pin-pulse {
  0% { transform: scale(0.7); opacity: 0.55; }
  80% { transform: scale(1.35); opacity: 0; }
  100% { opacity: 0; }
}

@keyframes roof-pin-halo {
  0% { transform: scale(0.65); opacity: 0.7; }
  100% { transform: scale(1.7); opacity: 0; }
}

body.is-pin-edit .roof-map__stage {
  outline: 2px dashed rgba(184, 115, 51, 0.65);
  outline-offset: 3px;
}

body.is-pin-edit .roof-pin { cursor: grab; z-index: 5; }

body.is-pin-edit .roof-pin.is-dragging { cursor: grabbing; }

body.is-pin-edit .roof-pin__tag {
  opacity: 1;
  transform: translateX(-50%) translateY(-8px);
}

.pin-calibrate {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 120;
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.96);
  box-shadow: var(--shadow);
}

.pin-calibrate p { margin: 0; font-size: 0.85rem; color: var(--muted); }

.pin-calibrate__actions { display: flex; flex-wrap: wrap; gap: 8px; }

.pin-calibrate button {
  margin: 0;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  cursor: pointer;
  font-weight: 600;
}

.pin-calibrate button[data-pin-action="save"] {
  background: var(--ink);
  color: #fffdf8;
  border-color: var(--ink);
}

.pin-calibrate textarea {
  width: 100%;
  min-height: 72px;
  resize: vertical;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  font: 600 0.72rem/1.4 ui-monospace, monospace;
  padding: 8px 10px;
}

.steps li {
  padding: 18px 16px;
  border-radius: 18px;
  background: #f8efe3;
  border: 1px solid rgba(198, 122, 46, 0.28);
}

.steps strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.4rem;
  color: var(--copper);
  margin-bottom: 4px;
}

/* Gallery */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }

.chip {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
}

.chip.is-active,
.chip:hover {
  color: #fffdf8;
  background: var(--copper);
  border-color: var(--copper);
}

.gallery {
  columns: 3;
  column-gap: 14px;
}

.gallery-item {
  break-inside: avoid;
  margin: 0 0 14px;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
}

.gallery-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #ddd4c6;
  cursor: zoom-in;
}

.gallery-item img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.gallery-item:nth-child(3n) img { aspect-ratio: 4 / 3; }
.gallery-item:nth-child(5n) img { aspect-ratio: 3 / 4; }

.gallery-item:hover img { transform: scale(1.06); }

.gallery-meta {
  position: absolute;
  inset: auto 0 0;
  padding: 28px 16px 14px;
  background: linear-gradient(transparent, rgba(20, 14, 8, 0.72));
  text-align: left;
  color: #fff;
}

.gallery-cat {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.68rem;
  color: var(--copper-3);
}

.gallery-title { font-weight: 500; }

/* Split / about */
.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  align-items: center;
}

.portrait {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 32px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.portrait img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.portrait-card {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
}

.portrait-card span { color: var(--muted); font-size: 0.85rem; }
.portrait-card strong { display: block; }

.checklist {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.checklist li {
  padding: 10px 0 10px 28px;
  border-top: 1px solid var(--line);
  position: relative;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--copper);
  box-shadow: 0 0 0 4px rgba(184, 115, 51, 0.16);
}

/* Reviews */
.quote-card {
  width: 320px;
  flex: 0 0 auto;
  padding: 22px;
  border-radius: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--copper);
  box-shadow: var(--shadow);
}

.quote-card blockquote {
  margin: 10px 0 14px;
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.35;
  font-style: italic;
}

.quote-card cite {
  display: block;
  font-style: normal;
  font-size: 0.85rem;
  color: var(--muted);
}

.quote-card p { margin: 0; color: var(--muted); }
.quote-card .stars { color: var(--copper); letter-spacing: 0.1em; margin: 0; }
.quote-card.is-score { display: grid; place-content: center; text-align: center; background: #1f1a14; color: #f6f1e8; }
.quote-card.is-score p { color: #d8cfc2; }
.quote-card .score {
  font-family: var(--serif);
  font-size: 4rem;
  line-height: 0.9;
  margin: 0 0 6px;
  color: var(--copper-3);
}

.review-cta { text-align: center; margin-top: 28px; }

/* Contact */
.contact-list {
  list-style: none;
  padding: 0;
  margin: 28px 0;
}

.contact-list li { padding: 12px 0; border-top: 1px solid var(--line); }
.contact-list span { display: block; color: var(--muted); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; }
.contact-list a, .contact-list em { font-style: normal; color: var(--ink); }

.map-frame {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  min-height: 220px;
  box-shadow: var(--shadow);
}

.map-frame iframe { width: 100%; height: 220px; border: 0; }

.form {
  position: relative;
  isolation: isolate;
  display: grid;
  gap: 14px;
  padding: 28px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  --mx: 50%;
  --my: 20%;
}

.form > *:not(.border-beam):not(.magic-spot) { position: relative; z-index: 2; }

/* 21st.dev — Border Beam */
.border-beam {
  pointer-events: none;
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  z-index: 4;
}

.border-beam::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(
    from var(--beam, 0deg),
    transparent 0 68%,
    #f0d2aa,
    var(--copper),
    transparent 88%
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: beam 6s linear infinite;
}

@property --beam {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

@keyframes beam {
  to { --beam: 360deg; }
}

.form label { display: grid; gap: 6px; font-size: 0.86rem; color: var(--muted); }

.form input,
.form select,
.form textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
}

.form input:focus,
.form select:focus,
.form textarea:focus { border-color: rgba(184, 115, 51, 0.7); background: #fff; }

.form-status { min-height: 1.4em; font-size: 0.88rem; }
.form-status[data-state="ok"] { color: #3d6b32; }
.form-status[data-state="error"] { color: #9a2f2f; }

/* Footer */
.footer {
  border-top: 1px solid var(--line);
  padding: 48px 0 100px;
  color: var(--muted);
  background: #ebe3d4;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 24px;
  margin-bottom: 28px;
}

.footer img {
  width: 88px;
  height: auto;
  border-radius: 0;
  margin-bottom: 12px;
  background: transparent;
}
.footer a { display: block; margin: 6px 0; }
.footer a:hover { color: var(--copper); }
.copy { text-align: center; font-size: 0.8rem; }

.mobile-bar {
  display: none;
  position: fixed;
  inset: auto 16px 16px;
  z-index: 40;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mobile-bar a {
  display: grid;
  place-items: center;
  height: 48px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.mobile-bar .is-fill {
  background: linear-gradient(135deg, #d4a574, var(--copper));
  color: #1a1008;
  font-weight: 600;
  border: 0;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(20, 14, 8, 0.9);
  display: grid;
  place-items: center;
  padding: 48px 72px;
}

.lightbox[hidden] { display: none; }

.lightbox figure { margin: 0; max-width: min(1100px, 100%); }
.lightbox img { max-height: 78vh; width: auto; margin: 0 auto; border-radius: 12px; }
.lightbox figcaption { text-align: center; margin-top: 12px; color: #d8cfc2; }

.lightbox-x,
.lightbox-nav {
  position: absolute;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
}

.lightbox-x { top: 18px; right: 24px; }
.lightbox-nav.is-prev { left: 18px; }
.lightbox-nav.is-next { right: 18px; }

/* Reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  transition-delay: var(--d, 0ms);
}

[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* Legal pages */
.legal {
  padding: 140px 0 80px;
  min-height: 70vh;
}

.legal h1 { font-size: clamp(2.4rem, 6vw, 4rem); margin-bottom: 24px; }
.legal h2 { font-size: 1.6rem; margin: 32px 0 10px; }
.legal p, .legal li { color: var(--muted); max-width: 72ch; }

/* Responsive */
@media (max-width: 900px) {
  .header,
  .wrap,
  .hero,
  .nav {
    width: 100%;
    max-width: 100%;
  }

  .nav-toggle { display: block; }

  .nav {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    background: rgba(246, 241, 232, 0.98);
    transform: translateY(-110%);
    transition: transform 0.4s ease;
  }

  .nav.is-open { transform: none; }

  .hero-actions { width: 100%; }
  .hero-actions .btn { width: 100%; }
  .roof-map { max-width: 100%; }
  .lightbox { padding: 24px 16px; }

  .trust-grid,
  .split,
  .footer-grid,
  .steps { grid-template-columns: 1fr 1fr; }

  .bento { grid-template-columns: 1fr 1fr; }
  .bento-card.is-feature { grid-row: auto; grid-column: 1 / -1; }
  .bento-card.is-wide { grid-column: 1 / -1; }

  .hero-masonry {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 110px;
  }

  .hero-tile:nth-child(1) { grid-column: 1; grid-row: 1 / span 2; }
  .hero-tile:nth-child(2) { grid-column: 2; grid-row: 1; }
  .hero-tile:nth-child(3) { grid-column: 2; grid-row: 2; }
  .hero-tile:nth-child(4),
  .hero-tile:nth-child(5),
  .hero-tile:nth-child(6) { display: none; }

  .gallery { columns: 2; }
  .mobile-bar { display: grid; }
  .section { padding: 72px 0; }
}

@media (max-width: 640px) {
  .gallery { columns: 1; }
  .trust-grid,
  .split,
  .steps,
  .footer-grid,
  .bento { grid-template-columns: 1fr; }
  .hero { padding-top: calc(var(--header) + 28px); }
  h1 { font-size: clamp(2.4rem, 11vw, 3.4rem); }
  .form { padding: 20px 16px; }
  .mobile-bar {
    left: 12px;
    right: 12px;
    width: auto;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }
  .section { padding-bottom: 96px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-tile, .marquee-track, .scroll-hint span, .border-beam::before, .roof-pin__pulse,
  .roof-pin.is-active .roof-pin__pulse { animation: none; }
  .magic-spot { display: none; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}
