:root {
  --paper: #f4efe4;
  --paper-soft: #fbf6ea;
  --paper-warm: #f8f1e5;
  --panel: #fbf8f1;
  --ink: #211a16;
  --text: #4c463d;
  --muted: #81786b;
  --faint: #a99f8f;
  --line: #d8d0c2;
  --line-strong: #9f947e;
  --olive: #59643b;
  --olive-dark: #3f4727;
  --sepia: #7b552f;
  --danger: #8a3d2d;
  --shadow: 0 18px 42px rgba(54, 43, 25, 0.08);
  --display: Georgia, "Times New Roman", serif;
  --sans: "Trebuchet MS", "Gill Sans", "Segoe UI", sans-serif;
  --mono: "Courier New", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 5%, rgba(255, 255, 255, 0.88), transparent 26rem),
    radial-gradient(circle at 82% 12%, rgba(214, 197, 166, 0.24), transparent 30rem),
    linear-gradient(110deg, rgba(90, 79, 51, 0.035) 0 1px, transparent 1px 7px),
    var(--paper);
  font-family: var(--sans);
  line-height: 1.5;
}

body::before,
body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
}

body::before {
  background-image:
    linear-gradient(rgba(80, 63, 38, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80, 63, 38, 0.025) 1px, transparent 1px);
  background-size: 34px 34px, 38px 38px;
  opacity: 0.35;
}

body::after {
  background-image:
    radial-gradient(circle at 30% 20%, rgba(45, 35, 22, 0.045) 0 1px, transparent 1px),
    radial-gradient(circle at 72% 58%, rgba(45, 35, 22, 0.035) 0 1px, transparent 1px);
  background-size: 7px 7px, 11px 11px;
  mix-blend-mode: multiply;
  opacity: 0.34;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--olive);
  outline-offset: 4px;
}

.site-shell {
  width: min(100% - 68px, 1500px);
  margin: 0 auto;
}

.site-header {
  display: grid;
  grid-template-columns: 210px 1fr 300px;
  align-items: center;
  min-height: 68px;
  border-bottom: 1px solid var(--line-strong);
}

.brand {
  font-family: var(--display);
  font-size: clamp(1.9rem, 2.3vw, 2.5rem);
  letter-spacing: 0.04em;
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: clamp(2rem, 5vw, 5rem);
}

.main-nav a,
.header-kicker,
.page-path,
.archive-rail p,
.contact-facts dt,
.contact-card h2,
.outline-button,
.form-heading h2,
.form-note,
.field-group label,
.submit-button,
.status-grid dt,
.film-strip span {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.main-nav a {
  position: relative;
  padding: 0.7rem 0;
  font-weight: 700;
  transition: color 180ms ease;
}

.main-nav a::after {
  position: absolute;
  right: 0;
  bottom: -1.23rem;
  left: 0;
  height: 2px;
  content: "";
  background: var(--olive);
  opacity: 0;
  transform: scaleX(0.5);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav a.is-active {
  color: var(--olive-dark);
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after,
.main-nav a.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

.header-kicker {
  justify-self: end;
  margin: 0;
}

.contact-page {
  padding: clamp(2.2rem, 4.1vw, 3.1rem) 0 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2.4rem, 4.7vw, 4.4rem);
  align-items: stretch;
}

.contact-info {
  display: flex;
  flex-direction: column;
  position: relative;
  min-width: 0;
  padding-left: 4.7rem;
}

.archive-rail {
  position: absolute;
  top: 0;
  bottom: 0.8rem;
  left: 0;
  width: 3.1rem;
  color: var(--ink);
}

.rail-line {
  display: block;
  width: 1px;
  height: 82px;
  margin: 0 auto 0.6rem;
  background: var(--line-strong);
}

.archive-rail p {
  position: absolute;
  top: 108px;
  left: 50%;
  width: 190px;
  margin: 0;
  transform: translateX(-50%) rotate(-90deg);
  transform-origin: center;
}

.archive-rail strong {
  position: absolute;
  top: 262px;
  left: 50%;
  color: var(--sepia);
  font-family: var(--display);
  font-size: 2.1rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  transform: translateX(-50%);
}

.contact-copy {
  max-width: 640px;
}

.page-path {
  margin: 0 0 1.1rem;
  color: var(--olive-dark);
  letter-spacing: 0.06em;
  text-transform: none;
}

.contact-copy h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(4.4rem, 7.6vw, 6.9rem);
  font-weight: 400;
  line-height: 0.86;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.contact-subtitle {
  margin: 0.7rem 0 0;
  color: var(--olive-dark);
  font-family: var(--display);
  font-size: clamp(1.65rem, 2.1vw, 2.2rem);
  letter-spacing: 0.08em;
}

.contact-description {
  max-width: 39rem;
  margin: 0.9rem 0 0;
  color: var(--text);
  font-size: 0.96rem;
  line-height: 1.85;
}

.contact-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 1.7rem 0 1.62rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line-strong);
}

