/* MahjongTableFlow — Premium V2 composition pass
   Purpose: make the homepage feel like one authored campaign, not a stack of cards.
   This file intentionally overrides homepage layout only. */

:root{
  --v2-ink:#071a16;
  --v2-forest:#0a2c25;
  --v2-forest-2:#123f35;
  --v2-cream:#f4efe5;
  --v2-paper:#fbf8f1;
  --v2-brass:#c6a46a;
  --v2-line:rgba(7,26,22,.14);
}

/* ---------- NAV ---------- */
.nav{
  background:rgba(248,244,235,.93);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
  border-bottom:1px solid rgba(7,26,22,.08);
}
.nav-inner{min-height:78px}
.nav .brand{letter-spacing:.025em}

/* ---------- HERO: campaign frame, not landing-page split ---------- */
.cinema-hero{
  width:calc(100% - 28px);
  margin:14px auto 0;
  min-height:calc(100svh - 96px);
  max-height:980px;
  border-radius:30px;
  overflow:hidden;
  box-shadow:0 42px 100px rgba(4,20,16,.24);
  isolation:isolate;
  align-items:flex-end;
}
.cinema-hero__media:after{
  content:"";
  position:absolute;
  inset:0;
  background:
    linear-gradient(90deg,rgba(3,18,15,.92) 0%,rgba(3,18,15,.74) 26%,rgba(3,18,15,.25) 54%,rgba(3,18,15,.08) 100%),
    linear-gradient(0deg,rgba(3,18,15,.78) 0%,transparent 45%);
  pointer-events:none;
}
.cinema-hero__media img,.cinema-hero__media video{object-position:63% 48%}
.cinema-hero__scrim{display:none}
.cinema-hero__content{
  position:relative;
  z-index:4;
  max-width:760px;
  padding:clamp(36px,6vw,84px) 0 clamp(78px,9vh,108px);
}
.cinema-hero .kicker{color:#d4b06d;margin-bottom:22px}
.cinema-hero h1{
  max-width:10.5ch;
  font-size:clamp(52px,7.3vw,112px);
  line-height:.88;
  letter-spacing:-.055em;
  text-wrap:balance;
}
.cinema-hero h1 .hero-line--minor{
  display:block;
  margin-top:12px;
  font-size:.43em;
  line-height:1.05;
  letter-spacing:-.03em;
  color:#e2d9c8;
  max-width:15ch;
}
.cinema-hero__lead{
  max-width:610px;
  font-size:clamp(16px,1.45vw,20px);
  line-height:1.7;
  color:rgba(250,247,239,.82);
  margin:30px 0 34px;
}
.cinema-hero__actions{gap:12px;flex-wrap:wrap}
.cinema-hero .btn{min-height:54px;padding:0 24px}
.cinema-hero__tiles{display:none!important}
.cinema-hero__scroll{bottom:22px}

/* ---------- TRUST: editorial ledger ---------- */
.trust-strip{
  background:transparent;
  margin:18px 14px 0;
  border:0;
}
.trust-grid{
  max-width:none!important;
  padding:0!important;
  display:grid;
  grid-template-columns:repeat(4,1fr);
  border:1px solid var(--v2-line);
  border-radius:18px;
  overflow:hidden;
  background:rgba(251,248,241,.84);
}
.trust-grid>div{
  min-height:96px;
  padding:22px 24px;
  border-right:1px solid var(--v2-line);
  display:flex;
  flex-direction:column;
  justify-content:center;
}
.trust-grid>div:last-child{border-right:0}
.trust-grid b{font:700 18px/1.15 Georgia,serif;color:var(--v2-ink)}
.trust-grid span{margin-top:7px;font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:#65736f}

/* ---------- GLOBAL CHAPTER RHYTHM ---------- */
.story-section,.section{
  position:relative;
}
.story-section>.wrap,.section>.wrap{position:relative;z-index:1}
.story-head{max-width:860px;margin-bottom:48px}
.story-head.center{margin-left:auto;margin-right:auto}
.story-h2,.section-head h2{
  letter-spacing:-.038em;
  line-height:.96;
}
.kicker,.eyebrow{
  letter-spacing:.18em;
  font-size:11px;
}

/* ---------- TENSION: cinematic editorial spread ---------- */
#tension{
  margin-top:54px;
  background:var(--v2-ink);
  color:var(--v2-cream);
  padding:clamp(76px,10vw,150px) 0;
  overflow:hidden;
}
#tension:before{
  content:"02";
  position:absolute;
  right:-.03em;
  top:-.16em;
  font:700 clamp(180px,26vw,420px)/1 Georgia,serif;
  color:rgba(255,255,255,.028);
  pointer-events:none;
}
#tension .tension{
  grid-template-columns:minmax(0,.84fr) minmax(420px,1.16fr);
  gap:clamp(48px,7vw,110px);
  align-items:center;
}
#tension .kicker{color:var(--v2-brass)}
#tension .story-h2{
  color:#fffaf0;
  font-size:clamp(48px,6.5vw,96px);
  max-width:8.5ch;
}
#tension .story-copy{color:rgba(244,239,229,.68);font-size:16px}
#tension .tension__list{border-top-color:rgba(255,255,255,.14)}
#tension .tension__list li{color:rgba(244,239,229,.74);border-bottom-color:rgba(255,255,255,.12)}
#tension .tension__figure{
  transform:rotate(1.2deg);
  border-radius:24px;
  box-shadow:0 50px 110px rgba(0,0,0,.42);
}
#tension .tension__figure:before{
  content:"";
  position:absolute;
  inset:14px;
  border:1px solid rgba(255,255,255,.16);
  border-radius:16px;
  z-index:3;
  pointer-events:none;
}
#tension .tension__figure figcaption{bottom:28px;left:30px;right:30px}

