/* ==========================================================================
   SIM MASTER — FIA KODOVI (/fia-kodovi/, /en/fia-kodovi/)
   Each platform is a one-screen media block (video or photo) with copy on
   top, followed by its request form. Scrolls normally like the rest of the
   site.
   ========================================================================== */

/* Partner line: AMSS (member of FIA) badge | Sim Master logo. */
.fia-hero__partners {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 0.6rem + 1vw, 1.5rem);
  margin: 0 0 var(--space-md);
  padding: 0;
  list-style: none;
}

.fia-hero__partners li {
  display: flex;
}

.fia-hero__amss {
  width: auto;
  height: clamp(3.25rem, 2.6rem + 1.6vw, 4.5rem);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.fia-hero__sm {
  width: auto;
  height: clamp(3.25rem, 2.6rem + 1.6vw, 4.5rem);
}

.fia-hero__sep {
  align-self: stretch;
  width: 1px;
  margin-block: 0.4rem;
  background: var(--line-strong);
}


/* ------------------------------------------------------ full-screen block */

.fia-show {
  position: relative;
  z-index: 0;
  --fia-head: var(--header-h-actual, var(--header-h));
  display: flex;
  align-items: center;
  min-height: calc(100svh - var(--fia-head));
  overflow: hidden;
  isolation: isolate;
  background: var(--surface-void);
}

.fia-show__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.fia-show__video,
.fia-show__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Dark from the bottom-left so the copy always reads, like a broadcast. */
.fia-show__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 3, 5, 0.82) 0%, rgba(0, 3, 5, 0.45) 45%, rgba(0, 3, 5, 0.1) 75%),
    linear-gradient(0deg, rgba(0, 3, 5, 0.85) 0%, transparent 45%);
  pointer-events: none;
}

.fia-show__placeholder {
  display: grid;
  place-items: center;
  height: 100%;
  background:
    repeating-linear-gradient(135deg, transparent 0 18px, var(--line-faint) 18px 19px),
    radial-gradient(80% 60% at 70% 40%, rgba(232, 19, 14, 0.12), transparent 70%),
    var(--surface-inset);
}

.fia-show__placeholder .fia-placeholder {
  width: auto;
  height: auto;
  padding: 1rem 1.5rem;
  margin-left: 30%;
}

.fia-show__inner {
  width: 100%;
  padding-block: clamp(1.5rem, 4vh, 3.5rem);
}

.fia-show__brand {
  display: flex;
  align-items: center;
  margin-bottom: clamp(0.75rem, 2.5vh, 1.5rem);
}

.fia-show__brand img {
  width: auto;
  height: clamp(1.75rem, 5vh, 3rem);
}

.fia-show__brand .fia-placeholder {
  width: 15rem;
  max-width: 100%;
}

.fia-show__title {
  max-width: 14ch;
  margin: 0 0 var(--space-sm);
  font-family: var(--font-display);
  /* Scales with the window height too, so the copy never spills past it. */
  font-size: clamp(2.2rem, min(1.2rem + 4vw, 9vh), 5rem);
  font-weight: 800;
  line-height: 0.95;
  text-transform: uppercase;
  color: var(--text-warm);
  text-wrap: balance;
}

.fia-show__text {
  max-width: min(32rem, 40vw);
  margin: 0 0 clamp(0.75rem, 2.5vh, 1.5rem);
  font-size: clamp(1rem, min(0.95rem + 0.3vw, 2.2vh), 1.15rem);
  color: rgba(244, 247, 248, 0.82);
}

.fia-show__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm) var(--space-md);
  margin-top: clamp(1rem, 3vh, 2rem);
}