.contact-facts div {
  min-width: 0;
  padding-right: 1.2rem;
}

.contact-facts div + div {
  padding-left: 1.55rem;
  border-left: 1px solid var(--line);
}

.contact-facts dt {
  margin-bottom: 0.28rem;
  color: var(--muted);
  font-size: 0.7rem;
}

.contact-facts dd {
  margin: 0;
  color: var(--ink);
  font-size: 0.92rem;
}

.contact-card-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.contact-card {
  display: flex;
  min-height: 306px;
  flex-direction: column;
  align-items: center;
  padding: 1.55rem 1.45rem 0.95rem;
  border: 1px solid rgba(160, 149, 128, 0.62);
  border-radius: 8px;
  background: rgba(255, 250, 239, 0.28);
  text-align: center;
  transition:
    background-color 190ms ease,
    border-color 190ms ease,
    box-shadow 190ms ease,
    transform 190ms ease;
}

.contact-card:hover,
.contact-card:focus-within {
  background: rgba(255, 250, 239, 0.52);
  border-color: var(--olive);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.contact-icon {
  display: grid;
  place-items: center;
  width: 4.2rem;
  height: 3.55rem;
  margin-bottom: 0.45rem;
  color: var(--olive-dark);
}

.contact-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
}

.contact-icon circle:last-child,
.contact-icon svg path + circle,
.contact-icon svg circle + circle {
  fill: currentColor;
  stroke: none;
}

.contact-card h2 {
  margin: 0.25rem 0 0.45rem;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 700;
}

.contact-handle {
  margin: 0;
  color: var(--text);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.small-rule {
  width: 22px;
  height: 1px;
  margin: 1.05rem 0 1.3rem;
  background: var(--line-strong);
}

.card-copy {
  max-width: 14rem;
  margin: 0;
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1.65;
}

.contact-card .outline-button {
  width: 100%;
  margin-top: auto;
}

.wechat-qr {
  width: clamp(92px, 7.4vw, 132px);
  height: clamp(92px, 7.4vw, 132px);
  margin: 0.5rem 0 0.85rem;
  border: 1px solid var(--line);
  image-rendering: pixelated;
}

.contact-card-qr {
  padding-top: 1.2rem;
}

.contact-card-qr .contact-icon {
  width: 3.85rem;
  height: 3.1rem;
  margin-bottom: 0.15rem;
}

.contact-card-qr .card-copy {
  margin-bottom: 0.9rem;
}

.outline-button,
.submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  min-height: 2.18rem;
  padding: 0.48rem 1rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 250, 239, 0.25);
  color: var(--sepia);
  font-size: 0.72rem;
  font-weight: 700;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.outline-button span,
.submit-button span {
  margin-left: 1rem;
  font-size: 1rem;
  transition: transform 180ms ease;
}

