/* STARForce marketing site. Colors, fonts and effects come from the app's css/theme.css (loaded first),
   so Admin HQ > Branding restyles this site too. */
:root {
  --cut: polygon(var(--sf-cut) 0, 100% 0, 100% calc(100% - var(--sf-cut)), calc(100% - var(--sf-cut)) 100%, 0 100%, 0 var(--sf-cut));
  --cut-btn: polygon(var(--sf-cut-btn) 0, 100% 0, 100% calc(100% - var(--sf-cut-btn)), calc(100% - var(--sf-cut-btn)) 100%, 0 100%, 0 var(--sf-cut-btn));
  --medal-bronze: #c98446;   /* the app's bronze medal (js/lesson-player.js) */
  --medal-silver: var(--sf-line-soft);
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 18px; line-height: 1.55; }
[hidden] { display: none !important; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--sf-cyan); outline-offset: 2px; }
img, svg { display: block; max-width: 100%; }

.site { position: relative; min-height: 100vh; overflow-x: clip; }
.wrap { width: 100%; max-width: 1312px; margin: 0 auto; padding-inline: clamp(20px, 5vw, 64px); position: relative; }

/* Type */
h1, h2, h3 { margin: 0; font-family: var(--sf-font-display); font-weight: 400; letter-spacing: 1px; color: var(--sf-text); }
h1 { font-size: clamp(40px, 5.2vw, 76px); line-height: 1.02; text-transform: uppercase; text-wrap: balance; }
h2 { font-size: clamp(30px, 3.5vw, 50px); line-height: 1.08; text-transform: uppercase; text-wrap: balance; }
h3 { font-size: 24px; line-height: 1.2; }
p { margin: 0; }
.lede { font-size: clamp(19px, 1.6vw, 23px); line-height: 1.45; font-weight: 600; color: var(--sf-text-2); max-width: 36em; }
.quiet { color: var(--sf-muted); }
.hud { font-family: var(--sf-font-hud); font-size: 14px; line-height: 1.3; letter-spacing: 3px; text-transform: uppercase; color: var(--sf-cyan); }
.hud.gold { color: var(--sf-gold); }
.hud-row { display: inline-flex; align-items: center; gap: 10px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--sf-good); box-shadow: 0 0 10px var(--sf-good); animation: sf-blink 1.8s ease-in-out infinite; flex: none; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.sec-head { display: flex; flex-direction: column; gap: 14px; max-width: 800px; margin-bottom: 48px; }
.sec-head.center { align-items: center; text-align: center; margin-inline: auto; }

/* Nav */
.nav { position: relative; z-index: 30; background: rgba(var(--sf-void-rgb), .82); border-bottom: 1px solid rgba(var(--sf-cyan-rgb), .25); }
.nav-in { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; min-height: 84px; padding-block: 10px; }
.nav .sf-logo { height: 58px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 28px; margin-left: auto; font-weight: 800; font-size: 17px; }
.nav-links a { color: var(--sf-text); text-decoration: none; padding: 10px 0; border-bottom: 2px solid transparent; white-space: nowrap; }
.nav-links a:hover { color: var(--sf-cyan); }
.nav-links a[aria-current="page"] { color: var(--sf-cyan); border-bottom-color: var(--sf-cyan); }
.nav-cta { display: flex; align-items: center; gap: 18px; }
.signin { color: var(--sf-text-2); font-weight: 800; text-decoration: none; white-space: nowrap; padding: 10px 0; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 28px; border: 0; cursor: pointer;
  font-family: var(--sf-font-display); font-size: 18px; letter-spacing: 1px; line-height: 1; text-transform: uppercase; text-decoration: none; white-space: nowrap; }
.btn-gold { position: relative; background: var(--sf-gold); color: var(--sf-ink); clip-path: var(--cut-btn); min-height: 64px; padding: 0 36px; font-size: 21px; }
.btn-gold:hover { background: var(--sf-gold-hi); color: var(--sf-ink); }
.sticker { position: relative; display: inline-block; isolation: isolate; }
.sticker::before, .sticker::after { content: ""; position: absolute; clip-path: var(--cut-btn); transform: translate(8px, 8px); }
.sticker::before { inset: 0; z-index: -2; background: var(--sf-cyan); }
.sticker::after { inset: 3px; z-index: -1; background: var(--sf-void); }
.btn-ghost { clip-path: none; background: transparent; color: var(--sf-cyan); box-shadow: inset 0 0 0 1.5px rgba(var(--sf-cyan-rgb), .75); }
.btn-ghost:hover { background: var(--sf-cyan-soft); color: var(--sf-text); }
.btn-sm { min-height: 46px; padding: 0 20px; font-size: 16px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; }

