/* The Pen & Post — marketing surface.
 *
 * Cotton stationery: the paper is the subject and the ink is a guest on it.
 * Navy and a dove blue do nearly everything; sage lines an envelope now and
 * then; gilt appears only as a hairline, the way foil actually would.
 *
 * Written as real classes rather than utility soup because almost none of this
 * is expressible in Tailwind defaults, and the parts that matter -- the inset
 * bevel, the paper fibre, the type scale -- want naming.
 */

:root {
  --paper:      #F4F1E8;
  --paper-lit:  #FBF9F5;
  --paper-deep: #EDE8DC;
  --ink:        #22304C;
  --ink-soft:   #5A6580;
  --ink-faint:  #8D93A1;
  --rule:       #DCD5C7;
  --rule-firm:  #C6BCA8;
  --haze:       #8FA6C4;
  --haze-wash:  #E7ECF3;
  --sage:       #9FB3A4;
  --gilt:       #AF9350;

  --grain-opacity: 0.05;
  --grain-blend: multiply;

  --display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --text:    "Karla", "Helvetica Neue", Arial, sans-serif;

  --measure: 34rem;
  --pad: clamp(1.25rem, 5vw, 3rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:      #14171E;
    --paper-lit:  #1C202A;
    --paper-deep: #0F1218;
    --ink:        #E8E4D8;
    --ink-soft:   #A6ABB6;
    --ink-faint:  #7C818C;
    --rule:       #2C313C;
    --rule-firm:  #3D4350;
    --haze:       #9DB4D2;
    --haze-wash:  #1B222E;
    --sage:       #A7BCAC;
    --gilt:       #C9AC69;
    --grain-opacity: 0.06;
    --grain-blend: soft-light;
  }
}

:root[data-theme="dark"] {
  --paper:      #14171E;
  --paper-lit:  #1C202A;
  --paper-deep: #0F1218;
  --ink:        #E8E4D8;
  --ink-soft:   #A6ABB6;
  --ink-faint:  #7C818C;
  --rule:       #2C313C;
  --rule-firm:  #3D4350;
  --haze:       #9DB4D2;
  --haze-wash:  #1B222E;
  --sage:       #A7BCAC;
  --gilt:       #C9AC69;
  --grain-opacity: 0.06;
  --grain-blend: soft-light;
}

body.marketing {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.7;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

/* Fibre, not grunge. Generated noise at a few percent reads as cotton rather
   than as texture -- you should notice the paper, never the effect. */
body.marketing::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: var(--grain-opacity);
  mix-blend-mode: var(--grain-blend);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
}

.wrap { max-width: 68rem; margin: 0 auto; padding: 0 var(--pad); position: relative; z-index: 1; }

.label {
  font-family: var(--text);
  font-size: 0.63rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: inline-block;
}
.label-haze { color: var(--haze); }
.label-sage { color: var(--sage); }

.gilt-rule { width: 2.5rem; height: 1px; background: var(--gilt); border: 0; margin: 1.5rem 0; }

/* ---------- masthead ---------- */

.bar { border-bottom: 1px solid var(--rule); background: var(--paper-lit); position: relative; z-index: 2; }
.bar .inner {
  max-width: 68rem; margin: 0 auto; padding: 0 var(--pad);
  min-height: 4.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.wordmark { font-family: var(--display); font-size: 1.5rem; font-weight: 500; text-decoration: none; color: var(--ink); }
.bar nav { display: none; gap: 1.75rem; }
.bar nav a { font-size: 0.85rem; color: var(--ink-soft); text-decoration: none; }
.bar nav a:hover, .bar nav a[aria-current] { color: var(--ink); }
@media (min-width: 56rem) { .bar nav { display: flex; } }
.bar .end { display: flex; gap: 0.9rem; align-items: center; }
.bar .end .signin { font-size: 0.85rem; color: var(--ink-soft); text-decoration: none; }
.bar .end .signin:hover { color: var(--ink); }

/* ---------- type ---------- */

h1.display {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.6rem, 6.5vw, 4.5rem);
  line-height: 1.05;
  margin: 1.25rem 0 0;
  max-width: 14ch;
  text-wrap: balance;
}
/* Differentiated by italic and ink rather than weight, now the base is 400. */
h1.display em { font-style: italic; font-weight: 400; color: var(--ink-soft); }