.outline-button:hover,
.outline-button:focus-visible {
  color: var(--paper-soft);
  background: var(--olive-dark);
  border-color: var(--olive-dark);
}

.outline-button:hover span,
.outline-button:focus-visible span,
.submit-button:hover span,
.submit-button:focus-visible span {
  transform: translateX(3px);
}

.message-panel {
  display: flex;
  min-width: 0;
  padding: clamp(2rem, 3vw, 2.6rem);
  border: 1px solid rgba(160, 149, 128, 0.66);
  border-radius: 10px;
  background: rgba(255, 250, 239, 0.22);
  box-shadow: 0 10px 30px rgba(54, 43, 25, 0.06);
}

.message-form {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 1.35rem;
}
.message-field { grid-template-rows: auto minmax(9.6rem, 1fr) auto; }
.message-field textarea { height: 100%; }

.form-heading {
  display: flex;
  justify-content: space-between;
  gap: 1.4rem;
  align-items: end;
  margin-bottom: 0.3rem;
}

.form-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 700;
}

.form-heading p {
  margin: 0;
}

.form-heading div p {
  color: var(--text);
  font-size: 0.88rem;
}

.form-note {
  color: var(--text);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: none;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.55rem;
}

.field-group {
  display: grid;
  gap: 0.46rem;
}

.field-group label {
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 700;
}

.field-group input,
.field-group select,
.field-group textarea {
  width: 100%;
  border: 1px solid rgba(160, 149, 128, 0.62);
  border-radius: 3px;
  background: rgba(255, 250, 239, 0.2);
  color: var(--ink);
  font-size: 0.88rem;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.field-group input,
.field-group select {
  min-height: 2.75rem;
  padding: 0 0.95rem;
}

.field-group textarea {
  min-height: 9.6rem;
  resize: vertical;
  padding: 0.95rem;
}

.field-group input::placeholder,
.field-group textarea::placeholder {
  color: var(--faint);
}

.field-group input:hover,
.field-group select:hover,
.field-group textarea:hover,
.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
  background: rgba(255, 250, 239, 0.52);
  border-color: var(--olive);
  box-shadow: 0 0 0 3px rgba(89, 100, 59, 0.08);
  outline: none;
}

.field-group.is-invalid input,
.field-group.is-invalid textarea {
  border-color: var(--danger);
}

.field-error {
  min-height: 1rem;
  margin: 0;
  color: var(--danger);
  font-size: 0.76rem;
  line-height: 1.25;
}

