/* The Salty Sea Shed
   Palette is pulled from real sea glass: frosted aqua, seafoam, cobalt,
   the odd bit of amber and lavender, set on warm sand with deep-sea ink. */

:root {
  --foam: #f7f4ed;
  --shell: #fffdf8;
  --sand: #ebe1cf;
  --mist: #e2f2eb;
  --driftwood: #7c6f5e;
  --ink: #12303b;
  --ink-soft: #40565f;
  --seafoam: #a9dccb;
  --aqua: #74c6cb;
  --teal: #23787c;
  --cobalt: #3563ae;
  --amber: #d9a04a;
  --lavender: #bfa8d8;

  --font-display: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --font-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-hand: 'Caveat', 'Bradley Hand', 'Segoe Print', cursive;

  --pebble: 58% 42% 55% 45% / 48% 60% 40% 52%;
  --shadow: 0 22px 44px -26px rgba(18, 48, 59, 0.5);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --header-h: 4.5rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-soft);
  background: var(--foam);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

h1,
h2 {
  font-family: var(--font-display);
  font-variation-settings: 'SOFT' 100, 'WONK' 1;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.02;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.75rem, 7.2vw, 5.4rem);
}

h2 {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--teal);
}

:focus-visible {
  outline: 3px solid var(--cobalt);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Decorative bits (tilted ribbon, floating glass) poke past the edges on
   purpose; clip them here so the page itself never scrolls sideways. */
main,
.site-footer {
  overflow-x: clip;
}

.wrap {
  width: min(1160px, 100% - 2.5rem);
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--ink);
  color: var(--foam);
  padding: 0.6rem 1rem;
  border-radius: 999px;
}

.skip:focus {
  top: 1rem;
}

.eyebrow {
  font-family: var(--font-hand);
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1;
  color: var(--teal);
  margin: 0 0 0.6rem;
  rotate: -2deg;
  transform-origin: left;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3.1rem;
  padding: 0.7rem 1.6rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--foam);
  font: 600 1rem/1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.25s var(--ease);
}

.btn:hover {
  background: var(--teal);
  border-color: var(--teal);
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
}

.btn-ghost:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--foam);
}

.btn-light {
  background: var(--foam);
  border-color: var(--foam);
  color: var(--ink);
}

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

.btn-small {
  min-height: 2.6rem;
  padding: 0.5rem 1.2rem;
  font-size: 0.95rem;
}

.btn .icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
}

.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}

.text-link {
  font-weight: 600;
  color: var(--ink);
  text-decoration-color: var(--aqua);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.text-link:hover {
  color: var(--teal);
}

/* ---------- sea glass pieces ---------- */

.glass {
  --c1: #d2eff0;
  --c2: #6bbfc5;
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  aspect-ratio: var(--ar, 1.2);
  rotate: var(--r, 0deg);
  border-radius: var(--pebble);
  background:
    radial-gradient(120% 90% at 24% 16%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 56%),
    linear-gradient(150deg, var(--c1), var(--c2));
  box-shadow:
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.45),
    inset -6px -10px 18px rgba(18, 48, 59, 0.12),
    0 16px 22px -14px rgba(18, 48, 59, 0.55);
  opacity: 0.94;
  animation: bob 7s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}

.glass::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: 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='1.1' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
  opacity: 0.8;
}

.glass.s2 {
  border-radius: 44% 56% 38% 62% / 58% 44% 56% 42%;
}

.glass.s3 {
  border-radius: 62% 38% 48% 52% / 40% 52% 48% 60%;
}

