:root {
  --rosy: #8f8389;
  --graphite: #34312d;
  --sage: #77ad78;
  --seashell: #fff4ec;
  --parchment: #fbf7f4;
  --pad: clamp(1.25rem, 5vw, 3.5rem);
  --scroll-track: #f0e9e2;
  --scroll-thumb: #a89a94;
  --scroll-thumb-hover: #77ad78;
}

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

html {
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
}

.enquiry textarea {
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: var(--scroll-track);
}

*::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border: 2px solid var(--scroll-track);
  border-radius: 0;
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--scroll-thumb-hover);
}

*::-webkit-scrollbar-corner {
  background: var(--scroll-track);
}

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

body {
  min-height: 100%;
  min-height: 100dvh;
  background: var(--parchment);
  color: var(--graphite);
  font-family: "Source Sans Pro", Helvetica, sans-serif;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.55;
}

a,
a:link,
a:visited {
  color: var(--graphite);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--sage);
}

.page {
  min-height: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

header,
footer {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem 2rem;
  flex-shrink: 0;
  padding: 1.05rem var(--pad);
  background: var(--seashell);
}

header {
  border-bottom: 1px solid var(--rosy);
}

footer {
  border-top: 1px solid var(--rosy);
  color: var(--rosy);
  font-size: 0.92rem;
}

.brand {
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.95rem;
}

nav a {
  color: var(--rosy);
}

nav a:hover,
nav a:focus-visible {
  color: var(--sage);
}

nav a[aria-current="page"] {
  display: none;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 34rem;
  padding: 2.5rem var(--pad);
}

main.work {
  justify-content: flex-start;
  max-width: none;
  width: 100%;
  padding-top: 2rem;
  padding-bottom: 2.5rem;
}

.work-section {
  width: 100%;
  margin: 0 0 2.75rem;
}

.work-section-ongoing {
  margin-top: 0.25rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(143, 131, 137, 0.4);
}

.work-section-head {
  margin: 0 0 1.25rem;
  max-width: 36rem;
}

.work-section-head h2 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--graphite);
}

.work-section-head p {
  margin: 0;
  font-size: 0.98rem;
  color: var(--rosy);
}

.work-card-ongoing {
  border-left-color: var(--rosy);
}

.page-intro {
  display: block;
  max-width: none;
  width: 100%;
  margin: 0 0 1.8rem;
  padding: 0;
  background: transparent;
  border: none;
}

.page-intro h1 {
  margin-bottom: 0.55rem;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
  width: 100%;
}

.tile {
  display: flex;
  flex-direction: column;
  color: var(--graphite);
  text-decoration: none;
}

.tile:link,
.tile:visited {
  color: var(--graphite);
}

.tile:hover .tile-media,
.tile:focus-visible .tile-media {
  border-color: var(--graphite);
}

.tile:hover h2,
.tile:focus-visible h2 {
  color: var(--sage);
}

.tile-media {
  width: 100%;
  aspect-ratio: 4 / 3;
  margin-bottom: 0.7rem;
  border: 1px solid var(--rosy);
  background: var(--seashell);
}

.tile h2 {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
}

.tile p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--rosy);
}

.tone-a { background: #e7ddd4; }
.tone-b { background: #d9e5d5; }
.tone-c { background: #e4d9df; }
.tone-d { background: #ddd8d1; }
.tone-e { background: #ebe4da; }
.tone-f { background: #d5ddd8; }

.tiles-single {
  grid-template-columns: minmax(0, 1fr);
  max-width: none;
  width: 100%;
}

.tile-media-photo {
  overflow: hidden;
  padding: 0;
}

.tile-media-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.work-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17.5rem, 22rem));
  gap: 1.25rem;
  width: 100%;
  justify-content: start;
}

.work-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  color: var(--graphite);
  text-decoration: none;
  background: var(--seashell);
  border: 1px solid rgba(143, 131, 137, 0.45);
  border-left: 3px solid var(--sage);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.work-card:link,
.work-card:visited {
  color: var(--graphite);
}

.work-card:hover,
.work-card:focus-visible {
  border-color: rgba(52, 49, 45, 0.55);
  border-left-color: var(--sage);
  transform: translateY(-2px);
}

.work-card:hover .work-card-more,
.work-card:focus-visible .work-card-more {
  color: var(--sage);
  border-bottom-color: var(--sage);
}

.work-card-media {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #141210;
  border-bottom: 1px solid rgba(143, 131, 137, 0.35);
}

.work-card-media-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(135deg, rgba(119, 173, 120, 0.35), transparent 55%),
    #2a2623;
  color: rgba(251, 247, 244, 0.72);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.work-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.45s ease;
}

.work-card:hover .work-card-media img,
.work-card:focus-visible .work-card-media img {
  transform: scale(1.03);
}

.work-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1rem 1.05rem 1.15rem;
  flex: 1;
}

.work-card-tag {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rosy);
}

