@import url("/fonts.css");

:root {
  --paper: #faf7f1;
  --ivory: #f3ede3;
  --ink: #15100e;
  --muted: #5a4f48;
  --oxblood: #6e1423;
  --oxblood-hover: #54101b;
  --rule: rgba(21, 16, 14, 0.18);
  --focus: #6e1423;
  --serif: "Bodoni Moda", "Didot", Georgia, serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--oxblood); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--paper); padding: 8px 12px; z-index: 10; }

/* Masthead */
.mast { padding: 20px 16px 0; text-align: center; }
.mast .title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.5rem, 12vw, 4.25rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
  margin: 0;
  text-decoration: none;
  display: inline-block;
}
.mast .title em { font-style: italic; }
.mast .meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 6px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* Mobile order: masthead, cover, content */
.layout { display: flex; flex-direction: column; }
.layout .side { display: contents; }
.layout .mast { order: 1; }
.layout .cover { order: 2; }
.layout .content { order: 3; }
.layout footer { order: 4; }

/* Cover image with stamp */
.cover { position: relative; margin: 20px 16px 0; background: #b9b2aa; }
.cover img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; object-position: 50% 42%; }
.stamp {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--oxblood);
  border: 3px solid var(--oxblood);
  box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 3.5px var(--oxblood);
  background: rgba(250, 247, 241, 0.92);
  padding: 0.5em 0.9em 0.45em;
  line-height: 1;
  transform: rotate(-6deg);
}
.cover .stamp { position: absolute; right: 14px; bottom: 18px; font-size: 1.25rem; }

/* Content */
.content { padding: 28px 16px 48px; max-width: 34rem; margin: 0 auto; }
.kicker {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--oxblood);
  margin: 0 0 12px;
}
h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.125rem, 8.5vw, 3.25rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin: 0 0 18px;
}
h1 em, h2 em { font-style: italic; color: var(--oxblood); }
.deck { font-family: var(--serif); font-size: 1.1875rem; line-height: 1.45; margin: 0 0 28px; }

/* Form */
.signup { border-top: 1px solid var(--ink); padding-top: 20px; }
.signup label { display: block; font-weight: 700; margin-bottom: 10px; }
.signup .row { display: flex; flex-direction: column; gap: 10px; }
.signup input[type="email"] {
  width: 100%;
  font: inherit;
  font-size: 1.0625rem;
  padding: 14px 14px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  -webkit-appearance: none;
  appearance: none;
}
.signup input[type="email"]::placeholder { color: #6f645c; }
.btn {
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: var(--oxblood);
  color: #fff;
  border: 0;
  border-radius: 0;
  padding: 15px 22px;
  min-height: 48px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}
.btn:hover { background: var(--oxblood-hover); color: #fff; }
.btn[disabled] { opacity: 0.75; cursor: progress; }
.fine { font-size: 0.875rem; color: var(--muted); margin: 12px 0 0; }
.error { color: var(--oxblood); font-weight: 700; margin: 12px 0 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Contents list */
.inside { margin-top: 44px; }
.inside ol { list-style: none; padding: 0; margin: 0; }
.inside li { display: grid; grid-template-columns: 3rem 1fr; gap: 4px; padding: 14px 0; border-top: 1px solid var(--rule); }
.inside .n { font-family: var(--serif); font-size: 1.5rem; line-height: 1; color: var(--oxblood); }
.inside b { font-family: var(--serif); font-weight: 500; font-size: 1.1875rem; display: block; line-height: 1.25; }
.inside span span { font-size: 0.9375rem; color: var(--muted); }

.about { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--ink); }
.about p { margin: 0 0 10px; }
.about .name { font-family: var(--serif); font-size: 1.375rem; }

footer { padding: 20px 16px 28px; border-top: 1px solid var(--rule); font-size: 0.8125rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }

/* Inner pages */
.inner .content { padding-top: 8px; }
.inner figure { margin: 24px 16px 0; }
.inner figure img { width: 100%; height: auto; max-width: 360px; aspect-ratio: 4 / 5; object-fit: cover; margin: 0 auto; }
.inner p { margin: 0 0 14px; }
.more { margin-top: 36px; border-top: 1px solid var(--ink); padding-top: 18px; }
.more ul { list-style: none; padding: 0; margin: 0; }
.more li { border-bottom: 1px solid var(--rule); }
.more a { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px 0; text-decoration: none; min-height: 48px; }
.more a b { font-family: var(--serif); font-weight: 500; font-size: 1.1875rem; }
.more a span { font-size: 0.875rem; color: var(--muted); text-align: right; }
.more a:hover b { color: var(--oxblood); }

/* Submit form */
.field { margin-bottom: 18px; }
.field label, .field legend { display: block; font-weight: 700; margin-bottom: 6px; }
.field .hint { font-size: 0.875rem; color: var(--muted); margin: -2px 0 8px; }
.field input[type="text"], .field input[type="email"], .field input[type="number"], .field select, .field textarea {
  width: 100%;
  font: inherit;
  padding: 12px 14px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
}
.field textarea { min-height: 140px; resize: vertical; }
.check { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; margin-bottom: 22px; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--oxblood); }

.prose h2 { font-family: var(--serif); font-weight: 500; font-size: 1.5rem; margin: 28px 0 8px; }

@media (min-width: 900px) {
  .layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
  .layout .cover { order: 0; }
  .layout .cover { margin: 0; position: sticky; top: 0; height: 100vh; }
  .layout .cover img { height: 100%; aspect-ratio: auto; }
  .layout .cover .stamp { right: 32px; bottom: 40px; font-size: 1.625rem; }
  .layout .side { display: flex; flex-direction: column; }
  .layout .mast, .layout .content, .layout footer { order: 0; }
  .layout .mast { padding: 36px 48px 0; text-align: left; }
  .layout .content { padding: 44px 48px 56px; margin: 0; max-width: 38rem; }
  .signup .row { flex-direction: row; }
  .signup input[type="email"] { flex: 1; }
  footer { padding: 20px 48px 28px; margin-top: auto; }
  .inner .wrap { max-width: 960px; margin: 0 auto; display: grid; grid-template-columns: 340px 1fr; gap: 48px; padding: 32px 32px 0; align-items: start; }
  .inner .wrap figure { margin: 0; }
  .inner .wrap .content { padding: 0 0 48px; margin: 0; max-width: none; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
