/* ==========================================================================
   A&P Grant Writing LLC - apgrants.com
   site.css  |  v1.0.0  |  August 2026
   Design system: "The Filed Document"
   Deep black canvas, metallic gold rules, deep quill blue accents.
   Display: Cormorant Garamond | Body: IBM Plex Sans | Utility: IBM Plex Mono
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
  /* Palette - dark (default) */
  --ink:            #08090c;   /* page canvas */
  --ink-raised:     #101218;   /* cards, panels */
  --ink-sunken:     #050608;   /* footer, deep wells */
  /* Sampled directly from the A&P logo artwork. */
  --gold:           #d29f4c;   /* metallic gold, primary accent */
  --gold-bright:    #f5c358;   /* highlight edge of the metal */
  --gold-deep:      #97611b;   /* shadow edge of the metal */
  --gold-spec:      #fbf4c2;   /* specular hit on the foil */
  --quill:          #467397;   /* the feather, mid tone */
  --quill-bright:   #639bc7;   /* feather highlight */
  --quill-deep:     #185178;   /* feather shadow */
  --quill-pale:     #add9f1;
  --paper:          #f0ece2;   /* primary text */
  --paper-muted:    #a09a8c;   /* secondary text */
  --hairline:       rgba(210, 159, 76, 0.30);
  --hairline-blue:  rgba(70, 115, 151, 0.34);
  --hairline-soft:  rgba(240, 236, 226, 0.12);
  --field:          rgba(255, 255, 255, 0.035);
  --focus:          #e8ce7a;
  --shadow:         0 24px 60px rgba(0, 0, 0, 0.55);

  /* Type */
  --font-display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --font-body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --step-hero: clamp(2.9rem, 1.4rem + 6.2vw, 6.25rem);
  --step-h1:   clamp(2.35rem, 1.5rem + 3.4vw, 4rem);
  --step-h2:   clamp(1.9rem, 1.35rem + 2.1vw, 3rem);
  --step-h3:   clamp(1.35rem, 1.1rem + 0.9vw, 1.85rem);
  --step-lead: clamp(1.08rem, 1rem + 0.4vw, 1.3rem);
  --step-body: 1.0625rem;
  --step-small: 0.9375rem;
  --step-label: 0.72rem;

  /* Space + measure */
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --measure: 68ch;
  --shell: 1240px;
  --section-y: clamp(4.5rem, 9vw, 8.5rem);
  --radius: 2px;
  --radius-lg: 4px;
  --field-solid:    #14161c;   /* opaque field, needed for native select popups */

  color-scheme: dark;
}

[data-theme="light"] {
  --ink:            #f6f3ea;
  --ink-raised:     #fffdf7;
  --ink-sunken:     #ece7da;
  --gold:           #8f5c17;
  --gold-bright:    #b07d24;
  --gold-deep:      #694218;
  --gold-spec:      #d29f4c;
  --quill:          #185178;
  --quill-bright:   #2c5a80;
  --quill-deep:     #0e3a5f;
  --quill-pale:     #467397;
  --paper:          #16171c;
  --paper-muted:    #55524a;
  --hairline:       rgba(143, 92, 23, 0.35);
  --hairline-blue:  rgba(24, 81, 120, 0.32);
  --hairline-soft:  rgba(22, 23, 28, 0.14);
  --field:          rgba(22, 23, 28, 0.035);
  --focus:          #6b5310;
  --shadow:         0 20px 46px rgba(60, 48, 16, 0.14);
  --field-solid:    #fffdf7;

  color-scheme: light;
}

/* --------------------------------------------------------------------------
   2. Reset + base
   -------------------------------------------------------------------------- */

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

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: var(--step-body);
  line-height: 1.72;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  text-wrap: balance;
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.005em;
  margin: 0 0 0.6em;
  color: var(--paper);
}

h1 { font-size: var(--step-h1); }
h2 { font-size: var(--step-h2); }
h3 { font-size: var(--step-h3); line-height: 1.2; }