h2.display {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.85rem, 4.2vw, 2.7rem);
  line-height: 1.15;
  margin: 0.75rem 0 0;
  max-width: 22ch;
  text-wrap: balance;
}

h3.display { font-family: var(--display); font-weight: 600; font-size: 1.25rem; margin: 0 0 0.5rem; line-height: 1.3; }

.standfirst { font-size: 1.05rem; line-height: 1.75; color: var(--ink-soft); max-width: var(--measure); margin: 0; }
.standfirst strong { color: var(--ink); font-weight: 600; }

.lede { max-width: var(--measure); color: var(--ink-soft); margin: 1.25rem 0 0; }
.lede em { font-family: var(--display); font-style: italic; font-size: 1.15em; color: var(--ink); }

.prose { max-width: var(--measure); color: var(--ink-soft); }
.prose p { margin: 0 0 1.15rem; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--ink); font-weight: 600; }

.footnote { margin-top: 1.75rem; font-size: 0.87rem; color: var(--ink-faint); max-width: 46rem; }
.aside-note { margin-top: 1.25rem; font-size: 0.85rem; color: var(--ink-faint); }

a { color: var(--ink); text-decoration-color: var(--haze); text-underline-offset: 4px; }

/* ---------- buttons ---------- */

.btn {
  font-family: var(--text);
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  padding: 0.95rem 1.85rem;
  border: 1px solid var(--ink); background: var(--ink); color: var(--paper-lit);
  text-decoration: none; display: inline-block; cursor: pointer;
}
.btn:hover { background: transparent; color: var(--ink); }
.btn-quiet { background: transparent; color: var(--ink-soft); border-color: var(--rule-firm); }
.btn-quiet:hover { color: var(--ink); border-color: var(--ink); }
.btn-sm { padding: 0.7rem 1.2rem; }
.btn-block { display: block; text-align: center; }
a:focus-visible, .btn:focus-visible, button:focus-visible { outline: 1px solid var(--haze); outline-offset: 4px; }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

/* ---------- hero ---------- */

.hero { display: grid; gap: clamp(2.5rem, 5vw, 4rem); padding: clamp(3rem, 7vw, 5rem) 0 clamp(2rem, 4vw, 3rem); align-items: center; }
@media (min-width: 60rem) { .hero { grid-template-columns: 1.05fr 0.95fr; } }

/* The bevel a card carries: a hairline held well inside the edge. */
.plate { position: relative; background: var(--paper-lit); border: 1px solid var(--rule-firm); padding: 2.25rem; }
.plate::after { content: ""; position: absolute; inset: 8px; border: 1px solid var(--rule); pointer-events: none; }
.plate > * { position: relative; }

.kit { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 1.4rem; }
.kit li { display: grid; grid-template-columns: 2rem 1fr; gap: 1rem; align-items: start; }
.kit .numeral { font-family: var(--display); font-style: italic; font-size: 1.35rem; color: var(--haze); line-height: 1.2; }
.kit h3 { font-family: var(--display); font-weight: 600; font-size: 1.15rem; margin: 0 0 0.15rem; }
.kit p { margin: 0; font-size: 0.9rem; color: var(--ink-soft); line-height: 1.6; }

/* Was a rotated navy tag hung off the corner. It overflowed its own background,
   collided with the plate's inner bevel, and read as a sticker -- a product-page
   device, not something a piece of stationery would ever carry. A printed note at
   the foot of the card, under a hairline, is what this actually wants to be, and
   it cannot break at any width. */
.plate-note {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-family: var(--display);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.4;
  color: var(--ink-soft);
  text-align: center;
}

/* ---------- sections ---------- */

.section { padding: clamp(3.5rem, 7vw, 5rem) 0 0; }
.band { background: var(--paper-lit); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin-top: clamp(2rem, 5vw, 3.5rem); }
.band .wrap { padding-top: clamp(3rem, 6vw, 4.5rem); padding-bottom: clamp(3rem, 6vw, 4.5rem); }

.head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.head-row a { font-size: 0.85rem; color: var(--ink-soft); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.25rem; margin-top: 2.5rem; }
.card { background: var(--paper); border: 1px solid var(--rule); padding: 1.75rem 1.5rem; }
.card p { margin: 0; font-size: 0.92rem; color: var(--ink-soft); line-height: 1.6; }
.band .card { background: var(--paper); }

