/* ─────────────────────────────────────────────────────────────
   garyroth.net — shared styles

   Self-hosted fonts, latin subset only, which covers the curly
   quotes and em-dashes the prose uses. No third-party requests.
   ───────────────────────────────────────────────────────────── */

@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/ebgaramond-normal.woff2) format('woff2');
}
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/ebgaramond-normal.woff2) format('woff2');
}
@font-face {
  font-family: 'EB Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/ebgaramond-italic.woff2) format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/inter-normal.woff2) format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/inter-normal.woff2) format('woff2');
}

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

:root {
  --ink:       #1a1a18;
  --ink-mid:   #4a4a46;
  --ink-faint: #8a8a84;
  --rule:      #d4d2cb;
  --bg:        #f8f7f4;
  --bg-form:   #ffffff;
  --accent:    #2a4a7f;
  --accent-hl: #1a3460;
  --serif:     'EB Garamond', Georgia, serif;
  --sans:      'Inter', system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink:       #e8e6e0;
    --ink-mid:   #b0aea8;
    --ink-faint: #6e6c68;
    --rule:      #333330;
    --bg:        #141412;
    --bg-form:   #1c1c1a;
    --accent:    #7fa8d8;
    --accent-hl: #a8c4e8;
  }
}

html { font-size: 16px; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem 4rem;
}

/* ── Watermark ── */
.watermark {
  position: fixed;
  inset: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 0;
}
.watermark span {
  font-family: var(--serif);
  font-size: clamp(5rem, 18vw, 14rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  color: var(--ink);
  opacity: 0.03;
  white-space: nowrap;
  user-select: none;
  line-height: 1;
}

/* ── Layout ── */
main {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
}

/* ── Page header ── */
header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 2.5rem;
}

.name {
  font-family: var(--serif);
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--ink);
}

/* ── Site nav ── */
.site-nav {
  display: flex;
  gap: 1.25rem;
  align-items: baseline;
}

.site-nav a {
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-decoration: none;
  transition: color 0.15s;
}

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

/* ── Bio ── */
.bio {
  font-family: var(--serif);
  font-size: clamp(1.125rem, 2.5vw, 1.25rem);
  line-height: 1.75;
  color: var(--ink);
}

.bio p + p {
  margin-top: 1.25em;
}

.bio a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.2em;
  transition: text-decoration-color 0.15s, color 0.15s;
}

.bio a:hover {
  color: var(--accent-hl);
  text-decoration-color: currentColor;
}

/* ── Form card ── */
.card {
  background: var(--bg-form);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 2rem 2rem 1.75rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mid);
  margin-bottom: 0.45rem;
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 0.9375rem;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0.6rem 0.75rem;
  outline: none;
  transition: border-color 0.15s;
  -webkit-appearance: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  border-color: var(--accent);
}

textarea {
  resize: vertical;
  min-height: 130px;
  line-height: 1.6;
}

.captcha-wrap {
  margin-bottom: 1.25rem;
}

.submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

button[type="submit"] {
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 4px;
  padding: 0.65rem 1.5rem;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

button[type="submit"]:hover    { background: var(--accent-hl); }
button[type="submit"]:disabled { opacity: 0.5; cursor: default; }

.status {
  font-size: 0.8125rem;
  color: var(--ink-faint);
  min-height: 1.2em;
}
.status.ok  { color: #2e7d4f; }
.status.err { color: #a33; }

/* ── Footer ── */
footer {
  margin-top: 2.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--ink-faint);
}

@media (max-width: 520px) {
  .card { padding: 1.5rem 1.25rem; }
}