p { margin: 0 0 1.15em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

a { color: var(--gold-bright); text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { color: var(--paper); }

strong { font-weight: 600; color: var(--paper); }

ul, ol { padding-left: 1.15rem; max-width: var(--measure); }
li { margin-bottom: 0.5rem; }
li::marker { color: var(--gold); }

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

::selection { background: var(--gold); color: #08090c; }
::-moz-selection { background: var(--gold); color: #08090c; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: #08090c;
  padding: 0.75rem 1.25rem;
  font-family: var(--font-mono);
  font-size: var(--step-label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  z-index: 200;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------------------
   3. Layout shell + the document-rule motif (signature)
   -------------------------------------------------------------------------- */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.band { padding-block: var(--section-y); position: relative; }
.band--tight { padding-block: clamp(3rem, 6vw, 5rem); }
.band--sunken { background: var(--ink-sunken); }

/* A mono label riding a gold hairline - the header rule of a filed document. */
.rule {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: clamp(1.75rem, 3vw, 2.75rem);
}
.rule__label {
  font-family: var(--font-mono);
  font-size: var(--step-label);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
}
.rule__line {
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, var(--hairline) 0%, var(--hairline-blue) 100%);
}
.rule::after {
  content: "";
  width: 6px;
  height: 6px;
  flex: none;
  transform: rotate(45deg);
  background: var(--quill);
  margin-left: 0.15rem;
}

.lead {
  font-size: var(--step-lead);
  line-height: 1.65;
  color: var(--paper-muted);
  max-width: 60ch;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--step-label);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1rem;
}

/* --------------------------------------------------------------------------
   4. Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 1.02rem 1.85rem;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
  line-height: 1.3;
  min-height: 48px;
  text-align: center;
}

.btn--primary {
  background: linear-gradient(160deg, var(--gold-spec) 0%, var(--gold-bright) 22%, var(--gold) 58%, var(--gold-deep) 100%);
  color: #0b0c10;
  font-weight: 600;
  border-color: transparent;
}
.btn--primary:hover {
  color: #0b0c10;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(210, 159, 76, 0.24);
}

.btn--ghost { background: transparent; color: var(--quill-bright); border-color: var(--quill); }
.btn--ghost:hover { background: color-mix(in srgb, var(--quill) 16%, transparent); color: var(--paper); border-color: var(--quill-bright); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2.25rem;
}

/* --------------------------------------------------------------------------
   5. Masthead
   -------------------------------------------------------------------------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hairline-blue);
}

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 74px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--paper);
}
.brand__mark { width: auto; height: 44px; flex: none; display: block; }
.brand picture { display: block; flex: none; }
.brand__name {
  font-family: var(--font-display);
  font-size: 1.42rem;
  letter-spacing: 0.02em;
  line-height: 1;
}
.brand__name em {
  font-style: normal;
  color: var(--gold);
}

.nav { display: flex; align-items: center; gap: clamp(1rem, 2vw, 2rem); }

.nav__links {
  display: flex;
  gap: clamp(1rem, 2vw, 2rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__links a {
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper-muted);
  text-decoration: none;
  padding-block: 0.4rem;
  border-bottom: 1px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}
.nav__links a:hover,
.nav__links a[aria-current="page"] {
  color: var(--paper);
  border-bottom-color: var(--gold);
}

.nav__cta { padding: 0.8rem 1.25rem; min-height: 42px; }

@media (max-width: 767px) {
  /* Phones show the monogram alone. The wordmark is clipped rather than
     removed, so screen readers still announce the link as the company name. */
  .brand__name {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .brand__mark { height: 40px; }
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--hairline-soft);
  color: var(--paper-muted);
  width: 40px; height: 40px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease;
}
.theme-toggle:hover { color: var(--gold); border-color: var(--hairline); }
.theme-toggle svg { width: 17px; height: 17px; }
[data-theme="light"] .btn--primary {
  background: linear-gradient(160deg, #8a6c15, #6b5310 58%, #54410b);
  color: #fffaf0;
}
[data-theme="light"] .btn--primary:hover { color: #fffaf0; }
[data-theme="light"] ::selection { background: var(--gold); color: #fffaf0; }

[data-theme="light"] .theme-toggle .icon-sun,
.theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--hairline-soft);
  color: var(--paper);
  width: 44px; height: 44px;
  border-radius: var(--radius);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 18px; height: 1px;
  margin: 4px auto;
  background: currentColor;
  transition: transform 200ms ease, opacity 200ms ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 1079px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed;
    inset: 74px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--ink-raised);
    border-bottom: 1px solid var(--hairline);
    padding: 1rem var(--gutter) 1.75rem;
    transform: translateY(-120%);
    transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: var(--shadow);
  }
  .nav[data-open="true"] { transform: translateY(0); }
  .nav__links { flex-direction: column; gap: 0; }
  .nav__links a {
    display: block;
    padding: 0.95rem 0;
    border-bottom: 1px solid var(--hairline-soft);
    font-size: 0.8rem;
  }
  .nav__cta { margin-top: 1.25rem; }
  .nav__utility { display: flex; justify-content: flex-end; margin-top: 1rem; }
}

@media (min-width: 1080px) {
  .nav__utility { display: flex; align-items: center; }
}

/* --------------------------------------------------------------------------
   6. Hero (signature: the quill stroke that draws itself)
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  padding-block: clamp(4.5rem, 11vw, 9rem) clamp(4rem, 8vw, 7rem);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -30%;
  right: -15%;
  width: min(760px, 90vw);
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(201, 162, 39, 0.13), transparent 62%);
  pointer-events: none;
}
[data-theme="light"] .hero::before { background: radial-gradient(circle, rgba(143, 92, 23, 0.12), transparent 62%); }
.hero::after {
  content: "";
  position: absolute;
  bottom: -40%;
  left: -18%;
  width: min(640px, 80vw);
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(70, 115, 151, 0.16), transparent 64%);
  pointer-events: none;
}
[data-theme="light"] .hero::after { background: radial-gradient(circle, rgba(24, 81, 120, 0.10), transparent 64%); }

.hero__inner {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  grid-template-columns: 1fr;
  align-items: end;
  position: relative;
}
@media (min-width: 1000px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.88fr);
    /* Bottom aligned so the panel's lower edge lands level with the CTA row. */
    align-items: end;
  }
}

