/* ---------------------------------------------------------
   STIFTA — stifta.co
   Editorial fintech. Navy, cream, terracotta. Fraunces + Inter.
   --------------------------------------------------------- */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght,SOFT@9..144,300..800,0..100&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #fffefc;
  --bg-2: #faf5ec;
  --ink: #12263f;
  --ink-2: #2a3f5f;
  --ink-muted: #5a6a82;
  --ink-faint: #8b96a8;
  --rule: #e8e1d2;
  --rule-strong: #d4cab5;
  --accent: #a35238;
  --accent-soft: #c87a5e;
  --accent-wash: #f3e6dd;

  --serif: 'Fraunces', 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;

  --maxw: 1120px;
  --read: 680px;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;
  --space-7: 9rem;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Very subtle warm noise — adds tactile depth without being visible */
  background-image:
    radial-gradient(ellipse at top left, rgba(163, 82, 56, 0.012), transparent 60%),
    radial-gradient(ellipse at bottom right, rgba(18, 38, 63, 0.015), transparent 60%);
  min-height: 100vh;
}

/* ---------- Typography primitives ---------- */

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.02em;
  font-variation-settings: 'opsz' 144, 'SOFT' 30;
  line-height: 1.05;
}

h1 {
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  font-variation-settings: 'opsz' 144, 'SOFT' 40;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.08;
}

h3 {
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

h4 {
  font-size: 1.125rem;
  font-weight: 600;
  font-family: var(--sans);
  letter-spacing: -0.005em;
  line-height: 1.3;
}

p { color: var(--ink-2); }

p + p { margin-top: 1.1em; }

a { color: var(--ink); text-decoration: none; }

a.inline {
  border-bottom: 1px solid var(--rule-strong);
  transition: border-color 0.2s, color 0.2s;
}
a.inline:hover { border-color: var(--accent); color: var(--accent); }

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

em { font-style: italic; }

::selection { background: var(--ink); color: var(--bg); }

/* ---------- Layout ---------- */

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 2rem; }
.read { max-width: var(--read); margin: 0 auto; padding: 0 2rem; }

@media (max-width: 720px) {
  .wrap, .read { padding: 0 1.25rem; }
}

/* ---------- Header ---------- */

header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 254, 252, 0.85);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
header.site.scrolled { border-bottom-color: var(--rule); }

header.site .inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

@media (max-width: 720px) {
  header.site .inner { padding: 0.9rem 1.25rem; }
}

header.site .brand {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  color: var(--ink);
}

header.site nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

header.site nav a {
  font-size: 0.93rem;
  color: var(--ink-muted);
  font-weight: 500;
  transition: color 0.15s;
}
header.site nav a:hover { color: var(--ink); }
header.site nav a.current { color: var(--ink); }

header.site nav a.cta {
  color: var(--bg);
  background: var(--ink);
  padding: 0.55rem 1.1rem;
  border-radius: 2px;
  font-weight: 500;
  transition: background 0.15s;
}
header.site nav a.cta:hover { background: var(--accent); }

@media (max-width: 640px) {
  header.site nav { gap: 1.1rem; }
  header.site nav a:not(.cta):not(.always) { display: none; }
}

/* ---------- Footer ---------- */

footer.site {
  margin-top: var(--space-7);
  background: var(--ink);
  color: var(--bg);
  padding: var(--space-5) 0 var(--space-4);
}

footer.site .inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
}

@media (max-width: 720px) {
  footer.site .inner {
    grid-template-columns: 1fr;
    padding: 0 1.25rem;
    gap: 2.5rem;
  }
}

footer.site .brand {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}

footer.site p {
  color: rgba(255, 254, 252, 0.65);
  font-size: 0.95rem;
  max-width: 32ch;
}

footer.site .meta {
  font-size: 0.85rem;
  color: rgba(255, 254, 252, 0.5);
  margin-top: 1.5rem;
  font-variant-numeric: tabular-nums;
}