/* Ordered steps, where the order is real information. */
.steps { list-style: none; counter-reset: step; margin: 2.5rem 0 0; padding: 0; display: grid; gap: 2rem; }
.steps li { display: grid; grid-template-columns: 2.5rem 1fr; gap: 1.25rem; align-items: start; }
.steps li::before {
  counter-increment: step; content: counter(step, lower-roman);
  font-family: var(--display); font-style: italic; font-size: 1.6rem; color: var(--haze); line-height: 1;
}
.steps p { margin: 0; color: var(--ink-soft); max-width: var(--measure); }

.qa { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 2rem 3rem; margin-top: 2.5rem; }
.qa p { margin: 0.4rem 0 0; font-size: 0.94rem; color: var(--ink-soft); }

/* ---------- plans ---------- */

.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14.5rem, 1fr)); gap: 1.25rem; margin-top: 2rem; }
.plan { background: var(--paper-lit); border: 1px solid var(--rule); padding: 2rem 1.75rem; display: flex; flex-direction: column; gap: 0.3rem; }
.plan.featured { border-color: var(--haze); background: var(--haze-wash); }
.plan .name { font-family: var(--display); font-weight: 600; font-size: 1.35rem; }
.plan .price { font-family: var(--display); font-weight: 400; font-size: 3rem; line-height: 1; margin: 0.6rem 0 0; font-variant-numeric: tabular-nums; }
.plan .price sup { font-family: var(--text); font-size: 0.68rem; letter-spacing: 0.1em; color: var(--ink-faint); vertical-align: super; }
.plan .meta { font-size: 0.87rem; color: var(--ink-soft); }
.plan .pick { margin-top: auto; padding-top: 1.4rem; display: grid; gap: 0.5rem; }
.plan .pick .alt { font-size: 0.78rem; color: var(--ink-faint); text-align: center; }

/* ---------- notice ---------- */

.notice { border-left: 2px solid var(--sage); background: var(--paper-lit); padding: 1.25rem 1.5rem; margin-top: 2rem; max-width: 46rem; }
.notice p { margin: 0; font-size: 0.94rem; color: var(--ink-soft); }
.notice p + p { margin-top: 0.6rem; }

/* ---------- colophon ---------- */

.colophon { margin-top: clamp(3.5rem, 7vw, 5rem); border-top: 1px solid var(--rule-firm); background: var(--paper-deep); }
.colophon .wrap { padding-top: clamp(2.5rem, 5vw, 3.5rem); padding-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.colophon dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1.75rem 2.5rem; margin: 1.5rem 0 0; }
.colophon dt { margin-bottom: 0.4rem; }
.colophon dd { margin: 0; font-size: 0.9rem; color: var(--ink-soft); line-height: 1.6; }
.colophon dd b { color: var(--ink); font-weight: 600; }

/* ---------- footer ---------- */

.site-footer { position: relative; z-index: 1; }
.site-footer .wrap { padding-top: 1.75rem; padding-bottom: 3rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; font-size: 0.82rem; color: var(--ink-faint); }
.site-footer a { color: var(--ink-faint); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.site-footer .set { margin-left: auto; font-family: var(--display); font-style: italic; font-size: 1rem; }

/* ---------- forms and the signed-out shell ---------- */

.auth-shell { min-height: 100vh; display: grid; align-content: center; justify-items: center; padding: clamp(2rem, 6vw, 4rem) var(--pad); position: relative; z-index: 1; }
.auth-card { width: 100%; max-width: 28rem; }
.auth-head { text-align: center; margin-bottom: 1.75rem; }
.auth-head .mark { color: var(--ink); }
.auth-head h1 { font-family: var(--display); font-weight: 400; font-size: 2.1rem; line-height: 1.15; margin: 1rem 0 0.4rem; }
.auth-head p { margin: 0; font-size: 0.94rem; color: var(--ink-soft); }
.auth-alt { margin-top: 1.5rem; text-align: center; font-size: 0.88rem; color: var(--ink-soft); }
.auth-alt a { color: var(--ink); }
.auth-back { margin-top: 1.75rem; text-align: center; font-size: 0.8rem; }
.auth-back a { color: var(--ink-faint); text-decoration: none; }
.auth-back a:hover { color: var(--ink); }

.form-stack { display: grid; gap: 1.15rem; }
.field { display: grid; gap: 0.4rem; }
.field > label {
  font-size: 0.63rem; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--ink-faint);
}
.field input {
  font-family: var(--text); font-size: 1rem; line-height: 1.4;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--rule-firm);
  background: var(--paper);
  color: var(--ink);
  border-radius: 0;
  width: 100%;
}
.field input::placeholder { color: var(--ink-faint); }
.field input:focus { outline: none; border-color: var(--haze); box-shadow: 0 0 0 1px var(--haze); }
.field .hint { font-size: 0.78rem; color: var(--ink-faint); }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1.15rem; }
@media (max-width: 26rem) { .field-pair { grid-template-columns: 1fr; } }