.hero__title {
  max-width: 14ch;
  font-size: var(--step-hero);
  line-height: 0.98;
  margin: 0 0 1.5rem;
  letter-spacing: -0.015em;
}
.hero__title .gilt {
  display: block;
  background: linear-gradient(102deg, var(--gold-spec) 0%, var(--gold-bright) 26%, var(--gold) 52%, var(--gold-deep) 78%, var(--gold-bright) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-style: italic;
  padding-bottom: 0.09em; /* keeps descenders from clipping under background-clip */
}

.quill-stroke { width: min(430px, 78%); height: auto; margin: 0 0 1.9rem; overflow: visible; }
.quill-stroke path {
  fill: none;
  stroke: var(--gold);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 620;
  stroke-dashoffset: 620;
  animation: draw 1600ms cubic-bezier(0.65, 0, 0.35, 1) 300ms forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

.hero__aside {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.75rem, 3.5vw, 2.75rem);
}

.hero__logo { display: none; }

@media (min-width: 1000px) {
  /* The lockup fills the head of the right column, so the hero opens with the
     mark on one side and the promise on the other. Hidden on small screens,
     where the masthead monogram is already doing this job. */
  .hero__logo { display: block; width: min(320px, 80%); }
  .hero__logo img { width: 100%; height: auto; }
  .hero__aside > .hero__panel { width: 100%; }
}

.hero__panel {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--ink-raised), var(--ink));
  padding: clamp(1.5rem, 3vw, 2.25rem);
  box-shadow: var(--shadow);
}
.hero__panel h2 {
  font-family: var(--font-mono);
  font-size: var(--step-label);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.25rem;
}