footer.site h5 {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 254, 252, 0.5);
  margin-bottom: 1rem;
}

footer.site ul { list-style: none; }
footer.site ul li { margin-bottom: 0.6rem; font-size: 0.95rem; }
footer.site ul a {
  color: rgba(255, 254, 252, 0.8);
  transition: color 0.15s;
}
footer.site ul a:hover { color: var(--accent-soft); }

footer.site .rule {
  max-width: var(--maxw);
  margin: var(--space-4) auto 0;
  padding: 1.5rem 2rem 0;
  border-top: 1px solid rgba(255, 254, 252, 0.1);
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: rgba(255, 254, 252, 0.45);
}

@media (max-width: 640px) {
  footer.site .rule { flex-direction: column; gap: 0.5rem; padding: 1.5rem 1.25rem 0; }
}

/* ---------- Sections ---------- */

section.hero {
  padding: var(--space-6) 0 var(--space-5);
}

@media (max-width: 720px) {
  section.hero { padding: var(--space-5) 0 var(--space-4); }
}

section.block {
  padding: var(--space-5) 0;
  border-top: 1px solid var(--rule);
}

section.block:first-of-type { border-top: none; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 1.5rem;
  height: 1px;
  background: var(--accent);
}

.lede {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 1.8vw, 1.5rem);
  line-height: 1.45;
  font-weight: 400;
  color: var(--ink-2);
  max-width: 36ch;
  letter-spacing: -0.005em;
}

.lede.wide { max-width: 50ch; }

.kicker {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* ---------- Hero (Home) ---------- */

.hero-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

.hero-grid h1 {
  /* The big "Get established." */
  max-width: 14ch;
}

.hero-grid h1 .period {
  color: var(--accent);
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.85rem 1.4rem;
  border-radius: 2px;
  transition: all 0.18s ease;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn.primary {
  background: var(--ink);
  color: var(--bg);
}
.btn.primary:hover { background: var(--accent); }

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule-strong);
}
.btn.ghost:hover { border-color: var(--ink); }

.btn .arrow {
  transition: transform 0.18s;
  display: inline-block;
}
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Two column ---------- */

.two-col {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  align-items: start;
}

@media (max-width: 800px) {
  .two-col { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* ---------- Numbered lists / operational rhythm ---------- */

.num-list { list-style: none; counter-reset: item; }

.num-list > li {
  counter-increment: item;
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--rule);
  align-items: baseline;
}
.num-list > li:last-child { border-bottom: 1px solid var(--rule); }

.num-list > li::before {
  content: counter(item, decimal-leading-zero);
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--accent);
  font-feature-settings: 'tnum';
  font-variation-settings: 'opsz' 144;
}

.num-list .li-title {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: 0.3rem;
}

.num-list .li-body {
  font-size: 0.97rem;
  color: var(--ink-muted);
  line-height: 1.55;
}

@media (max-width: 640px) {
  .num-list > li { grid-template-columns: 3rem 1fr; gap: 1rem; }
  .num-list > li::before { font-size: 1.2rem; }
}

/* ---------- Three col cards ---------- */

.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.three-col > div {
  background: var(--bg);
  padding: 2rem;
}

@media (max-width: 800px) {
  .three-col { grid-template-columns: 1fr; }
}

.card-num {
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--accent);
  font-weight: 500;
  font-feature-settings: 'tnum';
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
}

/* ---------- Pricing ---------- */

.tier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 3rem;
}

@media (max-width: 900px) { .tier-grid { grid-template-columns: 1fr; } }

.tier {
  background: var(--bg);
  border: 1px solid var(--rule);
  padding: 2rem 1.75rem 2.25rem;
  display: flex;
  flex-direction: column;
  position: relative;
}

.tier.featured {
  border-color: var(--ink);
  background: var(--bg);
  position: relative;
}

