/* Taco365 story pages (/team, /blogs/*). These sit on top of /css/styles.css and reuse the app's own
   components (topbar, panel, hero, stats-grid, tiles, section-title, mk-table, btn). Only what the
   story needs and the app doesn't have lives here. */

.story-main { max-width: 1180px; margin: 0 auto; padding: 28px 24px 96px; }
@media (max-width: 520px) { .story-nav { padding: 12px 16px; gap: 10px; } .story-nav .btn { padding: 8px 10px; font-size: 13px; } }
.story-nav { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 20px; padding: 12px 24px; background: rgba(18, 13, 10, .82); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.story-links { display: flex; gap: 2px; flex: 1; }
.story-links a { padding: 8px 13px; border-radius: 999px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; white-space: nowrap; }
.story-links a:hover { color: var(--text); background: var(--panel-2); }
.story-links a.active { color: var(--accent-ink); background: var(--accent); }

/* Hero: the lobby hero, with the story's numbers where the balance usually goes. */
.story-hero .hero-main h1 { max-width: 14ch; }
.story-hero .hero-main h1 .accent { color: var(--accent); }
.story-hero .hero-kicker { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 14px; }
.story-hero .hero-bal { font-size: clamp(30px, 5vw, 48px); }
.story-hero .stat b small { font-size: 12px; font-weight: 500; color: var(--muted); font-family: var(--font); margin-left: 4px; }

/* Team photo: one panel, one picture, mono caption. */
.team-photo { margin: 0; padding: 10px; }
.team-photo img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel-2); }
.team-photo .frame { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.team-photo .frame img { aspect-ratio: 4 / 5; object-fit: cover; object-position: center 20%; filter: grayscale(1) contrast(1.05); }
.team-photo figcaption { font-family: var(--mono); font-size: 12px; line-height: 1.7; color: var(--muted); text-align: center; padding: 14px 10px 6px; max-width: 80ch; margin: 0 auto; }

/* Timeline: alternating panels down a rail. */
.acts { position: relative; display: grid; gap: 28px; }
.acts::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: var(--line-2); }
.act { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center; transform: translateY(14px); transition: transform .6s ease-out; }
.act.in { transform: none; }
.act::before { content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 11px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--bg), 0 0 16px var(--accent); transform: translate(-5px, -50%); z-index: 1; }
.act .scene { grid-column: 1; grid-row: 1; }
.act .story { grid-column: 2; grid-row: 1; padding: 8px 12px 8px 36px; }
.act:nth-child(even) .scene { grid-column: 2; }
.act:nth-child(even) .story { grid-column: 1; padding: 8px 36px 8px 12px; }
.date { display: inline-block; font-family: var(--mono); font-size: 11px; padding: 3px 8px; border-radius: 999px; background: var(--panel-3); color: var(--accent); margin: 0 0 12px; }
.act h2 { font-size: clamp(22px, 2.6vw, 30px); font-weight: 800; line-height: 1.1; margin: 0 0 12px; }
.caption { font-size: 15px; line-height: 1.6; color: var(--muted); max-width: 50ch; margin: 0; }

/* Scenes: each moment reconstructed from the game's own parts. */
.scene { position: relative; min-height: 280px; display: grid; place-items: center; padding: 28px 20px 20px; overflow: hidden; }
.scene .t-tag { position: absolute; top: 14px; left: 14px; right: auto; }
.chat { width: 100%; max-width: 380px; display: grid; gap: 8px; }
.msg { display: flex; gap: 10px; align-items: flex-start; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 14px; line-height: 1.45; }
.msg .lb-av { font-size: 13px; }
.msg .m { color: var(--muted); }
.msg .m strong { color: var(--text); }
/* The story's coin: taco on the front, burrito on the back. It turns twice per cycle, and each face
   fades in for exactly the half-turns it faces us, so the burrito shows in every browser (Safari drops
   backface-visibility on animated 3D elements). */
