/* INTROHOLIC — quiet, elegant greyscale. Serif display, thin lines, soft geometry. */
:root {
  --ink: #1b1b1b;
  --muted: #6e6e6c;
  --faint: #a3a3a0;
  --line: #dcdcd8;
  --paper: #f5f5f3;
  --card: #ffffff;
  --tint: #ecece9;
  --fg: var(--ink);
  --bg: var(--paper);
  --serif: 'Instrument Serif', 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --radius: 14px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans); font-size: 16px; color: var(--ink); line-height: 1.55;
  min-height: 100vh; display: flex; flex-direction: column;
  background-color: var(--paper);
  /* faint dot grid */
  background-image: radial-gradient(circle at 1px 1px, rgba(0,0,0,.075) 1px, transparent 0);
  background-size: 28px 28px;
}
a { color: inherit; }
::selection { background: var(--ink); color: var(--paper); }
em { font-style: italic; }

/* Soft tinted block (replaces the old inverted black) */
.inv { background: var(--tint); }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: .14em; font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; line-height: 1; white-space: nowrap; }
.logo-word + .logo-loop + .logo-word { font-style: italic; }
.logo-loop { height: .62em; width: 1.05em; flex: none; overflow: visible; }
.logo-flow path { stroke-dasharray: .1 99.9; stroke-linecap: round; animation: flow 3.2s linear infinite; }
.logo-flow path + path { animation-delay: -1.6s; }
@keyframes flow { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
.logo-sm { font-size: 26px; }
.logo-sm .logo-flow { display: none; }
.logo:hover .logo-loop { animation: spin 1s cubic-bezier(.6,0,.3,1); }
@keyframes spin { to { transform: rotate(180deg); } }
@media (prefers-reduced-motion: reduce) { .logo-flow path, .logo:hover .logo-loop { animation: none; } }

/* ---------- Nav ---------- */
.nav { display: flex; justify-content: space-between; align-items: center; padding: 20px var(--gutter); border-bottom: 1px solid var(--line); background: rgba(245,245,243,.85); backdrop-filter: blur(6px); position: sticky; top: 0; z-index: 10; }
.nav-home { text-decoration: none; }
.nav nav { display: flex; gap: 28px; align-items: center; }
.nav nav a { font-size: 14px; color: var(--muted); text-decoration: none; }
.nav nav a:hover { color: var(--ink); }
.nav nav .nav-cta { color: var(--ink); border: 1px solid var(--ink); padding: 8px 18px; border-radius: 999px; }
.nav nav .nav-cta:hover { background: var(--ink); color: var(--paper); }

/* ---------- Flash ---------- */
.flash { margin: 20px var(--gutter) 0; padding: 14px 18px; border-radius: var(--radius); font-size: 15px; border: 1px solid var(--line); background: var(--card); }
.flash-success::before { content: '✓  '; }
.flash-error { border-color: var(--ink); }
.flash-error::before { content: '—  '; }

/* ---------- Buttons & inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font: 500 15px/1 var(--sans); letter-spacing: .01em; padding: 16px 28px; border: 1px solid var(--ink); border-radius: 999px; background: var(--ink); color: var(--paper); cursor: pointer; text-decoration: none; transition: background .2s, color .2s, box-shadow .2s; }
.btn:hover { background: #000; box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-block { width: 100%; }

input, textarea { width: 100%; font: 400 16px/1.4 var(--sans); color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; outline: none; -webkit-appearance: none; transition: border-color .2s, box-shadow .2s; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(0,0,0,.05); }
textarea { resize: vertical; min-height: 110px; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; }

.inline-form { display: flex; gap: 8px; max-width: 520px; margin: 0 auto; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 10px 40px rgba(0,0,0,.06); }
.inline-form input { border: 0; background: transparent; border-radius: 999px; padding-left: 20px; }
.inline-form input:focus { box-shadow: none; }
.inline-form .btn { flex: none; }

/* Section eyebrow */
.eyebrow { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }

/* ---------- Landing ---------- */
.hero { position: relative; overflow: hidden; text-align: center; padding: clamp(72px, 12vw, 150px) var(--gutter) clamp(72px, 10vw, 130px); border-bottom: 1px solid var(--line); }
.hero-geo { position: absolute; left: 50%; top: 50%; width: min(1100px, 150vw); transform: translate(-50%, -50%); color: var(--ink); opacity: .09; pointer-events: none; }
.hero > *:not(.hero-geo) { position: relative; }
.hero .eyebrow { margin-bottom: 28px; }
.hero h1 { font-weight: 400; }
.hero .logo { font-size: clamp(56px, 11vw, 150px); }
.hero-sub { font-family: var(--serif); font-size: clamp(22px, 2.6vw, 32px); line-height: 1.3; color: var(--muted); max-width: 26ch; margin: 28px auto 44px; }
.hero-sub em { color: var(--ink); }
.hero-fine { margin-top: 16px; font-size: 13px; color: var(--faint); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: clamp(56px, 8vw, 100px) var(--gutter); }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 36px 32px; }
.step-n { font-family: var(--serif); font-style: italic; font-size: 56px; line-height: 1; color: var(--faint); }
.step h3 { font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.1; margin: 20px 0 10px; }
.step p { color: var(--muted); max-width: 32ch; }

.manifesto { text-align: center; padding: clamp(64px, 10vw, 140px) var(--gutter); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.manifesto h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(44px, 7vw, 96px); line-height: 1.02; letter-spacing: -.015em; }
.manifesto h2 .out { font-style: italic; color: var(--muted); }
.manifesto p { font-size: 18px; color: var(--muted); max-width: 44ch; margin: 32px auto 0; }