.work-card-body h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.work-card-lead {
  margin: 0.15rem 0 0;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--graphite);
  opacity: 0.88;
}

.work-card-more {
  margin: auto 0 0;
  padding-top: 0.85rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--graphite);
  border-bottom: 1px solid transparent;
  align-self: flex-start;
  transition: color 0.15s ease, border-color 0.15s ease;
}

main.case-study {
  justify-content: flex-start;
  max-width: none;
  width: 100%;
  padding: 0 0 3.5rem;
}

.case-sheet {
  width: min(100%, 72rem);
  margin: 0 auto;
  padding: 2.25rem var(--pad) 0;
}

.case-pad {
  width: 100%;
  padding: 1.5rem var(--pad) 0;
}

.case-back {
  margin: 0 0 1.15rem;
  font-size: 0.92rem;
}

.case-back a {
  border-bottom: 1px solid transparent;
}

.case-back a:hover,
.case-back a:focus-visible {
  border-bottom-color: var(--sage);
}

.case-mast {
  width: 100%;
  margin: 0;
  padding: 1.15rem var(--pad) 2.1rem;
  background: var(--seashell);
  border-bottom: 1px solid rgba(143, 131, 137, 0.45);
}

.case-mast-inner {
  width: min(100%, 72rem);
  margin: 0 auto;
}

.case-mast-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(14rem, 0.75fr);
  gap: 1.75rem 2.25rem;
  align-items: start;
}

.case-mast-copy .place-line {
  margin-bottom: 0.7rem;
}

.case-mast-copy h1 {
  margin: 0 0 0.85rem;
  max-width: 18ch;
  font-size: clamp(1.85rem, 3.6vw, 2.55rem);
}

.case-mast-copy > p {
  margin: 0;
  max-width: 38rem;
  color: var(--rosy);
}

.case-facts {
  padding: 0 0 0 1.15rem;
  background: transparent;
  border-left: 3px solid var(--sage);
}

.case-facts-label {
  margin: 0 0 0.85rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sage);
}

.case-facts dl {
  margin: 0;
  display: grid;
  gap: 0.85rem;
}

.case-facts dl div {
  margin: 0;
}

.case-facts dt {
  margin: 0 0 0.15rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rosy);
}

.case-facts dd {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--graphite);
  line-height: 1.4;
}

.case-facts a {
  border-bottom: 1px solid rgba(52, 49, 45, 0.35);
}

.case-facts a:hover,
.case-facts a:focus-visible {
  border-bottom-color: var(--sage);
}

.case-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 1.5rem 2rem;
  align-items: center;
  margin: 0 0 2.75rem;
}

.case-band-flip {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
}

.case-band-flip .case-band-copy {
  order: 2;
}

.case-band-flip .case-frame {
  order: 1;
}

.case-band-copy h2 {
  margin: 0 0 0.55rem;
  font-size: 1.2rem;
  font-weight: 600;
}

.case-band-copy > p {
  margin: 0 0 0.85rem;
  color: var(--graphite);
}

.case-band-copy > p:last-child {
  margin-bottom: 0;
}

.case-points {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.case-points li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem 0.9rem;
  align-items: start;
}

.case-point-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 1.7rem;
  padding: 0 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--graphite);
  background: rgba(119, 173, 120, 0.28);
}

.case-points strong {
  display: block;
  margin: 0 0 0.2rem;
  font-size: 0.98rem;
  font-weight: 600;
}

.case-points p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--rosy);
}

.case-frame {
  margin: 0;
  min-width: 0;
  background: #141210;
  border: 1px solid rgba(143, 131, 137, 0.4);
}

