/* Lumen Craft — shared styles */
:root {
  --paper: #f4efe4;
  --paper-2: #ede6d8;
  --paper-3: #e6ddcb;
  --ink: #1d1a16;
  --ink-soft: #3a352d;
  --muted: #6d6455;
  --dim: #93887a;
  --line: rgba(29, 26, 22, 0.16);
  --line-soft: rgba(29, 26, 22, 0.09);
  --rust: #a9482a;
  --olive: #666c45;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --wrap: 1240px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { margin: 0; background: var(--paper); color: var(--ink); }

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-locked { overflow: hidden; }

::selection { background: var(--rust); color: var(--paper); }

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
button { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(20px, 4vw, 52px); }

/* grain + paper warmth */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='0.24'/%3E%3C/svg%3E");
}

/* ---------- header ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}

.site-head-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 74px;
}

.wordmark {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}

.wordmark em { font-style: italic; font-weight: 400; color: var(--rust); }

.nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 34px); }

.nav a {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  padding-block: 6px;
  position: relative;
  transition: color 0.25s;
}

.nav a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform 0.4s var(--ease); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }

.head-cta { display: flex; align-items: center; gap: 14px; }

.menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  cursor: pointer;
}

.menu-btn span { width: 17px; height: 1px; background: currentColor; position: relative; }
.menu-btn span::before, .menu-btn span::after { content: ""; position: absolute; left: 0; width: 17px; height: 1px; background: currentColor; transition: transform 0.3s, top 0.3s; }
.menu-btn span::before { top: -6px; }
.menu-btn span::after { top: 6px; }
.menu-btn[aria-expanded="true"] span { background: transparent; }
.menu-btn[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

.mobile-nav {
  display: none;
  position: fixed;
  inset: 74px 0 auto 0;
  z-index: 35;
  max-height: calc(100dvh - 74px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 8px clamp(20px, 4vw, 52px) 26px;
}

.mobile-nav.is-open { display: block; box-shadow: 0 24px 54px rgba(26, 24, 20, 0.16); }

/* dim the page behind the open menu so the panel reads as a menu, and tapping
   the page dismisses it */
.menu-scrim {
  position: fixed;
  inset: 0;
  z-index: 34;
  background: rgba(26, 24, 20, 0.34);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}
.menu-scrim.is-on { opacity: 1; pointer-events: auto; }
.mobile-nav a { display: block; padding: 16px 0; border-bottom: 1px solid var(--line-soft); font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; }

/* ---------- type ---------- */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.kicker::before { content: ""; width: 26px; height: 1px; background: currentColor; opacity: 0.7; }

.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.7rem, 6.4vw, 5.6rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
  font-optical-sizing: auto;
}

.display em { font-style: italic; color: var(--rust); font-weight: 400; }

.h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 3.6vw, 3.1rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.h2 em { font-style: italic; color: var(--rust); }

.h3 { font-family: var(--serif); font-size: clamp(1.25rem, 1.9vw, 1.6rem); line-height: 1.25; letter-spacing: -0.01em; font-weight: 500; }

.lede { font-size: clamp(1rem, 1.15vw, 1.08rem); line-height: 1.75; color: var(--ink-soft); }
.mono { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
}

.btn svg { width: 14px; height: 14px; }
.btn:hover { background: var(--ink); color: var(--paper); }
.btn:active { transform: translateY(1px); }
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: var(--rust); border-color: var(--rust); color: var(--paper); }
.btn-link { border: 0; padding: 0; min-height: 0; background: none; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; border-bottom: 1px solid var(--ink); }
.btn-link:hover { background: none; color: var(--rust); border-color: var(--rust); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: var(--d, 0ms); }
.reveal.is-in { opacity: 1; transform: none; }

.rise { display: inline-block; overflow: hidden; vertical-align: bottom; }
.rise > span { display: inline-block; transform: translateY(105%); transition: transform 1.1s var(--ease); transition-delay: var(--d, 0ms); }
.is-in .rise > span, .reveal.is-in .rise > span { transform: none; }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); padding: clamp(46px, 6vw, 76px) 0 26px; background: var(--paper-2); }

.foot-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 30px; align-items: flex-start; }
.foot-mark { font-family: var(--serif); font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.02em; line-height: 1; }
.foot-mark em { font-style: italic; color: var(--rust); }
.foot-links { display: flex; gap: clamp(30px, 6vw, 90px); flex-wrap: wrap; }
.foot-col h3 { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--dim); font-weight: 400; margin-bottom: 12px; }
.foot-col a { display: block; font-size: 13.5px; color: var(--muted); padding-block: 4px; }
.foot-col a:hover { color: var(--ink); }

.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; margin-top: clamp(34px, 4vw, 54px); padding-top: 18px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }

/* ---------- forms ---------- */
.field { margin-bottom: 20px; }
.field label { display: block; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.field label span { text-transform: none; letter-spacing: 0; color: var(--dim); }

.field input, .field select, .field textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  transition: border-color 0.25s;
}

.field textarea { min-height: 96px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--dim); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom-color: var(--ink); }
.field.has-error input, .field.has-error textarea, .field.has-error select { border-bottom-color: var(--rust); }
.field-error { display: none; margin-top: 6px; font-size: 12px; color: var(--rust); }
.field.has-error .field-error { display: block; }

.form-success { display: none; border: 1px solid var(--line); padding: 30px; background: var(--paper-2); }
.form-success.is-on { display: block; animation: fade-up 0.6s var(--ease) both; }
.form-success h3 { font-family: var(--serif); font-size: 24px; font-weight: 400; letter-spacing: -0.01em; }
.form-success p { margin-top: 10px; color: var(--muted); font-size: 14px; }

@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 90; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; background: var(--ink); color: var(--paper); padding: 10px 18px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; transition: 0.35s var(--ease); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- responsive ---------- */
@media (max-width: 880px) {
  .nav { display: none; }
  .head-cta .btn { display: none; }
  .menu-btn { display: inline-flex; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .rise > span { transform: none; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