.cta-band { text-align: center; padding: clamp(64px, 9vw, 120px) var(--gutter); }
.cta-band h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(38px, 5vw, 68px); line-height: 1.05; margin-bottom: 32px; }
.cta-band h2 br { display: none; }

/* ---------- Auth ---------- */
.auth { flex: 1; display: grid; place-items: center; padding: 72px var(--gutter); }
.auth-box { width: 100%; max-width: 460px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: clamp(28px, 5vw, 48px); box-shadow: 0 20px 60px rgba(0,0,0,.05); }
.auth h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 6vw, 52px); line-height: 1.05; margin-bottom: 10px; }
.auth .lede { color: var(--muted); margin-bottom: 28px; }
.auth form > * + * { margin-top: 14px; }
.code-input { font-family: var(--serif); font-size: 40px; letter-spacing: .35em; text-align: center; padding: 14px; }
.dev-note { border: 1px dashed var(--faint); border-radius: 10px; padding: 10px 14px; font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.text-link { font-size: 14px; color: var(--muted); text-underline-offset: 3px; margin-top: 18px; display: inline-block; }

/* ---------- App ---------- */
.app { flex: 1; padding-bottom: 40px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 40px var(--gutter) 0; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 30px; }
.stat b { display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(56px, 7vw, 84px); line-height: .95; }
.stat span { display: block; margin-top: 8px; font-size: 14px; color: var(--muted); }
.stat.inv { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.stat.inv span { color: rgba(255,255,255,.65); }

.panel { margin: 20px var(--gutter) 0; padding: clamp(28px, 4vw, 44px); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.panel-title { font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 4vw, 44px); line-height: 1.1; margin-bottom: 20px; }
.panel-note { color: var(--muted); margin: -10px 0 24px; max-width: 60ch; }

.intro-form { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0 24px; align-items: stretch; }
.intro-form .person { display: grid; gap: 10px; align-content: start; }
.intro-form .person h3 { font-size: 13px; font-weight: 400; color: var(--muted); }
.intro-form .swap { align-self: center; font-size: 64px; color: var(--faint); }
.intro-form .why { grid-column: 1 / -1; margin-top: 20px; }
.intro-form .submit { grid-column: 1 / -1; margin-top: 20px; }

.profile-form { display: grid; grid-template-columns: 1fr 2fr auto; gap: 14px; align-items: end; }

.intro-list { list-style: none; }
.intro-row { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 18px 0; border-top: 1px solid var(--line); }
.intro-pair { font-family: var(--serif); font-size: 24px; line-height: 1.2; }
.intro-meta { color: var(--muted); font-size: 14px; margin-top: 4px; }
.tag { font-size: 12px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); white-space: nowrap; }
.tag-connected { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.tag-declined { text-decoration: line-through; color: var(--faint); }
.tag-back { font-family: var(--sans); font-size: 11px; padding: 3px 10px; margin-left: 8px; vertical-align: middle; border-color: var(--ink); color: var(--ink); }
.empty { font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--muted); padding: 24px 0; border-top: 1px solid var(--line); }

/* ---------- Intro response page ---------- */
.respond { flex: 1; }
.respond-hero > *:not(.hero-geo) { position: relative; }
.respond-hero .hero-geo { position: absolute; left: 50%; top: 50%; width: min(1100px, 150vw); transform: translate(-50%, -50%); color: var(--ink); opacity: .07; pointer-events: none; }
.respond-hero { position: relative; overflow: hidden; text-align: center; padding: clamp(64px, 10vw, 130px) var(--gutter); }
.respond-hero .kicker { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: 24px; }
.respond-hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 6vw, 76px); line-height: 1.05; max-width: 18ch; margin: 0 auto; }
.quote { font-family: var(--serif); font-style: italic; font-size: clamp(20px, 2.2vw, 26px); line-height: 1.4; color: var(--muted); max-width: 36ch; margin: 32px auto; }
.choice { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.big-status { font-family: var(--serif); font-weight: 400; font-size: clamp(56px, 9vw, 120px); line-height: 1; }
.respond-hero .intro-meta { margin-top: 20px; }

.forward { max-width: 900px; margin: 0 auto 40px; }
.forward.panel { margin-left: auto; margin-right: auto; }
.forward-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.forward-form textarea, .forward-form .btn { grid-column: 1 / -1; }
.forward-form .btn { justify-self: start; }

/* ---------- Outbox (dev) ---------- */
.mail { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 20px; }
.mail-head { padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); background: var(--paper); }
.mail-body { padding: 8px; background: #fff; }

/* ---------- Footer ---------- */
.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: auto; padding: 28px var(--gutter); border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.foot span:first-child { font-family: var(--serif); font-size: 18px; color: var(--ink); }
.foot a { color: var(--muted); }

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  .steps, .stats { grid-template-columns: 1fr; }
  .inline-form { flex-direction: column; border-radius: 20px; }
  .inline-form input { text-align: center; padding-left: 16px; }
  .intro-form { grid-template-columns: 1fr; }
  .intro-form .swap { justify-self: center; margin: 12px 0; transform: rotate(90deg); }
  .profile-form, .forward-form { grid-template-columns: 1fr; }
  .intro-row { grid-template-columns: 1fr; }
  .intro-row .tag { justify-self: start; }
  .nav nav { gap: 16px; }
  .logo-sm { font-size: 22px; }
}
