:root {
  --bg: #FBFAF7;
  --ink: #1E2A3A;
  --muted: #8A8C86;
  --rule-strong: #E6E3DB;
  --rule-soft: #E1DED5;
  --rule-contact: #C9C7BE;
  --placeholder: #B7B3A8;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
}

body {
  color: var(--ink);
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a {
  color: var(--ink);
  text-decoration: none;
}

a:hover {
  color: var(--muted);
}

input,
textarea,
button {
  font: inherit;
  color: inherit;
}

::placeholder {
  color: var(--placeholder);
}

/* Homepage */

.page {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 48px clamp(28px, 6vw, 88px) 40px;
}

.site-header {
  display: flex;
  justify-content: center;
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 24px;
}

.eyebrow {
  font-size: 10px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(64px, 12vh, 140px) 0;
}

.mark {
  width: 72px;
  height: 72px;
  display: block;
}

.wordmark {
  margin: 34px 0 0;
  font-family: Cormorant, Georgia, serif;
  font-weight: 300;
  font-size: clamp(38px, 6.4vw, 78px);
  line-height: 1.05;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tagline {
  margin: 26px 0 0;
  font-size: 10px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--muted);
  text-wrap: balance;
}

/* Shared footer (all pages) */

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  flex-wrap: wrap;
  border-top: 1px solid var(--rule-strong);
  padding-top: 24px;
  padding-bottom: 32px;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-trigger {
  position: relative;
  background: none;
  border: 0;
  padding: 0 0 3px;
  margin: 0;
  cursor: pointer;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--rule-contact);
}

/* Expand the tap target to a comfortable size without moving the visible
   text/underline - the design's small type is deliberate, the hit area
   doesn't have to match it. */
.contact-trigger::after {
  content: '';
  position: absolute;
  top: -16px;
  right: -10px;
  bottom: -16px;
  left: -10px;
}

.contact-trigger:hover {
  color: var(--muted);
  border-bottom-color: var(--muted);
}

/* Contact overlay */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: var(--bg);
  display: flex;
  justify-content: center;
  overflow-y: auto;
  /* Extra top clearance keeps centered content clear of the Close button,
     which stays at a fixed top offset regardless of overlay content. */
  padding: clamp(88px, 16vh, 130px) clamp(28px, 6vw, 88px) 48px;
}

.overlay[hidden] {
  display: none;
}

@media (prefers-reduced-motion: no-preference) {
  .overlay {
    animation: overlay-fade 150ms ease;
  }
}

@keyframes overlay-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.close-btn {
  position: absolute;
  top: 44px;
  right: clamp(28px, 6vw, 88px);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}

.close-btn::after {
  content: '';
  position: absolute;
  top: -16px;
  right: -16px;
  bottom: -16px;
  left: -16px;
}

.close-btn:hover {
  color: var(--ink);
}

.thankyou {
  text-align: center;
  max-width: 520px;
  /* Auto margins (not the parent's align-items) do the vertical centering,
     so overflowing content stays scrollable from its true top instead of
     clipping above scrollTop: 0. */
  margin-top: auto;
  margin-bottom: auto;
}

.thankyou[hidden] {
  display: none;
}

.thankyou-title {
  margin: 0;
  font-family: Cormorant, Georgia, serif;
  font-weight: 300;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.4;
}

.thankyou-sub {
  margin: 20px 0 0;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-form {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 34px;
  margin-top: auto;
  margin-bottom: auto;
}

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

.form-heading {
  text-align: center;
}

.form-heading h2 {
  margin: 0;
  font-family: Cormorant, Georgia, serif;
  font-weight: 300;
  font-size: clamp(30px, 4vw, 46px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.form-subhead {
  margin: 16px 0 0;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}

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

.field span {
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field textarea {
  background: none;
  border: 0;
  border-bottom: 1px solid var(--rule-soft);
  padding: 8px 0;
  font-size: 15px;
  outline: none;
}

.field input:focus,
.field textarea:focus {
  border-bottom-color: var(--ink);
}

.field textarea {
  line-height: 1.6;
  resize: none;
}

.send-btn {
  align-self: center;
  margin-top: 6px;
  background: none;
  border: 1px solid var(--ink);
  padding: 15px 44px;
  cursor: pointer;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.send-btn:hover {
  background: var(--ink);
  color: var(--bg);
}

/* Secondary pages (/tmsg/, /email/) */

.page-header {
  display: flex;
  border-bottom: 1px solid var(--rule-strong);
  padding: 24px 0;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}

.brand-link:hover {
  color: var(--muted);
}

.brand-mark {
  display: block;
}

.brand-name {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.doc-page {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 0 clamp(28px, 6vw, 88px);
}

.doc {
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
  padding: clamp(48px, 8vh, 96px) 0;
}

.doc h1 {
  margin: 0 0 8px;
  font-family: Cormorant, Georgia, serif;
  font-weight: 300;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.1;
  letter-spacing: 0.01em;
}

.doc .doc-lede {
  margin: 0 0 32px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
}

.doc h2 {
  margin: 40px 0 16px;
  padding-top: 28px;
  border-top: 1px solid var(--rule-strong);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.doc h2:first-of-type {
  margin-top: 8px;
}

.doc h3 {
  margin: 24px 0 10px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.doc p {
  margin: 0 0 18px;
  font-size: 16px;
  line-height: 1.7;
}

.doc ul {
  margin: 0 0 18px;
  padding-left: 20px;
}

.doc li {
  margin-bottom: 8px;
  font-size: 16px;
  line-height: 1.6;
}

.doc a {
  text-decoration: underline;
  text-decoration-color: var(--rule-contact);
}

.doc a:hover {
  color: var(--muted);
}

.link-list {
  margin: 0 0 18px;
}

.link-list dt {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 16px;
}

.link-list dt:first-child {
  margin-top: 0;
}

.link-list dd {
  margin: 3px 0 0;
  font-size: 16px;
}

