/* The Browser page: the copy column on the container's left edge, the scene (one canvas: the tower of the session,
   the city of the past ones, the water) from the column to the window's right edge, the whole first screen in 100svh. */

.first {
  display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 40px; align-items: stretch;
  padding: 24px 0 24px max(var(--gut), calc((100vw - var(--wrap)) / 2));
  height: calc(100svh - var(--head-h) - 1px - var(--reh-h) - 1px); min-height: 600px; padding-bottom: 24px;
}
.first-copy { display: flex; flex-direction: column; justify-content: center; gap: 22px; min-width: 0; padding-bottom: 8px; }
.name { font-size: 92px; line-height: 0.95; }
.headline { font: 800 30px/1.2 "Text", sans-serif; letter-spacing: -0.01em; }
.lede { font-size: 18px; color: var(--ink-2); max-width: 46ch; }
.acts { display: flex; gap: 12px; flex-wrap: wrap; }
.figs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0; }
.figs div { background: var(--glass); border-radius: 18px; padding: 14px 24px 16px; }
.figs dt { white-space: nowrap; }
.figs dt { font-size: 16px; font-weight: 600; color: var(--ink-2); }
.figs dd { margin: 2px 0 0; font: 800 24px/1.15 "Text", sans-serif; color: #fff; white-space: nowrap; }
.figs div.glow { box-shadow: 0 0 26px rgba(63, 240, 255, 0.7); }

.scene-col { position: relative; min-width: 0; }
.scene { position: relative; width: 100%; height: 100%; overflow: hidden; }
.scene.hero {
  border-radius: 28px 0 0 28px; border: 2px solid rgba(63, 240, 255, 0.35); border-right: 0;
  background: radial-gradient(120% 70% at 60% 20%, rgba(30, 80, 230, 0.25), transparent 70%), linear-gradient(180deg, rgba(6, 16, 54, 0.4), rgba(8, 40, 80, 0.5));
}
.scene canvas { position: absolute; inset: 0; display: block; }
.tower-label {
  position: absolute; left: 0; top: 0; z-index: 2; transform: translate(-50%, -100%); white-space: nowrap; pointer-events: none;
  padding: 10px 20px; border-radius: 999px; font-size: 18px; font-weight: 700; color: #fff;
  background: var(--glass-2); border: 2px solid transparent;
}
.tower-label .pct { color: var(--cyan); display: inline-block; }
.tower-label .pct.flip { animation: flip .35s ease-out; }
@keyframes flip { from { transform: translateY(-60%); opacity: 0; } to { transform: none; opacity: 1; } }
.frozen-label {
  position: absolute; left: 0; top: 0; z-index: 3; transform: translate(-50%, -50%); padding: 10px 20px; border-radius: 999px; white-space: nowrap;
  font-size: 18px; font-weight: 800; color: #062a35; background: linear-gradient(180deg, #C8FBFF, #6FE9F5); box-shadow: 0 0 24px rgba(63, 240, 255, 0.6);
}

/* "Aw, Snap!": a glossy browser window in the middle of the scene */
.snap {
  position: absolute; left: 50%; top: 42%; z-index: 4; transform: translate(-50%, -50%); width: min(380px, 80%); padding: 0 28px 24px; text-align: center;
  border-radius: 24px; background: linear-gradient(180deg, rgba(20, 30, 96, 0.97), rgba(8, 14, 52, 0.97)) padding-box, linear-gradient(135deg, var(--magenta), var(--cyan)) border-box;
  border: 4px solid transparent; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3) inset, 0 0 60px rgba(210, 60, 255, 0.55);
  animation: pop .35s cubic-bezier(.2, 1.4, .4, 1);
}
.snap-bar { display: flex; gap: 8px; padding: 14px 0 12px; margin: 0 -28px 16px; padding-left: 24px; border-bottom: 3px solid var(--magenta); }
.snap-bar i { width: 12px; height: 12px; border-radius: 50%; background: var(--yellow); }
.snap-bar i:nth-child(2) { background: var(--green); } .snap-bar i:nth-child(3) { background: var(--cyan); } .snap-bar i:nth-child(4) { background: #B040FF; }
.snap .disp { font-size: 48px; line-height: 1.1; }
.snap p:not(.disp) { margin-top: 8px; font-size: 16px; color: var(--ink-2); }
@keyframes pop { from { transform: translate(-50%, -50%) scale(0.6); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }

/* effect texts over the scene */
.fx-layer { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.fx-pop {
  position: absolute; transform: translate(-50%, -50%); padding: 8px 18px; border-radius: 999px; white-space: nowrap; font-size: 18px; font-weight: 800;
  animation: popfly 1.1s ease-out forwards;
}
.fx-pop.ctrlw { color: #2a1200; background: linear-gradient(180deg, #FFC27A, var(--orange)); box-shadow: 0 0 26px rgba(255, 154, 60, 0.8); }
.fx-pop.burned { color: #fff; background: linear-gradient(180deg, #E070FF, #9A2BE2); box-shadow: 0 0 26px rgba(210, 60, 255, 0.8); animation: rise 1.8s ease-out forwards; }
.fx-pop.trial { color: #2a2100; background: linear-gradient(180deg, #FFE98A, var(--yellow)); }
@keyframes popfly { 0% { opacity: 0; transform: translate(-50%, -30%) scale(0.8); } 20% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(10%, -90%) scale(0.95); } }
@keyframes rise { 0% { opacity: 0; transform: translate(-50%, 0); } 15% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -160px); } }
.drop { position: absolute; right: 20px; top: -6px; width: 14px; height: 18px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: radial-gradient(circle at 40% 35%, #fff, var(--cyan) 45%, #0A8FA8); box-shadow: 0 0 14px var(--cyan); animation: dropfall .7s ease-in forwards; pointer-events: none; }
@keyframes dropfall { from { transform: translateY(-120px); opacity: 0; } 30% { opacity: 1; } to { transform: translateY(0); opacity: 0.2; } }

.log-sec { padding-top: 64px; }

/* short windows (1366 x 768) */
@media (max-height: 820px) and (min-width: 1001px) {
  .name { font-size: 76px; }
  .headline { font-size: 26px; }
  .first-copy { gap: 16px; }
  .lede { font-size: 17px; }
  .figs dd { font-size: 24px; }
  .figs div { padding: 12px 24px 16px; }
}
@media (max-width: 1240px) and (min-width: 1001px) {
  .first { grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 28px; }
  .name { font-size: 68px; }
  .headline { font-size: 24px; }
  .figs dd { font-size: 24px; }
}
@media (min-width: 1300px) { .first { grid-template-columns: minmax(0, 700px) minmax(0, 1fr); } }
@media (max-width: 1000px) {
  .first { grid-template-columns: 1fr; height: auto; min-height: 0; padding: 24px var(--gut) 32px; gap: 20px; }
  .first-copy { display: contents; }
  .first .name { order: 1; font-size: 64px; }
  .scene-col { order: 2; height: min(118vw, 560px); }
  .first .headline { order: 3; font-size: 24px; }
  .first .lede { order: 4; }
  .first .acts { order: 5; }
  .first .ca { order: 6; }
  .first .figs { order: 7; }
  .scene.hero { border-radius: 24px; border-right: 2px solid rgba(63, 240, 255, 0.35); }
  .acts .key { flex: 1 1 0; padding: 0 16px; }
  .tower-label { font-size: 16px; padding: 8px 16px; }
}
@media (max-width: 480px) {
  .first .name { font-size: 52px; }
  .figs { grid-template-columns: 1fr 1fr; }
  .snap .disp { font-size: 36px; }
  .ca-row .key { flex: 1 1 auto; }
}