/* Sections and layout */
.sec { position: relative; padding-block: clamp(64px, 7vw, 104px); }
.sec.band { background: rgba(var(--sf-panel-rgb), .42); border-block: 1px solid rgba(var(--sf-cyan-rgb), .15); }
.g2, .g3, .g4 { display: grid; gap: 22px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(36px, 6vw, 88px); align-items: center; }
.panel { position: relative; background: rgba(var(--sf-panel-rgb), .9); border: 1px solid rgba(var(--sf-cyan-rgb), .24); clip-path: var(--cut); padding: 30px; }
.panel.lit { box-shadow: inset 0 3px 0 var(--sf-cyan); }
.panel.earned { box-shadow: inset 0 3px 0 var(--sf-gold); }
.panel .stack { height: 100%; }
.push { margin-top: auto; }
.ic { width: 34px; height: 34px; color: var(--sf-cyan); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic.sm { width: 22px; height: 22px; }
.ic.gold { color: var(--sf-gold); }
.ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ticks li { display: flex; align-items: flex-start; gap: 12px; font-weight: 700; color: var(--sf-text-2); }
.ticks .ic { margin-top: 3px; color: var(--sf-good); }

/* Page heroes */
.hero { position: relative; overflow: hidden; }
.hero-in { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); gap: clamp(32px, 5vw, 72px); align-items: center; min-height: 760px; padding-block: 64px 84px; }
.hero-copy { display: flex; flex-direction: column; gap: 24px; align-items: flex-start; position: relative; z-index: 2; }
.page-hero { position: relative; overflow: hidden; border-bottom: 1px solid rgba(var(--sf-cyan-rgb), .15); }
.page-hero-in { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; padding-block: clamp(64px, 7vw, 100px); position: relative; z-index: 2; max-width: min(720px, 56vw); margin-left: 0; }
.slab { position: absolute; top: 0; bottom: 0; right: 0; width: 46%; z-index: 0; pointer-events: none; }
.slab i { position: absolute; inset: 0; clip-path: polygon(24% 0, 100% 0, 100% 100%, 0 100%); }
.slab i:nth-child(1) { background: var(--sf-gold); transform: translateX(-20px); }
.slab i:nth-child(2) { background: var(--sf-void); transform: translateX(-13px); }
.slab i:nth-child(3) { background: var(--sf-cyan); transform: translateX(-8px); }
.slab i:nth-child(4) { background: var(--sf-panel-2); }
.page-hero .slab { width: 38%; }

/* Sample mission */
.tablet { position: relative; z-index: 2; background: var(--sf-void); border: 2px solid var(--sf-line-hi); padding: 12px; clip-path: var(--cut); box-shadow: 0 0 40px rgba(var(--sf-cyan-rgb), .2); }
.screen { background: var(--sf-panel); padding: clamp(18px, 2.2vw, 30px); display: flex; flex-direction: column; gap: 20px; min-height: 480px; }
.screen-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.points { display: inline-flex; align-items: center; gap: 8px; font-family: var(--sf-font-display); font-size: 24px; color: var(--sf-gold); }
.prompt { font-size: clamp(24px, 2.2vw, 30px); line-height: 1.25; font-weight: 800; color: var(--sf-text); }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tile { aspect-ratio: 1 / 1; min-height: 88px; display: grid; place-items: center; background: var(--sf-deep); color: var(--sf-cyan); cursor: pointer; box-shadow: inset 0 0 0 2px var(--sf-line-hi); clip-path: var(--cut); padding: 12%; transition: background .15s, box-shadow .15s; }
.tile:hover { background: var(--sf-panel-2); color: var(--sf-cyan); box-shadow: inset 0 0 0 2px var(--sf-cyan); }
.tile svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tile.tried, .tile.tried:hover { background: var(--sf-deep); color: var(--sf-muted); box-shadow: inset 0 0 0 2px var(--sf-line); opacity: .7; }
.tile.right, .tile.right:hover { color: var(--sf-good); box-shadow: inset 0 0 0 2px var(--sf-good); background: rgba(var(--sf-good-rgb), .12); }
.feedback { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 24px; font-weight: 800; color: var(--sf-text-2); }
.feedback.win { color: var(--sf-good); }

/* Small pictures */
.vis { position: relative; height: 190px; display: grid; place-items: center; background: var(--sf-deep); overflow: hidden; }
.brackets { --c: var(--sf-cyan); background:
  linear-gradient(var(--c), var(--c)) top left / 18px 2px no-repeat, linear-gradient(var(--c), var(--c)) top left / 2px 18px no-repeat,
  linear-gradient(var(--c), var(--c)) top right / 18px 2px no-repeat, linear-gradient(var(--c), var(--c)) top right / 2px 18px no-repeat,
  linear-gradient(var(--c), var(--c)) bottom left / 18px 2px no-repeat, linear-gradient(var(--c), var(--c)) bottom left / 2px 18px no-repeat,
  linear-gradient(var(--c), var(--c)) bottom right / 18px 2px no-repeat, linear-gradient(var(--c), var(--c)) bottom right / 2px 18px no-repeat,
  var(--sf-deep); }
