/* Bernard Pottle — a 1970s sitting room that happens to have a telephone in it.
   Self-hosted fonts, no third-party JS, no build step. */

@font-face { font-family: 'Inter'; src: url('/static/fonts/inter.woff2') format('woff2');
             font-weight: 300 600; font-display: swap; }

:root {
  --ink:      #f2e9da;
  --ink-dim:  #cfc2ac;
  --muted:    #9c8f79;
  --paper:    #171310;
  --paper-2:  #1e1915;
  --paper-3:  #241e18;
  --brass:    #c9a227;
  --brass-hi: #e8c65a;
  --rust:     #b8502a;
  --olive:    #7d8b5a;
  --line:     rgba(201,162,39,.18);
  --line-2:   rgba(255,255,255,.07);
  --serif:    Georgia, 'Iowan Old Style', 'Times New Roman', serif;
  --sans:     'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono:     ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, Consolas, monospace;
  --r:        14px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.62;
  background:
    radial-gradient(1100px 620px at 12% -8%, #2a1f14 0%, transparent 58%),
    radial-gradient(900px 520px at 92% 2%, #241a12 0%, transparent 52%),
    var(--paper);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wrap { width: min(1120px, 92vw); margin: 0 auto; }
a { color: var(--brass-hi); }

/* ---------------------------------------------------------------- header */
.top {
  border-bottom: 1px solid var(--line-2);
  background: linear-gradient(180deg, rgba(23,19,16,.96), rgba(23,19,16,.78));
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(8px);
}
.top .wrap { display: flex; align-items: center; gap: 1.2rem; padding: .9rem 0; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); }
.brand svg { width: 30px; height: 30px; }
.brand .name {
  font-family: var(--serif); font-size: 1.02rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--brass-hi);
}
.brand .sub { display: block; font-family: var(--sans); font-size: .62rem; letter-spacing: .22em;
              text-transform: uppercase; color: var(--muted); }
nav.top-nav { margin-left: auto; display: flex; gap: 1.15rem; font-size: .78rem;
              letter-spacing: .12em; text-transform: uppercase; }
nav.top-nav a { color: var(--ink-dim); text-decoration: none; }
nav.top-nav a:hover { color: var(--brass-hi); }

.chip-live {
  display: inline-flex; align-items: center; gap: .45rem;
  font-family: var(--mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase;
  color: #f0d9c8; border: 1px solid rgba(184,80,42,.55); border-radius: 999px;
  padding: .3rem .62rem; background: rgba(184,80,42,.12);
}
.lamp { width: 7px; height: 7px; border-radius: 50%; background: var(--rust);
        box-shadow: 0 0 0 3px rgba(184,80,42,.2); animation: lamp 2.4s ease-in-out infinite; }
@keyframes lamp { 0%,100% { opacity: 1 } 50% { opacity: .45 } }
.chip-live.off { border-color: var(--line-2); background: transparent; color: var(--muted); }
.chip-live.off .lamp { background: var(--muted); box-shadow: none; animation: none; }

/* ---------------------------------------------------------------- hero */
main { flex: 1; padding: 2.6rem 0 4rem; }
.kicker { font-size: .68rem; letter-spacing: .26em; text-transform: uppercase; color: var(--brass);
          margin: 0 0 .9rem; }
h1 {
  font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 4.4vw, 3.15rem);
  line-height: 1.1; margin: 0 0 1rem; letter-spacing: -.01em; max-width: 21ch;
}
h1 em { font-style: italic; color: var(--brass-hi); }
.lede { font-size: 1.04rem; color: var(--ink-dim); max-width: 56ch; margin: 0 0 1.6rem; }

.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 2.6rem; align-items: start; }

/* the phone card */
.phone-card {
  border: 1px solid var(--line); border-radius: var(--r);
  background: linear-gradient(180deg, rgba(201,162,39,.07), rgba(255,255,255,.015));
  overflow: hidden;
}
.phone-head { display: flex; align-items: center; gap: .8rem; padding: .85rem 1rem;
              border-bottom: 1px solid var(--line-2); background: rgba(0,0,0,.18); }
.phone-head .who { font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; color: var(--ink-dim); }
.phone-head .who b { color: var(--ink); font-weight: 500; }
.phone-head .state { margin-left: auto; white-space: nowrap; font-family: var(--mono);
                     font-size: .64rem; letter-spacing: .16em; text-transform: uppercase;
                     color: var(--rust); }

.transcript { max-height: 430px; overflow-y: auto; overflow-x: hidden; padding: 1rem 1.05rem 1.2rem;
              scroll-behavior: smooth; overflow-anchor: none; }
.transcript::-webkit-scrollbar { width: 8px; }
.transcript::-webkit-scrollbar-thumb { background: rgba(201,162,39,.25); border-radius: 8px; }

.line { display: grid; grid-template-columns: 5.6rem 1fr; gap: .7rem; padding: .45rem 0;
        border-bottom: 1px dashed rgba(255,255,255,.05); }