.g-seafoam { --c1: #d9f3e9; --c2: #8ccdb6; }
.g-aqua { --c1: #d2eff0; --c2: #6bbfc5; }
.g-cobalt { --c1: #b6caef; --c2: #3e6bb6; }
.g-amber { --c1: #f5deaf; --c2: #d2983d; }
.g-lavender { --c1: #eadff3; --c2: #b298cc; }
.g-white { --c1: #ffffff; --c2: #d6e3de; }

@keyframes bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -10px; }
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 244, 237, 0.86);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  transition: box-shadow 0.3s;
}

.site-header.scrolled {
  box-shadow: 0 10px 30px -22px rgba(18, 48, 59, 0.6);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
}

.logo-mark {
  width: 2.6rem;
  height: 2.6rem;
  flex: none;
}

.logo-text {
  position: relative;
  font-family: var(--font-display);
  font-variation-settings: 'SOFT' 100, 'WONK' 1;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1;
  padding-top: 0.55rem;
  white-space: nowrap;
}

.logo-the {
  position: absolute;
  top: -0.35rem;
  left: 0.1rem;
  font-family: var(--font-hand);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--teal);
  rotate: -6deg;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.site-nav a:not(.btn) {
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s;
}

.site-nav a:not(.btn):hover {
  background: rgba(116, 198, 203, 0.3);
}

.site-nav .btn {
  margin-left: 0.5rem;
}

.menu-toggle {
  display: none;
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  cursor: pointer;
  place-items: center;
}

.menu-bars,
.menu-bars::before,
.menu-bars::after {
  display: block;
  width: 1.25rem;
  height: 2px;
  border-radius: 2px;
  background: var(--foam);
  transition: transform 0.3s var(--ease), background 0.2s;
}

.menu-bars {
  position: relative;
}

.menu-bars::before,
.menu-bars::after {
  content: '';
  position: absolute;
  left: 0;
}

.menu-bars::before { top: -6px; }
.menu-bars::after { top: 6px; }

.nav-open .menu-bars { background: transparent; }
.nav-open .menu-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-open .menu-bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 820px) {
  .menu-toggle {
    display: grid;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: calc(100dvh - var(--header-h));
    flex-direction: column;
    justify-content: center;
    gap: 1.25rem;
    background: var(--ink);
    opacity: 0;
    visibility: hidden;
    translate: 0 -12px;
    transition: opacity 0.3s, translate 0.3s var(--ease), visibility 0.3s;
  }

  .nav-open .site-nav {
    opacity: 1;
    visibility: visible;
    translate: 0 0;
  }

  .site-nav a:not(.btn) {
    color: var(--foam);
    font-family: var(--font-display);
    font-variation-settings: 'SOFT' 100, 'WONK' 1;
    font-size: 2.2rem;
  }

  .site-nav .btn {
    margin: 1rem 0 0;
    background: var(--seafoam);
    border-color: var(--seafoam);
    color: var(--ink);
    font-size: 1.1rem;
    padding-inline: 2rem;
  }

  body.nav-open {
    overflow: hidden;
  }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(4rem, 8vw, 6.5rem);
  background:
    radial-gradient(58rem 36rem at 88% 8%, rgba(116, 198, 203, 0.3), transparent 62%),
    radial-gradient(40rem 28rem at -5% 95%, rgba(169, 220, 203, 0.4), transparent 62%),
    radial-gradient(26rem 20rem at 45% 110%, rgba(217, 160, 74, 0.16), transparent 62%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(3rem, 6vw, 5rem);
  align-items: center;
}

.hero h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--teal);
  padding-bottom: 0.08em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14' preserveAspectRatio='none'%3E%3Cpath d='M3 9C20 2 35 13 55 7s35-5 55 1 45 6 87-3' fill='none' stroke='%23d9a04a' stroke-width='4' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") no-repeat 0 100% / 100% 0.22em;
}

.lede {
  max-width: 33rem;
  margin: 1.5rem 0 2.1rem;
  font-size: clamp(1.1rem, 1.6vw, 1.25rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.hero-art {
  position: relative;
  width: min(25rem, 78vw);
  aspect-ratio: 4 / 5;
  margin-inline: auto;
}

.hero-frame {
  position: absolute;
  inset: 0;
  rotate: 2.5deg;
  border: 0.7rem solid var(--shell);
  border-radius: 999px 999px 1.4rem 1.4rem;
  background: var(--sand);
  box-shadow: var(--shadow), 0 0 0 1px rgba(18, 48, 59, 0.06);
  overflow: hidden;
}

.hero-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge {
  position: absolute;
  left: -9%;
  bottom: -5%;
  width: 34%;
  rotate: -10deg;
  filter: drop-shadow(0 12px 14px rgba(18, 48, 59, 0.35));
}

.badge text {
  font: 600 10.5px var(--font-body);
  letter-spacing: 0.08em;
  fill: var(--seafoam);
}

.badge-spin {
  transform-origin: 60px 60px;
  animation: spin 26s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }

  .hero-art {
    width: min(27rem, 100%);
  }
}

/* ---------- marquee ---------- */

.marquee {
  position: relative;
  z-index: 2;
  overflow: hidden;
  padding: 0.95rem 0;
  background: var(--ink);
  color: var(--foam);
  rotate: -1.2deg;
  margin: -1.5rem -1rem;
  box-shadow: 0 16px 30px -22px rgba(18, 48, 59, 0.8);
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  width: max-content;
  padding-left: 1.6rem;
  font-family: var(--font-display);
  font-variation-settings: 'SOFT' 100, 'WONK' 1;
  font-style: italic;
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  white-space: nowrap;
  animation: slide 34s linear infinite;
}

.marquee-track i {
  font-style: normal;
  font-size: 0.8em;
  color: var(--aqua);
}

.marquee-track i:nth-of-type(3n + 2) { color: var(--amber); }
.marquee-track i:nth-of-type(3n) { color: var(--lavender); }

@keyframes slide {
  to { transform: translateX(-50%); }
}

/* ---------- sections ---------- */

.section {
  position: relative;
  padding: clamp(4.5rem, 10vw, 8rem) 0;
}

.section-head {
  max-width: 38rem;
  margin: 0 auto clamp(2rem, 5vw, 3.5rem);
  text-align: center;
}

.section-head .eyebrow {
  transform-origin: center;
}

.section-head p:last-child {
  margin: 1rem 0 0;
}

.wave {
  position: absolute;
  left: 0;
  bottom: calc(100% - 1px);
  width: 100%;
  height: clamp(2.25rem, 6vw, 5rem);
  display: block;
  pointer-events: none;
}

/* ---------- gallery ---------- */

.gallery-section {
  padding-bottom: clamp(6rem, 13vw, 11rem);
}

.gallery {
  columns: 2;
  column-gap: 0.85rem;
}

.gallery-loading,
.gallery-empty {
  column-span: all;
  text-align: center;
  font-family: var(--font-hand);
  font-size: 1.5rem;
  color: var(--driftwood);
  padding: 3rem 0;
}

.gallery-note {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 1.75rem;
  padding: 0.45rem 1.1rem;
  border: 1.5px dashed var(--amber);
  border-radius: 999px;
  background: rgba(217, 160, 74, 0.12);
  color: #6f4f14;
  font-size: 0.9rem;
  text-align: center;
}

.tile {
  --tilt: -1deg;
  display: block;
  margin: 0 0 0.85rem;
  padding: 0.4rem;
  break-inside: avoid;
  border-radius: 1rem;
  background: var(--shell);
  box-shadow: 0 14px 28px -20px rgba(18, 48, 59, 0.55), 0 0 0 1px rgba(18, 48, 59, 0.05);
  transition: transform 0.4s var(--ease), box-shadow 0.4s;
}

.tile:nth-child(even) {
  --tilt: 1deg;
}

.tile img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: var(--ar, 1);
  object-fit: cover;
  border-radius: 0.7rem;
  background: var(--sand);
}

@media (hover: hover) {
  .tile:hover {
    transform: translateY(-5px) rotate(var(--tilt));
    box-shadow: 0 26px 40px -24px rgba(18, 48, 59, 0.6), 0 0 0 1px rgba(18, 48, 59, 0.05);
  }
}

.gallery-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
  margin-top: clamp(1.5rem, 4vw, 2.75rem);
}