.case-frame img,
.case-frame video {
  display: block;
  width: 100%;
  height: auto;
}

.case-frame figcaption {
  margin: 0;
  padding: 0.55rem 0.75rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rosy);
  background: var(--seashell);
  border-top: 1px solid rgba(143, 131, 137, 0.35);
}

.case-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem 1.25rem;
  margin: 0 0 2.75rem;
  padding: 1.35rem 0;
  border-top: 1px solid rgba(143, 131, 137, 0.35);
  border-bottom: 1px solid rgba(143, 131, 137, 0.35);
}

.case-metric-value {
  margin: 0 0 0.35rem;
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--graphite);
}

.case-metric-label {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sage);
}

.case-metric-note {
  margin: 0;
  font-size: 0.9rem;
  color: var(--rosy);
  max-width: 18rem;
}

.case-duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem 1.5rem;
  margin: 0 0 2.75rem;
  align-items: start;
}

.case-duo-copy {
  display: grid;
  gap: 1.5rem;
}

.case-duo-copy h2 {
  margin: 0 0 0.55rem;
  font-size: 1.15rem;
  font-weight: 600;
}

.case-duo-copy p {
  margin: 0;
  color: var(--graphite);
}

.case-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem 2.5rem;
  margin: 0 0 2rem;
}

.case-columns h2 {
  margin: 0 0 0.55rem;
  font-size: 1.15rem;
  font-weight: 600;
}

.case-columns p {
  margin: 0;
  color: var(--graphite);
}

.case-columns a {
  border-bottom: 1px solid rgba(52, 49, 45, 0.35);
}

.case-columns a:hover,
.case-columns a:focus-visible {
  border-bottom-color: var(--sage);
}

/* Legacy full-bleed helpers (older markup) */
.case-intro {
  display: block;
  max-width: none;
  width: 100%;
  margin: 0 0 1.5rem;
  padding: 0;
  background: transparent;
  border: none;
}

.case-meta {
  margin: 0.85rem 0 0;
  font-size: 0.95rem;
  color: var(--rosy);
}

.case-meta a {
  border-bottom: 1px solid rgba(52, 49, 45, 0.35);
}

.case-meta a:hover,
.case-meta a:focus-visible {
  border-bottom-color: var(--sage);
}

.case-hero {
  margin: 0 0 2.25rem;
  width: 100%;
  border: none;
  border-top: 1px solid rgba(143, 131, 137, 0.35);
  border-bottom: 1px solid rgba(143, 131, 137, 0.35);
  background: #141210;
}

.case-hero img,
.case-video {
  display: block;
  width: 100%;
  height: auto;
}

.case-video {
  max-width: 100%;
  object-fit: contain;
  background: #141210;
  pointer-events: none;
}

.case-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.75rem 2.5rem;
  width: 100%;
  max-width: none;
  padding-top: 0;
}

.case-body .case-cta {
  grid-column: 1 / -1;
}

.case-body section h2 {
  margin: 0 0 0.55rem;
  font-size: 1.15rem;
  font-weight: 600;
}

.case-body section p {
  margin: 0 0 0.75rem;
  color: var(--graphite);
}

.case-body section p:last-child {
  margin-bottom: 0;
}

.case-body a {
  border-bottom: 1px solid rgba(52, 49, 45, 0.35);
}

.case-body a:hover,
.case-body a:focus-visible {
  border-bottom-color: var(--sage);
}

.case-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin: 0.5rem 0 0;
}

.case-cta .action {
  border-bottom-width: 1px;
}

@media screen and (max-width: 900px) {
  .case-mast-grid,
  .case-band,
  .case-band-flip,
  .case-metrics,
  .case-duo,
  .case-columns {
    grid-template-columns: 1fr;
  }

  .case-band-flip .case-band-copy,
  .case-band-flip .case-frame {
    order: unset;
  }

  .case-mast-copy h1 {
    max-width: none;
  }

  .case-facts {
    padding: 1rem 0 0;
    border-left: none;
    border-top: 3px solid var(--sage);
  }
}

@media screen and (max-width: 800px) {
  .case-body {
    grid-template-columns: 1fr;
  }
}