.line:last-child { border-bottom: 0; }
.line .who { font-family: var(--mono); font-size: .64rem; letter-spacing: .08em; text-transform: uppercase;
             color: var(--muted); padding-top: .25rem; }
.line.bernard .who { color: var(--brass); }
.line .said { color: var(--ink); font-size: .96rem; }
.line.bernard .said { font-family: var(--serif); font-size: 1.02rem; color: #fbf3e6; }
.line.fresh { animation: arrive .5s ease; }
@keyframes arrive { from { opacity: 0; transform: translateY(4px) } to { opacity: 1; transform: none } }

.empty-call { padding: 2.2rem 1.2rem; text-align: center; color: var(--muted); }
.empty-call .big { font-family: var(--serif); font-size: 1.15rem; color: var(--ink-dim); margin-bottom: .4rem; }

/* the hold line: a recorded band between calls — not a speaker, not a character */
.band {
  margin: 1rem -1.05rem .2rem; padding: .85rem 1.05rem .9rem;
  background: linear-gradient(100deg, rgba(184,80,42,.17), rgba(201,162,39,.05));
  border-top: 1px solid rgba(184,80,42,.42);
  border-bottom: 1px solid rgba(184,80,42,.42);
}
.band-tag { display: block; font-family: var(--mono); font-size: .6rem; letter-spacing: .2em;
            text-transform: uppercase; color: #d98a63; margin-bottom: .35rem; }
.band-said { margin: 0; font-family: var(--serif); font-style: italic; font-size: .98rem;
             color: var(--ink-dim); line-height: 1.55; }
.band.fresh { animation: arrive .6s ease; }

/* the pitch form */
.pitch { margin-top: 1.9rem; border: 1px solid var(--line-2); border-radius: var(--r);
         padding: 1.15rem 1.2rem; background: rgba(255,255,255,.02); }
.pitch label { display: block; font-size: .72rem; letter-spacing: .18em; text-transform: uppercase;
               color: var(--brass); margin-bottom: .55rem; }
.pitch .row { display: flex; gap: .6rem; }
.pitch input[type=text] {
  flex: 1; background: rgba(0,0,0,.35); border: 1px solid var(--line-2); border-radius: 10px;
  color: var(--ink); padding: .8rem .9rem; font-family: var(--sans); font-size: .95rem;
}
.pitch input[type=text]:focus { outline: none; border-color: var(--brass); box-shadow: 0 0 0 3px rgba(201,162,39,.12); }
.pitch button {
  background: linear-gradient(100deg, var(--brass-hi), var(--brass)); color: #221a06;
  border: 0; border-radius: 10px; padding: 0 .95rem; font-family: var(--sans); font-weight: 600;
  font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; cursor: pointer;
  white-space: nowrap; transition: transform .15s ease, box-shadow .15s ease;
}
.pitch button:hover { transform: translateY(-1px); box-shadow: 0 14px 30px -20px rgba(232,198,90,.9); }
.pitch button:disabled { opacity: .55; cursor: default; transform: none; box-shadow: none; }
.pitch .hint { margin: .6rem 0 0; font-size: .78rem; color: var(--muted); }
.pitch .msg { margin: .6rem 0 0; font-size: .84rem; }
.pitch .msg.ok { color: var(--olive); }
.pitch .msg.err { color: #e08a6a; }

/* ---------------------------------------------------------------- counters */
.strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 2.8rem 0 0;
         background: var(--line-2); border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; }
.stat { background: var(--paper-2); padding: 1.05rem 1.1rem; }
.stat .n { font-family: var(--mono); font-size: clamp(1.35rem, 2.4vw, 1.9rem); color: var(--brass-hi);
           letter-spacing: -.01em; }
.stat .k { font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-top: .25rem; }

/* ---------------------------------------------------------------- sections */
section.block { margin-top: 3.4rem; }
section.block > h2 {
  font-family: var(--serif); font-weight: 400; font-size: 1.32rem; letter-spacing: .01em;
  margin: 0 0 .35rem; color: var(--ink);
}
section.block > .sub { margin: 0 0 1.3rem; color: var(--muted); font-size: .9rem; }
.split { display: grid; grid-template-columns: 1.25fr .75fr; gap: 2.2rem; align-items: start; }

/* call cards */
.call-card {
  display: block; text-decoration: none; color: inherit; border: 1px solid var(--line-2);
  border-radius: var(--r); padding: 1rem 1.05rem; background: var(--paper-2);
  transition: border-color .16s ease, transform .16s ease;
}
.call-card + .call-card { margin-top: .7rem; }
.call-card:hover { border-color: var(--line); transform: translateY(-1px); }
.call-card .top-line { display: flex; align-items: baseline; gap: .6rem; }
.call-card .caller { font-family: var(--serif); font-size: 1.02rem; }
.call-card .mins { margin-left: auto; font-family: var(--mono); font-size: .78rem; color: var(--brass); }
.call-card .co { font-size: .82rem; color: var(--muted); margin-top: .15rem; }
.call-card .quote { margin: .55rem 0 0; font-size: .92rem; color: var(--ink-dim); font-style: italic;
                    font-family: var(--serif); }
.stamp {
  display: inline-block; font-family: var(--mono); font-size: .6rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--rust); border: 1px solid rgba(184,80,42,.5);
  border-radius: 4px; padding: .12rem .38rem; transform: rotate(-2.4deg); margin-left: .5rem;
}

/* ------------------------------------------------ the pinned call of the day */
.pinned .kicker { color: var(--rust); letter-spacing: .3em; margin-bottom: .8rem; }
.pin {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 1.5rem; align-items: center;
  text-decoration: none; color: inherit; padding: .85rem; border-radius: var(--r);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(201,162,39,.08), rgba(0,0,0,.22));
  transition: border-color .16s ease, transform .16s ease;
}
.pin:hover { border-color: rgba(201,162,39,.45); transform: translateY(-1px); }
.pin-shot { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--line-2);
            background: #120f0c; line-height: 0; }
