/* ==========================================================================
   Praxisi — shared styles for interior pages (contact, privacy, terms).
   Tokens lifted verbatim from index.html so the pages sit in the same world.
   The dot field is the canvas in assets/field.js, not a CSS texture.
   ========================================================================== */

:root {
  --paper:     #FAFAF8;
  --ink:       #141311;
  --muted:     #8a857c;
  --hair:      rgba(20, 19, 17, 0.15);
  --hair-soft: rgba(20, 19, 17, 0.07);
  --field-bg:  rgba(250, 250, 248, 0.72);

  --display: 'Bodoni Moda', Georgia, serif;
  --body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

  --measure: 68ch;
  --gutter: clamp(1.5rem, 5vw, 4rem);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

/* Interior pages scroll — index.html sets overflow:hidden, we deliberately don't. */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

canvas#field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
}

/* A wash over the field so long-form text stays legible above it. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: var(--field-bg);
  pointer-events: none;
  z-index: 1;
}

.masthead, main, footer { position: relative; z-index: 2; }

a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--hair); padding-bottom: 1px; }
a:hover { border-color: var(--ink); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 3px;
}

/* --------------------------------------------------------------- masthead */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2rem var(--gutter) 0;
}

.masthead .wordmark-row {
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 0;
}

.masthead .mark { width: 30px; height: 30px; object-fit: contain; }

.masthead .rule-v { width: 1px; height: 22px; background: var(--hair); }

.masthead .wordmark {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.35rem;
  letter-spacing: 0.12em;
  line-height: 1;
  color: var(--ink);
}

.masthead nav { display: flex; gap: clamp(1rem, 3vw, 2rem); }

.masthead nav a {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 0;
}

.masthead nav a:hover,
.masthead nav a[aria-current="page"] { color: var(--ink); }

@media (max-width: 520px) {
  .masthead { flex-direction: column; align-items: flex-start; gap: 1rem; }
}

/* ------------------------------------------------------------------ shell */

main {
  flex: 1;
  width: 100%;
  max-width: 62rem;
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) var(--gutter) 4rem;
}

.eyebrow {
  margin-bottom: 1.25rem;
  font-size: 0.68rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--muted);
}

h1 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.2rem, 5.5vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
}

.standfirst {
  max-width: 34rem;
  font-size: 1.0625rem;
  color: #55514a;
}

h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.4rem;
  line-height: 1.3;
  margin: 3rem 0 0.75rem;
}

h3 {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 2rem 0 0.5rem;
}

p, li { max-width: var(--measure); color: #3d3a35; }
p { margin-bottom: 1.1rem; }

ul { padding-left: 1.1rem; margin-bottom: 1.1rem; }
li { margin-bottom: 0.45rem; }

hr { border: 0; border-top: 1px solid var(--hair); margin-top: 2.75rem; }

.legal-meta {
  margin-top: 2.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* ------------------------------------------------------------------- form */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 7vw, 5.5rem);
  align-items: start;
  margin-top: clamp(2.5rem, 6vw, 4rem);
}

@media (max-width: 760px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.field-row { margin-bottom: 1.75rem; }

label {
  display: block;
  margin-bottom: 0.6rem;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--muted);
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 0.6rem 0;
  border: 0;
  border-bottom: 1px solid var(--hair);
  background: transparent;
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.6;
  border-radius: 0;
  transition: border-color 160ms ease;
}

input:hover, textarea:hover { border-bottom-color: rgba(20, 19, 17, 0.32); }
input:focus, textarea:focus { border-bottom-color: var(--ink); outline-offset: 6px; }

textarea { resize: vertical; min-height: 7.5rem; }

/* Honeypot — present in the DOM, out of sight and out of the tab order. */
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

button[type="submit"] {
  margin-top: 0.5rem;
  padding: 0.9rem 2.25rem;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-family: var(--body);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 0;
  transition: background-color 180ms ease, color 180ms ease;
}

button[type="submit"]:hover:not(:disabled) { background: var(--ink); color: var(--paper); }
button[type="submit"]:disabled { opacity: 0.45; cursor: progress; }

.form-note {
  margin-top: 1.25rem;
  font-size: 0.75rem;
  color: var(--muted);
  min-height: 1.25rem;
  max-width: 32rem;
}

.form-note[data-state="error"] { color: #8a3324; }
.form-note[data-state="ok"] { color: var(--ink); }

.field-error { border-bottom-color: #8a3324 !important; }

/* --------------------------------------------------------------- sidebar */

.aside-block { margin-bottom: 2.5rem; }
.aside-block p { margin: 0; font-size: 0.9rem; max-width: 26rem; }
.aside-block a { font-size: 0.9rem; }

/* ---------------------------------------------------------------- footer */

footer {
  padding: 2rem var(--gutter) 2.5rem;
  border-top: 1px solid var(--hair-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  justify-content: space-between;
  align-items: center;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

footer nav { display: flex; gap: clamp(1rem, 3vw, 2rem); }
footer a { color: var(--muted); border-bottom: 1px solid var(--hair); }
footer a:hover { color: var(--ink); border-color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
