/* ── Reset & base ────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:      #f2ede8;
  --primary: #1a2744;
  --accent:  #8a7155;
  --border:  rgba(26,39,68,.18);
  --serif:   Georgia, 'Times New Roman', serif;
  --sans:    system-ui, -apple-system, sans-serif;
}

html { font-size: 16px; }

body {
  background: var(--bg);
  color: var(--primary);
  font-family: var(--serif);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ── Animations ──────────────────────────────────────────────────────────── */
@keyframes fadeIn   { from { opacity:0 } to { opacity:1 } }
@keyframes slideUp  { from { opacity:0; transform:translateY(20px) } to { opacity:1; transform:none } }

.fade-in      { animation: fadeIn  .8s ease both; }
.fade-in-late { animation: fadeIn  .8s ease .6s both; }
.slide-up     { animation: slideUp .7s ease calc(var(--d, 0s)) both; }

/* ── Shared footer ───────────────────────────────────────────────────────── */
.site-footer {
  text-align: center;
  padding: 2.5rem 1rem;
  font-family: var(--sans);
  font-size: .625rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(26,39,68,.55);
  margin-top: auto;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   HOME PAGE
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.page-home .home-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  padding: 2rem;
}

.logo-wrap { width: min(80vw, 80vh); }

.home-logo {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.contact-link {
  font-family: var(--sans);
  font-size: .6875rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--primary);
  text-decoration: none;
  border: 1px solid rgba(26,39,68,.3);
  padding: .9rem 2.5rem;
  transition: background .4s, color .4s, border-color .4s;
  --d: .3s;
}
.contact-link:hover {
  background: var(--primary);
  color: var(--bg);
  border-color: var(--primary);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CONTACT PAGE
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.site-header {
  width: 100%;
  padding: 2.5rem 2rem;
  display: flex;
  justify-content: center;
}

.logo-mark {
  font-family: var(--serif);
  font-size: 1.5rem;
  letter-spacing: .25em;
  color: var(--primary);
  text-decoration: none;
  transition: color .4s;
}
.logo-mark:hover { color: var(--accent); }

.contact-main {
  flex: 1;
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: 1rem 1.5rem 3rem;
}

/* Heading */
.contact-heading {
  text-align: center;
  margin-bottom: 3.5rem;
  --d: 0s;
}
.contact-heading h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 400;
  letter-spacing: .04em;
  margin-bottom: 1rem;
}
.tagline {
  font-size: 1.05rem;
  color: rgba(26,39,68,.65);
  letter-spacing: .08em;
}

/* ── Form fields ─────────────────────────────────────────────────────────── */
.contact-form { display: flex; flex-direction: column; gap: 2.75rem; }

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

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}
@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
}

label {
  font-family: var(--sans);
  font-size: .625rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(26,39,68,.65);
}
.optional { color: rgba(26,39,68,.4); text-transform: none; letter-spacing: 0; }

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: .75rem 0;
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--primary);
  outline: none;
  transition: border-color .3s;
  width: 100%;
}
input::placeholder, textarea::placeholder { color: rgba(26,39,68,.22); }
input:focus, textarea:focus { border-bottom-color: var(--accent); }

textarea {
  resize: none;
  line-height: 1.65;
}

/* char counter row */
.field-label-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.char-count {
  font-family: var(--sans);
  font-size: .625rem;
  letter-spacing: .05em;
  color: rgba(26,39,68,.38);
  transition: color .2s;
}
.char-count.count-warn { color: #a04040; }

/* ── CAPTCHA ─────────────────────────────────────────────────────────────── */
.captcha-field {
  border-top: 1px solid rgba(26,39,68,.1);
  padding-top: 2rem;
}
.captcha-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}
.captcha-label-row label { white-space: nowrap; }
.captcha-label-row strong {
  font-family: var(--serif);
  font-weight: normal;
  font-size: .9rem;
  color: var(--primary);
}
.refresh-link {
  font-family: var(--sans);
  font-size: .5625rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(26,39,68,.38);
  text-decoration: none;
  transition: color .3s;
  white-space: nowrap;
}
.refresh-link:hover { color: var(--accent); }

/* ── Errors ──────────────────────────────────────────────────────────────── */
.field-error {
  font-family: var(--sans);
  font-size: .75rem;
  color: rgba(140,40,40,.85);
  font-style: italic;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.field-submit { display: flex; justify-content: center; margin-top: .5rem; }

.btn-primary {
  background: var(--primary);
  color: var(--bg);
  border: 1px solid var(--primary);
  padding: 1.1rem 3.5rem;
  font-family: var(--sans);
  font-size: .625rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .4s, color .4s, border-color .4s;
}
.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
}
.btn-primary:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.btn-outline {
  display: inline-block;
  border: 1px solid rgba(26,39,68,.3);
  padding: .9rem 2.5rem;
  font-family: var(--sans);
  font-size: .625rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--primary);
  text-decoration: none;
  margin-top: 1.5rem;
  transition: background .4s, color .4s;
}
.btn-outline:hover { background: var(--primary); color: var(--bg); }

/* ── Success box ─────────────────────────────────────────────────────────── */
.success-box {
  text-align: center;
  padding: 4rem 2rem;
  border: 1px solid rgba(138,113,85,.2);
  background: rgba(26,39,68,.03);
  --d: .1s;
}
.success-box h2 {
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: .04em;
  margin-bottom: 1.25rem;
}
.success-box p {
  color: rgba(26,39,68,.65);
  line-height: 1.8;
  font-size: .95rem;
}
