/* skirmforge.com: Skirmforge's own layer over the ASL art kit (asl-design-system.css, assets/asl-ambient.css).
   The kit gives the navy / steel / electric-blue system, the top bar, panels, buttons and the splash band; this file
   adds the forge accent, the splash's entrance, the model turntables and the pack cards. */
:root {
  --ember: #ff8a2a;
  --ember-hot: #ffd27a;
  --forge-glow: rgba(255, 138, 42, .55);
  --render-bg: #060912;
}

/* The EN | ES switch: always in the top bar, beside the menu links on wide screens and beside the Menu button when
   the menu folds away, so the other language is one tap away everywhere. */
.lang-switch {
  display: inline-flex; align-items: center; gap: 2px; padding: 3px;
  margin-left: auto; flex: none;
  border: 1px solid rgba(76, 154, 255, .35); border-radius: 999px;
  background: rgba(9, 22, 46, .55);
}
.lang-switch a {
  padding: .32rem .62rem; border-radius: 999px;
  font-size: .78rem; font-weight: 800; letter-spacing: .06em; line-height: 1;
  color: var(--muted, #9fb0c8); text-decoration: none;
}
.lang-switch a:hover { color: #fff; }
.lang-switch a[aria-current="page"] { color: #fff; background: linear-gradient(180deg, rgba(76, 154, 255, .45), rgba(46, 107, 255, .3)); }
.topbar .lang-switch ~ .nav { margin-left: .5rem; }
.topbar .lang-switch ~ .nav-toggle { margin-left: .5rem; }
/* The smallest phones: the mark alone, so the mark, the switch and the Menu button share one row. */
@media (max-width: 360px) { .topbar .brand b { display: none; } }

/* Brand: the hex-and-anvil mark and the word. */
.topbar .brand img { width: 34px; height: 34px; }
.topbar .brand b { letter-spacing: .02em; }
.brand-word { font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

/* Splash: the ChatGPT key art sits right, the forge animation runs over it. */
.sf-hero h1 {
  font-size: clamp(2.4rem, 5.2vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -.02em;
  background: linear-gradient(180deg, #ffffff 0%, #dfe8f7 55%, #9fbcf0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  max-width: 13ch;
}
.sf-hero h1 em { font-style: normal; background: linear-gradient(180deg, var(--ember-hot), var(--ember) 70%, #e2550f); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sf-hero .lede { max-width: 54ch; }
.sf-hero .hero-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; max-width: 46rem; }
.sf-hero .hero-metric span { display: block; max-width: 22ch; }
@media (max-width: 640px) { .sf-hero .hero-metrics { grid-template-columns: 1fr; gap: .9rem; } }
.sf-hero .pill-ember { border-color: rgba(255, 138, 42, .45); color: #ffd9b0; background: rgba(255, 138, 42, .08); }
.forge-glow {
  position: absolute;
  z-index: 2;
  left: calc(104% - .45 * var(--asl-splash-h));
  top: calc(.29 * var(--asl-splash-h));
  width: calc(.55 * var(--asl-splash-h));
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 196, 120, .55) 0%, rgba(255, 138, 42, .22) 30%, rgba(255, 110, 30, 0) 66%);
  mix-blend-mode: screen;
  pointer-events: none;
  opacity: .55;
}
/* The splash art, one asset per screen class (a <picture>: a phone crop, then 1024 to 3072 pixels wide). On tablets
   and desktops it fills the splash band's height from the right, as the kit draws it; on phones the emblem crop fills
   the band's width. */
.sf-hero .hero-bg picture { position: absolute; inset: 0; display: block; }
main .sf-hero.asl-splash > .hero-bg > picture > img[width][height] {
  position: absolute; top: 0; right: -4%; left: auto;
  height: 100%; width: auto; max-width: none;
  transform: none; opacity: .8;
}
/* Phones (the emblem crop) and tablets (the full art) fill the band's width, in a taller band than the kit's
   17.5rem so the emblem and the battlefield under it both show; the words start where the art fades out. */
@media (max-width: 800px) {
  :root { --asl-splash-h: 22rem; }
  main .sf-hero.asl-splash { padding-top: 18.5rem !important; }
  main .sf-hero.asl-splash > .hero-bg > picture > img[width][height] {
    left: 0; right: 0; width: 100%; height: var(--asl-splash-h);
    object-fit: cover; object-position: 52% 22%; opacity: .96;
  }
  .sf-hero > .hero-bg::before {
    background: linear-gradient(180deg, rgba(4, 9, 20, .05) 0, rgba(4, 9, 20, .05) 55%, rgba(4, 9, 20, .82) 88%, rgba(4, 9, 20, .9) 100%);
  }
  .forge-glow { left: 54.6%; top: 6.6rem; width: 10rem; }
}
@media (min-width: 520px) and (max-width: 800px) {
  :root { --asl-splash-h: 28rem; }
  main .sf-hero.asl-splash { padding-top: 24rem !important; }
  main .sf-hero.asl-splash > .hero-bg > picture > img[width][height] { object-position: 70% 30%; }
  .forge-glow { left: 70%; top: 8rem; width: 13rem; }
}

/* Large, ultrawide and 4K screens: a taller splash (up to three quarters of the window), a wider column and larger
   type, so the art, the animation and the words keep their proportions instead of shrinking into the middle. */
@media (min-width: 1600px) {
  :root { --asl-splash-h: clamp(34rem, min(38vw, 74vh), 90rem); }
  .sf-hero { padding-top: clamp(5rem, 9vh, 10rem); }
  .sf-hero h1 { font-size: clamp(4.4rem, 3.6vw, 7rem); }
  .sf-hero .lede { font-size: clamp(1.14rem, .9vw, 1.6rem); }
}
@media (min-width: 2200px) {
  html { font-size: 112.5%; }
  :root { --shell: 1640px; }
}
@media (min-width: 3000px) {
  html { font-size: 125%; }
  :root { --shell: 1960px; }
}

/* The entrance: the art comes up out of the dark, the forge ignites, the words rise in turn. */
@media (prefers-reduced-motion: no-preference) {
  /* Opacity and scale only, on the picture: a filter on a 3072-pixel image stalled software rendering. */
  .sf-hero .hero-bg > picture { animation: sf-art-in 1.9s cubic-bezier(.2, .7, .2, 1) both; transform-origin: 80% 40%; }
  .forge-glow { animation: sf-ignite 2.2s cubic-bezier(.2, .8, .2, 1) .5s both, sf-breathe 5.5s ease-in-out 2.7s infinite; }
  .sf-hero .hero-split > div > * { animation: sf-rise .9s cubic-bezier(.2, .7, .2, 1) both; }
  .sf-hero .hero-split > div > :nth-child(1) { animation-delay: .15s; }
  .sf-hero .hero-split > div > :nth-child(2) { animation-delay: .3s; }
  .sf-hero .hero-split > div > :nth-child(3) { animation-delay: .45s; }
  .sf-hero .hero-split > div > :nth-child(4) { animation-delay: .6s; }
  .sf-hero .hero-split > div > :nth-child(5) { animation-delay: .75s; }
  .sf-hero .hero-split > div > :nth-child(6) { animation-delay: .9s; }
}
@keyframes sf-art-in { from { opacity: 0; scale: 1.06; } to { opacity: 1; scale: 1; } }
@keyframes sf-ignite { 0% { opacity: 0; scale: .2; } 45% { opacity: 1; scale: 1.25; } 100% { opacity: .55; scale: 1; } }
@keyframes sf-breathe { 0%, 100% { opacity: .55; scale: 1; } 50% { opacity: .8; scale: 1.08; } }
@keyframes sf-rise { from { opacity: 0; translate: 0 18px; } to { opacity: 1; translate: 0 0; } }

/* Section heads with an ember rule. */
.sf-rule { display: inline-block; vertical-align: top; width: 3.2rem; height: 3px; border-radius: 3px; margin: 0 0 1rem; background: linear-gradient(90deg, var(--ember), rgba(46, 107, 255, .9)); }

/* Turntables: 36 frames of a model drawn by Skirmforge's engine, on the renderer's own background colour. */
.models-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 1100px) { .models-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .models-grid { grid-template-columns: 1fr; } }
.model-card {
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  background: var(--render-bg);
  border: 1px solid rgba(76, 154, 255, .2);
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .05);
  transition: border-color .25s ease, transform .25s ease;
}
.model-card:hover { border-color: rgba(255, 138, 42, .45); transform: translateY(-3px); }
.turntable {
  position: relative;
  aspect-ratio: 1;
  background-color: var(--render-bg);
  cursor: grab;
  touch-action: pan-y;
  outline-offset: -3px;
}
/* The current frame and the next one; the script fades the second in as the model turns. */
.tt-layer { position: absolute; inset: 0; background-repeat: no-repeat; pointer-events: none; }
.turntable:active { cursor: grabbing; }
.turntable > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.turntable.is-live > img { visibility: hidden; }
.turntable::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background: radial-gradient(70% 60% at 50% 100%, rgba(46, 107, 255, .14), transparent 70%);
}
.model-card figcaption { padding: .85rem 1rem 1rem; border-top: 1px solid rgba(76, 154, 255, .14); }
.model-card figcaption b { display: block; color: #fff; font-size: 1rem; }
.model-card figcaption span { color: var(--muted, #9fb0c8); font-size: .88rem; }
.drag-hint { color: var(--muted, #9fb0c8); font-size: .85rem; margin-top: .9rem; }

/* Feature panels with a small numbered badge. */
.feature-num {
  display: inline-grid; place-items: center;
  width: 2rem; height: 2rem; margin-bottom: .7rem;
  border-radius: 10px;
  font-weight: 800; font-size: .85rem;
  color: #ffe2c2;
  background: linear-gradient(180deg, rgba(255, 138, 42, .35), rgba(255, 138, 42, .1));
  border: 1px solid rgba(255, 138, 42, .45);
}

/* Art pack cards. */
.packs-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 1100px) { .packs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .packs-grid { grid-template-columns: 1fr; } }
.pack-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.pack-card > img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; background: var(--render-bg); }
.pack-card .pack-body { display: flex; flex-direction: column; gap: .35rem; padding: 1rem 1.1rem 1.15rem; flex: 1; }
.pack-card h3 { margin: 0; font-size: 1.08rem; }
.pack-card p { margin: 0; }
.pack-card .pack-price { margin-top: auto; padding-top: .6rem; display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.pack-card .pack-price b { color: #fff; font-size: 1.15rem; }
.pack-soon { color: #ffd9b0; font-weight: 700; }

/* The Features section stands on the Codex hex floor: the grid fades in from the bottom, under the panels. */
.sf-art-section { position: relative; isolation: isolate; overflow: hidden; }
.sf-art-section > .section-art { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.sf-art-section > .section-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; opacity: .75; }
.sf-art-section > .section-art::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(4, 9, 20, .92) 0%, rgba(4, 9, 20, .55) 45%, rgba(4, 9, 20, .15) 100%);
}

/* The closing band: the three-worlds battlefield from Codex behind it, laid out like the splash (art right, words on
   the dark left), with the band's light animation over the art. One art file per screen class. */
.ctaband.sf-band-art {
  min-height: clamp(22rem, 30vw, 36rem);
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  text-align: left; padding: clamp(2rem, 4vw, 4.5rem);
}
.ctaband.sf-band-art > .band-art { position: absolute; inset: 0; z-index: 0; overflow: hidden; border-radius: inherit; }
.ctaband.sf-band-art > .band-art img { width: 100%; height: 100%; object-fit: cover; object-position: 75% 45%; opacity: .9; }
.ctaband.sf-band-art > .band-art::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(4, 9, 20, .96) 0%, rgba(4, 9, 20, .86) 34%, rgba(4, 9, 20, .25) 68%, rgba(4, 9, 20, .08) 100%);
}
.ctaband.sf-band-art > .asl-ambient { z-index: 1; }
.ctaband.sf-band-art > *:not(.asl-ambient):not(.band-art) { position: relative; z-index: 2; max-width: 36rem; }
.ctaband.sf-band-art p { margin-left: 0; margin-right: 0; }
.ctaband.sf-band-art .action-row { justify-content: flex-start; }
@media (max-width: 800px) {
  .ctaband.sf-band-art { min-height: 0; padding-top: clamp(11rem, 44vw, 18rem); }
  .ctaband.sf-band-art > .band-art img { object-position: 70% 0; height: clamp(14rem, 56vw, 22rem); }
  .ctaband.sf-band-art > .band-art::after {
    background: linear-gradient(180deg, rgba(4, 9, 20, .05) 0, rgba(4, 9, 20, .1) clamp(7rem, 30vw, 12rem), rgba(4, 9, 20, .94) clamp(13rem, 54vw, 21rem), rgba(4, 9, 20, .96) 100%);
  }
}

.foot .brand-mark { display: inline-block; width: 22px; height: 22px; vertical-align: -5px; margin-right: .35rem; }
/* The kit's footer stacks its links in columns; this site's footer is two plain lines. */
.foot p a { display: inline; padding: 0; }
