:root {
  --cream: #f4f0e4;
  --olive: #555d3d;
  --olive-dark: #343c28;
  --ink: #292e24;
  --mono: "DM Mono", "SFMono-Regular", Consolas, monospace;
  --sans: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { display: flex; flex-direction: column; min-height: 100dvh; margin: 0; background: var(--olive); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
::selection { background: var(--olive); color: var(--cream); }
.mono { font-family: var(--mono); font-size: 10px; line-height: 1.5; letter-spacing: .09em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.topbar {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  min-height: 94px;
  padding: 15px clamp(22px, 4.2vw, 72px);
  background: var(--olive);
  color: var(--cream);
}
.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  background: var(--cream);
  color: var(--olive-dark);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.085em;
  text-decoration: none;
  transition: transform .25s ease, background .25s ease;
}
.brand span { color: #909b70; }
.brand:hover { transform: translateY(-2px); background: #fffdf3; }
.topbar nav { justify-self: end; display: flex; gap: clamp(20px, 3.4vw, 48px); }
.topbar nav a { text-decoration: none; font: 11px var(--mono); letter-spacing: .08em; white-space: nowrap; transition: color .2s ease; }
.topbar nav a:hover, .topbar nav a[aria-current="page"] { color: #e1e5ba; }
.nav-arrow { margin-left: 5px; font-size: 16px; }

.canvas { flex: 1; min-height: calc(100vh - 150px); margin: 0 14px; padding: 0 clamp(24px, 5.1vw, 88px); background-color: var(--cream); }
.grid-surface {
  background-image: linear-gradient(to right, rgba(85,93,61,.085) 1px, transparent 1px), linear-gradient(to bottom, rgba(85,93,61,.085) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: center 0;
}
.hero { display: flex; flex-direction: column; align-items: center; padding: clamp(48px, 6vw, 78px) 0 0; text-align: center; }
.hero h1, .contact-intro h1 { margin: 18px 0 0; font-size: clamp(48px, 6.2vw, 98px); line-height: .96; font-weight: 600; letter-spacing: -.09em; }
.hero h1 em, .contact-intro h1 em { color: var(--olive); font-style: normal; }
.cluster-wrap { width: min(100%, 520px); margin: 28px auto 36px; }
.cluster-caption { display: flex; align-items: center; justify-content: space-between; color: var(--olive); }
.pebble-cluster { position: relative; width: 100%; aspect-ratio: 1.2; isolation: isolate; }
.pebble {
  position: absolute;
  left: calc(var(--x) * 1%);
  top: calc(var(--y) * 1%);
  display: block;
  width: calc(var(--size) * 16.5%);
  aspect-ratio: 1.55;
  transform: translate(-50%, -50%) rotate(var(--rotation));
  z-index: 1;
  border-radius: 50%;
  outline-offset: 5px;
  transition: transform .32s cubic-bezier(.2,.8,.2,1);
}
.pebble-center { z-index: 2; }
.stone-art { display: block; width: 100%; height: 100%; overflow: visible; }
.stone-art use { fill: #b9c0aa; stroke: #4c593b; stroke-width: 2.8; stroke-dasharray: 12 5; stroke-linecap: round; transition: fill .3s ease, stroke .3s ease; }
.is-filled .stone-art use { stroke-dasharray: none; }
.pebble:hover, .pebble:focus-visible { z-index: 5; transform: translate(-50%, -50%) rotate(var(--rotation)) scale(1.16); }
.pebble:hover .stone-art use, .pebble:focus-visible .stone-art use { fill: #7c896b; stroke: #343c28; }
.pebble:focus-visible { outline: 2px solid var(--olive-dark); }
.stone-photo { position: absolute; left: 50%; top: 50%; width: 77%; aspect-ratio: 1; border-radius: 50%; border: 2px solid var(--olive-dark); object-fit: cover; opacity: 0; transform: translate(-50%, -50%) scale(.76); transition: opacity .32s ease, transform .32s ease; }
.has-photo:hover .stone-photo, .has-photo:focus-visible .stone-photo { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.cluster-caption { gap: 20px; min-height: 37px; padding: 9px 5px 0; border-top: 1px solid rgba(85,93,61,.45); text-align: left; }
.cluster-caption span:last-child { text-align: right; }

.footer { display: flex; min-height: 56px; padding: 19px clamp(28px, 5.1vw, 88px); color: var(--cream); }

.contact-canvas { display: flex; flex-direction: column; }
.contact-canvas > .back-link { margin-top: 22px; }
.contact-content { display: grid; grid-template-columns: 1.04fr .96fr; gap: clamp(60px, 10vw, 190px); width: 100%; max-width: 1320px; margin: auto; padding: 90px 0 85px; }
.contact-intro h1 { font-size: clamp(50px, 5.6vw, 82px); }
.contact-intro > p { max-width: 390px; margin: 30px 0 24px; color: #626654; font-size: 16px; line-height: 1.6; }
.contact-form { align-self: center; padding: 32px 36px 30px; background: rgba(244,240,228,.82); border: 1px solid rgba(85,93,61,.45); box-shadow: 12px 12px 0 rgba(85,93,61,.08); }
.form-heading { display: flex; justify-content: space-between; margin-bottom: 42px; padding-bottom: 13px; color: var(--olive); border-bottom: 1px solid rgba(85,93,61,.48); }
.contact-form label { display: flex; justify-content: space-between; margin: 0 0 11px; font: 10px var(--mono); letter-spacing: .12em; color: var(--olive); }
.contact-form input, .contact-form textarea { display: block; width: 100%; margin: 0 0 30px; padding: 12px 0; background: transparent; border: 0; border-bottom: 1px solid rgba(85,93,61,.5); border-radius: 0; color: var(--ink); font-size: 16px; outline: none; resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--olive-dark); box-shadow: 0 1px 0 var(--olive-dark); }
.contact-form input::placeholder, .contact-form textarea::placeholder { color: #8b8f7c; }
.contact-form textarea { min-height: 100px; }
.contact-form button { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 19px 20px; background: var(--olive); color: var(--cream); border: 1px solid var(--olive); cursor: pointer; font: 11px var(--mono); letter-spacing: .12em; transition: background .2s ease, transform .2s ease; }
.contact-form button:hover { background: var(--olive-dark); transform: translateY(-2px); }
.contact-form button span { font-size: 19px; }
.form-note { margin: 16px 0 0; color: #717861; font-size: 9px; }
.back-link { align-self: flex-start; text-decoration: none; color: var(--olive); }
.back-link:hover { text-decoration: underline; }

@media (min-width: 901px) {
  body { height: 100dvh; overflow: hidden; }
  .canvas { min-height: 0; overflow: hidden; }
  .hero { height: 100%; min-height: 0; justify-content: center; padding: 0; }
  .hero h1 { margin: 0; font-size: clamp(44px, min(6.2vw, 9vh), 98px); }
  .cluster-wrap { width: min(520px, 56vh, 100%); margin: clamp(8px, 2vh, 28px) auto 0; }
  .contact-content { flex: 1; min-height: 0; margin: 0 auto; padding: 8px 0 18px; align-items: center; }
}
@media (min-width: 901px) and (max-height: 850px) {
  .contact-form { padding: 20px 26px; }
  .form-heading { margin-bottom: 22px; }
  .contact-form input, .contact-form textarea { margin-bottom: 15px; padding: 8px 0; }
  .contact-form textarea { min-height: 65px; }
  .contact-form button { padding: 13px 16px; }
  .form-note { margin-top: 10px; }
}
@media (min-width: 901px) and (max-height: 650px) {
  .contact-form { padding: 14px 22px; }
  .form-heading { margin-bottom: 12px; padding-bottom: 9px; }
  .contact-form label { margin-bottom: 6px; }
  .contact-form input, .contact-form textarea { margin-bottom: 9px; padding: 5px 0; }
  .contact-form textarea { min-height: 50px; max-height: 70px; }
  .contact-form button { padding: 10px 14px; }
  .form-note { margin-top: 6px; }
}
@media (min-width: 901px) and (max-height: 580px) {
  body { height: auto; overflow: auto; }
  .canvas { min-height: 430px; overflow: visible; }
}
@media (min-width: 681px) and (max-width: 900px) {
  .hero { min-height: calc(100vh - 150px); justify-content: center; padding: 40px 0; }
}
@media (max-width: 900px) {
  .contact-content { gap: 50px; }
}
@media (max-width: 680px) {
  .topbar { min-height: 75px; padding: 10px 16px; }
  .brand { width: 58px; height: 58px; font-size: 14px; }
  .topbar nav { gap: 15px; }
  .topbar nav a { font-size: 9px; }
  .nav-arrow { margin-left: 2px; font-size: 13px; }
  .canvas { margin: 0 7px; padding: 0 19px; }
  .hero { padding-top: 72px; }
  .hero h1 { margin-top: 17px; font-size: clamp(45px, 11vw, 70px); }
  .cluster-wrap { width: min(100%, 340px); margin: 36px auto 38px; }
  .cluster-caption { font-size: 8px; }
  .pebble-cluster { aspect-ratio: 1.03; }
  .pebble { width: calc(var(--size) * 18%); }
  .footer { padding: 19px 18px; font-size: 8px; }
  .contact-content { grid-template-columns: 1fr; gap: 45px; padding: 80px 0 55px; }
  .contact-intro h1 { font-size: clamp(48px, 11vw, 68px); }
  .contact-form { padding: 24px 21px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
