/* VENALBE — document/letter aesthetic */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --bg: #faf8f4;
  --ink: #1a1a1a;
  --muted: #5a5a5a;
  --rule: #d8d2c5;
  --accent: #1a1a1a;
  --field-bg: #ffffff;
  --field-border: #cbc4b4;
  --field-border-focus: #1a1a1a;
  --max-width: 680px;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-serif, Georgia, "Iowan Old Style", "Apple Garamond", "Baskerville", "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (min-width: 720px) {
  body { font-size: 19px; }
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.5rem 0.75rem;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
}
.skip-link:focus { left: 1rem; top: 1rem; z-index: 100; }

/* Header */
.site-header {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 1.25rem 2rem;
  text-align: left;
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0.32em;
  font-weight: 600;
  text-transform: uppercase;
}

.tagline {
  margin: 0.25rem 0 0;
  font-size: 1rem;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0;
  color: var(--muted);
}

/* Letter */
.letter {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
  font-feature-settings: "onum" 1, "kern" 1, "liga" 1;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.letter p { margin: 0 0 1.1em; }

.letter-meta {
  text-align: right;
  font-size: 0.8rem;
  font-style: italic;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin: 0 0 2.25rem;
}

.letter .salutation {
  margin-top: 0;
  margin-bottom: 1.25em;
  font-weight: 500;
}

/* Lead paragraph: slightly larger, with a serif drop cap */
.letter .lead {
  font-size: 1.08em;
  line-height: 1.55;
}

.letter .lead::first-letter {
  font-family: ui-serif, Georgia, "Iowan Old Style", "Apple Garamond", "Baskerville", serif;
  float: left;
  font-size: 3.4em;
  line-height: 0.88;
  font-weight: 600;
  margin: 0.06em 0.08em 0 -0.06em;
  color: var(--ink);
}

/* Section labels: small caps, tracked */
.letter h2 {
  margin: 0 0 1.25rem;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
}

.letter ul, .letter ol {
  margin: 0 0 1.4em;
  padding-left: 1.4em;
}

.letter li { margin-bottom: 0.65em; }

.letter a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

.letter a:hover { text-decoration-thickness: 2px; }

/* Pull-quote — single emotional line set apart */
.letter .pullquote {
  margin: 2.5rem 0 2.5rem -0.25rem;
  padding: 0 0 0 1.25rem;
  border-left: 2px solid var(--ink);
  font-size: 1.18em;
  font-style: italic;
  line-height: 1.5;
  color: var(--ink);
}

/* Section divider — three small gradient dots, echoing the favicon */
.letter .divider {
  margin: 3rem auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  height: 1rem;
}

.letter .divider span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f6c178 0%, #e58547 55%, #b6541d 100%);
}

/* Sign-off */
.letter .signoff {
  margin: 3rem 0 1.5rem;
}

.letter .signoff-name {
  font-style: italic;
  font-size: 1.35rem;
  margin: 0 0 0.6rem;
  color: var(--ink);
}

.letter .signoff-meta {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--muted);
}

/* P.S. — quietly emphasised closing note */
.letter .ps {
  margin: 1.5rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.96em;
  color: var(--muted);
}

.letter .ps strong {
  color: var(--ink);
  letter-spacing: 0.12em;
  margin-right: 0.2em;
}

/* Logo grid */
.logo-grid {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 2.5rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

@media (min-width: 480px) {
  .logo-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 720px) {
  .logo-grid { grid-template-columns: repeat(5, 1fr); }
}

.logo-grid li {
  background: var(--bg);
  aspect-ratio: 3 / 2;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0.5rem;
  text-align: center;
}

.logo-grid img {
  max-width: 75%;
  max-height: 55%;
  width: auto;
  height: auto;
  filter: grayscale(1);
  opacity: 0.85;
}

.logo-placeholder {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.25;
  word-break: break-word;
}

/* Form */
.application {
  margin-top: 1rem;
}

.field {
  margin-bottom: 1.5rem;
}

.field label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
  font-weight: 500;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="url"],
.field textarea,
.field select {
  width: 100%;
  font: inherit;
  padding: 0.65rem 0.75rem;
  background: var(--field-bg);
  color: var(--ink);
  border: 1px solid var(--field-border);
  border-radius: 2px;
  line-height: 1.4;
}

.field textarea { resize: vertical; min-height: 7rem; }

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: 2px solid var(--field-border-focus);
  outline-offset: 1px;
  border-color: var(--field-border-focus);
}

.field-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.field-checkbox input { margin-top: 0.35rem; }

.field-checkbox label {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--muted);
  margin: 0;
}

.field-checkbox a { color: var(--ink); }

.submit {
  font: inherit;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: var(--ink);
  color: var(--bg);
  border: 0;
  padding: 0.85rem 1.5rem;
  cursor: pointer;
  border-radius: 2px;
}

.submit:hover { background: #000; }
.submit:focus { outline: 2px solid var(--ink); outline-offset: 3px; }
.submit[disabled] { opacity: 0.6; cursor: not-allowed; }

.form-status {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.form-status.is-error { color: #a02020; }
.form-status.is-success { color: #1a6b3c; }

/* Cloudflare Turnstile widget */
.cf-turnstile {
  margin: 0 0 1.25rem;
  min-height: 65px;
}

/* Honeypot — visually hidden but still focusable for assistive tech (which won't fill it). */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* Inline success block (replaces the form on JS-mode success) */
.form-success {
  margin-top: 1.5rem;
  padding: 1.5rem 1.25rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: rgba(255, 255, 255, 0.4);
}

.form-success p { margin: 0 0 0.6em; }
.form-success p:last-child { margin-bottom: 0; color: var(--muted); }

/* Footer */
.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
  color: var(--muted);
}

.site-footer p { margin: 0 0 0.4rem; }

.site-footer a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.site-footer a:hover { color: var(--ink); }

/* Reduced motion (no motion in v1, here for future-proofing) */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
