/* ==================================================== */
/* HOMEPAGE "night sky" (preview B1, council pass).       */
/* Standalone layer loaded after style.css, homepage only. */
/* ==================================================== */

body.night {
  --ink: #ffffff;          /* titles */
  --text: #c5cceb;         /* reading text: soft periwinkle, not white */
  --muted: #a3abd3;        /* fine print (4.5:1+ on the navy) */
  --star: #ffd98a;         /* warm starlight: stars and ratings only */
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-family: var(--sans);  /* slab is kept for titles and labels */
  color: var(--text);
  position: relative;
  background:
    radial-gradient(ellipse 80% 520px at 50% -60px, rgba(96, 120, 235, 0.42), transparent 72%) no-repeat,
    radial-gradient(ellipse 900px 520px at 0% 1100px, rgba(126, 86, 214, 0.09), transparent 70%) no-repeat,
    radial-gradient(ellipse 800px 520px at 100% 1700px, rgba(60, 170, 190, 0.09), transparent 70%) no-repeat,
    linear-gradient(180deg, #121b47 0%, #0e1638 40%, #0a102c 100%) #0e1638;
}

/* ---------- Sky ---------- */
/* Three random star tiles of unrelated sizes, so no pattern repeats.   */
/* All three are static (a full-page animated layer never lets the page go idle);  */
/* the twinkle comes from the six small gold stars around the logo.              */
.night .sky { position: absolute; top: 0; right: 0; bottom: 0; left: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.night .sky::before,
.night .sky::after,
.night .sky i { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
.night .sky::before { background: url(images/home/stars-1.svg) 0 0 / 1600px 1600px; opacity: 0.6; }
.night .sky::after  { background: url(images/home/stars-2.svg) -300px -200px / 1900px 1700px; opacity: 0.8; }
.night .sky i       { background: url(images/home/stars-3.svg) -700px -120px / 2300px 1900px; }

/* Hand-placed four-point stars: the logo's own motif, in starlight gold */
.night .sky b { position: absolute; color: var(--star); font-weight: normal; line-height: 1; opacity: 0.8; animation: n-pulse 5s ease-in-out infinite; }
.night .sky b:nth-of-type(1) { top: 86px;  left: 14%;  font-size: 20px; }
.night .sky b:nth-of-type(2) { top: 212px; left: 25%;  font-size: 13px; animation-delay: -1.4s; }
.night .sky b:nth-of-type(3) { top: 128px; right: 15%; font-size: 22px; animation-delay: -2.6s; }
.night .sky b:nth-of-type(4) { top: 318px; right: 24%; font-size: 14px; animation-delay: -0.8s; }
.night .sky b:nth-of-type(5) { top: 470px; left: 9%;   font-size: 16px; animation-delay: -3.4s; }
.night .sky b:nth-of-type(6) { top: 520px; right: 10%; font-size: 17px; animation-delay: -2s; }
@keyframes n-pulse { 0%, 100% { transform: scale(0.7); opacity: 0.35; } 50% { transform: scale(1.1); opacity: 0.9; } }

/* Motion pauses once the hero has scrolled away (class set by the page script) */
.sky-paused .night .sky b, .sky-paused .night .shoot, .sky-paused .night .logo { animation-play-state: paused; }

/* One shooting star, rarely */
.night .shoot {
  position: absolute; top: 90px; left: 62%;
  width: 150px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), #fff);
  opacity: 0;
  transform: rotate(152deg) translateX(0);
  animation: n-shoot 40s ease-in 5s infinite;
}
@keyframes n-shoot {
  0%   { opacity: 0; transform: rotate(152deg) translateX(0); }
  0.4% { opacity: 1; }
  2%   { opacity: 0; transform: rotate(152deg) translateX(520px); }
  100% { opacity: 0; transform: rotate(152deg) translateX(520px); }
}

.night .logo-container, .night .site-footer { position: relative; z-index: 1; }
.night .logo-container { margin-bottom: 20px; }

/* The game sheet keeps its own light look: the night page's text colour and font must not leak into it */
.night .modal, .night #screenshot-modal { color: #000; font-family: 'MyGameFont', sans-serif; }

/* ---------- Hero ---------- */
.night .hero { position: relative; z-index: 0; padding-top: 10px; }
/* a calm patch of sky behind the words, so no star sits inside the text */
.night .hero::before {
  content: ""; position: absolute; z-index: -1;
  left: 50%; bottom: -16px; width: min(780px, 100%); height: 170px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(15, 23, 60, 0.92) 35%, rgba(15, 23, 60, 0));
}
.night .logo { width: 220px; margin-bottom: 0; filter: brightness(0) invert(1); animation: n-float 8s ease-in-out infinite; }
@keyframes n-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* promise: always one line, stars kept (style.css stacks it under 400px) */
/* wraps, as whole phrases, only when the visitor's text size is very large */
.night .promise { flex-direction: row; flex-wrap: wrap; gap: 4px 12px; color: var(--ink); margin: 20px auto 10px auto; }
.night .promise span { white-space: nowrap; }
.night .promise-star { display: inline; color: var(--star); opacity: 1; }
.night .home-pitch { max-width: 560px; margin: 0 auto; font-size: 1.04rem; line-height: 1.6; color: var(--text); }

.night .eyebrow {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  font-family: 'MyGameFont', sans-serif;
  font-size: 0.85rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink);
  margin: 34px 0 22px 0;
}
.night .eyebrow::before, .night .eyebrow::after { content: "\2726"; font-size: 0.8em; color: var(--star); letter-spacing: 0; }