main.contact {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: stretch;
  max-width: none;
  width: 100%;
  min-height: 0;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background:
    radial-gradient(ellipse 70% 55% at 18% 42%, rgba(119, 173, 120, 0.14), transparent 60%),
    radial-gradient(ellipse 50% 40% at 88% 80%, rgba(143, 131, 137, 0.1), transparent 55%),
    var(--parchment);
}

.contact-layout {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: stretch;
  justify-items: center;
  width: 100%;
  max-width: none;
  margin: 0;
  min-height: 0;
}

.contact-layout.is-sending {
  grid-template-columns: 1fr;
  justify-items: center;
  position: relative;
}

.contact-layout.is-sending .contact-panel {
  position: absolute;
  inset: 0;
  width: auto;
  max-width: none;
  opacity: 0;
  pointer-events: none;
  border: none;
  background: transparent;
  transition: opacity 0.55s ease;
}

.contact-layout.is-sending .enquiry {
  pointer-events: none;
}

.contact-layout.is-sent {
  grid-template-columns: 1fr;
  place-items: center;
}

.contact-layout.is-sent .enquiry,
.contact-layout.is-sent .mail-stage {
  display: none;
}

.contact-layout.is-sent .contact-panel {
  position: static;
  inset: auto;
  opacity: 1;
  pointer-events: auto;
  width: min(100%, 38rem);
  margin: auto;
  padding: clamp(2rem, 5vh, 3.5rem) clamp(1.4rem, 4vw, 2.75rem);
  border-left: none;
  background: transparent;
  gap: 1.5rem;
  transition: none;
}

.contact-layout.is-sent .thanks {
  display: block;
}

.contact-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.85rem;
  min-width: 0;
  min-height: 0;
  width: min(100%, 34rem);
  padding: clamp(0.9rem, 2.5vh, 1.6rem) clamp(1.1rem, 3.5vw, 2.25rem);
  background: transparent;
  border-left: none;
  transition: opacity 0.55s ease;
}

.mail-stage {
  position: relative;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
  height: 100%;
  padding: clamp(0.75rem, 2.5vh, 1.5rem) clamp(0.75rem, 2.5vw, 1.5rem);
  opacity: 0;
  transform: translateY(0.5rem);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.contact-layout.is-sending .mail-stage:not([hidden]) {
  display: flex;
}

.mail-stage.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.mail-glow {
  position: absolute;
  width: min(60%, 14rem);
  height: min(45%, 11rem);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(119, 173, 120, 0.28), transparent 70%);
  filter: blur(8px);
  pointer-events: none;
}

.mail-flight {
  position: relative;
  z-index: 1;
  width: min(100%, 18rem);
  transform-origin: 65% 45%;
  transform: rotate(-10deg);
}

.mail-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.letter-sheet {
  fill: var(--seashell);
  stroke: var(--graphite);
  stroke-width: 2;
  stroke-opacity: 0.55;
}

.letter-rule {
  stroke: var(--rosy);
  stroke-opacity: 0.3;
  stroke-width: 1;
}

.letter-line {
  fill: var(--graphite);
  fill-opacity: 0;
  font-family: 'Source Sans Pro', Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 400;
  transition: fill-opacity 0.35s ease;
}

.env-body {
  fill: var(--seashell);
  stroke: var(--graphite);
  stroke-width: 2.4;
  stroke-opacity: 0.75;
  stroke-linejoin: round;
}

.env-interior {
  fill: #d8d2cc;
  stroke: none;
  transition: opacity 0.35s ease;
}

.env-flap-open {
  fill: var(--seashell);
  stroke: var(--graphite);
  stroke-width: 2.4;
  stroke-opacity: 0.75;
  stroke-linejoin: round;
  transform-origin: 180px 100px;
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.6, 1), opacity 0.2s ease;
}

.env-pocket,
.env-side-left,
.env-side-right {
  fill: var(--seashell);
  stroke: var(--graphite);
  stroke-width: 2.4;
  stroke-opacity: 0.75;
  stroke-linejoin: round;
}

.env-side-left {
  fill: #f7f1ea;
}

.env-side-right {
  fill: #fff4ec;
}

.env-flap-closed {
  fill: var(--seashell);
  stroke: var(--graphite);
  stroke-width: 2.4;
  stroke-opacity: 0.75;
  stroke-linejoin: round;
  transform-origin: 180px 100px;
  transform: scaleY(0);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.28s,
    opacity 0.12s ease 0.28s;
}