.sc-coin { position: relative; width: 160px; height: 160px; transform-style: preserve-3d; animation: sc-spin 4s linear infinite; }
.sc-coin .face { position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center; font-size: 80px; backface-visibility: hidden; box-shadow: inset 0 0 0 10px rgba(255, 255, 255, .15), inset 0 -8px 20px rgba(0, 0, 0, .3), 0 20px 50px -10px rgba(255, 182, 39, .5); }
.sc-coin .front { background: radial-gradient(circle at 35% 30%, #ffe08a, #f2a516 55%, #b86f00); animation: sc-front 4s linear infinite; }
.sc-coin .back { background: radial-gradient(circle at 35% 30%, #ffd7a8, #d9822b 55%, #8a4310); transform: rotateY(180deg); animation: sc-back 4s linear infinite; }
@keyframes sc-spin { to { transform: rotateY(720deg); } }
/* 720° per cycle: the front faces us for 0–90°, 270–450° and 630–720°; the back for the rest. */
@keyframes sc-front { 0%, 12.49% { opacity: 1; } 12.5%, 37.49% { opacity: 0; } 37.5%, 62.49% { opacity: 1; } 62.5%, 87.49% { opacity: 0; } 87.5%, 100% { opacity: 1; } }
@keyframes sc-back { 0%, 12.49% { opacity: 0; } 12.5%, 37.49% { opacity: 1; } 37.5%, 62.49% { opacity: 0; } 62.5%, 87.49% { opacity: 1; } 87.5%, 100% { opacity: 0; } }
.coin-mult { position: absolute; right: 16px; bottom: 12px; font-family: var(--mono); font-weight: 700; font-size: 26px; color: var(--accent); }
.neon { font-weight: 800; font-size: clamp(32px, 4.6vw, 52px); letter-spacing: -.03em; line-height: .95; text-align: center; transform: skewX(-8deg); text-shadow: 0 0 18px rgba(255, 182, 39, .7), 0 0 50px rgba(255, 79, 58, .5); }
.neon small { display: block; font-size: .34em; letter-spacing: .3em; color: var(--accent); text-shadow: none; margin-top: 10px; font-family: var(--mono); }
.sc-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: 100%; max-width: 340px; margin-top: 20px; }
.sc-tiles span { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 0; text-align: center; font-size: 24px; }
.console { width: 100%; max-width: 420px; background: var(--bg); border: 1px solid var(--line-2); border-radius: 12px; font-family: var(--mono); font-size: 12.5px; line-height: 1.7; padding: 14px 16px; color: var(--muted); white-space: pre; overflow: hidden; }
.console .p { color: var(--dim); }
.console .k { color: var(--c-epic); }
.console .s { color: var(--c-uncommon); }
.console .n { color: var(--accent); }
.console .e { color: var(--lose); }
.console .ok { color: var(--win); }
.scene .balance { position: absolute; right: 14px; top: 12px; }
.scene .balance.hot { border-color: var(--win); color: var(--win); box-shadow: 0 0 0 4px rgba(61, 220, 132, .2); }
.lockup { display: inline-flex; align-items: center; gap: .16em; font-weight: 800; font-size: clamp(44px, 6vw, 72px); line-height: 1; transform: skewX(-8deg); }
.lockup .word { letter-spacing: -.035em; }
.lockup .num { font-size: .8em; color: #fff4e6; background: var(--logo-red); padding: .06em .2em .12em; border-radius: .2em; }
.domain { position: absolute; bottom: 14px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.loan-sheet { width: 100%; max-width: 340px; display: grid; gap: 2px; }
.loan-sheet .stat-line { padding: 7px 0; border-bottom: 1px dashed var(--line); }
.loan-sheet .stat-line:last-child { border: 0; }
.loan-sheet .stat-line b.late { color: var(--lose); }
.scene .stats-grid { width: 100%; max-width: 380px; }
.scene .stat b { color: var(--accent); }

/* Founders: full-length shots in panels, roles as tags. */
.founder { padding: 10px; display: flex; flex-direction: column; }
.founder .portrait { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: center top; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel-2); transition: transform .2s, border-color .2s; }
.founder:hover .portrait { transform: translateY(-3px); border-color: var(--accent); }
.founder .who { padding: 16px 10px 10px; }
.founder h3 { font-size: 22px; font-weight: 800; margin: 0 0 8px; }
.founder .role { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.founder .bio { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 0; }
.founder-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }

/* CTA: the hero panel again, shorter. */
.story-cta h2 { font-size: clamp(26px, 3.6vw, 40px); font-weight: 800; line-height: 1.05; margin: 0; max-width: 18ch; }

.foot { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-family: var(--mono); font-size: 12px; color: var(--dim); }
.foot a { color: var(--muted); text-decoration: none; }

/* Blog post: game-head title, article in a panel. */
.post { max-width: 820px; margin: 0 auto; }
.post .kicker { display: inline-block; font-family: var(--mono); font-size: 11px; padding: 3px 8px; border-radius: 999px; background: var(--panel-3); color: var(--accent); margin-bottom: 14px; }
.post .game-head h1 { max-width: 18ch; line-height: 1.04; }
.post .standfirst { font-size: clamp(16px, 1.7vw, 19px); color: var(--muted); line-height: 1.55; margin: 12px 0 10px; max-width: 60ch; }
.post .post-meta { font-family: var(--mono); font-size: 12px; color: var(--dim); letter-spacing: .06em; margin: 0 0 20px; }
.post .body { padding: 28px clamp(20px, 4vw, 44px); }
.post .body p { font-size: 16px; line-height: 1.7; color: #e9dfd4; margin: 0 0 20px; }
.post .body p.dateline b { font-family: var(--mono); font-size: 13px; letter-spacing: .06em; color: var(--text); }
.post .body h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; margin: 32px 0 12px; }
.post .body blockquote { margin: 24px 0; padding: 16px 18px; border-left: 3px solid var(--accent); background: var(--panel-2); border-radius: 0 12px 12px 0; }
.post .body blockquote p { font-size: 18px; line-height: 1.5; color: var(--text); margin: 0 0 8px; }
.post .body blockquote cite { font-style: normal; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.post .body ul { padding-left: 20px; color: #e9dfd4; font-size: 16px; line-height: 1.7; margin: 0 0 20px; }
.post .body li { margin-bottom: 8px; }
.post .body .mk-table td { white-space: normal; }
.post .body .mk-table td:last-child { font-family: var(--mono); text-align: right; }
.post .terms { margin: 24px 0; }
.post .brandline { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; margin: 28px 0; padding: 32px 20px; border-radius: 12px; background: linear-gradient(135deg, #3b1d0b 0%, #1e1611 70%); border: 1px solid var(--line-2); }
.post .brandline .pw { font-weight: 700; font-size: clamp(26px, 4vw, 40px); letter-spacing: -.02em; }
.post .brandline .by { font-family: var(--mono); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.post .brandline .lockup { font-size: clamp(26px, 4vw, 40px); }
.post .brandline sup { font-size: .5em; color: var(--accent); }
.post .fine { font-size: 13px; color: var(--dim); line-height: 1.6; }
.post .boiler p { font-size: 15px; color: var(--muted); }
.post .body a { color: var(--accent); }

@media (max-width: 820px) {
  .acts::before, .act::before { left: 0; }
  .act { grid-template-columns: 1fr; gap: 12px; padding-left: 22px; }
  .act .scene, .act .story, .act:nth-child(even) .scene, .act:nth-child(even) .story { grid-column: 1; padding: 6px 0; }
  .act .scene { grid-row: 1; }
  .act .story { grid-row: 2; }
  .founder-grid { grid-template-columns: 1fr; }
  .story-hero { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .story-main { padding: 20px 16px 72px; }
  .team-photo .frame { gap: 6px; }
}