/* ---------- App icons ---------- */
.night .gicon { display: block; flex: none; line-height: 0; position: relative; text-decoration: none; transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.3, 1); }
.night .gicon img {
  width: var(--icon, 112px); height: var(--icon, 112px);
  border-radius: 22.5%;
  display: block;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.22),
    0 14px 34px rgba(0, 0, 0, 0.5),
    0 0 46px rgba(var(--glow), var(--glow-a, 0.42));
  transition: box-shadow 0.22s ease;
}
.night .gicon:hover { transform: translateY(-4px) scale(1.04); }
.night .gicon:hover img { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.4), 0 18px 40px rgba(0, 0, 0, 0.55), 0 0 60px rgba(var(--glow), 0.65); }
.night .gicon:active { transform: scale(0.96); }

.night .g-mots  { --glow: 110, 215, 200; --accent: #7fe3d2; }
.night .g-terra { --glow: 245, 135, 75;  --accent: #ffa672; --glow-a: 0.3; }

/* Home screen row: the two games as big icons, each with its one action */
.night .home-icons { display: flex; justify-content: center; align-items: flex-start; gap: 56px; }
.night .home-app { display: flex; flex-direction: column; align-items: center; width: 270px; }
.night .home-app .gicon { --icon: 164px; display: flex; flex-direction: column; align-items: center; line-height: 1.25; }
.night .home-app strong { font-family: 'MyGameFont', sans-serif; font-weight: normal; font-size: 1.08rem; color: var(--ink); margin-top: 16px; }
.night .home-app small { font-family: 'MyGameFont', sans-serif; font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin-top: 6px; }
.night .home-app .status-live::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #5fe08a; box-shadow: 0 0 8px #5fe08a; vertical-align: 1px; }

.night .hero-stores { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.night .hero-stores a { line-height: 0; border-radius: 8px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28); transition: transform 0.15s ease; }
.night .hero-stores a:hover { transform: scale(1.05); }
.night .hero-stores img { height: 40px; width: auto; border-radius: 7px; display: block; }
/* on a phone, show only the visitor's own store */
.is-ios .night .hero-stores .gp, .is-android .night .hero-stores .as { display: none; }

.night .hero-notify {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 16px;
  min-height: 40px; box-sizing: border-box; padding: 4px 18px; border-radius: 999px;
  font-family: 'MyGameFont', sans-serif; font-size: 0.86rem; text-decoration: none;
  color: var(--ink); border: 1px solid rgba(255, 255, 255, 0.38);
  transition: background 0.15s ease, color 0.15s ease;
}
.night .hero-notify:hover { background: #fff; color: #1d2a5e; }
.night .hero-notify svg, .night .notify svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Game panels ---------- */
.night .shows { margin-top: 54px; }
.night .game {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 36px;
  align-items: start;
  max-width: 1160px;
  margin: 0 auto 34px auto;
  padding: 24px;
  border-radius: 28px;
  text-align: left;
  background:
    radial-gradient(ellipse 70% 90% at 22% 40%, rgba(var(--glow), 0.13), transparent 70%),
    rgba(16, 23, 60, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.32);
}
.night .show-flip {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  background:
    radial-gradient(ellipse 70% 90% at 78% 40%, rgba(var(--glow), 0.13), transparent 70%),
    rgba(16, 23, 60, 0.72);
}
.night .show-flip .show-media { order: 2; }
.night .show-info { padding-top: 8px; min-width: 0; }

.night .show-art {
  position: relative; display: block; overflow: hidden;
  aspect-ratio: 1200 / 630;
  border-radius: 18px;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.night .show-art img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.3, 1); }
.night .show-art:hover img { transform: scale(1.04); }

.night .play {
  position: absolute; left: 14px; bottom: 14px;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'MyGameFont', sans-serif; font-size: min(0.78rem, 15px); letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap;
  color: #fff;
  padding: 9px 16px 9px 11px; border-radius: 999px;
  background: rgba(12, 18, 50, 0.74); border: 1px solid rgba(255, 255, 255, 0.25);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: background 0.2s ease, color 0.2s ease;
}
.night .g-mots .play { bottom: auto; top: 14px; } /* this art has its title bottom-right */
.night .play svg { width: 18px; height: 18px; fill: currentColor; }
.night .show-art:hover .play { background: rgba(255, 255, 255, 0.96); color: #1d2a5e; }

.night .show-shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.night .show-shots a { display: block; line-height: 0; border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18); transition: transform 0.2s ease; }
.night .show-shots a:hover { transform: translateY(-3px); }
.night .show-shots img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }

/* App Store listing row: small icon, name, tagline */
.night .show-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.night .show-head .gicon { --icon: 76px; }
.night .show-head h2 { margin: 4px 0 2px 0; font-family: 'MyGameFont', sans-serif; font-size: 1.5rem; line-height: 1.15; color: var(--ink); }
.night .tagline { margin: 0; font-size: 0.95rem; color: var(--muted); }

.night .status { display: inline-block; font-family: 'MyGameFont', sans-serif; font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.night .show-head .status-live::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #5fe08a; box-shadow: 0 0 8px #5fe08a; vertical-align: 1px; }

.night .show-desc { margin: 0 0 16px 0; font-size: 1.04rem; line-height: 1.65; color: var(--text); }

.night .proof { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px 0; padding: 0; list-style: none; }
.night .proof li { font-size: 0.84rem; font-weight: 500; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.12); color: #e6e9f8; white-space: nowrap; }
.night .proof strong { color: var(--star); font-weight: 700; }
.night .proof .rating-stars { color: var(--star); }

.night .quote { margin: 0 0 18px 0; padding-left: 14px; border-left: 3px solid rgba(255, 255, 255, 0.25); font-family: 'HeadlineFont', serif; font-size: 1.05rem; font-style: normal; line-height: 1.5; color: #e6e9f8; }
.night .quote cite { display: block; font-family: var(--sans); font-style: normal; font-size: 0.84rem; color: var(--muted); margin-top: 4px; }

.night .stores { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.night .stores a { line-height: 0; border-radius: 9px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28); transition: transform 0.15s ease; }
.night .stores a:hover { transform: scale(1.04); }
.night .stores img { height: 52px; width: auto; border-radius: 8px; }
.night .platforms { margin: 0 0 14px 0; font-size: 0.84rem; line-height: 1.5; color: var(--muted); }

.night .more { display: inline-block; font-size: 0.92rem; text-decoration: none; color: var(--text); border-bottom: 1px solid rgba(197, 204, 235, 0.35); padding: 8px 0 4px 0; }
.night .more:hover { color: var(--ink); border-color: var(--ink); }
.night .more span { display: inline-block; transition: transform 0.2s ease; }
.night .more:hover span { transform: translateX(4px); }

/* ---------- Email forms on the night page (panel + footer; not the sheet's) ---------- */
.night .notify { margin: 2px 0 16px 0; scroll-margin-top: 90px; }
.night .notify-title { display: flex; align-items: center; gap: 8px; margin: 0 0 10px 0; font-family: 'MyGameFont', sans-serif; font-size: 1rem; color: var(--ink); }
.night .notify-note { margin: 8px 0 0 4px; font-size: 0.8rem; color: var(--muted); }
.night .notify-note a { color: inherit; display: inline-block; padding: 6px 0; }

.night .notify .subscribe-form,
.night .site-footer .subscribe-form {
  display: flex;
  max-width: 460px;
  margin: 0;
  box-sizing: border-box;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: none;
  overflow: hidden;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.night .site-footer .subscribe-form { margin: 0 auto; }
.night .notify .subscribe-form:focus-within,
.night .site-footer .subscribe-form:focus-within { border-color: rgba(255, 255, 255, 0.7); background: rgba(255, 255, 255, 0.11); }
.night .notify .subscribe-content,
.night .site-footer .subscribe-content { flex-direction: row !important; align-items: center; }
.night .notify .subscribe-form input.subscribe-email,
.night .site-footer .subscribe-form input.subscribe-email {
  flex: 1 1 auto; width: auto; min-width: 0;
  background: transparent; color: #fff;
  border: 0; border-radius: 999px;
  padding: 10px 14px 10px 16px;
  font-size: 16px; /* 16px stops iOS zooming the page on focus */
  text-align: left;
  outline: none;
}
.night .notify .subscribe-email::placeholder,
.night .site-footer .subscribe-email::placeholder { color: var(--muted); opacity: 1; }
.night .notify .subscribe-form button.subscribe-btn,
.night .site-footer .subscribe-form button.subscribe-btn {
  flex: none; width: auto;
  background: #fff; color: #1d2a5e;
  border-radius: 999px;
  padding: 10px 20px;
  font-family: 'MyGameFont', sans-serif; font-weight: normal; font-size: 0.92rem;
}
.night .notify .subscribe-form button.subscribe-btn:hover,
.night .site-footer .subscribe-form button.subscribe-btn:hover { background: #dfe5ff; }
.night .notify .subscribe-form.subscribed,
.night .site-footer .subscribe-form.subscribed { background: rgba(95, 224, 138, 0.12); border-color: #5fe08a; border-radius: 18px; color: #dcffe8; min-height: 0; padding: 12px 16px; font-weight: 500; }
.night .notify .subscribe-success,
.night .site-footer .subscribe-success { font-size: 0.95rem; color: #dcffe8; padding: 8px 12px; }

.night .logo-container a img { color: var(--text); font-size: 0.85rem; } /* alt text if an image fails */
.night .g-mots .show-art img { transform-origin: right bottom; } /* this art's title sits bottom-right */

.night a:focus-visible, .night button:focus-visible { outline: 3px solid #9fb0ff; outline-offset: 3px; }

/* ---------- Footer melts into the night ---------- */
.night .site-footer { background: rgba(8, 12, 34, 0.6); border-top: 1px solid rgba(255, 255, 255, 0.1); margin-top: 40px; padding-top: 44px; }
.night .site-footer::before { content: "\2726"; position: absolute; top: -10px; left: 50%; transform: translateX(-50%); color: var(--star); font-size: 16px; line-height: 20px; }
.night #subscribe-text { font-family: 'MyGameFont', sans-serif; font-weight: normal; font-size: 1rem; color: var(--ink); letter-spacing: 0.02em; }
.night .footer-note { font-family: var(--sans); color: var(--muted); opacity: 1; }

/* ---------- Tablet ---------- */
@media (max-width: 900px) {
  .night .game, .night .show-flip { grid-template-columns: 1fr; gap: 20px; max-width: 620px; padding: 18px; border-radius: 24px; }
  .night .show-flip .show-media { order: 0; }
  .night .show-info { padding-top: 0; }
}

/* ---------- Phone ---------- */
@media (max-width: 600px) {
  body.night { padding-left: 12px; padding-right: 12px; }
  .night .site-footer { margin-left: -12px; margin-right: -12px; }
  .night .logo { width: 132px; }
  .night .promise { font-size: 0.72rem; letter-spacing: 0.12em; gap: 9px; margin-top: 14px; }
  .night .home-pitch { font-size: 0.98rem; }
  .night .eyebrow { margin: 24px 0 18px 0; }
  .night .home-icons { gap: 14px; }
  .night .home-app { width: 50%; max-width: 180px; }
  .night .home-app .gicon { --icon: 116px; }
  .night .home-app strong { font-size: 0.92rem; margin-top: 12px; min-height: 2.5em; display: flex; align-items: center; text-align: center; }
  .night .home-app small { margin-top: 2px; }
  .night .hero-stores { flex-direction: column; align-items: center; gap: 8px; margin-top: 12px; }
  .night .hero-stores img { height: 44px; }
  .night .hero-notify { margin-top: 12px; min-height: 44px; }
  .night .shows { margin-top: 38px; }
  .night .game, .night .show-flip { padding: 12px 12px 18px 12px; border-radius: 22px; margin-bottom: 22px; }
  .night .show-info { padding: 0 4px; }
  .night .show-art { border-radius: 14px; }
  .night .show-shots { gap: 8px; margin-top: 8px; }
  .night .show-head { gap: 14px; }
  .night .show-head .gicon { --icon: 64px; }
  .night .show-head h2 { font-size: 1.3rem; }
  .night .proof li { white-space: normal; }
  .night .stores img { height: 46px; }
  .night .notify .subscribe-form button.subscribe-btn,
  .night .site-footer .subscribe-form button.subscribe-btn { padding: 12px 16px; }
  .night .notify .subscribe-form input.subscribe-email,
  .night .site-footer .subscribe-form input.subscribe-email { padding-top: 12px; padding-bottom: 12px; }
  .night .footer-links { gap: 9px; font-size: 0.8em; }
  .night .sky b { display: none; }
  .night .sky b:nth-of-type(1), .night .sky b:nth-of-type(3) { display: block; }
  .night .sky b:nth-of-type(1) { top: 70px; left: 9%; }
  .night .sky b:nth-of-type(3) { top: 96px; right: 9%; }
}
@media (max-width: 350px) {
  .night .promise { font-size: 0.64rem; letter-spacing: 0.08em; gap: 6px; }
  .night .home-app .gicon { --icon: 100px; }
  .night .hero-notify { padding: 0 12px; font-size: 0.8rem; }
}

/* Phones held sideways: style.css shrinks the logo to 60px there, keep it legible */
@media screen and (orientation: landscape) and (max-height: 500px) {
  .night .logo { width: 110px; }
  .night .site-footer { margin-bottom: -10px; } /* style.css sets the body's bottom padding to 10px here */
  .night .eyebrow { font-size: 0.85rem; margin: 18px 0 16px 0; }
  .night .home-app .gicon img { width: 116px; height: 116px; }
}

@media (prefers-reduced-motion: reduce) {
  .night .sky b, .night .logo { animation: none !important; }
  .night .shoot { display: none; }
  .night .gicon, .night .gicon img, .night .show-art img, .night .show-shots a, .night .stores a, .night .hero-stores a, .night .more span { transition: none; }
  .night .gicon:hover, .night .show-art:hover img { transform: none; }
}

/* Existing sheet, desktop: the screenshot strip was 100% wide plus side margins,
   which let the whole sheet scroll sideways by a few pixels */
@media (min-width: 1080px) {
  .night .modal-content > .screenshots { width: auto; }
}

/* Very large text sizes on small phones: long names break instead of pushing the page sideways */
.night .home-app, .night .show-head > div { min-width: 0; }
.night .home-app strong, .night .home-app small, .night .show-head h2, .night .tagline { overflow-wrap: anywhere; }
