/* ============================================================
   Tash Marcellis — warm letterpress / foil-stamp direction
   Paper ground, deep ink, gold foil accents, pressed cards.
   ============================================================ */

:root {
  --gold: #9c7a2a;
  --gold-bright: #c19b3f;
  --gold-glow: rgba(193,155,63,0.16);
}
:root, :root[data-theme="light"] {
  --bg: #f7f1e2;
  --bg-warm: #efe6d0;
  --ink: #17130c;
  --ink-soft: #443c2d;
  --ink-dim: #746a56;
  --card: #fdfaf2;
  --card-edge: rgba(120,90,20,0.16);
  --card-shadow: 0 1px 2px rgba(80,60,20,.05), 0 8px 24px rgba(80,60,20,.06);
  --card-shadow-lift: 0 2px 4px rgba(80,60,20,.07), 0 18px 44px rgba(80,60,20,.13);
  --hairline: rgba(120,90,20,0.22);
  --nav-bg: rgba(247,241,226,0.88);
  --grain: .035;
}
:root[data-theme="dark"] {
  --gold: #c9a44c;
  --gold-bright: #e5c982;
  --gold-glow: rgba(201,164,76,0.13);
  --bg: #0d0b07;
  --bg-warm: #14110b;
  --ink: #f5f0e2;
  --ink-soft: #d8d0bd;
  --ink-dim: #9d9481;
  --card: #16130d;
  --card-edge: rgba(201,164,76,0.18);
  --card-shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  --card-shadow-lift: 0 2px 4px rgba(0,0,0,.5), 0 18px 44px rgba(0,0,0,.5);
  --hairline: rgba(201,164,76,0.24);
  --nav-bg: rgba(13,11,7,0.88);
  --grain: .05;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Work Sans", -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  transition: background .4s ease, color .4s ease;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
}

/* paper grain, sits above the background, below everything else */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
}
body > * { position: relative; z-index: 1; }

.display { font-family: "Cormorant Garamond", Georgia, serif; }
a { color: inherit; }
main { flex: 1 0 auto; width: 100%; }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------------- nav ---------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 32px;
  background: var(--nav-bg);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--hairline);
}
.nav .brand {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.3rem;
  letter-spacing: .05em;
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s ease;
}
.nav .brand:hover { color: var(--gold); }
.nav-right { display: flex; align-items: center; gap: 26px; }
.nav-right a {
  font-size: .7rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-dim);
  padding-bottom: 4px;
  position: relative;
  white-space: nowrap;
  transition: color .2s ease;
}
.nav-right a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 1px;
  background: var(--gold);
  transition: right .25s ease;
}
.nav-right a:hover { color: var(--gold); }
.nav-right a:hover::after, .nav-right a.current::after { right: 0; }
.nav-right a.current { color: var(--gold); }
.toggle {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--card-edge);
  background: var(--card);
  color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: .9rem; flex-shrink: 0;
  box-shadow: var(--card-shadow);
  transition: transform .25s ease, box-shadow .25s ease;
}
.toggle:hover { transform: rotate(-20deg); box-shadow: var(--card-shadow-lift); }
@media (max-width: 620px) {
  .nav { padding: 13px 18px; }
  .nav-right { gap: 15px; }
  .nav-right a { font-size: .64rem; letter-spacing: .1em; }
}

/* ---------------- layout ---------------- */
.wrap { max-width: 900px; margin: 0 auto; padding: 0 28px; }
.wrap-narrow { max-width: 660px; margin: 0 auto; padding: 0 28px; }
.section { padding: 90px 0; }
.section-warm { background: var(--bg-warm); }

.kicker {
  text-transform: uppercase;
  letter-spacing: .3em;
  font-size: .68rem;
  color: var(--gold);
  margin: 0 0 16px;
}
.section-head { text-align: center; margin-bottom: 52px; }
.section-head h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  margin: 0;
  line-height: 1.15;
  text-wrap: balance;
}
.section-head .sub {
  color: var(--ink-dim);
  font-size: .95rem;
  margin: 12px 0 0;
  max-width: 460px;
  margin-inline: auto;
}

/* gold ornament divider */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 auto 16px;
  max-width: 180px;
}
.ornament::before, .ornament::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--hairline));
}
.ornament::after { background: linear-gradient(90deg, var(--hairline), transparent); }
.ornament span { color: var(--gold); font-size: .7rem; }

/* ---------------- hero ---------------- */
.hero {
  min-height: calc(100svh - 70px);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 60px 28px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  top: 22%;
  left: 50%;
  width: min(760px, 110vw);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, var(--gold-glow) 0%, transparent 62%);
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.hero.short { min-height: auto; padding: 96px 28px 56px; }