.message-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.char-count {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.submit-button {
  width: min(100%, 320px);
  min-height: 2.68rem;
  justify-content: center;
  gap: 2.8rem;
  margin-top: 0.2rem;
  border-color: var(--olive-dark);
  background: var(--olive-dark);
  color: var(--paper-soft);
  box-shadow: 0 12px 24px rgba(63, 71, 39, 0.12);
}

.submit-button:hover,
.submit-button:focus-visible {
  background: #4d5731;
  transform: translateY(-1px);
}

.submit-button:disabled {
  cursor: default;
  opacity: 0.62;
  transform: none;
}

.archive-status {
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(460px, 0.95fr);
  margin-top: 1.6rem;
  border: 1px solid rgba(160, 149, 128, 0.62);
  background: rgba(255, 250, 239, 0.14);
}

.film-strip {
  --film-frame-width: clamp(132px, 11vw, 164px);
  position: relative;
  display: grid;
  align-content: center;
  min-width: 0;
  min-height: 118px;
  padding: 0.65rem;
  background:
    linear-gradient(90deg, rgba(255, 250, 239, 0.08) 0 1px, transparent 1px 52px),
    #171713;
  overflow: hidden;
}

.film-strip figure {
  flex: 0 0 var(--film-frame-width);
  position: relative;
  min-width: 0;
  margin: 0;
  padding: 0.84rem 0.35rem 0.72rem;
  border-right: 1px solid rgba(244, 239, 228, 0.15);
}

.film-strip .film-label {
  position: absolute;
  top: 0.08rem;
  left: 0.32rem;
  z-index: 1;
  color: #b68d50;
  font-size: 0.5rem;
  letter-spacing: 0.12em;
}

.film-strip figure::before,
.film-strip figure::after {
  position: absolute;
  right: 0.35rem;
  left: 0.35rem;
  height: 3px;
  content: "";
  background:
    radial-gradient(circle, rgba(244, 239, 228, 0.52) 0 1px, transparent 1.4px) repeat-x;
  background-size: 14px 3px;
}

.film-strip figure::before {
  top: 0.26rem;
}

.film-strip figure::after {
  bottom: 0.28rem;
}

.film-strip img {
  width: 100%;
  height: 132px;
  object-fit: cover;
  border: 1px solid rgba(244, 239, 228, 0.1);
  filter: sepia(0.22) saturate(0.65) contrast(0.96) brightness(0.82);
  transition:
    filter 200ms ease,
    transform 200ms ease;
}

.film-strip img[hidden] { display: none; }

.film-strip figure:hover img {
  filter: sepia(0.1) saturate(0.82) contrast(1.02) brightness(0.92);
  transform: scale(1.015);
}

.film-viewport { min-width: 0; overflow: hidden; }
.film-viewport:focus-visible { outline-offset: -2px; }
.film-track { display: flex; width: max-content; animation: contact-film-roll var(--film-duration, 40s) linear infinite; animation-play-state: paused; }
.film-group { display: flex; flex: none; }
.film-strip.is-playing .film-track { animation-play-state: running; }
.film-strip.is-static .film-track { animation: none; transform: none; }
.film-strip.is-static .film-viewport { overflow-x: auto; }
.film-strip.is-static .film-group[aria-hidden],
.film-strip.is-static .film-repeat { display: none; }
.film-playback { position: absolute; z-index: 3; top: .3rem; right: .3rem; width: 32px; height: 32px; border: 1px solid rgba(244,239,228,.35); border-radius: 50%; background: #171713; color: var(--paper-soft); font-size: .75rem; }
.film-empty { align-self: center; margin: 0; padding: 1.5rem; color: #b68d50; font-size: .8rem; text-align: center; }
.film-image-error { display: grid; place-items: center; width: 100%; height: 132px; margin: 0; padding: .5rem; color: #b68d50; font-size: .65rem; text-align: center; }
@keyframes contact-film-roll { to { transform: translateX(-50%); } }

.status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  align-content: center;
  margin: 0;
  padding: 1.6rem 1.25rem;
}

.status-grid div {
  min-width: 0;
  padding: 0 1.15rem;
  border-left: 1px solid var(--line);
}

.status-grid div:first-child {
  border-left: 0;
}

.status-grid dt {
  margin-bottom: 0.24rem;
  color: var(--ink);
  font-size: 0.65rem;
  font-weight: 700;
}

.status-grid dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.status-grid dd:last-child {
  margin-top: 0.48rem;
  color: var(--ink);
  font-size: 0.96rem;
}

.status-open {
  display: inline-flex;
  gap: 0.48rem;
  align-items: center;
}

.status-open span,
.contact-footer span {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--sepia);
  border-radius: 999px;
}

.contact-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.5rem;
  align-items: center;
  padding: 1.55rem 0 2rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.contact-footer p {
  margin: 0;
}

.contact-footer p:nth-child(2) {
  justify-self: center;
}

.contact-footer p:last-child {
  justify-self: end;
}

.contact-footer span {
  margin-left: 1.1rem;
}

.toast {
  position: fixed;
  right: clamp(1rem, 4vw, 4.2rem);
  bottom: clamp(1rem, 5vw, 4.2rem);
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  width: min(92vw, 330px);
  padding: 1rem 1rem 1rem 1.1rem;
  border: 1px solid rgba(160, 149, 128, 0.5);
  border-radius: 9px;
  background:
    linear-gradient(rgba(251, 248, 241, 0.96), rgba(246, 240, 230, 0.96)),
    var(--panel);
  box-shadow: 0 18px 38px rgba(49, 39, 24, 0.14);
  animation: toast-in 260ms ease-out both;
}

.toast[hidden] {
  display: none;
}

.toast-icon {
  color: var(--olive-dark);
}

.toast-icon svg {
  width: 36px;
  height: 36px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.toast p {
  margin: 0 0 0.18rem;
  font-size: 0.98rem;
  font-weight: 700;
}

.toast span {
  display: block;
  color: var(--text);
  font-size: 0.82rem;
}

.toast button {
  align-self: start;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
  transition:
    color 180ms ease,
    transform 180ms ease;
}

.toast button:hover,
.toast button:focus-visible {
  color: var(--olive-dark);
  transform: rotate(90deg);
}

.reveal-item {
  animation: fade-up 540ms ease-out both;
}

.contact-facts.reveal-item {
  animation-delay: 90ms;
}

.contact-card-grid.reveal-item {
  animation-delay: 160ms;
}

.message-panel.reveal-item {
  animation-delay: 220ms;
}

.reveal-section {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 520ms ease,
    transform 520ms ease;
}

.reveal-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 1320px) {
  .site-header {
    grid-template-columns: 150px 1fr;
    row-gap: 0.5rem;
    padding: 0.9rem 0;
  }

  .header-kicker {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

@media (max-width: 1120px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .contact-info {
    padding-left: 4.2rem;
  }

  .message-panel {
    max-width: none;
  }

  .archive-status {
    grid-template-columns: 1fr;
  }

  .status-grid div:first-child {
    border-left: 1px solid var(--line);
  }
}

@media (max-width: 860px) {
  .site-shell {
    width: min(100% - 32px, 760px);
  }

  .site-header {
    display: block;
    min-height: 0;
    padding: 1rem 0 0.9rem;
  }

  .brand {
    display: inline-block;
    margin-bottom: 0.7rem;
  }

  .main-nav {
    justify-content: flex-start;
    gap: 1.05rem;
    overflow-x: auto;
    padding-bottom: 0.4rem;
  }

  .main-nav a {
    font-size: 0.68rem;
    letter-spacing: 0.12em;
  }

  .main-nav a::after {
    bottom: -0.15rem;
  }

  .header-kicker {
    margin-top: 0.45rem;
  }

  .contact-page {
    padding-top: 2.2rem;
  }

  .contact-info {
    padding-left: 0;
  }

  .archive-rail {
    position: static;
    display: flex;
    width: auto;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1.4rem;
  }

  .rail-line {
    width: 54px;
    height: 1px;
    margin: 0;
  }

  .archive-rail p,
  .archive-rail strong {
    position: static;
    transform: none;
  }

  .archive-rail p {
    width: auto;
  }

  .archive-rail strong {
    margin-left: auto;
    font-size: 1.65rem;
  }

  .contact-copy h1 {
    font-size: clamp(3.8rem, 18vw, 6rem);
    letter-spacing: 0.03em;
  }

  .contact-facts,
  .contact-card-grid,
  .status-grid,
  .field-row {
    grid-template-columns: 1fr;
  }

  .contact-facts div,
  .contact-facts div + div,
  .status-grid div,
  .status-grid div:first-child {
    padding: 0.85rem 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .contact-facts div:first-child,
  .status-grid div:first-child {
    border-top: 0;
  }

  .contact-card {
    min-height: 0;
  }

  .form-heading {
    display: grid;
    gap: 0.8rem;
    align-items: start;
  }

  .archive-status {
    margin-top: 1.2rem;
  }

  .contact-footer {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .contact-footer p:nth-child(2),
  .contact-footer p:last-child {
    justify-self: start;
  }
}

@media (max-width: 520px) {
  .message-panel {
    padding: 1.35rem;
  }

  .submit-button {
    width: 100%;
  }

}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