.tier.featured::before {
  content: "Founding cohort";
  position: absolute;
  top: -10px;
  left: 1.5rem;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.6rem;
  border-radius: 1px;
}

.tier h3 {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.tier .price {
  font-family: var(--serif);
  font-size: 3.5rem;
  font-weight: 400;
  color: var(--ink);
  line-height: 1;
  font-feature-settings: 'tnum';
  letter-spacing: -0.03em;
  font-variation-settings: 'opsz' 144;
}
.tier .price .cents {
  font-size: 1.4rem;
  vertical-align: top;
  margin-right: 0.1rem;
  color: var(--ink-muted);
  font-weight: 400;
}
.tier .price .per {
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--ink-muted);
  font-weight: 400;
  margin-left: 0.3rem;
  letter-spacing: 0;
}

.tier .setup {
  font-size: 0.88rem;
  color: var(--ink-muted);
  margin-top: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.tier .audience {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-2);
  font-size: 1rem;
  line-height: 1.5;
  margin: 1.5rem 0;
  padding: 1rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.tier ul.includes {
  list-style: none;
  margin-bottom: 2rem;
  flex-grow: 1;
}

.tier ul.includes li {
  font-size: 0.93rem;
  color: var(--ink-2);
  padding: 0.5rem 0;
  border-bottom: 1px dotted var(--rule);
  display: flex;
  gap: 0.7rem;
  line-height: 1.4;
}

.tier ul.includes li::before {
  content: "→";
  color: var(--accent);
  flex-shrink: 0;
  font-weight: 600;
}

/* ---------- Notes index ---------- */

.note-list { list-style: none; margin-top: 3rem; }

.note-list li {
  padding: 2rem 0;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 3rem;
  align-items: baseline;
}
.note-list li:last-child { border-bottom: 1px solid var(--rule); }

.note-list .date {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--ink-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-feature-settings: 'tnum';
  font-weight: 500;
}

.note-list h3 {
  font-family: var(--serif);
  font-size: 1.55rem;
  line-height: 1.25;
  margin-bottom: 0.5rem;
  letter-spacing: -0.015em;
  transition: color 0.15s;
}
.note-list a:hover h3 { color: var(--accent); }

.note-list .excerpt {
  font-size: 0.97rem;
  color: var(--ink-muted);
  line-height: 1.55;
  max-width: 60ch;
}

@media (max-width: 720px) {
  .note-list li { grid-template-columns: 1fr; gap: 0.5rem; }
}

/* ---------- Long-form essay ---------- */

article.essay {
  padding: var(--space-5) 0;
}

article.essay .meta {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--ink-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-feature-settings: 'tnum';
  font-weight: 500;
  margin-bottom: 2rem;
  display: flex;
  gap: 1rem;
  align-items: center;
}
article.essay .meta::after {
  content: "";
  flex-grow: 1;
  height: 1px;
  background: var(--rule);
}

article.essay h1 {
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 2.5rem;
  max-width: 22ch;
}

article.essay .body {
  font-family: var(--serif);
  font-size: 1.18rem;
  line-height: 1.65;
  color: var(--ink-2);
  font-weight: 400;
  font-variation-settings: 'opsz' 14, 'SOFT' 30;
}

article.essay .body p { color: var(--ink-2); }
article.essay .body p + p { margin-top: 1.4em; }

article.essay .body p:first-of-type::first-letter {
  font-family: var(--serif);
  font-size: 4.2rem;
  font-weight: 500;
  float: left;
  line-height: 0.85;
  padding: 0.4rem 0.75rem 0 0;
  color: var(--accent);
  font-variation-settings: 'opsz' 144;
}

article.essay .body h2 {
  font-size: 1.75rem;
  margin: 2.5em 0 0.6em;
  letter-spacing: -0.015em;
}

article.essay .body blockquote {
  margin: 2em 0;
  padding-left: 1.5rem;
  border-left: 2px solid var(--accent);
  font-style: italic;
  color: var(--ink);
}

article.essay .back {
  font-family: var(--sans);
  font-size: 0.88rem;
  color: var(--ink-muted);
  margin-bottom: 3rem;
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
}
article.essay .back:hover { color: var(--accent); }

/* ---------- Forms ---------- */

form.contact {
  margin-top: 3rem;
  max-width: 560px;
}

form.contact .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) { form.contact .row { grid-template-columns: 1fr; } }