.fia-show__badge {
  font-family: var(--font-mono);
  font-size: var(--fs-mono-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* Placeholder slots until the partner assets arrive. */
.fia-placeholder {
  display: grid;
  place-items: center;
  min-height: 3.5rem;
  padding: var(--space-sm);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: var(--fs-mono-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
}

/* ------------------------------------------------------------ claim panel */

.fia-claim-wrap__inner {
  max-width: 44rem;
}

.fia-claim {
  position: relative;
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(232, 19, 14, 0.1), transparent 60%),
    var(--surface-raised);
  scroll-margin-top: 6rem;
}

.fia-claim::before {
  content: "";
  position: absolute;
  top: -1px;
  left: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  width: 3.5rem;
  height: 3px;
  background: var(--action);
}

.fia-claim__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.fia-claim__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  color: var(--text-warm);
}

.fia-claim__sub {
  margin: 0.4rem 0 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.fia-claim__consent {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin-top: var(--space-md);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.fia-claim__consent input {
  margin-top: 0.2rem;
  accent-color: var(--action);
}

.fia-claim__consent a {
  color: var(--text-primary);
}

.fia-claim__actions {
  display: flex;
  margin-top: var(--space-md);
}

.fia-claim__actions .btn {
  flex: 1 1 auto;
}

.fia-claim__status {
  margin: var(--space-sm) 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.fia-claim__status:empty {
  display: none;
}

.fia-claim__status[data-kind="success"],
.fia-claim__status[data-kind="error"] {
  padding: var(--space-sm) var(--space-md);
  border-left: 3px solid #2fbf71;
  background: rgba(47, 191, 113, 0.1);
  color: var(--text-warm);
}

.fia-claim__status[data-kind="error"] {
  border-left-color: #e8130e;
  background: rgba(232, 19, 14, 0.1);
}

/* ------------------------------------------------------------------ steps */

.fia-pool__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.4rem + 2.2vw, 3rem);
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  color: var(--text-warm);
}

.fia-steps {
  display: grid;
  gap: var(--space-md);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: fia-step;
}

@media (min-width: 48rem) {
  .fia-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.fia-steps li {
  counter-increment: fia-step;
  padding: var(--space-md);
  border: 1px solid var(--line-faint);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
  color: var(--text-secondary);
}

.fia-steps li::before {
  content: counter(fia-step, decimal-leading-zero);
  display: block;
  margin-bottom: 0.5rem;
  font-family: var(--font-numeric);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--action-text);
}

.fia-steps strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--text-warm);
}


/*
  Track Titan: the partnership artwork has its own big headline, so it is
  shown whole (never cropped) on the right at full section height. A blurred,
  darkened copy of the same artwork fills the rest of the section edge to
  edge, so it reads as full screen like the iRacing video, and the left
  column stays dark for our copy.
*/
.fia-show__bg .fia-show__img--right {
  position: absolute;
  top: 0;
  right: 0;
  width: 68%;
  height: 100%;
  object-fit: contain;
  object-position: right center;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 22%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 22%);
}

.fia-show__bg:has(.fia-show__img--right) {
  background: #050302;
  overflow: hidden;
}

.fia-show__bg:has(.fia-show__img--right)::before {
  content: "";
  position: absolute;
  inset: -3rem;
  background: url("../img/fia/fia-track-titan-960.jpg") center / cover no-repeat;
  filter: blur(32px) brightness(0.9) saturate(1.3);
  transform: scale(1.1);
}

.fia-show__bg:has(.fia-show__img--right)::after {
  background:
    linear-gradient(90deg, rgba(5, 3, 2, 0.92) 18%, rgba(5, 3, 2, 0.55) 40%, transparent 62%),
    linear-gradient(0deg, rgba(5, 3, 2, 0.6) 0%, transparent 30%);
}

@media (max-width: 47.99rem) {
  .fia-show__text {
    max-width: none;
  }

  .fia-show__bg .fia-show__img--right {
    width: 100%;
    opacity: 0.35;
    -webkit-mask-image: none;
    mask-image: none;
  }
}

/* ------------------------------------------------- FIA kodovi page hero */

/*
  First screen shows only the hero: it fills the viewport below the race
  banner and header. --fia-hero-top is measured by the page script; the
  fallback roughly matches banner + header.
*/
.fia-hero {
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: calc(100svh - var(--fia-hero-top, 8rem));
}

.fia-hero .page-hero__inner {
  width: 100%;
}

/* The trophy photo fills the right ~70% and fades into the copy column. */
.fia-hero__bg {
  position: absolute;
  inset: 0 0 0 auto;
  width: min(100%, 72%);
  z-index: 0;
}

.fia-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 35% 50%;
}

.fia-hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--surface-base) 0%, rgba(4, 9, 11, 0.6) 30%, rgba(4, 9, 11, 0.1) 70%),
    linear-gradient(0deg, var(--surface-base) 0%, transparent 35%);
}

@media (max-width: 47.99rem) {
  .fia-hero__bg {
    width: 100%;
    opacity: 0.45;
  }
}

/*
  Hide the generic wheel line-art; the trophy photo replaces it here.
  pages.css shows it through `body:not(.article-page) .page-hero::after`
  and similar per-breakpoint rules, so this needs !important to win.
*/
.fia-hero.page-hero::after {
  display: none !important;
  background-image: none !important;
}

.fia-hero .page-hero__inner {
  position: relative;
  z-index: 1;
}