@media (min-width: 700px) {
  .gallery {
    columns: 3;
    column-gap: 1.35rem;
  }

  .tile {
    margin-bottom: 1.35rem;
    padding: 0.55rem;
  }
}

/* ---------- story ---------- */

.story-section {
  background: var(--shell);
  border-radius: clamp(2rem, 6vw, 4.5rem) clamp(2rem, 6vw, 4.5rem) 0 0;
  margin-top: calc(-1 * clamp(2rem, 6vw, 4.5rem));
  padding-bottom: clamp(7rem, 15vw, 12rem);
  overflow: hidden;
}

.story-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(3rem, 7vw, 5.5rem);
  align-items: center;
}

.collage {
  position: relative;
  width: min(26rem, 100%);
  aspect-ratio: 1 / 1.2;
  margin-inline: auto;
}

.snap {
  position: absolute;
  margin: 0;
  padding: 0.6rem 0.6rem 0;
  background: #fff;
  border-radius: 4px;
  box-shadow: var(--shadow), 0 0 0 1px rgba(18, 48, 59, 0.06);
}

.snap img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2px;
}

.snap figcaption {
  padding: 0.35rem 0 0.5rem;
  font-family: var(--font-hand);
  font-size: 1.35rem;
  color: var(--ink);
  text-align: center;
}