.errors { border-left: 2px solid var(--gilt); background: var(--paper); padding: 0.9rem 1.1rem; margin-bottom: 1.5rem; }
.errors p { margin: 0 0 0.35rem; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); }
.errors ul { margin: 0; padding-left: 1.1rem; font-size: 0.9rem; color: var(--ink-soft); }

.flash-note { border-left: 2px solid var(--sage); background: var(--paper); padding: 0.85rem 1.1rem; margin-bottom: 1.5rem; font-size: 0.92rem; color: var(--ink-soft); }
.flash-note.is-alert { border-left-color: var(--gilt); }

/* ---------- onboarding ---------- */

.onboarding-shell { max-width: 42rem; margin: 0 auto; padding: 0 var(--pad) 4rem; position: relative; z-index: 1; }

.progress { display: flex; gap: 0.6rem; list-style: none; margin: 2.25rem 0 2.75rem; padding: 0; }
.progress li { flex: 1; }
.progress .tick { height: 1px; background: var(--rule-firm); }
.progress li.done .tick, .progress li.here .tick { background: var(--ink); height: 2px; }
.progress li.here .tick { background: var(--haze); }
.progress .name { display: block; margin-top: 0.6rem; font-size: 0.62rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-faint); }
.progress li.here .name { color: var(--ink); }

.step-head h1 { font-family: var(--display); font-weight: 400; font-size: clamp(1.9rem, 5vw, 2.6rem); line-height: 1.12; margin: 0; }
.step-head p { margin: 0.9rem 0 0; color: var(--ink-soft); max-width: var(--measure); }

.field select, .field textarea {
  font-family: var(--text); font-size: 1rem; line-height: 1.4;
  padding: 0.8rem 0.9rem; border: 1px solid var(--rule-firm);
  background: var(--paper); color: var(--ink); border-radius: 0; width: 100%;
}
.field select:focus, .field textarea:focus { outline: none; border-color: var(--haze); box-shadow: 0 0 0 1px var(--haze); }
.field-row { display: grid; gap: 1.15rem; }
@media (min-width: 34rem) { .field-row.two { grid-template-columns: 1fr 1fr; } .field-row.three { grid-template-columns: 1fr 1fr 1fr; } }
.field-row.address { grid-template-columns: 1fr; }
@media (min-width: 34rem) { .field-row.address { grid-template-columns: 3fr 1fr 2fr; } }

.step-actions { display: flex; align-items: center; gap: 1.25rem; margin-top: 2rem; }
.step-actions .back { font-size: 0.85rem; color: var(--ink-faint); text-decoration: none; }
.step-actions .back:hover { color: var(--ink); }

.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1rem; margin-top: 2rem; }
.choice { background: var(--paper-lit); border: 1px solid var(--rule); padding: 1.6rem 1.4rem; display: flex; flex-direction: column; gap: 0.25rem; text-align: center; }
.choice.suggested { border-color: var(--haze); background: var(--haze-wash); }
.choice .name { font-family: var(--display); font-weight: 600; font-size: 1.3rem; }
.choice .price { font-family: var(--display); font-weight: 400; font-size: 2.6rem; line-height: 1; margin: 0.5rem 0 0; font-variant-numeric: tabular-nums; }
.choice .price sup { font-family: var(--text); font-size: 0.65rem; letter-spacing: 0.1em; color: var(--ink-faint); vertical-align: super; }
.choice .meta { font-size: 0.85rem; color: var(--ink-soft); }
.choice .buy { margin-top: auto; padding-top: 1.25rem; display: grid; gap: 0.45rem; }
.choice .buy form { margin: 0; }