.spec {
  list-style: none;
  margin: 0;
  padding: 0;
}
.spec li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--hairline-soft);
  margin: 0;
  font-size: var(--step-small);
}
.spec li:last-child { border-bottom: 0; padding-bottom: 0; }
.spec dt, .spec .spec__k { color: var(--paper-muted); }
.spec .spec__v {
  font-family: var(--font-mono);
  color: var(--paper);
  text-align: right;
  font-size: 0.86rem;
}
.spec .spec__v em { font-style: normal; color: var(--gold-bright); }

/* --------------------------------------------------------------------------
   7. Page header (interior pages)
   -------------------------------------------------------------------------- */

.page-head {
  padding-block: clamp(3.5rem, 7vw, 6rem) clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--hairline-soft);
  position: relative;
}
.page-head h1 { max-width: 20ch; }
.page-head .lead { margin-top: 1.25rem; }
.page-head--plain { border-bottom: 0; padding-bottom: clamp(1rem, 2vw, 1.5rem); }

/* The lockup sits in the same place it occupies on the home page, pinned to
   the shell's right edge. Desktop only: on narrow screens the masthead
   monogram already carries the mark and the space belongs to the headline. */
.page-logo { display: none; }

@media (min-width: 1000px) {
  .page-logo {
    display: block;
    position: absolute;
    top: clamp(2.75rem, 5vw, 4.5rem);
    right: max(var(--gutter), calc((100% - var(--shell)) / 2 + var(--gutter)));
    width: clamp(190px, 20vw, 270px);
    pointer-events: none;
  }
  .page-logo img { width: 100%; height: auto; }
  .page-head .shell > *:not(.page-logo) { max-width: calc(100% - 320px); }
}

/* --------------------------------------------------------------------------
   8. Grids + cards
   -------------------------------------------------------------------------- */

.grid { display: grid; gap: clamp(1.25rem, 2.5vw, 2rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }

.split {
  display: grid;
  gap: clamp(2rem, 5vw, 4.5rem);
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: start; }
  .split--reverse > *:first-child { order: 2; }
}

.card {
  border: 1px solid var(--hairline-soft);
  border-radius: var(--radius-lg);
  background: var(--ink-raised);
  padding: clamp(1.5rem, 3vw, 2.15rem);
  position: relative;
  transition: border-color 200ms ease, transform 200ms ease;
}
.card:hover { border-color: var(--hairline-blue); transform: translateY(-3px); }
.card h3 { margin-bottom: 0.65rem; }
.card p { color: var(--paper-muted); font-size: var(--step-small); }
.card__index {
  font-family: var(--font-mono);
  font-size: var(--step-label);
  letter-spacing: 0.18em;
  color: var(--quill-bright);
  display: block;
  margin-bottom: 1rem;
}

/* Sequence: the four stages of a proposal, in order. Numbering earns its place. */
.stage {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  padding-block: clamp(1.75rem, 3vw, 2.5rem);
  border-top: 1px solid var(--hairline-soft);
  align-items: start;
}
.stage:last-child { border-bottom: 1px solid var(--hairline-soft); }
.stage__num {
  min-width: 1.6ch;
  text-align: right;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 0.85;
  color: var(--gold);
  font-style: italic;
}
.stage h3 { margin-bottom: 0.5rem; }
.stage p { color: var(--paper-muted); }
.stage__note {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--paper-muted);
  letter-spacing: 0.04em;
  margin-top: 0.85rem;
  padding-left: 0.9rem;
  border-left: 1px solid var(--quill);
}

/* Deliverable list styled like a proposal table of contents */
.toc { list-style: none; margin: 1.5rem 0 0; padding: 0; max-width: var(--measure); }
.toc li {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  padding: 0.7rem 0;
  border-bottom: 1px dotted var(--hairline-soft);
  margin: 0;
  font-size: var(--step-small);
}
.toc li::before {
  content: attr(data-sec);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--quill-bright);
  letter-spacing: 0.1em;
  flex: none;
  min-width: 3.2rem;
}

