/* Confidential landing C (home-terminal.html): the real terminal rising over the limb of the brand ring, seen from orbit.
   Builds on home.css (tokens, header, type, button, facts, entry motion). Decisions in docs/landing/NOTES.md.
   Stacking, all in .stage: stars 0, light 1, terminal 2, planet 3, limb 4, glint 5, words 6. */

:root { --ground: #000; --space: #030304; }

/* The page is one scene: space above the limb, the planet's night side below it. */
.stage {
  /* The planet. --R is its radius, --h the band of light above the limb, --d how far that light leans to the lit (left) side.
     --edge is how far the limb has dropped by the screen's edge, R - sqrt(R^2 - (50vw)^2), worked out for this R. */
  --R: 110vw;
  --h: 7vw;
  --d: -3vw;
  --edge: 12.02vw;
  --limb: 2px;
  position: relative;
  isolation: isolate;
  overflow: clip;
  background: var(--space);
}
.bar, .copy, .facts { position: relative; z-index: 6; }

/* ---------- stars: three sparse layers drawn as box-shadows on a 2560 x 1600 field (generated, at the end of this file) ---------- */
.sky { position: absolute; inset: 0; pointer-events: none; }
.stars { position: absolute; left: 0; top: 0; z-index: 0; border-radius: 50%; }

/* ---------- the words ---------- */
.intro { width: var(--col); margin-inline: auto; }
/* Two lines that sit on one line when there is room. inline-block keeps the entry transform working. */
.orbit h1 .ln { display: inline-block; }
/* The proof line arrives after load, so it sits outside the flow and never moves the terminal. */
.proof { position: absolute; left: 0; top: 100%; margin-top: 10px; }

/* ---------- the terminal ---------- */
/* The figure's box is the part of the capture above the limb. The capture runs on below it, behind the planet. */
.shot { position: relative; margin: 0 auto; }
.shot img {
  position: absolute;
  z-index: 2;
  left: 0;
  top: 0;
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  background: #000;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* ---------- the planet, its limb and the light behind it ---------- */
/* All centred under the figure, with the limb's highest point on the figure's bottom edge. */
.space { position: absolute; inset: 0; pointer-events: none; }
.space > * { position: absolute; left: calc(50% - var(--R)); top: 100%; width: calc(2 * var(--R)); aspect-ratio: 1; border-radius: 50%; }
.planet { z-index: 3; background: #000; }
/* Neutral light from beyond the limb, a little stronger on the lit side. It sits behind the terminal, so it never washes the words. */
.halo {
  z-index: 1;
  left: calc(50% + var(--d) - var(--R) - var(--h));
  top: calc(100% - var(--h));
  width: calc(2 * (var(--R) + var(--h)));
  background: radial-gradient(closest-side, rgba(255, 241, 234, 0.12) var(--R), rgba(255, 241, 234, 0.045) calc(var(--R) + var(--h) * 0.2), rgba(255, 241, 234, 0.014) calc(var(--R) + var(--h) * 0.55), transparent);
}
/* The brand ring as the limb: the mark's lit arc, its gap and its glass, turned so the gap shows right of centre.
   Wedges in the ring's own angles (0 = 3 o'clock, clockwise): lit to -81.5deg, gap, glass from -78.5deg. home-terminal.js reads the same -81.5. */
.rim { z-index: 4; box-sizing: border-box; border: var(--limb) solid; }
.rim.lit {
  border-color: var(--coral);
  /* the night side catches a little of the light just inside the limb, so the planet reads as a sphere */
  box-shadow: inset 0 0 28px rgba(255, 102, 77, 0.2);
  clip-path: polygon(50% 50%, -3.69% 19.00%, -1.52% 15.50%, 0.89% 12.16%, 3.51% 8.99%, 6.33% 5.99%, 9.35% 3.19%, 12.54% 0.59%, 15.91% -1.78%, 19.42% -3.93%, 23.06% -5.84%, 26.83% -7.51%, 30.70% -8.92%, 34.65% -10.07%, 38.67% -10.96%, 42.74% -11.57%, 46.85% -11.92%, 50.96% -11.99%, 55.07% -11.79%, 59.16% -11.32%);
}
.rim.glass {
  border-color: var(--glass);
  clip-path: polygon(50% 50%, 62.36% -10.76%, 66.46% -9.77%, 70.49% -8.52%, 74.42% -6.99%, 78.24% -5.19%, 81.93% -3.14%, 85.47% -0.85%, 88.85% 1.68%, 92.05% 4.44%, 95.05% 7.40%, 97.84% 10.56%, 100.41% 13.91%, 102.75% 17.42%, 104.84% 21.08%, 106.68% 24.88%, 108.26% 28.79%);
}

/* The glint that runs along the lit arc after the pointer (home-terminal.js draws it). */
.spark { position: absolute; inset: 0; z-index: 5; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.spark path { fill: none; stroke: url(#sparkfade); stroke-linecap: round; }
.spark-line { stroke-width: 2; }
.spark-wide { stroke-width: 6; opacity: 0.2; }

/* ---------- the facts, on the planet's night side ---------- */
.facts { margin-top: calc(var(--edge) + 40px); border-top: 0; }

/* ---------- entry: the words as on A, then the terminal rises from behind the limb ---------- */
@keyframes surface { from { opacity: 0; transform: translateY(8%); } 40% { opacity: 1; } }
.shot img { animation: surface 1.6s var(--ease-out-quint) 0.3s both; }
.stars, .halo, .rim { animation: appear 1.8s var(--ease-out-quad) both; }
.rim.lit { animation-delay: 0.15s; }
/* the glint lights up once the limb is there */
.spark { animation: appear 1.2s var(--ease-out-quad) 0.6s both; }

/* ---------- wide screens: the words left and the film right fill the first screen; the terminal's top peeks in under them ---------- */
@media (min-width: 960px) {
  .first {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    column-gap: clamp(40px, 5vw, 96px);
    align-items: center;
    min-height: calc(100svh - 72px - clamp(56px, 11svh, 120px));
    padding-bottom: clamp(24px, 4svh, 44px);
  }
  /* The headline is sized to its column: "without showing it." is about 8.9em wide. */
  .copy { container-type: inline-size; }
  .orbit h1 { font-size: clamp(40px, min(10.9cqi, 9svh), 80px); }
  .shot { width: min(100%, 1280px); margin: 0 auto; aspect-ratio: 1440 / 495; }
}
/* Big screens give the first screen more width, so the film and the headline grow with them. */
@media (min-width: 1600px) {
  .stage { --col: min(1520px, 100% - 2 * var(--gutter)); }
}
@media (max-width: 959px) and (min-width: 600px) {
  .shot { width: 100%; margin-top: 64px; aspect-ratio: 1440 / 495; }
}

/* ---------- phones: the terminal's own phone layout, captured at 390px ---------- */
@media (max-width: 599px) {
  .stage { --R: 120vw; --h: 10vw; --d: -8vw; --edge: 10.91vw; }
  .shot { width: min(100%, 320px); margin-top: 64px; aspect-ratio: 390 / 472; }
  .shot img { border-radius: 18px; }
  /* On phones the first screen belongs to the words and the film: no proof line. */
  .proof { display: none; }
}

/* ---------- generated starfield: node gen-stars.cjs (seeded, so it never changes between builds) ---------- */
.stars.s1 { width: 1px; height: 1px; box-shadow: 201px 434px rgba(255, 255, 255, 0.29), 1282px 401px rgba(255, 255, 255, 0.48), 57px 274px rgba(255, 255, 255, 0.25), 2301px 1365px rgba(255, 255, 255, 0.27), 2047px 571px rgba(255, 255, 255, 0.34), 876px 413px rgba(255, 255, 255, 0.35), 1972px 154px rgba(255, 255, 255, 0.43), 841px 1549px rgba(255, 255, 255, 0.41), 1072px 595px rgba(255, 255, 255, 0.35), 748px 1185px rgba(255, 255, 255, 0.31), 381px 233px rgba(255, 255, 255, 0.30), 1497px 213px rgba(205, 216, 255, 0.31), 2513px 1237px rgba(255, 255, 255, 0.25), 2464px 483px rgba(255, 255, 255, 0.24), 989px 1356px rgba(255, 226, 212, 0.52), 2316px 314px rgba(255, 255, 255, 0.23), 2017px 1176px rgba(255, 255, 255, 0.43), 811px 1594px rgba(255, 255, 255, 0.54), 2351px 55px rgba(255, 255, 255, 0.40), 1872px 1434px rgba(255, 255, 255, 0.31), 252px 1007px rgba(255, 255, 255, 0.35), 1077px 1584px rgba(255, 255, 255, 0.42), 1019px 1243px rgba(255, 255, 255, 0.37), 1680px 183px rgba(255, 255, 255, 0.26), 1631px 1443px rgba(255, 255, 255, 0.26), 482px 1479px rgba(255, 255, 255, 0.36), 1359px 807px rgba(255, 255, 255, 0.52), 1601px 684px rgba(255, 255, 255, 0.44), 1771px 1122px rgba(255, 226, 212, 0.36), 985px 201px rgba(255, 255, 255, 0.34), 1684px 1082px rgba(255, 255, 255, 0.36), 1779px 630px rgba(255, 255, 255, 0.27), 2138px 1556px rgba(255, 255, 255, 0.24), 1612px 261px rgba(255, 255, 255, 0.32), 478px 1227px rgba(255, 226, 212, 0.53), 388px 778px rgba(255, 255, 255, 0.29), 1685px 1197px rgba(255, 226, 212, 0.43), 1409px 800px rgba(255, 255, 255, 0.54), 734px 510px rgba(255, 255, 255, 0.37), 2493px 261px rgba(255, 255, 255, 0.30), 316px 1259px rgba(255, 255, 255, 0.37), 185px 728px rgba(255, 255, 255, 0.38), 2457px 484px rgba(255, 255, 255, 0.23), 1853px 0px rgba(205, 216, 255, 0.40), 150px 1006px rgba(255, 255, 255, 0.32), 1318px 1516px rgba(255, 255, 255, 0.34), 2103px 190px rgba(255, 255, 255, 0.32), 309px 490px rgba(255, 226, 212, 0.47), 891px 1433px rgba(255, 255, 255, 0.36), 1644px 369px rgba(255, 226, 212, 0.52), 2392px 1201px rgba(255, 255, 255, 0.47), 231px 761px rgba(255, 255, 255, 0.32), 643px 513px rgba(255, 255, 255, 0.45), 2141px 351px rgba(255, 255, 255, 0.53), 844px 81px rgba(255, 226, 212, 0.54), 466px 727px rgba(255, 255, 255, 0.31), 1362px 338px rgba(255, 255, 255, 0.51), 2527px 963px rgba(255, 255, 255, 0.21), 2041px 1347px rgba(255, 255, 255, 0.32), 1025px 1579px rgba(255, 255, 255, 0.39), 193px 165px rgba(255, 255, 255, 0.32), 2210px 8px rgba(255, 255, 255, 0.42), 2073px 557px rgba(255, 226, 212, 0.45), 287px 747px rgba(255, 255, 255, 0.24), 847px 439px rgba(255, 255, 255, 0.51), 1531px 13px rgba(255, 255, 255, 0.30), 1871px 1372px rgba(255, 255, 255, 0.28), 763px 1115px rgba(205, 216, 255, 0.49), 1477px 178px rgba(255, 255, 255, 0.31), 15px 177px rgba(255, 255, 255, 0.51), 1837px 112px rgba(255, 255, 255, 0.28), 1828px 238px rgba(255, 255, 255, 0.41), 1049px 425px rgba(255, 255, 255, 0.42), 1111px 535px rgba(255, 226, 212, 0.35), 867px 1518px rgba(255, 255, 255, 0.30), 1131px 1156px rgba(205, 216, 255, 0.39), 557px 879px rgba(255, 255, 255, 0.37), 2242px 1188px rgba(255, 255, 255, 0.39), 1608px 1061px rgba(255, 255, 255, 0.33), 2535px 1365px rgba(205, 216, 255, 0.46), 2531px 768px rgba(255, 255, 255, 0.40), 1786px 1042px rgba(255, 255, 255, 0.50), 1422px 1504px rgba(255, 255, 255, 0.34), 92px 1072px rgba(255, 255, 255, 0.35), 1475px 358px rgba(255, 255, 255, 0.45), 1456px 1235px rgba(255, 255, 255, 0.42), 1934px 724px rgba(255, 226, 212, 0.36), 121px 1018px rgba(255, 255, 255, 0.34), 594px 998px rgba(255, 255, 255, 0.27), 496px 1170px rgba(255, 255, 255, 0.30), 60px 423px rgba(255, 255, 255, 0.29), 1964px 602px rgba(255, 255, 255, 0.44), 2441px 350px rgba(255, 255, 255, 0.29), 9px 1429px rgba(255, 255, 255, 0.31), 2168px 534px rgba(255, 255, 255, 0.51), 162px 457px rgba(255, 255, 255, 0.53), 2496px 98px rgba(255, 255, 255, 0.41), 1190px 1029px rgba(205, 216, 255, 0.22), 547px 551px rgba(255, 255, 255, 0.47), 237px 1412px rgba(255, 226, 212, 0.45), 1100px 625px rgba(205, 216, 255, 0.42), 1284px 790px rgba(255, 255, 255, 0.22), 744px 734px rgba(255, 255, 255, 0.24), 1468px 1340px rgba(255, 255, 255, 0.37), 675px 565px rgba(255, 226, 212, 0.50), 179px 88px rgba(205, 216, 255, 0.52), 1975px 414px rgba(255, 255, 255, 0.55), 1701px 1348px rgba(255, 255, 255, 0.42), 2496px 261px rgba(255, 255, 255, 0.25), 1642px 584px rgba(255, 226, 212, 0.27), 2104px 249px rgba(255, 255, 255, 0.27), 2296px 740px rgba(255, 255, 255, 0.21), 976px 1132px rgba(255, 255, 255, 0.41), 339px 717px rgba(255, 255, 255, 0.46), 897px 1332px rgba(255, 255, 255, 0.36), 0px 1568px rgba(205, 216, 255, 0.22), 1347px 301px rgba(205, 216, 255, 0.51), 754px 991px rgba(205, 216, 255, 0.39), 1986px 872px rgba(255, 255, 255, 0.41), 60px 82px rgba(255, 255, 255, 0.37), 1648px 760px rgba(255, 255, 255, 0.40), 1678px 641px rgba(255, 255, 255, 0.38), 1714px 1438px rgba(255, 255, 255, 0.23), 1904px 57px rgba(255, 255, 255, 0.49), 2031px 1546px rgba(255, 255, 255, 0.45), 499px 578px rgba(255, 255, 255, 0.32), 543px 1243px rgba(205, 216, 255, 0.51), 1505px 977px rgba(255, 255, 255, 0.35), 463px 1136px rgba(255, 255, 255, 0.22), 397px 798px rgba(255, 255, 255, 0.28), 475px 960px rgba(255, 255, 255, 0.35), 1791px 1149px rgba(255, 255, 255, 0.46), 1669px 1435px rgba(255, 255, 255, 0.29), 1408px 715px rgba(255, 255, 255, 0.22), 1549px 1563px rgba(205, 216, 255, 0.24), 1264px 596px rgba(255, 255, 255, 0.45), 1188px 43px rgba(255, 255, 255, 0.54), 165px 350px rgba(255, 255, 255, 0.30), 1306px 686px rgba(255, 226, 212, 0.23), 2510px 1037px rgba(205, 216, 255, 0.35), 1568px 1049px rgba(255, 255, 255, 0.42), 1186px 689px rgba(255, 255, 255, 0.32), 1019px 608px rgba(255, 255, 255, 0.25), 661px 818px rgba(255, 255, 255, 0.55), 768px 1298px rgba(255, 255, 255, 0.38), 517px 565px rgba(255, 255, 255, 0.47), 300px 49px rgba(255, 255, 255, 0.51), 304px 592px rgba(255, 255, 255, 0.36), 1663px 827px rgba(205, 216, 255, 0.42), 2164px 1494px rgba(255, 255, 255, 0.32), 569px 995px rgba(255, 226, 212, 0.48), 666px 1267px rgba(255, 255, 255, 0.34), 363px 499px rgba(255, 255, 255, 0.41), 1339px 1448px rgba(255, 255, 255, 0.51), 1996px 1282px rgba(205, 216, 255, 0.46), 1036px 665px rgba(255, 255, 255, 0.35), 66px 639px rgba(255, 255, 255, 0.47), 1732px 1158px rgba(255, 226, 212, 0.55), 655px 762px rgba(255, 255, 255, 0.30), 2454px 15px rgba(255, 255, 255, 0.54), 1910px 1397px rgba(255, 255, 255, 0.50), 904px 518px rgba(255, 255, 255, 0.35), 397px 819px rgba(255, 255, 255, 0.24), 1964px 161px rgba(255, 255, 255, 0.52), 220px 364px rgba(255, 226, 212, 0.35), 1475px 545px rgba(255, 255, 255, 0.31), 1189px 1350px rgba(255, 255, 255, 0.34), 1257px 913px rgba(255, 255, 255, 0.31), 593px 1222px rgba(255, 255, 255, 0.38), 1481px 615px rgba(255, 255, 255, 0.42); }
.stars.s2 { width: 1.6px; height: 1.6px; box-shadow: 2007px 1068px rgba(255, 255, 255, 0.35), 645px 308px rgba(255, 255, 255, 0.55), 1503px 415px rgba(255, 255, 255, 0.42), 680px 647px rgba(255, 255, 255, 0.61), 2313px 9px rgba(255, 255, 255, 0.62), 1730px 1398px rgba(205, 216, 255, 0.72), 2155px 509px rgba(205, 216, 255, 0.38), 1122px 554px rgba(255, 255, 255, 0.47), 1647px 902px rgba(255, 255, 255, 0.44), 684px 1018px rgba(255, 255, 255, 0.69), 393px 777px rgba(255, 255, 255, 0.44), 1561px 10px rgba(255, 255, 255, 0.39), 991px 1267px rgba(255, 255, 255, 0.53), 1954px 777px rgba(255, 255, 255, 0.41), 466px 511px rgba(255, 255, 255, 0.65), 1229px 276px rgba(205, 216, 255, 0.59), 1550px 158px rgba(255, 255, 255, 0.53), 717px 279px rgba(255, 255, 255, 0.51), 1380px 919px rgba(255, 255, 255, 0.36), 963px 967px rgba(255, 255, 255, 0.69), 226px 448px rgba(205, 216, 255, 0.66), 2328px 204px rgba(255, 255, 255, 0.52), 566px 1546px rgba(255, 255, 255, 0.61), 466px 409px rgba(255, 255, 255, 0.42), 1613px 97px rgba(255, 255, 255, 0.38), 1970px 1095px rgba(255, 255, 255, 0.50), 2157px 317px rgba(255, 255, 255, 0.38), 1774px 939px rgba(255, 255, 255, 0.40), 2189px 637px rgba(255, 255, 255, 0.59), 1983px 16px rgba(255, 255, 255, 0.54), 716px 452px rgba(205, 216, 255, 0.48), 129px 1126px rgba(255, 255, 255, 0.44), 126px 1461px rgba(205, 216, 255, 0.40), 1925px 829px rgba(205, 216, 255, 0.71), 2380px 1576px rgba(255, 255, 255, 0.50), 1622px 1001px rgba(255, 255, 255, 0.66), 1735px 536px rgba(255, 255, 255, 0.65), 360px 175px rgba(255, 255, 255, 0.38), 1135px 1401px rgba(255, 255, 255, 0.66), 378px 578px rgba(255, 255, 255, 0.55), 2374px 27px rgba(255, 255, 255, 0.54), 354px 929px rgba(255, 255, 255, 0.69), 243px 1411px rgba(255, 255, 255, 0.51), 99px 1118px rgba(255, 255, 255, 0.70), 854px 1596px rgba(255, 255, 255, 0.42), 856px 1445px rgba(255, 255, 255, 0.59), 2195px 1450px rgba(255, 226, 212, 0.73), 774px 90px rgba(255, 255, 255, 0.68), 1000px 784px rgba(255, 255, 255, 0.55), 1605px 219px rgba(255, 255, 255, 0.67), 1606px 184px rgba(255, 255, 255, 0.48), 1230px 165px rgba(255, 255, 255, 0.51); }
.stars.s3 { width: 2.2px; height: 2.2px; box-shadow: 1504px 816px rgba(205, 216, 255, 0.67), 1410px 1008px rgba(255, 255, 255, 0.77), 205px 1465px rgba(255, 255, 255, 0.76), 701px 1582px rgba(255, 255, 255, 0.60), 911px 812px rgba(255, 255, 255, 0.69), 1410px 1005px rgba(255, 255, 255, 0.83), 2346px 361px rgba(255, 255, 255, 0.72), 1612px 624px rgba(255, 255, 255, 0.91), 1331px 1018px rgba(205, 216, 255, 0.94), 2296px 221px rgba(255, 255, 255, 0.90), 1741px 1250px rgba(255, 255, 255, 0.88), 2011px 411px rgba(255, 255, 255, 0.91), 348px 937px rgba(255, 255, 255, 0.66), 838px 855px rgba(255, 255, 255, 0.87); }