.pin-shot img { display: block; width: 100%; height: auto; }
.pin-copy { display: flex; flex-direction: column; gap: .42rem; padding: .2rem .5rem .2rem 0; }
.pin-head { font-family: var(--serif); font-size: clamp(1.05rem, 1.7vw, 1.32rem); color: var(--ink);
            line-height: 1.22; }
.pin-head em { font-style: italic; color: var(--brass-hi); }
.pin-meta { font-family: var(--mono); font-size: .63rem; letter-spacing: .11em;
            text-transform: uppercase; color: var(--muted); }
.pin-quote { font-family: var(--serif); font-style: italic; font-size: .95rem; color: var(--ink-dim); }
.pin-go { font-family: var(--mono); font-size: .64rem; letter-spacing: .16em; text-transform: uppercase;
          color: var(--brass); margin-top: .3rem; }
.pinned .sub { margin: .8rem 0 0; font-size: .78rem; }

/* leaderboard */
.board { border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; background: var(--paper-2); }
.board .row { display: grid; grid-template-columns: 2rem 1fr auto; gap: .8rem; align-items: center;
              padding: .62rem .9rem; border-bottom: 1px solid var(--line-2); font-size: .9rem; }
.board .row:last-child { border-bottom: 0; }
.board .rank { font-family: var(--mono); color: var(--muted); font-size: .78rem; }
.board .n { font-family: var(--mono); color: var(--brass-hi); font-size: .84rem; }
.board .who small { display: block; color: var(--muted); font-size: .76rem; }

/* prose */
.prose p { max-width: 68ch; margin: 0 0 .95rem; color: var(--ink-dim); }
.prose h2 { font-family: var(--serif); font-weight: 400; font-size: 1.08rem; color: var(--brass-hi);
            margin: 1.9rem 0 .5rem; }
.page-head { padding-top: 1rem; }

/* support */
.donate { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .8rem; margin-top: 1.4rem; }
.donate a {
  display: block; text-decoration: none; color: var(--ink); border: 1px solid var(--line-2);
  border-radius: var(--r); padding: 1rem 1.05rem; background: var(--paper-2);
  transition: border-color .16s ease, transform .16s ease;
}
.donate a:hover { border-color: var(--line); transform: translateY(-1px); }
.donate .amt { font-family: var(--mono); color: var(--brass-hi); font-size: 1.2rem; }
.donate .what { font-size: .82rem; color: var(--muted); margin-top: .2rem; }

/* ---------------------------------------------------------------- footer */
footer { border-top: 1px solid var(--line-2); padding: 1.8rem 0 2.6rem; margin-top: 3rem;
         text-align: center; color: var(--muted); font-size: .8rem; line-height: 1.85; }
footer p { margin: .15rem 0; }
footer a { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(201,162,39,.35); }
footer a:hover { color: var(--brass-hi); border-bottom-color: currentColor; }
footer .rule { width: 44px; height: 1px; background: var(--line); margin: 1rem auto 1.1rem; }

@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; gap: 1.8rem; }
  .split { grid-template-columns: 1fr; gap: 1.4rem; }
  .strip { grid-template-columns: repeat(2, 1fr); }
  .top .wrap { flex-wrap: wrap; row-gap: .55rem; }
  nav.top-nav {
    display: flex; order: 3; width: 100%; justify-content: space-between; gap: .8rem;
    font-size: .68rem; letter-spacing: .1em; margin-left: 0;
    border-top: 1px solid var(--line-2); padding-top: .6rem;
  }
  .transcript { max-height: 380px; }
  .pin { grid-template-columns: 1fr; gap: 1rem; }
  .pin-copy { padding: 0 .3rem .3rem; }
}
@media (max-width: 520px) {
  .pitch .row { flex-direction: column; }
  .line { grid-template-columns: 4.6rem 1fr; gap: .5rem; }
  h1 { font-size: 1.75rem; }
}