.seal {
  width: 116px; height: 116px; border-radius: 50%;
  border: 1px solid var(--hairline);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 32px; position: relative;
  background: var(--card);
  box-shadow: var(--card-shadow);
}
.seal::before {
  content: ""; position: absolute; inset: 9px;
  border-radius: 50%; border: 1px solid var(--hairline);
}
.seal::after {
  content: ""; position: absolute; inset: -1px;
  border-radius: 50%;
  border: 1px solid transparent;
  border-top-color: var(--gold);
  opacity: .55;
}
.seal span {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.7rem; color: var(--gold); letter-spacing: .1em;
}

h1.name {
  font-size: clamp(2.6rem, 8vw, 4.6rem);
  font-weight: 400;
  margin: 0 0 16px;
  line-height: 1.05;
  letter-spacing: .01em;
  text-wrap: balance;
}
.tagline {
  max-width: 480px;
  color: var(--ink-soft);
  font-size: 1.06rem;
  line-height: 1.7;
  margin: 0 0 36px;
  text-wrap: pretty;
}
.cue {
  font-size: .68rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink-dim); text-decoration: none;
  padding: 12px 26px;
  border: 1px solid var(--hairline);
  border-radius: 100px;
  background: var(--card);
  box-shadow: var(--card-shadow);
  transition: color .25s ease, border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}
.cue:hover {
  color: var(--gold);
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-lift);
}

/* page-load sequence */
@media (prefers-reduced-motion: no-preference) {
  .rise { opacity: 0; transform: translateY(14px); animation: rise .9s cubic-bezier(.2,.7,.3,1) forwards; }
  .rise:nth-child(1) { animation-delay: .05s; }
  .rise:nth-child(2) { animation-delay: .16s; }
  .rise:nth-child(3) { animation-delay: .27s; }
  .rise:nth-child(4) { animation-delay: .38s; }
  .rise:nth-child(5) { animation-delay: .49s; }
  @keyframes rise { to { opacity: 1; transform: none; } }
  .seal { transition: transform .7s cubic-bezier(.2,.7,.3,1); }
  .seal:hover { transform: rotate(10deg) scale(1.04); }
  .seal::after { animation: spin 14s linear infinite; }
  @keyframes spin { to { transform: rotate(360deg); } }
}

/* ---------------- statement ---------------- */
.lede {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.5rem, 3.6vw, 2.05rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.45;
  text-align: center;
  margin: 0;
  text-wrap: balance;
  color: var(--ink);
}

/* ---------------- stat strip ---------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--card-edge);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}
.stat {
  background: var(--card);
  padding: 24px 20px;
  text-align: center;
}
.stat .n {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2.4rem;
  line-height: 1;
  color: var(--gold);
  display: block;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}
.stat .l {
  font-size: .64rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

/* status dot */
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  display: inline-block; flex-shrink: 0;
  margin-right: 9px;
  vertical-align: 1px;
}
.dot.live { background: #6f9a4e; box-shadow: 0 0 0 3px rgba(111,154,78,.16); }
.dot.soon { background: var(--gold); box-shadow: 0 0 0 3px var(--gold-glow); }

/* ---------------- catalog cards ---------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  padding: 30px 28px 26px;
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: 4px;
  box-shadow: var(--card-shadow);
  position: relative;
  overflow: hidden;
  transition: transform .3s cubic-bezier(.2,.7,.3,1), box-shadow .3s ease, border-color .3s ease;
}
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s cubic-bezier(.2,.7,.3,1);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-lift);
  border-color: var(--gold);
}
.card:hover::before { transform: scaleX(1); }
.card .cat {
  font-size: .62rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}
.card .ct {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.65rem;
  line-height: 1.15;
  margin-bottom: 10px;
}
.card .cd {
  font-size: .88rem;
  color: var(--ink-dim);
  line-height: 1.6;
  margin: 0 0 18px;
}
.card .meta {
  font-size: .74rem;
  color: var(--ink-dim);
  padding-top: 14px;
  margin-bottom: 12px;
  border-top: 1px solid var(--hairline);
  display: flex;
  align-items: center;
}
.card .latest {
  font-size: .78rem;
  color: var(--ink-soft);
  margin: 0 0 18px;
  line-height: 1.5;
}
.card .latest b {
  font-weight: 600;
  font-size: .62rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 4px;
}
.card .go {
  font-size: .66rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-dim);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  transition: color .25s ease, gap .25s ease;
}
.card:hover .go { color: var(--gold); gap: 13px; }

/* ---------------- journal ---------------- */
.posts { display: flex; flex-direction: column; gap: 16px; }
.post-card {
  display: block;
  text-decoration: none;
  padding: 30px 30px 28px;
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-left: 2px solid var(--hairline);
  border-radius: 4px;
  box-shadow: var(--card-shadow);
  transition: transform .3s cubic-bezier(.2,.7,.3,1), box-shadow .3s ease, border-left-color .3s ease;
}
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-shadow-lift);
  border-left-color: var(--gold);
}
.post-card .date, .post .date {
  display: block; font-size: .64rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 12px;
}
.post-card .pt {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.75rem; line-height: 1.2;
  display: block; margin-bottom: 10px;
  text-wrap: balance;
}
.post-card .px { font-size: .92rem; color: var(--ink-dim); line-height: 1.65; margin: 0; }

