/* Coffee Breach landing page (served at /welcome, and at coffeebreach.com/). Its own coffee-house palette,
   separate from the game's Arcade and Corporate themes. No web fonts besides the game's self-hosted pixel font. */
@font-face { font-family: 'Press Start 2P'; src: url('/fonts/PressStart2P-Regular.ttf') format('truetype'); font-display: swap; }

:root {
  --espresso: #160e0a; --roast: #21150f; --mocha: #3a271c; --bean: #5b3d2b;
  --caramel: #d6a062; --caramel-hi: #f0c58c; --crema: #f4e6d2; --foam: #fbf6ee; --cream-card: #fffaf3;
  --ink: #2b1b13; --ink-soft: #6c5444; --on-dark-soft: #c4ab93; --breach: #ff5d3d; --patch: #5cc995;
  --line-dark: rgba(244, 230, 210, .12); --line-light: rgba(43, 27, 19, .12);
  --serif: ui-serif, 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
  --pixel: 'Press Start 2P', var(--mono);
  --radius: 18px; --wrap: 1120px;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 84px; } /* jump links, citations and keyboard focus stay below the sticky header */
body { margin: 0; background: var(--espresso); color: var(--crema); font: 17px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img, svg { display: block; }
.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--caramel-hi); outline-offset: 3px; border-radius: 6px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; font: 600 16px/1 var(--sans); text-decoration: none; padding: 15px 24px; border-radius: 999px;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.btn-primary { background: linear-gradient(180deg, var(--caramel-hi), var(--caramel)); color: var(--espresso); box-shadow: 0 10px 30px rgba(214, 160, 98, .35), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(214, 160, 98, .45), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn-ghost { color: var(--crema); border: 1px solid rgba(244, 230, 210, .3); }
.btn-ghost:hover { background: rgba(244, 230, 210, .08); }
.btn-lg { font-size: 18px; padding: 19px 32px; }
.btn svg { width: 18px; height: 18px; }

/* ---------- Header ---------- */
.top { position: sticky; top: 0; z-index: 20; background: rgba(22, 14, 10, .86); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line-dark); }
.top .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 21px/1 var(--serif); letter-spacing: -.01em; }
.brand svg { width: 34px; height: 34px; }
.brand b { color: var(--caramel); font-weight: 700; }
.top nav { display: flex; gap: 26px; margin-left: auto; font-size: 15px; }
.top nav a { text-decoration: none; color: var(--on-dark-soft); }
.top nav a:hover { color: var(--crema); }
.top .btn { padding: 11px 18px; font-size: 15px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 84px 0 96px;
  background:
    radial-gradient(900px 520px at 78% 30%, rgba(214, 160, 98, .22), transparent 60%),
    radial-gradient(700px 500px at 10% 90%, rgba(255, 93, 61, .10), transparent 60%),
    linear-gradient(180deg, var(--espresso), var(--roast)); }
.hero::before { content: ''; position: absolute; inset: 0; opacity: .35; pointer-events: none; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E"); }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 10px/1.6 var(--pixel); letter-spacing: .04em; color: var(--caramel-hi); text-transform: uppercase;
  padding: 9px 14px; border: 1px solid rgba(240, 197, 140, .3); border-radius: 999px; background: rgba(240, 197, 140, .06); margin: 0 0 26px; }
.eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: var(--breach); box-shadow: 0 0 12px var(--breach); animation: pulse 1.6s ease-in-out infinite; }
h1 { font: 700 clamp(44px, 6.4vw, 80px)/1.02 var(--serif); letter-spacing: -.025em; margin: 0 0 24px; }
h1 em { font-style: italic; background: linear-gradient(100deg, var(--caramel-hi), var(--caramel) 45%, var(--breach)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(18px, 1.6vw, 21px); color: var(--on-dark-soft); max-width: 36em; margin: 0 0 32px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 34px; }
.hero-facts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 28px; color: var(--on-dark-soft); font-size: 15px; }
.hero-facts b { color: var(--crema); font: 700 22px/1 var(--serif); margin-right: 6px; }