.snap-a {
  left: 0;
  top: 0;
  width: 54%;
  rotate: -5deg;
}

.snap-b {
  right: 0;
  bottom: 0;
  width: 52%;
  rotate: 4deg;
}

.story-copy h2 {
  margin-bottom: 1.4rem;
}

.traits {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.1rem;
}

.traits li {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.traits strong {
  display: block;
  font-family: var(--font-display);
  font-variation-settings: 'SOFT' 100, 'WONK' 1;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
}

.traits span:not(.glass) {
  font-size: 0.98rem;
}

.glass.mini {
  position: relative;
  flex: none;
  width: 2.9rem;
  animation: none;
}

.glass.deco {
  opacity: 0.75;
}

@media (min-width: 900px) {
  .story-grid {
    grid-template-columns: 0.9fr 1.1fr;
  }
}

/* ---------- visit ---------- */

.visit-section {
  background: var(--ink);
  color: #c9dadd;
  padding-bottom: clamp(7rem, 15vw, 12rem);
}

.visit-section > .wave {
  fill: var(--ink);
}

.visit-section h2 {
  color: var(--foam);
  margin-bottom: 1.75rem;
}

.visit-section .eyebrow,
.hand-note {
  color: var(--seafoam);
}

.visit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 4.5rem);
  align-items: center;
}

.details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 1.5rem;
  margin: 0 0 2rem;
}

.details dt {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--aqua);
  margin-bottom: 0.35rem;
}

.details dd {
  margin: 0;
  font-family: var(--font-display);
  font-variation-settings: 'SOFT' 100;
  font-size: 1.35rem;
  line-height: 1.3;
  color: var(--foam);
}

.visit-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem 1.25rem;
}

.hand-note {
  margin: 0;
  font-family: var(--font-hand);
  font-size: 1.5rem;
  line-height: 1;
  rotate: -3deg;
}

@media (min-width: 620px) {
  .map {
    aspect-ratio: 4 / 3;
  }
}

.map-frame {
  padding: 0.5rem;
  border-radius: 2rem;
  background: rgba(247, 244, 237, 0.1);
  rotate: 1deg;
}

.map {
  position: relative;
  z-index: 0;
  aspect-ratio: 1 / 1;
  width: 100%;
  border-radius: 1.55rem;
  overflow: hidden;
  background: #cfe3e2;
  display: grid;
  place-items: center;
  font: inherit;
}

.map-fallback {
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--foam);
  font-weight: 600;
  text-decoration: none;
}

.map .leaflet-tile-pane {
  filter: saturate(0.72) sepia(0.14) hue-rotate(-6deg) brightness(1.03);
}

.map.leaflet-container {
  display: block;
  font-family: var(--font-body);
}

.map .leaflet-popup-content-wrapper {
  border-radius: 1rem;
  box-shadow: var(--shadow);
}

.map .leaflet-popup-content {
  margin: 0.7rem 1rem;
  font: 600 1.05rem var(--font-display);
  color: var(--ink);
}

.map .leaflet-bar a {
  color: var(--ink);
}

