:root {
  --ink: #171717;
  --muted: #686868;
  --line: #dedede;
  --accent: #a64b36;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  color: var(--ink);
  background: #fff;
  font-family: "DM Sans", Arial, sans-serif;
}

main {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: clamp(4rem, 9vw, 8rem) 0 5rem;
}

.intro { max-width: 900px; margin-bottom: clamp(5rem, 10vw, 9rem); }

.eyebrow {
  margin: 0 0 1.25rem;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

h1, h2 { font-family: "Playfair Display", Georgia, serif; font-weight: 500; }

h1 {
  margin: 0 0 2rem;
  font-size: clamp(3.8rem, 8vw, 8rem);
  line-height: 0.94;
  letter-spacing: -0.045em;
}

h1 em { color: var(--accent); font-weight: 500; }

.lead {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  line-height: 1.65;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: end;
  margin-bottom: 1.5rem;
}

.section-heading .eyebrow { margin-bottom: 0.55rem; }

h2 { margin: 0; font-size: clamp(2.3rem, 4vw, 4rem); line-height: 1; }

.section-heading > p {
  margin: 0 0 0.25rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.splat-viewer { display: flex; flex-direction: column; gap: 10px; }

.splat-viewport {
  position: relative;
  height: min(76vh, 780px);
  min-height: 560px;
  overflow: hidden;
  background: #f1f1f1;
  border: 1px solid var(--line);
}

.splat-canvas { position: absolute; inset: 0; }

.splat-controls {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 54px;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  background: #fff;
}

.viewer-status {
  flex: 1;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viewer-button {
  padding: 0.65rem 0.85rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cfcfcf;
  cursor: pointer;
  font: 600 0.7rem "DM Sans", sans-serif;
  letter-spacing: 0.04em;
}

.viewer-button:hover { color: #fff; background: var(--ink); border-color: var(--ink); }
.viewer-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.viewer-error { display: grid; min-height: 360px; padding: 2rem; place-items: center; color: var(--accent); text-align: center; }

.splat-viewer:fullscreen { width: 100vw; height: 100vh; padding: 10px; background: #fff; }
.splat-viewer:fullscreen .splat-viewport { flex: 1; height: auto; min-height: 0; }

footer {
  display: flex;
  justify-content: space-between;
  padding: 1.5rem max(24px, calc((100vw - 1240px) / 2));
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

@media (max-width: 700px) {
  main { width: min(100% - 28px, 1240px); padding-top: 3.5rem; }
  .intro { margin-bottom: 5rem; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 1rem; }
  .splat-viewport { height: 68vh; min-height: 440px; }
  .splat-controls { flex-wrap: wrap; }
  .viewer-status { flex-basis: 100%; order: 2; }
  footer { padding-inline: 14px; }
}