/* People */
.person { display: grid; gap: 1.5rem; }
.person__portrait {
  width: 100%;
  max-width: 300px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background: var(--ink-raised);
  filter: grayscale(0.18) contrast(1.04);
}
.person__role {
  font-family: var(--font-mono);
  font-size: var(--step-label);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.9rem;
}
.portrait-placeholder {
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper-muted);
  text-align: center;
  padding: 1rem;
}

/* Trust bar */
.trustbar {
  border-top: 1px solid var(--hairline-soft);
  border-bottom: 1px solid var(--hairline-soft);
  padding-block: 1.35rem;
}
.trustbar p {
  margin: 0;
  max-width: none;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--paper-muted);
  text-align: center;
}
.trustbar strong { color: var(--gold); font-weight: 500; }

/* Price */
.price-figure {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  font-family: var(--font-display);
  color: var(--gold);
  line-height: 0.9;
  margin-bottom: 1.25rem;
}
.price-figure .amount { font-size: clamp(4rem, 12vw, 7.5rem); font-style: italic; }
.price-figure .unit {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--quill-bright);
  padding-top: 1.1rem;
}

/* Quote / callout */
.callout {
  border-left: 2px solid var(--quill);
  padding: 0.4rem 0 0.4rem 1.5rem;
  margin: 2rem 0;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  line-height: 1.35;
  font-style: italic;
  color: var(--paper);
  max-width: 46ch;
}

/* --------------------------------------------------------------------------
   9. Forms
   -------------------------------------------------------------------------- */

.form-wrap {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background: var(--ink-raised);
  padding: clamp(1.5rem, 4vw, 3rem);
  box-shadow: var(--shadow);
}

fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 clamp(2rem, 4vw, 3rem);
}
fieldset:last-of-type { margin-bottom: 1.5rem; }

legend {
  font-family: var(--font-mono);
  font-size: var(--step-label);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 0;
  margin-bottom: 1.5rem;
  width: 100%;
  border-bottom: 1px solid var(--hairline-blue);
  padding-bottom: 0.75rem;
}

.field-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}
.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field--full { grid-column: 1 / -1; }

label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper-muted);
}
label .req { color: var(--gold); }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="date"],
input[type="file"],
select,
textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--paper);
  background: var(--field);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--radius);
  padding: 0.85rem 0.95rem;
  width: 100%;
  min-height: 48px;
  transition: border-color 160ms ease, background-color 160ms ease;
}
textarea { min-height: 130px; resize: vertical; line-height: 1.6; }
select {
  background-color: var(--field-solid);
  appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 20px) calc(50% + 2px), calc(100% - 14px) calc(50% + 2px); background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; padding-right: 2.75rem; }

select option,
select optgroup {
  background-color: var(--field-solid);
  color: var(--paper);
  font-family: var(--font-body);
}
select optgroup {
  color: var(--gold);
  font-style: normal;
  font-weight: 600;
}
select:invalid, select option[value=""] { color: var(--paper-muted); }

input:hover, select:hover, textarea:hover { border-color: var(--hairline); }
input:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: color-mix(in srgb, var(--gold) 6%, transparent);
}
select:focus { outline: none; border-color: var(--gold); }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--paper-muted) 70%, transparent); }

.hint {
  font-family: var(--font-body);
  font-size: 0.84rem;
  color: var(--paper-muted);
  text-transform: none;
  letter-spacing: 0;
  margin: 0;
}

.choice { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.choice label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--font-body);
  font-size: var(--step-small);
  color: var(--paper);
  cursor: pointer;
}
input[type="radio"], input[type="checkbox"] { width: 18px; height: 18px; min-height: 0; accent-color: var(--gold); flex: none; }

.consent {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: var(--step-small);
  color: var(--paper-muted);
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--font-body);
  max-width: var(--measure);
}

.trap { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

.form-alert {
  border: 1px solid var(--gold);
  border-left-width: 3px;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--gold) 8%, transparent);
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  font-size: var(--step-small);
}
.form-alert h2 { font-family: var(--font-body); font-size: 1rem; font-weight: 600; margin-bottom: 0.35rem; }
.form-alert ul { margin: 0.5rem 0 0; }

