@font-face {
  font-family: "Cormorant Garamond";
  src: url("/assets/fonts/cormorant-garamond-latin-300-normal.woff2") format("woff2");
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("/assets/fonts/cormorant-garamond-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
:root {
  --ink: #07101a;
  --mist: #d3e0e6;
  --mist-dim: #8ea3ad;
  --rule: #1d2e39;
}
* { box-sizing: border-box; }
html { background: var(--ink); }
body {
  margin: 0;
  color: var(--mist);
  font-family: "Cormorant Garamond", Garamond, "Times New Roman", serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--mist); text-underline-offset: 3px; text-decoration-color: var(--mist-dim); }
a:focus-visible { outline: 1px solid var(--mist); outline-offset: 3px; }

/* ---------- Home ---------- */
body.home { height: 100vh; height: 100dvh; overflow: hidden; overscroll-behavior: none; background: var(--ink); }
#water {
  position: fixed; inset: 0; width: 100%; height: 100%;
  display: block; touch-action: none;
  -webkit-tap-highlight-color: transparent;
}
.vignette {
  position: fixed; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 45%, transparent 50%, rgba(3, 7, 11, 0.6) 100%);
}
.home-footer {
  position: fixed; left: 0; right: 0; bottom: 0;
  padding: 0 1.5rem calc(2.25rem + env(safe-area-inset-bottom));
  text-align: center; pointer-events: none;
}
.home-footer h1 {
  margin: 0; font-weight: 300;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  letter-spacing: 0.06em; line-height: 1.2;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.85);
}
.home-footer nav { margin-top: 0.6rem; font-size: 0.95rem; letter-spacing: 0.04em; }
.home-footer nav a {
  pointer-events: auto; color: var(--mist-dim); text-decoration: none;
  padding: 0.35rem 0.6rem; border-radius: 4px; transition: color 0.2s;
}
.home-footer nav a:hover, .home-footer nav a:focus-visible { color: var(--mist); }

/* ---------- Text pages ---------- */
body.page {
  font-size: 1.2rem; line-height: 1.65;
  background: radial-gradient(ellipse at 50% -10%, #11283a 0%, var(--ink) 60%) no-repeat, var(--ink);
  min-height: 100vh;
}
.page main { max-width: 38rem; margin: 0 auto; padding: 4rem 1.5rem 3rem; }
.back {
  display: inline-block; margin-bottom: 2.5rem; color: var(--mist-dim);
  text-decoration: none; font-size: 1rem; letter-spacing: 0.04em;
}
.back:hover { color: var(--mist); }
.page h1 { font-weight: 300; font-size: clamp(2.2rem, 6vw, 3rem); line-height: 1.1; margin: 0 0 0.4rem; }
.updated { color: var(--mist-dim); margin: 0 0 2.5rem; font-size: 1rem; }
.page h2 {
  font-weight: 400; font-size: 1.45rem; margin: 2.4rem 0 0.5rem;
  padding-top: 1.4rem; border-top: 1px solid var(--rule);
}
.page p, .page li { margin: 0 0 1rem; }
.page ul { padding-left: 1.2rem; }
.page footer {
  max-width: 38rem; margin: 0 auto; padding: 1.5rem 1.5rem 3rem;
  color: var(--mist-dim); font-size: 1rem; border-top: 1px solid var(--rule);
}
.page footer { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; }
.page footer a { white-space: nowrap; }

/* ---------- Contact ---------- */
.page .contact-intro { margin: 0 0 2rem; }
.contact-panel {
  background: rgba(12, 28, 39, 0.72);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 2rem;
}
.contact-form { display: grid; gap: 1.35rem; }
.contact-form[hidden] { display: none; }
.field-row { display: grid; gap: 1.35rem; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; min-width: 0; }
.field label {
  font-size: 1.05rem; letter-spacing: 0.02em;
  color: var(--mist); margin-bottom: 0.4rem;
}
.field input, .field textarea {
  width: 100%; font-family: inherit; font-size: 1.15rem; line-height: 1.4;
  color: var(--mist); background: #07131c;
  border: 1px solid #243845; border-radius: 8px;
  padding: 0.7rem 0.85rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none; appearance: none;
}
.field textarea { min-height: 10rem; resize: vertical; }
.field input:hover, .field textarea:hover { border-color: #33505f; }
.field input:focus, .field textarea:focus {
  outline: none; border-color: #8fb3c4;
  box-shadow: 0 0 0 3px rgba(143, 179, 196, 0.18);
}
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #c27373; }
.field-error { color: #e0a3a3; font-size: 0.95rem; margin-top: 0.35rem; }

/* Honeypot: kept out of sight and out of the tab order */
.hp-field { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; left: -10000px; }

.cf-turnstile { min-height: 65px; }

.form-actions {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 1rem;
  padding-top: 1.35rem; border-top: 1px solid var(--rule);
}
.form-note { margin: 0; color: var(--mist-dim); font-size: 0.98rem; flex: 1 1 14rem; }
.form-actions button {
  font-family: inherit; font-size: 1.15rem; letter-spacing: 0.03em;
  color: #07101a; background: var(--mist);
  border: 1px solid var(--mist); border-radius: 8px;
  padding: 0.6rem 1.8rem; cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.form-actions button:hover { background: #ffffff; }
.form-actions button:focus-visible { outline: 2px solid var(--mist); outline-offset: 3px; }
.form-actions button:disabled { opacity: 0.6; cursor: progress; }

/* Message banners. The Formspree library marks them with data-fs-active when they should show. */
[data-fs-success], [data-fs-error] { display: none; }
[data-fs-success][data-fs-active], [data-fs-error][data-fs-active] { display: block; }
.form-banner { padding: 0.9rem 1.1rem; border-radius: 8px; font-size: 1.1rem; }
.form-banner.is-error { background: #2a1618; border: 1px solid #56292d; color: #f0c4c4; }
.form-success {
  text-align: center; padding: 2.5rem 1.5rem;
}
.form-success h2 { border: 0; margin: 0 0 0.5rem; padding: 0; font-weight: 300; font-size: 1.9rem; }
.form-success p { margin: 0; color: var(--mist-dim); }
.form-success:focus { outline: none; }

@media (max-width: 520px) {
  .contact-panel { padding: 1.35rem; }
  .form-actions button { width: 100%; }
}