.letter {
  transform-origin: 180px 110px;
  transition: transform 0.75s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
}

.mail-caption {
  position: relative;
  z-index: 1;
  margin: 0.55rem 0 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rosy);
  transition: opacity 0.3s ease;
}

.mail-stage.is-writing .letter-line {
  fill-opacity: 0.82;
}

.mail-stage.is-writing .letter-rule {
  opacity: 0.35;
}

/* Letter tucks in first; flap stays open */
.mail-stage.is-inserting .letter {
  transform: translateY(78px) scale(0.7);
  opacity: 0.88;
}

/* Then flap folds at the hinge: open collapses, closed unfolds */
.mail-stage.is-closing .env-flap-open {
  transform: scaleY(0);
  opacity: 0;
  transition:
    transform 0.48s cubic-bezier(0.55, 0.05, 0.7, 0.2),
    opacity 0.18s ease 0.22s;
}

.mail-stage.is-closing .env-interior {
  opacity: 0;
  transition: opacity 0.28s ease;
}

.mail-stage.is-closing .env-flap-closed {
  transform: scaleY(1);
  opacity: 1;
}

.mail-stage.is-closing .letter {
  opacity: 0;
  transition: opacity 0.35s ease 0.15s;
}

.mail-stage.is-closing .mail-flight {
  animation: mail-seal 0.55s cubic-bezier(0.34, 1.2, 0.64, 1) 0.45s both;
}

.mail-stage.is-flying .mail-flight {
  animation: mail-fly 1.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.mail-stage.is-flying .mail-caption {
  opacity: 0;
}

@keyframes mail-seal {
  0% {
    transform: rotate(-10deg) scale(1);
  }
  55% {
    transform: rotate(-10deg) scale(0.96);
  }
  100% {
    transform: rotate(-10deg) scale(1);
  }
}

@keyframes mail-fly {
  0% {
    transform: rotate(-10deg) translate(0, 0) scale(1);
    opacity: 1;
  }
  55% {
    opacity: 1;
  }
  100% {
    transform: rotate(8deg) translate(38vw, -42vh) scale(0.48);
    opacity: 0;
  }
}

.enquiry {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: clamp(1rem, 2vw, 1.25rem);
  background: var(--seashell);
  border: 1px solid rgba(143, 131, 137, 0.5);
  border-left: 3px solid var(--sage);
  max-width: none;
  box-shadow: 0 18px 40px rgba(52, 49, 45, 0.06);
  transition: opacity 0.55s ease;
}

.thanks {
  padding: clamp(1.6rem, 3vw, 2.4rem);
  background: var(--seashell);
  border: 1px solid rgba(143, 131, 137, 0.55);
  border-left: 3px solid var(--sage);
  box-shadow: 0 18px 40px rgba(52, 49, 45, 0.07);
  animation: thanks-in 0.55s ease;
}

.thanks[hidden] {
  display: none;
}

.thanks .place-line {
  margin: 0 0 0.7rem;
  color: var(--sage);
  letter-spacing: 0.18em;
}

.thanks h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.45rem, 3.2vw, 1.95rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--graphite);
}

.thanks p {
  margin: 0;
  color: var(--graphite);
}

.thanks p + p {
  margin-top: 0.65rem;
}

.thanks .mail {
  margin-left: 0.25rem;
  color: var(--graphite);
  border-bottom: 1px solid rgba(52, 49, 45, 0.35);
}

.thanks .mail:hover,
.thanks .mail:focus-visible {
  color: var(--sage);
  border-bottom-color: var(--sage);
}

.contact-heading {
  margin: 0 0 1.1rem;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.18em;
}

.form-error {
  margin: 0;
  font-size: 0.9rem;
  color: #8a4a4a;
}

.form-error[hidden] {
  display: none;
}