form.contact .field {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
}

form.contact label {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-muted);
  margin-bottom: 0.55rem;
}
form.contact label .opt {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--ink-faint);
  margin-left: 0.4rem;
}

form.contact input,
form.contact select,
form.contact textarea {
  font-family: var(--sans);
  font-size: 1rem;
  padding: 0.85rem 1rem;
  background: var(--bg);
  border: 1px solid var(--rule-strong);
  color: var(--ink);
  border-radius: 2px;
  transition: border-color 0.15s, background 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

form.contact textarea {
  resize: vertical;
  min-height: 110px;
  font-family: var(--sans);
}

form.contact input:focus,
form.contact select:focus,
form.contact textarea:focus {
  outline: none;
  border-color: var(--ink);
  background: var(--bg);
}

form.contact .submit-row {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

form.contact .fineprint {
  font-size: 0.85rem;
  color: var(--ink-muted);
  max-width: 32ch;
  line-height: 1.45;
}

form.contact button {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.9rem 1.6rem;
  background: var(--ink);
  color: var(--bg);
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.18s;
}
form.contact button:hover { background: var(--accent); }

/* ---------- Page header (for non-home pages) ---------- */

.page-header {
  padding: var(--space-5) 0 var(--space-3);
}

.page-header h1 {
  font-size: clamp(2.5rem, 5vw, 4.25rem);
  max-width: 16ch;
  margin-top: 1.25rem;
}

/* ---------- Detail blocks ---------- */

.detail-row {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 4rem;
  padding: var(--space-4) 0;
  border-top: 1px solid var(--rule);
  align-items: start;
}
.detail-row:first-of-type { border-top: none; padding-top: var(--space-3); }

@media (max-width: 800px) {
  .detail-row { grid-template-columns: 1fr; gap: 1.25rem; }
}

.detail-row .label {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-muted);
  padding-top: 0.5rem;
}

.detail-row h3 { margin-bottom: 1rem; }

/* ---------- Pull quote / emphasis blocks ---------- */

.pull {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.8vw, 2.25rem);
  line-height: 1.25;
  color: var(--ink);
  letter-spacing: -0.015em;
  padding: var(--space-4) 0;
  max-width: 28ch;
  font-weight: 400;
}

.pull .accent { color: var(--accent); }

/* ---------- Glyph / decorative ---------- */

.dingbat {
  font-family: var(--serif);
  color: var(--accent);
  font-size: 1.4rem;
  font-style: italic;
  margin: 0 0.4rem;
}

/* ---------- Animations ---------- */

@keyframes rise {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.rise { animation: rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) both; }
.rise-1 { animation-delay: 0.05s; }
.rise-2 { animation-delay: 0.18s; }
.rise-3 { animation-delay: 0.32s; }
.rise-4 { animation-delay: 0.46s; }

@media (prefers-reduced-motion: reduce) {
  .rise, .rise-1, .rise-2, .rise-3, .rise-4 { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Misc helpers ---------- */

.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2.5rem; }
.mt-5 { margin-top: 4rem; }
.muted { color: var(--ink-muted); }
.accent-text { color: var(--accent); }

/* Thank-you success state */
.thanks {
  border: 1px solid var(--rule-strong);
  background: var(--bg-2);
  padding: 1.5rem 1.75rem;
  border-radius: 2px;
  font-size: 0.97rem;
  margin-top: 1.5rem;
  display: none;
}
.thanks.visible { display: block; }