.uv { font-size: 84px; font-weight: 800; color: var(--sf-cyan); text-shadow: 0 0 24px rgba(var(--sf-cyan-rgb), .8); }
.uv-beam { position: absolute; width: 190px; height: 190px; border-radius: 50%; background: radial-gradient(circle, rgba(var(--sf-cyan-rgb), .3), transparent 70%); }
.letters { display: flex; gap: 10px; }
.letter { width: 66px; height: 76px; display: grid; place-items: center; background: var(--sf-panel-2); border: 2px solid var(--sf-cyan); clip-path: var(--cut-btn); font-size: 42px; font-weight: 800; color: var(--sf-text); }
.step-no { font-family: var(--sf-font-display); font-size: 46px; line-height: 1; color: var(--sf-cyan); }

/* Rewards */
.medals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.medal { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 18px 8px; background: var(--sf-deep); clip-path: var(--cut-btn); font-weight: 800; }
.medal svg { width: 64px; height: 64px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.medal.b { color: var(--medal-bronze); } .medal.s { color: var(--medal-silver); } .medal.g { color: var(--sf-gold); }
.stat-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; border-top: 1px solid rgba(var(--sf-cyan-rgb), .18); font-weight: 700; color: var(--sf-text-2); }
.stat-row b { font-family: var(--sf-font-display); font-weight: 400; color: var(--sf-gold); font-size: 22px; }
.stat-name { font-weight: 800; font-size: 20px; color: var(--sf-text); text-align: right; }
.code { font-family: var(--sf-font-code); font-size: 28px; letter-spacing: 2px; color: var(--sf-text); }

/* Radar */
.radar { position: relative; width: min(100%, 460px); aspect-ratio: 1 / 1; margin: 0 auto; border-radius: 50%; border: 2px solid rgba(var(--sf-cyan-rgb), .75); overflow: hidden;
  background: repeating-radial-gradient(circle, transparent 0 58px, rgba(var(--sf-cyan-rgb), .2) 58px 59px), var(--sf-deep); }
.radar::before { content: ""; position: absolute; inset: 0; background: conic-gradient(from 0deg, rgba(var(--sf-cyan-rgb), .42), transparent 26%); animation: sf-spin 4.5s linear infinite; }
.radar b { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--sf-cyan); box-shadow: 0 0 12px var(--sf-cyan); }

/* FAQ */
.faq { border-top: 1px solid rgba(var(--sf-cyan-rgb), .22); }
.faq details { border-bottom: 1px solid rgba(var(--sf-cyan-rgb), .22); padding-block: 18px; }
.faq summary { cursor: pointer; font-weight: 800; font-size: 20px; color: var(--sf-text); }
.faq p { margin-top: 10px; color: var(--sf-text-2); }


/* Closing call to action */
.cta { position: relative; text-align: center; overflow: hidden; border-top: 1px solid rgba(var(--sf-cyan-rgb), .22); background: radial-gradient(ellipse 60% 80% at 50% 40%, var(--sf-glow-top), transparent 75%); }
.cta-in { display: flex; flex-direction: column; align-items: center; gap: 24px; padding-block: clamp(64px, 7vw, 96px); }

/* Footer */
.foot { position: relative; background: rgba(var(--sf-void-rgb), .92); border-top: 3px solid var(--sf-cyan); padding-block: 52px 32px; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, .7fr)); gap: 36px; }
.foot-h { font-family: var(--sf-font-hud); font-size: 14px; letter-spacing: 3px; text-transform: uppercase; color: var(--sf-cyan); margin: 0 0 12px; font-weight: 400; line-height: 1.3; }
.foot-cta { margin-top: 14px; }
.foot-links { display: flex; flex-direction: column; gap: 4px; }
.foot-links a { color: var(--sf-text-2); text-decoration: none; font-weight: 700; padding-block: 5px; }
.foot-links a:hover { color: var(--sf-cyan); }
.legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(var(--sf-cyan-rgb), .18); font-size: 15px; color: var(--sf-muted); }

@keyframes sf-spin { to { transform: rotate(360deg); } }
.in { animation: sf-in .45s ease-out both; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

@media (max-width: 1120px) {
  .nav-links { order: 3; width: 100%; margin-left: 0; overflow-x: auto; gap: 22px; }
  .nav-cta { margin-left: auto; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 920px) {
  .hero-in, .split { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .g3 { grid-template-columns: minmax(0, 1fr); }
  .slab { width: 100%; opacity: .35; }
  .page-hero .slab { display: none; }
  .page-hero-in { max-width: none; }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .g2, .g4 { grid-template-columns: minmax(0, 1fr); }
  .nav .sf-logo { height: 48px; }
  .signin { display: none; }
  .panel { padding: 24px; }
  .btn-gold { padding: 0 26px; font-size: 19px; }
}