@keyframes thanks-in {
  from {
    opacity: 0;
    transform: translateY(0.6rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mail-stage,
  .contact-panel,
  .enquiry {
    transition: none;
  }

  .mail-stage.is-flying .mail-flight {
    animation: none;
    opacity: 0;
  }

  .mail-stage.is-inserting .letter,
  .mail-stage.is-closing .env-flap-open,
  .mail-stage.is-closing .env-flap-closed,
  .mail-stage.is-closing .env-interior,
  .mail-stage.is-closing .mail-flight {
    transition: none;
    animation: none;
  }

  .thanks {
    animation: none;
  }
}

.enquiry .field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.field-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rosy);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.company-block {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.65rem 0.75rem;
  background: rgba(251, 247, 244, 0.7);
  border: 1px solid rgba(143, 131, 137, 0.35);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.company-block.is-personal {
  background: rgba(232, 226, 220, 0.55);
  border-color: rgba(143, 131, 137, 0.28);
}

.enquiry .check {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.95rem;
  color: var(--graphite);
  cursor: pointer;
  user-select: none;
}

.enquiry .check input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
}

.check-box {
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
  border: 1px solid var(--rosy);
  background: var(--parchment);
  display: grid;
  place-items: center;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.check-box::after {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  background: var(--sage);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.enquiry .check input:checked + .check-box {
  border-color: var(--sage);
  background: var(--parchment);
}

.enquiry .check input:checked + .check-box::after {
  opacity: 1;
  transform: scale(1);
}

.enquiry .check input:focus-visible + .check-box {
  outline: 2px solid var(--sage);
  outline-offset: 2px;
}

.enquiry input,
.enquiry textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid rgba(143, 131, 137, 0.65);
  border-radius: 0;
  background: var(--parchment);
  color: var(--graphite);
  font: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.enquiry textarea {
  height: 6.5rem;
  min-height: 6.5rem;
  max-height: 6.5rem;
  resize: none;
  overflow-y: auto;
  line-height: 1.45;
  field-sizing: fixed;
}

.enquiry input:hover,
.enquiry textarea:hover {
  border-color: var(--graphite);
}

.enquiry input:focus,
.enquiry textarea:focus {
  outline: none;
  border-color: var(--sage);
  background: #fff;
  box-shadow: inset 0 -2px 0 var(--sage);
}

.enquiry input.is-locked,
.enquiry input.is-locked:hover,
.enquiry input.is-locked:focus {
  background: #e4ddd6;
  color: var(--rosy);
  border-color: #c9bfb7;
  box-shadow: none;
  cursor: not-allowed;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.15rem;
  padding-top: 0.15rem;
}

.enquiry button {
  appearance: none;
  align-self: flex-start;
  margin: 0;
  padding: 0.7rem 1.25rem;
  border: 1px solid var(--graphite);
  background: var(--graphite);
  color: var(--parchment);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.enquiry button:disabled {
  cursor: wait;
  opacity: 1;
  background: #4a4641;
  border-color: #4a4641;
  color: var(--parchment);
}

.enquiry button:disabled .btn-label {
  display: none;
}

.enquiry button:disabled .btn-busy {
  display: inline;
}

.enquiry button .btn-busy[hidden] {
  display: none;
}

.enquiry button:hover,
.enquiry button:focus-visible {
  background: var(--sage);
  border-color: var(--sage);
  color: var(--graphite);
}

.enquiry button:disabled:hover {
  background: #4a4641;
  border-color: #4a4641;
  color: var(--parchment);
  transform: none;
}

.enquiry button:active {
  transform: translateY(1px);
}

.enquiry .honey {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

h1 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h2 {
  margin: 0 0 0.45rem;
  font-size: 1.15rem;
  font-weight: 600;
}

main p {
  margin: 0;
  color: var(--rosy);
}

main p + p,
.piece {
  margin-top: 1.4rem;
}

.piece .swatch {
  width: 100%;
  height: 9rem;
  margin-bottom: 1rem;
  background: var(--seashell);
  border: 1px solid var(--rosy);
}

.piece p {
  margin: 0;
}

.mail,
.mail:link,
.mail:visited {
  color: var(--graphite);
  white-space: nowrap;
  border-bottom: 1px solid var(--graphite);
}

.mail:hover,
.mail:focus-visible {
  color: var(--sage);
  border-bottom-color: var(--sage);
}

footer span {
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

main.home {
  max-width: none;
  width: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 34rem) minmax(0, 1fr);
  align-items: stretch;
  padding: 0;
}

.home .copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  max-width: none;
  padding: 2rem var(--pad);
}

.home .copy h1 {
  max-width: 100%;
  font-size: clamp(1.35rem, 2.05vw + 0.7rem, 2.35rem);
}

.place-line {
  margin: 0 0 0.85rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rosy);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin-top: 1.6rem;
}

.action,
.action:link,
.action:visited {
  color: var(--graphite);
  font-weight: 600;
  border-bottom: 1px solid var(--graphite);
  white-space: nowrap;
}

.action:hover,
.action:focus-visible {
  color: var(--sage);
  border-bottom-color: var(--sage);
}

.slant {
  position: relative;
  overflow: hidden;
  height: 100%;
  min-height: 0;
  background: var(--sage);
  clip-path: polygon(18% 0, 100% 0, 100% 100%, 0 100%);
}

.scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.scene .guides path {
  fill: none;
  stroke: var(--graphite);
  stroke-opacity: 0.1;
  stroke-width: 1;
  stroke-dasharray: 3 7;
}

.scene .links path {
  stroke: url(#linkGrad);
  stroke-width: 1.35;
  stroke-linecap: round;
}

.scene .node {
  fill: var(--parchment);
  stroke: var(--graphite);
  stroke-width: 1;
  stroke-opacity: 0.28;
}

.scene .node-hub {
  fill: var(--seashell);
  stroke-opacity: 0.38;
  animation: hub-glow 16s ease-in-out 7.4s infinite;
}

.scene .node-ring {
  fill: none;
  stroke: var(--seashell);
  stroke-width: 1.2;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}

.scene .ring-a { animation: node-ring 16s ease-out infinite; }
.scene .ring-b { animation: node-ring 16s ease-out 0.9s infinite; }
.scene .ring-c { animation: node-ring 16s ease-out 1.8s infinite; }
.scene .ring-d { animation: node-ring 16s ease-out 3.6s infinite; }
.scene .ring-e { animation: node-ring 16s ease-out 4.2s infinite; }
.scene .ring-f { animation: node-ring 16s ease-out 5.8s infinite; }
.scene .ring-g { animation: node-ring 16s ease-out 7.4s infinite; }

.scene .node-a { animation: node-glow 16s ease-in-out infinite; }
.scene .node-b { animation: node-glow 16s ease-in-out 0.9s infinite; }
.scene .node-c { animation: node-glow 16s ease-in-out 1.8s infinite; }
.scene .node-d { animation: node-glow 16s ease-in-out 3.6s infinite; }
.scene .node-e { animation: node-glow 16s ease-in-out 4.2s infinite; }
.scene .node-f { animation: node-glow 16s ease-in-out 5.8s infinite; }

.scene .packet {
  fill: var(--seashell);
  stroke: var(--graphite);
  stroke-width: 0.85;
  stroke-opacity: 0.35;
  opacity: 0;
}

.scene .talk-pulse {
  stroke: var(--seashell);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-dasharray: 7 93;
  stroke-dashoffset: 100;
  opacity: 0;
  filter: url(#softGlow);
}

/* Continuity: packets land ~3.5s, then talk chains toward the doc */
.scene .talk-1 { animation: talk-dash 16s cubic-bezier(0.4, 0, 0.2, 1) 3.5s infinite; }
.scene .talk-2 { animation: talk-dash 16s cubic-bezier(0.4, 0, 0.2, 1) 3.9s infinite; }
.scene .talk-2b { animation: talk-dash 16s cubic-bezier(0.4, 0, 0.2, 1) 4.3s infinite; }
.scene .talk-3 { animation: talk-dash 16s cubic-bezier(0.4, 0, 0.2, 1) 5.2s infinite; }
.scene .talk-4 { animation: talk-dash 16s cubic-bezier(0.4, 0, 0.2, 1) 5.6s infinite; }
.scene .talk-5 { animation: talk-dash 16s cubic-bezier(0.4, 0, 0.2, 1) 6.8s infinite; }
.scene .talk-6 { animation: talk-dash 16s cubic-bezier(0.4, 0, 0.2, 1) 8s infinite; }

.scene .doc-station .doc-body,
.scene .doc-out .doc-body {
  fill: var(--parchment);
  stroke: var(--graphite);
  stroke-width: 1.15;
  stroke-opacity: 0.38;
}

.scene .doc-station .doc-fold,
.scene .doc-out .doc-fold {
  fill: var(--seashell);
  stroke: var(--graphite);
  stroke-width: 1.05;
  stroke-opacity: 0.32;
}

.scene .doc-station .doc-line,
.scene .doc-out .doc-line {
  stroke: var(--rosy);
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-opacity: 0.85;
}

.scene .doc-station {
  animation: doc-receive 16s ease-in-out infinite;
}

.scene .doc-out {
  opacity: 0;
  transform: translate(392px, 140px);
  animation: doc-emit 16s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes node-ring {
  0%,
  20% {
    opacity: 0;
    transform: scale(0.55);
  }
  24% {
    opacity: 0.55;
    transform: scale(0.85);
  }
  34% {
    opacity: 0;
    transform: scale(1.35);
  }
  100% {
    opacity: 0;
    transform: scale(1.35);
  }
}

@keyframes node-glow {
  0%,
  18% {
    fill: var(--parchment);
  }
  24%,
  32% {
    fill: var(--seashell);
  }
  42%,
  100% {
    fill: var(--parchment);
  }
}

@keyframes hub-glow {
  0%,
  18% {
    fill: var(--seashell);
  }
  24%,
  36% {
    fill: #ffffff;
  }
  48%,
  100% {
    fill: var(--seashell);
  }
}

@keyframes talk-dash {
  0%,
  4% {
    stroke-dashoffset: 100;
    opacity: 0;
  }
  8% {
    opacity: 0.9;
  }
  28% {
    stroke-dashoffset: 0;
    opacity: 0.85;
  }
  34%,
  100% {
    stroke-dashoffset: 0;
    opacity: 0;
  }
}

@keyframes doc-receive {
  0%,
  48% {
    opacity: 0.7;
  }
  52% {
    opacity: 1;
  }
  58% {
    opacity: 1;
  }
  68%,
  100% {
    opacity: 0.7;
  }
}

@keyframes doc-emit {
  0%,
  50% {
    opacity: 0;
    transform: translate(392px, 140px) scale(0.92);
  }
  54% {
    opacity: 1;
    transform: translate(392px, 140px) scale(1);
  }
  72% {
    opacity: 0.9;
    transform: translate(460px, 132px) scale(1);
  }
  84%,
  100% {
    opacity: 0;
    transform: translate(510px, 126px) scale(0.96);
  }
}

@media (prefers-reduced-motion: reduce) {
  .scene .talk-pulse,
  .scene .doc-station,
  .scene .doc-out,
  .scene .node-ring,
  .scene .node {
    animation: none;
  }

  .scene .packets {
    display: none;
  }

  .scene .talk-pulse,
  .scene .node-ring {
    opacity: 0;
  }

  .scene .doc-station {
    opacity: 0.85;
  }

  .scene .doc-out {
    opacity: 0.5;
    transform: translate(430px, 140px);
  }
}

@media screen and (max-width: 900px) {
  .tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-layout.is-sending {
    grid-template-columns: 1fr;
  }

  .contact-layout.is-sending .contact-panel {
    border: none;
    padding: clamp(0.9rem, 2.5vh, 1.6rem) clamp(1.1rem, 3.5vw, 2.25rem);
  }

  .mail-stage {
    min-height: 9.5rem;
    height: auto;
    order: -1;
    padding: 0.75rem 1rem 0.2rem;
  }

  .mail-flight {
    width: min(100%, 13.5rem);
  }

  .mail-caption {
    margin-top: 0.4rem;
  }

  .contact-layout.is-sent .contact-panel {
    width: 100%;
    padding: 1.5rem var(--pad) 2rem;
  }
}

@media screen and (max-width: 800px) {
  main.home {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .home .copy h1 {
    font-size: clamp(1.35rem, 5.2vw, 2rem);
  }

  .slant {
    clip-path: polygon(0 16%, 100% 0, 100% 100%, 0 100%);
    min-height: min(42vh, 16rem);
  }
}

@media screen and (max-width: 640px) {
  header,
  footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
  }

  .tiles {
    grid-template-columns: 1fr;
  }

  .work-cards {
    grid-template-columns: 1fr;
  }

  .field-row {
    grid-template-columns: 1fr;
  }
}