/* --------------------------------------------------------------------------
   10. Blog
   -------------------------------------------------------------------------- */

.post-list { list-style: none; margin: 0; padding: 0; max-width: none; }
.post-list li { margin: 0; }
.post-item {
  display: grid;
  gap: 0.5rem 2rem;
  grid-template-columns: 1fr;
  padding-block: clamp(1.75rem, 3vw, 2.35rem);
  border-top: 1px solid var(--hairline-soft);
  text-decoration: none;
  color: inherit;
  transition: background-color 180ms ease;
}
.post-list li:last-child .post-item { border-bottom: 1px solid var(--hairline-soft); }
@media (min-width: 800px) {
  .post-item { grid-template-columns: 190px 1fr; align-items: start; }
}
.post-item:hover h3 { color: var(--gold-bright); }
.post-item h3 { font-size: clamp(1.35rem, 2vw, 1.75rem); margin-bottom: 0.4rem; transition: color 160ms ease; }
.post-item p { color: var(--paper-muted); font-size: var(--step-small); margin: 0; }
.post-meta {
  font-family: var(--font-mono);
  font-size: var(--step-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--quill-bright);
}
.post-meta span { display: block; color: var(--paper-muted); margin-top: 0.35rem; }

.prose { max-width: var(--measure); }
.prose h2 { font-size: clamp(1.6rem, 2.6vw, 2.15rem); margin-top: 2.5rem; }
.prose h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); margin-top: 2rem; }
.prose ul, .prose ol { margin-bottom: 1.5rem; }
.prose > p:first-of-type { font-size: var(--step-lead); color: var(--paper); }

/* --------------------------------------------------------------------------
   11. Closing CTA + footer
   -------------------------------------------------------------------------- */

.closer {
  border-top: 1px solid var(--hairline);
  background:
    radial-gradient(ellipse at 50% 120%, rgba(46, 74, 138, 0.22), transparent 60%),
    var(--ink-sunken);
  text-align: center;
}
.closer h2 { max-width: 18ch; margin-inline: auto; }
.closer p { margin-inline: auto; }
.closer .btn-row { justify-content: center; }

.site-foot {
  background: var(--ink-sunken);
  border-top: 1px solid var(--hairline-soft);
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
  font-size: var(--step-small);
}
.foot-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--hairline-soft);
}
.foot-brand { margin-bottom: 1.25rem; }
.foot-brand img { width: 100%; max-width: 190px; height: auto; }

.foot-grid h2 {
  font-family: var(--font-mono);
  font-size: var(--step-label);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.15rem;
}
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { margin-bottom: 0.7rem; }
.foot-grid a:not(.btn) { color: var(--paper-muted); text-decoration: none; }
.foot-grid a:not(.btn):hover { color: var(--gold-bright); text-decoration: underline; }
.foot-grid address { font-style: normal; color: var(--paper-muted); line-height: 1.7; }

.social { display: flex; gap: 0.75rem; margin-top: 1.15rem; }
.social a {
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--hairline-soft);
  border-radius: 50%;
  color: var(--paper-muted);
  transition: color 160ms ease, border-color 160ms ease;
}
.social a:hover { color: var(--quill-bright); border-color: var(--hairline-blue); }
.social svg { width: 17px; height: 17px; fill: currentColor; }

.colophon {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.75rem;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--paper-muted);
}
.colophon a { color: var(--paper-muted); text-decoration: none; }
.colophon a:hover { color: var(--gold-bright); }
.colophon .powered a { color: var(--gold); }

/* --------------------------------------------------------------------------
   12. Motion
   -------------------------------------------------------------------------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms cubic-bezier(0.22, 1, 0.36, 1), transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}
[data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .quill-stroke path { stroke-dashoffset: 0; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   13. Print
   -------------------------------------------------------------------------- */

@media print {
  .masthead, .closer, .btn, .social, .nav-toggle { display: none !important; }
  body { background: #fff; color: #000; }
  a { color: #000; }
}