.pin {
  display: block;
  width: 2.3rem;
  height: 2.3rem;
  border: 3px solid #fff;
  border-radius: var(--pebble);
  background: linear-gradient(150deg, #9adfe2, var(--teal));
  box-shadow: 0 8px 14px -4px rgba(18, 48, 59, 0.6);
  rotate: -12deg;
}

.pin::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  border: 2px solid var(--teal);
  animation: ping 2.4s ease-out infinite;
}

@keyframes ping {
  from { scale: 1; opacity: 0.8; }
  to { scale: 2.1; opacity: 0; }
}

@media (min-width: 900px) {
  .visit-grid {
    grid-template-columns: 0.8fr 1.2fr;
  }
}

/* ---------- contact ---------- */

.contact-section {
  background: linear-gradient(180deg, var(--mist), var(--foam) 70%);
  padding-bottom: clamp(7rem, 15vw, 11rem);
}

.contact-section > .wave {
  fill: var(--mist);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.contact-copy h2 {
  margin-bottom: 1.4rem;
}

.contact-quick {
  margin: 1.75rem 0 0;
}

.contact-direct {
  margin-top: 1.1rem;
  font-weight: 500;
  color: var(--ink);
}

.contact-direct a {
  overflow-wrap: anywhere;
}

.contact-form {
  /* "Ask about this piece" scrolls here. The extra margin covers the 22px the
     form rises as it fades in, so its top never ends up under the header. */
  scroll-margin-top: 1.5rem;
  display: grid;
  gap: 1.15rem;
  padding: clamp(1.4rem, 4vw, 2.5rem);
  border-radius: 1.75rem;
  background: var(--shell);
  box-shadow: var(--shadow), 0 0 0 1px rgba(18, 48, 59, 0.05);
}

.hp {
  position: absolute;
  left: -9999px;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.piece-chip {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.6rem 0.7rem;
  border-radius: 1.1rem;
  background: var(--mist);
  outline: none;
}

.piece-chip img {
  flex: none;
  width: 3.5rem;
  height: 3.5rem;
  object-fit: cover;
  border: 3px solid #fff;
  border-radius: 0.6rem;
  background: var(--sand);
}

.piece-chip p {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-weight: 500;
  line-height: 1.3;
  color: var(--ink);
}

.piece-label {
  display: block;
  font: 600 1.3rem/1 var(--font-hand);
  color: var(--teal);
}

#piece-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.piece-clear {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s;
}

.piece-clear:hover {
  background: rgba(18, 48, 59, 0.1);
}

.piece-clear svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
}

.field label {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1.5px solid #d9d0be;
  border-radius: 0.9rem;
  background: #fff;
  color: var(--ink);
  font: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field textarea {
  resize: vertical;
  min-height: 8rem;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(116, 198, 203, 0.35);
}

.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
}

.form-status {
  flex: 1 1 14rem;
  margin: 0;
  font-weight: 500;
  color: var(--ink);
}

.form-status.error {
  color: #a03a2c;
}

.form-done {
  text-align: center;
  padding-block: clamp(2rem, 6vw, 4rem);
}

.form-done h3 {
  font: 500 2rem/1.1 var(--font-display);
  font-variation-settings: 'SOFT' 100, 'WONK' 1;
  color: var(--ink);
  margin: 0 0 0.6rem;
}

.form-done p {
  margin: 0;
}

@media (min-width: 620px) {
  .contact-form {
    grid-template-columns: 1fr 1fr;
  }

  .field-wide,
  .form-done {
    grid-column: 1 / -1;
  }
}

@media (min-width: 900px) {
  .contact-grid {
    grid-template-columns: 0.85fr 1.15fr;
  }

  .contact-copy {
    position: sticky;
    top: calc(var(--header-h) + 2rem);
  }
}

/* ---------- footer ---------- */

.site-footer {
  position: relative;
  background: var(--ink);
  color: #a9c0c5;
  padding: 2.5rem 0 2.5rem;
}

.site-footer > .wave {
  fill: var(--ink);
}

.footer-inner {
  display: grid;
  gap: 1.5rem;
  justify-items: center;
  text-align: center;
}

.site-footer .logo {
  color: var(--foam);
}

.site-footer .logo-the {
  color: var(--seafoam);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.6rem;
}