/* Cup, steam made of code, and the snippet being fixed */
.stage { position: relative; min-height: 540px; }
.cup { width: min(430px, 100%); margin: -24px 0 0 auto; filter: drop-shadow(0 40px 60px rgba(0, 0, 0, .55)); }
.cup .crack { stroke: var(--breach); filter: drop-shadow(0 0 6px rgba(255, 93, 61, .9)); stroke-dasharray: 150; stroke-dashoffset: 150; animation: crack 6s ease-in-out infinite; }
.cup .steam path { fill: none; stroke: rgba(244, 230, 210, .45); stroke-width: 6; stroke-linecap: round; animation: rise 4.5s ease-in-out infinite; }
.cup .steam path:nth-child(2) { animation-delay: 1.4s; }
.cup .steam path:nth-child(3) { animation-delay: 2.8s; }
.cup .bits text { font: 18px var(--mono); fill: var(--caramel-hi); animation: bits 5s linear infinite; opacity: 0; }
.cup .bits text:nth-child(2) { animation-delay: 1s; } .cup .bits text:nth-child(3) { animation-delay: 2s; }
.cup .bits text:nth-child(4) { animation-delay: 3s; } .cup .bits text:nth-child(5) { animation-delay: 4s; }
.code-card { position: absolute; left: -4%; bottom: -12px; width: min(350px, 86%); margin: 0; background: rgba(23, 15, 11, .88); border: 1px solid var(--line-dark); border-radius: 14px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, .5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); overflow: hidden; animation: float 7s ease-in-out infinite; }
.code-card figcaption { display: flex; align-items: center; gap: 7px; padding: 10px 14px; font: 12px var(--mono); color: var(--on-dark-soft); border-bottom: 1px solid var(--line-dark); }
.code-card figcaption i { width: 9px; height: 9px; border-radius: 50%; background: #ff5f57; }
.code-card figcaption i + i { background: #febc2e; } .code-card figcaption i + i + i { background: #28c840; }
.code-card figcaption span { margin-left: auto; }
.code-card pre { margin: 0; padding: 12px 0; font: 13px/1.75 var(--mono); overflow-x: auto; }
.code-card code { display: block; padding: 0 14px; white-space: pre; color: #e7d6c3; }
.code-card .bad { background: rgba(255, 93, 61, .14); color: #ffd4c9; text-decoration: line-through; text-decoration-color: rgba(255, 93, 61, .8); }
.code-card .good { background: rgba(92, 201, 149, .14); color: #d6f6e5; }
.code-card .sign { display: inline-block; width: 1.4em; color: var(--on-dark-soft); }
.code-card .bad .sign { color: var(--breach); } .code-card .good .sign { color: var(--patch); }
.code-card .verdict { display: flex; align-items: center; gap: 8px; padding: 10px 14px; font: 12px var(--mono); color: var(--patch); border-top: 1px solid var(--line-dark); }
.badge-coin { position: absolute; right: 6%; top: 2%; font: 9px/1.5 var(--pixel); color: var(--espresso); background: var(--caramel-hi); padding: 8px 11px; border-radius: 8px;
  transform: rotate(6deg); box-shadow: 0 10px 24px rgba(214, 160, 98, .35); animation: blink 1.4s steps(2) infinite; }

/* ---------- Sections ---------- */
section { position: relative; }
.section-dark { background: var(--roast); }
.section-light { background: var(--foam); color: var(--ink); }
.section-pad { padding: 104px 0; }
.kicker { font: 10px/1.6 var(--pixel); letter-spacing: .05em; text-transform: uppercase; color: var(--caramel); margin: 0 0 18px; }
.section-light .kicker { color: #9a6532; }
h2 { font: 700 clamp(34px, 4.4vw, 54px)/1.08 var(--serif); letter-spacing: -.02em; margin: 0 0 18px; }
.intro { font-size: 19px; max-width: 40em; margin: 0 0 48px; color: var(--on-dark-soft); }
.section-light .intro { color: var(--ink-soft); }

/* The break window: what fits inside 15 minutes, and what comes just after */
.moments { list-style: none; padding: 0; margin: 0 0 56px; display: grid; grid-template-columns: repeat(6, 1fr); position: relative; }
.moments::before { content: ''; position: absolute; left: 0; right: 0; top: 13px; height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, var(--caramel) 0%, var(--caramel-hi) 55%, var(--breach) 70%, var(--breach) 100%); opacity: .55; }
.moments li { position: relative; padding: 42px 16px 0 0; }
.moments li::before { content: ''; position: absolute; top: 6px; left: 0; width: 18px; height: 18px; border-radius: 50%; background: var(--roast); border: 4px solid var(--caramel); }
.moments li.end::before { width: 26px; height: 26px; top: 2px; left: -4px; background: var(--caramel-hi); border-color: var(--crema); box-shadow: 0 0 0 6px rgba(240, 197, 140, .18); }
.moments li.after::before { border-color: var(--breach); }
.moments time { display: block; font: 700 26px/1 var(--serif); color: var(--crema); margin-bottom: 10px; letter-spacing: -.01em; }
.moments li.end time { color: var(--caramel-hi); }
.moments li.after time { color: #ffb4a3; }
.moments p { margin: 0 0 8px; font-size: 14px; line-height: 1.5; color: var(--on-dark-soft); }
.moments li.end p { color: var(--crema); font-weight: 600; }
.moments a { font: 11px/1.4 var(--mono); color: var(--caramel-hi); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.stat { padding: 28px 26px 24px; border-radius: var(--radius); background: linear-gradient(180deg, rgba(244, 230, 210, .06), rgba(244, 230, 210, .02)); border: 1px solid var(--line-dark);
  transition: transform .2s ease, border-color .2s ease; }
.stat:hover { transform: translateY(-4px); border-color: rgba(240, 197, 140, .35); }
.stat .num { font: 700 clamp(40px, 4.6vw, 58px)/1 var(--serif); letter-spacing: -.02em;
  background: linear-gradient(120deg, var(--caramel-hi), var(--caramel) 55%, var(--breach)); -webkit-background-clip: text; background-clip: text; color: transparent; margin: 0 0 12px; }
.stat p { margin: 0 0 14px; font-size: 16px; color: var(--crema); }
.stat cite { display: block; font: 12px/1.5 var(--mono); font-style: normal; color: var(--on-dark-soft); }
.stat cite a { color: var(--caramel-hi); }
.sub { font: 700 26px/1.2 var(--serif); margin: 64px 0 20px; }
.stories { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.story { padding: 24px; border-radius: var(--radius); background: rgba(22, 14, 10, .55); border: 1px dashed rgba(240, 197, 140, .3); }
.story .when { font: 9px/1.6 var(--pixel); text-transform: uppercase; color: var(--caramel-hi); margin: 0 0 12px; }
.story p { margin: 0 0 12px; font-size: 15px; color: var(--crema); }
.story a { font: 12px var(--mono); color: var(--caramel-hi); }
.checklist a { color: #9a6532; }

/* Why the name */
.why-head { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: end; margin-bottom: 44px; }
.why-head .intro { margin: 0; }
.latte { width: 210px; justify-self: end; }
.reasons { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.reason { position: relative; padding: 30px 26px; border-radius: var(--radius); background: var(--cream-card); border: 1px solid var(--line-light);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 18px 40px rgba(60, 35, 20, .08); }
.reason svg { width: 44px; height: 44px; margin-bottom: 18px; }
.reason h3 { font: 700 22px/1.2 var(--serif); margin: 0 0 10px; }
.reason p { margin: 0; color: var(--ink-soft); font-size: 16px; }
.formerly { margin: 34px 0 0; font-size: 15px; color: var(--ink-soft); }
.formerly b { color: var(--ink); }

/* How it works */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; margin: 0 0 40px; padding: 0; list-style: none; }
.step { padding: 30px 26px; border-radius: var(--radius); background: rgba(244, 230, 210, .04); border: 1px solid var(--line-dark); }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 18px; border-radius: 12px;
  font: 14px var(--pixel); color: var(--espresso); background: linear-gradient(180deg, var(--caramel-hi), var(--caramel)); }
.step h3 { font: 700 22px/1.2 var(--serif); margin: 0 0 8px; }
.step p { margin: 0; color: var(--on-dark-soft); font-size: 16px; }
.topics { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0 0 48px; }
.topics li { font-size: 14px; padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(240, 197, 140, .3); color: var(--crema); background: rgba(240, 197, 140, .06); }
.daily { display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center; padding: 28px 30px; margin: 0 0 40px; border-radius: var(--radius);
  background: radial-gradient(500px 200px at 0% 0%, rgba(240, 197, 140, .16), transparent 70%), rgba(244, 230, 210, .04); border: 1px solid rgba(240, 197, 140, .35); }
.daily-tile { display: grid; justify-items: center; width: 108px; margin: 0; border-radius: 16px; overflow: hidden; background: var(--cream-card); color: var(--ink);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .35); }
.daily-tile span { width: 100%; text-align: center; font: 9px/1 var(--pixel); text-transform: uppercase; color: var(--crema); background: var(--breach); padding: 9px 0; }
.daily-tile b { font: 700 46px/1 var(--serif); margin: 10px 0 0; }
.daily-tile small { font-size: 12px; color: var(--ink-soft); margin: 2px 0 12px; }
.daily h3 { font: 700 24px/1.2 var(--serif); margin: 0 0 8px; }
.daily p { margin: 0; color: var(--on-dark-soft); font-size: 16px; }
.daily-tile + div p { max-width: 36em; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0; border-top: 1px solid var(--line-dark); }
.feature { padding: 24px 22px 24px 0; border-bottom: 1px solid var(--line-dark); }
.feature h3 { font: 700 18px/1.3 var(--serif); margin: 0 0 6px; color: var(--caramel-hi); }
.feature p { margin: 0; color: var(--on-dark-soft); font-size: 15px; }

/* Checklist */
.checklist { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; list-style: none; padding: 0; margin: 0; }
.checklist li { padding: 28px 26px; border-radius: var(--radius); background: var(--cream-card); border: 1px solid var(--line-light); }
.checklist svg { width: 38px; height: 38px; margin-bottom: 14px; }
.checklist h3 { font: 700 20px/1.25 var(--serif); margin: 0 0 8px; }
.checklist p { margin: 0; color: var(--ink-soft); font-size: 16px; }
kbd { font: 13px var(--mono); padding: 2px 7px; border-radius: 6px; background: #f1e4d3; border: 1px solid var(--line-light); border-bottom-width: 2px; color: var(--ink); white-space: nowrap; }

/* Closing call to action */
.final { text-align: center; padding: 120px 0; overflow: hidden;
  background: radial-gradient(700px 400px at 50% 0%, rgba(240, 197, 140, .28), transparent 70%), linear-gradient(180deg, var(--mocha), var(--espresso)); }
.final h2 { font-size: clamp(38px, 5.4vw, 66px); }
.final p { color: var(--on-dark-soft); margin: 0 0 34px; font-size: 18px; }
.final .cta-row { justify-content: center; margin-bottom: 0; }
.final .addr { margin: 22px 0 0; font: 10px/1.6 var(--pixel); color: var(--caramel); }
.final .ring { position: absolute; border-radius: 50%; border: 10px solid rgba(214, 160, 98, .07); pointer-events: none; }
.final .ring.r1 { width: 380px; height: 380px; left: -120px; top: 40px; } .final .ring.r2 { width: 260px; height: 260px; right: -60px; bottom: -40px; }

/* Sources (collapsed; following a citation opens it) and fine print */
.sources { padding: 36px 0 34px; background: var(--espresso); color: var(--on-dark-soft); font-size: 14px; border-top: 1px solid var(--line-dark); }
.src-list { border-block: 1px solid var(--line-dark); margin-bottom: 22px; }
.src-list summary { position: relative; display: block; padding: 16px 36px 16px 2px; cursor: pointer; list-style: none; }
.src-list summary::-webkit-details-marker { display: none; }
.src-list summary::after { content: ''; position: absolute; right: 10px; top: 50%; width: 8px; height: 8px; margin-top: -7px;
  border: solid var(--caramel-hi); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .18s ease; }
.src-list[open] summary::after { margin-top: -3px; transform: rotate(-135deg); }
.src-list .t { font: 700 18px/1.3 var(--serif); color: var(--crema); margin-right: 12px; }
.src-list summary:hover .t { color: var(--caramel-hi); }
.src-list .hint { display: inline-block; } /* wraps as one line under "Sources" on phones */
.sources ol { margin: 0 0 20px; padding-left: 22px; line-height: 1.7; }
.sources li:target { color: var(--crema); }
.sources a { color: var(--caramel-hi); }
.sources .fine { margin: 0; max-width: 60em; font-size: 13px; line-height: 1.6; }
@media print { .src-list::details-content { content-visibility: visible; display: block; } } /* print every source, even when the list is closed */

/* Legal footer, same links as the game's pages */
.site-footer { text-align: center; font-size: 13px; line-height: 1.7; color: var(--on-dark-soft); padding: 22px 16px 30px; background: var(--espresso); border-top: 1px solid var(--line-dark); }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; margin-bottom: 4px; }
.site-footer a { color: var(--crema); }
.site-footer p { margin: 0; }

/* ---------- Motion ---------- */
@keyframes rise { 0% { transform: translateY(14px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(-38px); opacity: 0; } }
@keyframes bits { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: .9; } 100% { transform: translateY(-120px); opacity: 0; } }
@keyframes crack { 0%, 18% { stroke-dashoffset: 150; } 40%, 70% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -150; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.6); opacity: .6; } }
@keyframes blink { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .cup .crack { stroke-dashoffset: 0; }
}

/* ---------- Smaller screens ---------- */
@media (max-width: 960px) {
  .hero .wrap, .why-head { grid-template-columns: 1fr; }
  .stage { min-height: 420px; }
  .cup { margin: 0 auto; }
  .latte { justify-self: start; width: 150px; }
  .steps { grid-template-columns: 1fr; }
  .moments { grid-template-columns: 1fr; gap: 22px; padding-left: 34px; }
  .moments::before { left: 11px; right: auto; top: 6px; bottom: 6px; width: 4px; height: auto; background: linear-gradient(180deg, var(--caramel), var(--caramel-hi) 55%, var(--breach) 70%); }
  .moments li { padding: 0; }
  .moments li::before { left: -32px; top: 2px; }
  .moments li.end::before { left: -36px; top: -2px; }
  .daily { grid-template-columns: auto 1fr; }
  .daily .btn { grid-column: 1 / -1; justify-self: start; }
  .top nav { display: none; }
  .top .btn { margin-left: auto; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .hero { padding: 56px 0 64px; }
  .section-pad { padding: 76px 0; }
  .stage { min-height: 0; padding-bottom: 150px; }
  .code-card { left: 50%; transform: translateX(-50%); animation: none; }
  .daily { grid-template-columns: 1fr; padding: 24px 22px; }
  .daily-tile { width: 92px; }
  .badge-coin { right: 2%; }
  .final { padding: 88px 0; }
}