.empty {
  text-align: center; color: var(--ink-dim);
  font-size: .95rem; padding: 56px 24px;
  border: 1px dashed var(--hairline);
  border-radius: 4px;
}
.empty a { color: var(--gold); }

/* ---------------- single post ---------------- */
.post { max-width: 640px; margin: 0 auto; padding: 80px 28px 60px; }
.post .date { text-align: center; }
.post h1 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 400; font-size: clamp(2.1rem, 5.5vw, 3rem);
  text-align: center; margin: 0 0 14px; line-height: 1.15; text-wrap: balance;
}
.post .rule {
  width: 48px; height: 1px; background: var(--gold);
  margin: 0 auto 44px; opacity: .7;
}
.post .body p { font-size: 1.06rem; line-height: 1.85; margin: 0 0 24px; color: var(--ink-soft); }
.post .body p:first-of-type::first-letter {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 3.4rem;
  float: left;
  line-height: .82;
  padding: 4px 12px 0 0;
  color: var(--gold);
}
.post .back {
  display: inline-block; margin-top: 32px;
  font-size: .68rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-dim); text-decoration: none;
  padding: 11px 22px;
  border: 1px solid var(--hairline);
  border-radius: 100px;
  transition: color .25s ease, border-color .25s ease;
}
.post .back:hover { color: var(--gold); border-color: var(--gold); }

/* ---------------- forms ---------------- */
.panel {
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: 5px;
  box-shadow: var(--card-shadow);
  padding: 38px 34px 34px;
}
.field { margin-bottom: 24px; }
.field label {
  display: block; font-size: .66rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 9px;
}
.field input, .field textarea {
  width: 100%; padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--card-edge);
  border-radius: 3px; color: var(--ink);
  font-family: "Work Sans", Arial, sans-serif; font-size: 1rem;
  transition: border-color .2s ease, background .2s ease;
}
.field input:focus, .field textarea:focus { border-color: var(--gold); }
.field textarea { resize: vertical; line-height: 1.75; }
.field .hint { font-size: .78rem; color: var(--ink-dim); margin: 8px 0 0; }

.btn {
  padding: 14px 28px;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  border: none; border-radius: 3px;
  color: #17130c; font-weight: 600;
  font-family: "Work Sans", Arial, sans-serif;
  font-size: .82rem; letter-spacing: .1em; text-transform: uppercase;
  cursor: pointer;
  box-shadow: var(--card-shadow);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--card-shadow-lift); filter: brightness(1.06); }
.btn:active { transform: none; }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn-wide { width: 100%; padding: 16px; font-size: .86rem; }

.status { margin-top: 20px; padding: 14px 18px; border-radius: 3px; font-size: .9rem; display: none; }
.status.ok { display: block; background: rgba(110,150,80,.14); border: 1px solid rgba(110,150,80,.42); }
.status.err { display: block; background: rgba(190,80,70,.14); border: 1px solid rgba(190,80,70,.42); }
.status a { color: var(--gold); }

/* signup */
.signup { text-align: center; }
.signup .panel { max-width: 480px; margin: 0 auto; }
.signup form { display: flex; gap: 10px; }
.signup input[type="email"] {
  flex: 1;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--card-edge);
  border-radius: 3px;
  color: var(--ink);
  font-family: "Work Sans", Arial, sans-serif;
  font-size: 1rem;
  transition: border-color .2s ease;
}
.signup input[type="email"]:focus { border-color: var(--gold); }
.signup input::placeholder, .field input::placeholder, .field textarea::placeholder {
  color: var(--ink-dim);
  opacity: .8;
}
.signup .fine { margin: 14px 0 0; font-size: .76rem; color: var(--ink-dim); }

/* admin manage */
.manage-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 4px; border-top: 1px solid var(--hairline); font-size: .95rem;
}
.manage-row:last-child { border-bottom: 1px solid var(--hairline); }
.manage-row .mt { flex: 1; }
.manage-row .md { font-size: .72rem; color: var(--ink-dim); }
.link-btn {
  background: none; border: none; cursor: pointer; padding: 6px 8px;
  color: var(--ink-dim); font-size: .68rem; letter-spacing: .14em;
  text-transform: uppercase; font-family: inherit;
  transition: color .2s ease;
}
.link-btn:hover { color: #b8483f; }

footer {
  flex-shrink: 0;
  text-align: center; padding: 44px 28px 52px;
  color: var(--ink-dim); font-size: .72rem; letter-spacing: .08em;
  border-top: 1px solid var(--hairline);
  background: var(--bg-warm);
}

@media (max-width: 560px) {
  .signup form { flex-direction: column; }
  .panel { padding: 28px 22px 26px; }
  .section { padding: 66px 0; }
  .post .body p:first-of-type::first-letter { font-size: 2.8rem; }
}