.footer-nav a {
  color: var(--foam);
  text-decoration: none;
  font-weight: 500;
}

.footer-nav a:hover {
  color: var(--seafoam);
}

.fine {
  margin: 0;
  font-size: 0.88rem;
}

/* ---------- lightbox ---------- */

.lightbox {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  /* Bottom padding keeps the "ask" buttons clear of the prev / next arrows,
     which sit in the bottom corners on small screens. */
  padding: 3.75rem 0.75rem 1.75rem;
  border: 0;
  background: transparent;
  color: var(--foam);
  overflow: hidden;
}

.lightbox[open] {
  display: grid;
  place-items: center;
}

.lightbox::backdrop {
  background: rgba(8, 24, 31, 0.93);
  backdrop-filter: blur(6px);
}

.lb-figure {
  margin: 0;
  display: grid;
  justify-items: center;
  gap: 0.9rem;
  max-width: min(68rem, 100%);
}

.lb-figure img {
  display: block;
  max-width: 100%;
  /* Viewport minus everything else in the viewer: padding, caption, ask row, meta. */
  max-height: calc(100dvh - 18rem);
  width: auto;
  height: auto;
  border: 0.45rem solid #fff;
  border-radius: 0.5rem;
  background: var(--sand);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.7);
}

.lb-figure figcaption {
  max-width: 40rem;
  text-align: center;
}

#lb-caption {
  margin: 0;
  max-height: 3.5em;
  overflow-y: auto;
  font-family: var(--font-display);
  font-variation-settings: 'SOFT' 100;
  font-size: 1.15rem;
  line-height: 1.4;
}

.lb-ask {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 1rem;
  margin-top: 0.6rem;
}

.lb-ask-label {
  font: 600 1.4rem/1 var(--font-hand);
  color: var(--seafoam);
}

.lb-ask-actions {
  display: flex;
  gap: 0.6rem;
}

.lb-ask .btn {
  min-height: 2.5rem;
}

.lb-ghost {
  background: transparent;
  border-color: rgba(247, 244, 237, 0.55);
  color: var(--foam);
}

.lb-ghost:hover {
  background: rgba(247, 244, 237, 0.16);
  border-color: var(--foam);
}

.lb-meta {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin: 1rem 0 0;
  font-size: 0.88rem;
  color: #a9c0c5;
}

.lb-meta a {
  color: var(--seafoam);
}

.lb-btn {
  position: fixed;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 50%;
  background: rgba(247, 244, 237, 0.14);
  color: var(--foam);
  cursor: pointer;
  transition: background 0.2s;
}

.lb-btn:hover {
  background: rgba(247, 244, 237, 0.3);
}

.lb-btn svg {
  width: 1.4rem;
  height: 1.4rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lb-close { top: 0.6rem; right: 0.75rem; }
.lb-prev { left: 0.75rem; bottom: 1rem; }
.lb-next { right: 0.75rem; bottom: 1rem; }

@media (min-width: 900px) {
  .lightbox {
    padding-inline: 5.5rem;
    padding-bottom: 1.25rem;
  }

  .lb-figure img {
    max-height: calc(100dvh - 15.5rem);
  }

  .lb-meta {
    margin-top: 0.6rem;
  }

  .lb-prev,
  .lb-next {
    top: 50%;
    bottom: auto;
    translate: 0 -50%;
  }

  .lb-prev { left: 1.25rem; }
  .lb-next { right: 1.25rem; }
}

/* Phones on their side: too short to fit everything, so let the viewer scroll. */
@media (max-height: 520px) {
  .lightbox {
    overflow-y: auto;
  }

  .lightbox[open] {
    align-items: start;
  }

  .lb-figure img {
    max-height: 68dvh;
  }
}

/* ---------- motion ---------- */

.js .reveal {
  opacity: 0;
  translate: 0 22px;
  transition: opacity 0.8s var(--ease), translate 0.8s var(--ease);
}

.js .reveal.in {
  opacity: 1;
  translate: 0 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }

  .js .reveal {
    opacity: 1;
    translate: 0 0;
  }
}