/* ---------- CHAOS: shorter, full-stage ---------- */
.night-stage{
  background:#061612!important;
  padding-top:clamp(70px,9vw,120px);
  padding-bottom:clamp(60px,8vw,100px);
}
.night-stage .story-h2{font-size:clamp(46px,6.4vw,88px);color:#f6efe1}
.night-stage__pin{max-width:1120px;margin:0 auto}
.night-stage__scene{border-radius:26px;background:
  radial-gradient(circle at 50% 20%,rgba(42,112,87,.18),transparent 42%),
  linear-gradient(180deg,#0c332b,#071d18);
}
html.motion-active .night-stage__pin{height:138vh}
.night-stage__rail{bottom:34px}
.night-stage .timeline{
  max-width:900px;
  margin:38px auto 0;
}

/* ---------- RESOLUTION: calm after chaos ---------- */
.night-stage + .story-section{
  background:var(--v2-paper);
  padding-top:clamp(90px,11vw,150px);
  padding-bottom:clamp(90px,11vw,150px);
}
.night-stage + .story-section .story-head{
  display:grid;
  grid-template-columns:160px 1fr;
  gap:30px 52px;
  max-width:1120px;
}
.night-stage + .story-section .story-head .kicker{grid-row:1/3}
.night-stage + .story-section .story-h2{font-size:clamp(44px,6vw,84px);max-width:11ch}
.night-stage + .story-section .story-copy{max-width:580px}
.chaos-physical{border-radius:24px;box-shadow:0 34px 90px rgba(3,24,19,.18)}

/* ---------- FLOW: four monumental beats ---------- */
.flow-stage{
  padding-top:clamp(90px,11vw,150px);
  padding-bottom:clamp(90px,11vw,150px);
  background:#ede5d6!important;
}
.flow-stage .story-head{max-width:1050px}
.flow-stage .story-h2{font-size:clamp(58px,9vw,130px);color:var(--v2-forest);margin-bottom:16px}
.flow-stage__row{gap:clamp(10px,1.7vw,24px)}
.flow-tile{
  width:clamp(118px,13vw,190px);
  height:clamp(150px,17vw,230px);
  border-radius:18px;
  background:linear-gradient(145deg,#fffdf8,#e7dcc6);
}
.flow-tile__letter{font-size:clamp(56px,7vw,96px)}
.flow-tile__word{font-size:13px}
.flow-method{margin-top:54px}

/* ---------- ROLE SCENE: one immersive image + floating editorial rail ---------- */
#roles{
  padding:0!important;
  background:#061712!important;
  overflow:hidden;
}
#roles>.wrap{max-width:none!important;padding:0!important}
#roles .story-head{
  max-width:1180px;
  margin:0 auto;
  padding:clamp(86px,9vw,130px) 32px 50px;
}
#roles .story-h2{font-size:clamp(50px,7.5vw,104px);max-width:12ch;color:#fffaf0}
#roles .story-copy{color:rgba(244,239,229,.68);max-width:650px}
.role-scene{
  position:relative;
  display:block!important;
  min-height:min(82vw,900px);
  max-height:900px;
  overflow:hidden;
  border-top:1px solid rgba(255,255,255,.1);
}
.role-scene__frame{
  position:absolute!important;
  inset:0!important;
  min-height:0!important;
  border-radius:0!important;
  box-shadow:none!important;
}
.role-scene__frame img{
  object-position:center 50%!important;
  transform:scale(1.03)!important;
}
.role-scene__frame:after{
  content:"";
  position:absolute;
  inset:0;
  background:
    linear-gradient(90deg,rgba(4,20,16,.92) 0%,rgba(4,20,16,.48) 36%,rgba(4,20,16,.08) 66%),
    linear-gradient(0deg,rgba(4,20,16,.72) 0%,transparent 55%);
  pointer-events:none;
}
.role-scene__grade,.role-scene__warm{z-index:2}
.role-scene__aside{
  position:absolute;
  z-index:5;
  left:max(28px,calc((100vw - 1240px)/2));
  top:50%;
  transform:translateY(-50%);
  width:min(430px,38vw);
  background:rgba(5,24,20,.8);
  border:1px solid rgba(255,255,255,.13);
  border-radius:20px;
  padding:22px;
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  box-shadow:0 28px 70px rgba(0,0,0,.38);
}
.role-rail{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.role-rail__btn{
  min-height:78px;
  background:rgba(255,255,255,.04);
  border-color:rgba(255,255,255,.12);
  color:#fff;
  text-align:left;
}
.role-rail__btn[aria-pressed="true"]{background:#f3ecdd;color:#0b2b24}
.role-rail__btn[aria-pressed="true"] em{color:#0b2b24}
.role-copy{padding:26px 4px 4px}
.role-copy h3{font-size:34px;color:#fffaf0}
.role-copy p{color:rgba(244,239,229,.7)}
.role-copy .text-link{color:#e9c98d}
.role-scene__links{
  position:absolute;
  z-index:5;
  left:max(28px,calc((100vw - 1240px)/2));
  right:max(28px,calc((100vw - 1240px)/2));
  bottom:28px;
  background:rgba(5,24,20,.58);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  border-top:0!important;
  border-radius:14px;
  padding:14px 18px!important;
}

/* ---------- PROOF: real tools as a studio spread ---------- */
#roles + .story-section{
  background:#f1eadf!important;
  padding-top:clamp(92px,10vw,140px);
  padding-bottom:clamp(92px,10vw,140px);
}
#roles + .story-section .story-h2{font-size:clamp(48px,6.5vw,88px);max-width:11ch}
.proof-pair{gap:18px}
.proof-pair .demo,.proof-pair .tourney-sim{
  border-radius:22px;
  box-shadow:0 24px 60px rgba(7,26,22,.12);
}

/* ---------- TOOLS / GUIDES: fewer boxes, more editorial ---------- */
.section .tools-grid{gap:1px;background:var(--v2-line);border:1px solid var(--v2-line);border-radius:20px;overflow:hidden}
.section .tool-card{
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  background:#fbf8f1;
  min-height:310px;
  padding:34px;
}
.section .tool-card:hover{transform:none;background:#f4eddf}
.resources{background:#0a2c25!important;color:#f7f1e5}
.resources .section-head h2{color:#fffaf0;font-size:clamp(48px,6vw,82px)}
.resources .section-copy{color:rgba(247,241,229,.66)}
.resources .guide-home-grid{gap:14px}
.resources .guide-card{background:#113a31;border-color:rgba(255,255,255,.1)}
.resources .guide-card-copy h3,.resources .guide-card-copy p,.resources .text-link{color:#f7f1e5}
.resources .guide-card-copy p{opacity:.7}

/* ---------- FINAL CTA ---------- */
.section .banner{
  border-radius:26px;
  padding:clamp(34px,5vw,68px);
  background:
    radial-gradient(circle at 84% 18%,rgba(200,166,108,.18),transparent 32%),
    linear-gradient(135deg,#0a2c25,#123f35);
}
.section .banner h2{font-size:clamp(38px,5vw,66px);max-width:11ch}

/* ---------- MOBILE ---------- */
@media(max-width:980px){
  .cinema-hero{width:calc(100% - 16px);margin-top:8px}
  .trust-strip{margin:12px 8px 0}
  .trust-grid{grid-template-columns:1fr 1fr}
  .trust-grid>div:nth-child(2){border-right:0}
  .trust-grid>div:nth-child(-n+2){border-bottom:1px solid var(--v2-line)}
  #tension .tension{grid-template-columns:1fr}
  #tension .story-h2{max-width:10ch}
  #tension .tension__figure{transform:none}
  .night-stage + .story-section .story-head{grid-template-columns:1fr}
  .night-stage + .story-section .story-head .kicker{grid-row:auto}
  .role-scene{min-height:980px;max-height:none}
  .role-scene__aside{
    left:22px;right:22px;top:auto;bottom:90px;transform:none;width:auto;
  }
  .role-scene__links{left:22px;right:22px;bottom:20px}
}
@media(max-width:720px){
  .nav-inner{min-height:64px}
  .cinema-hero{
    min-height:780px;
    max-height:none;
    border-radius:20px;
    align-items:flex-end;
  }
  .cinema-hero__media img,.cinema-hero__media video{object-position:69% 40%}
  .cinema-hero__media:after{
    background:linear-gradient(0deg,rgba(3,18,15,.96) 0%,rgba(3,18,15,.82) 40%,rgba(3,18,15,.2) 74%,rgba(3,18,15,.04) 100%);
  }
  .cinema-hero__content{padding:0 0 78px}
  .cinema-hero h1{font-size:clamp(46px,15vw,68px);max-width:8.8ch}
  .cinema-hero h1 .hero-line--minor{font-size:.46em}
  .cinema-hero__lead{font-size:15px;line-height:1.55;margin-top:22px}
  .cinema-hero__actions{display:grid;grid-template-columns:1fr}
  .cinema-hero .btn{width:100%;justify-content:center}
  .trust-grid{grid-template-columns:1fr}
  .trust-grid>div{border-right:0;border-bottom:1px solid var(--v2-line);min-height:78px}
  .trust-grid>div:last-child{border-bottom:0}
  #tension{padding-top:74px}
  #tension .story-h2{font-size:52px}
  #tension .tension__figure figcaption{display:none}
  html.motion-active .night-stage__pin{height:auto}
  .flow-stage .story-h2{font-size:76px}
  .role-scene{min-height:900px}
  .role-scene__frame img{object-position:61% center!important}
  .role-scene__aside{left:12px;right:12px;bottom:82px;padding:14px}
  .role-rail{grid-template-columns:1fr 1fr}
  .role-rail__btn{min-height:68px;padding:10px}
  .role-copy{padding:16px 4px 2px}
  .role-copy h3{font-size:27px}
  .role-copy p{font-size:14px;line-height:1.55}
  .role-scene__links{left:12px;right:12px;bottom:12px;font-size:12px;gap:8px 12px}
  .resources .section-head h2{font-size:52px}
}

/* Hero copy must never disappear if animation timing or browser throttling differs. */
html.motion-active .cinema-hero .hero-line{
  opacity:1!important;
  transform:none!important;
}
html.motion-active .cinema-hero .hero-line span{
  opacity:1!important;
  transform:none!important;
}

/* Keep scroll-driven transforms from creating horizontal document overflow. */
html,body{overflow-x:hidden}

/* The premium role scene uses photographic focus, not diagram markers. */
.role-scene__objects,.role-scene__seat{display:none!important}

@media(max-width:720px){
  .guide-home-grid,.guide-card,.guide-card-art{min-width:0;max-width:100%}
  .guide-card-art img{max-width:100%;height:auto}
  .chaos-physical{overflow:hidden}
}

.tension__figure figcaption{justify-content:flex-start}
