/* ==========================================================================
   AOPA Sweepstakes — Piper Archer Landing Page
   ========================================================================== */

:root {
  --navy: #04213e;
  --navy-hover: #03192f;
  --red: #ef4136;
  --red-hover: #d7382e;
  --teal: #3c8e9f;
  --teal-hover: #2c6c79;
  --lime: #cfe535;
  --lime-header: #c2ce4e;
  --sky-wash: #d4effb;
  --sky-wash-pale: #eef8fd;
  --muted-blue: #9fb2c2;
  --table-line: #04213e;
  --font-display: 'Oswald', Arial, sans-serif;
  --font-body: 'Inter', Arial, sans-serif;
  --max-width: 1140px;
  --card-shadow: 0 10px 26px rgba(4, 33, 62, 0.18);
}

/* ---------- Reset & base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: #142239;
  background: #ffffff;
  line-height: 1.55;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--teal);
}

a:hover {
  color: var(--teal-hover);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 14px;
  padding: 12px 26px;
  border-radius: 999px; /* pill shape, matches hero CTA */
  text-decoration: none;
  border: 2px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease,
    box-shadow 0.15s ease, transform 0.15s ease;
}

.btn:hover,
.btn:active {
  transform: translateY(-2px); /* same lift as hero CTA */
}

.btn-red {
  background: var(--red);
  color: #ffffff;
}
.btn-red:hover {
  background: var(--red-hover);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(239, 65, 54, 0.35);
}

.btn-navy {
  background: var(--navy);
  color: #ffffff;
}
.btn-navy:hover {
  background: var(--navy-hover);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(4, 33, 62, 0.35);
}

.btn-lime {
  background: var(--lime);
  color: var(--navy);
}
.btn-lime:hover {
  background: var(--navy-hover);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(4, 33, 62, 0.35);
}

.alt-entry-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Mosaic decoration (shared symbol, reused via <use>) ---------- */

.mosaic-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.mosaic {
  position: absolute;
  pointer-events: none;
  z-index: 1; /* always behind foreground content (z-index 2), never covers text */
  overflow: hidden; /* clip instead of bleeding into content when a section is short */
}

.mosaic svg {
  display: block;
  width: 100%;
  height: 100%;
}

.mosaic--hero {
  top: -90px;
  right: -130px;
  width: 820px;
  height: 517px;
  opacity: 0.75;
  transform: rotate(180deg);
}

.mosaic--entry {
  top: -60px;
  left: -90px;
  width: 510px;
  height: 321px;
  opacity: 0.9;
  transform: scaleY(-1);
}

.mosaic--grand {
  right: -90px;
  bottom: -90px;
  width: 700px;
  height: 441px;
  opacity: 0.95;
  transform: scaleX(-1);
}

.mosaic--footer {
  bottom: -16px;
  right: -30px;
  width: 320px;
  height: 202px;
  opacity: 0.9;
  transform: scaleX(-1);
}

/* Scale mosaics down at each existing breakpoint so they stay decorative
   corner accents instead of growing to cover headlines/copy/buttons as
   the viewport narrows. Sizes shrink roughly in step with the container. */

@media (max-width: 900px) {
  .mosaic--grand {
    width: 420px;
    height: 265px;
    right: -50px;
    bottom: -50px;
  }
}

@media (max-width: 780px) {
  .mosaic--hero {
    width: 460px;
    height: 290px;
    top: -50px;
    right: -80px;
  }
  .mosaic--entry {
    width: 330px;
    height: 209px;
    top: -36px;
    left: -45px;
  }
  .mosaic--grand {
    width: 320px;
    height: 202px;
    right: -40px;
    bottom: -40px;
  }
  .mosaic--footer {
    width: 220px;
    height: 139px;
    bottom: -10px;
    right: -20px;
  }
}

@media (max-width: 520px) {
  .mosaic--hero {
    width: 300px;
    height: 189px;
    top: -30px;
    right: -50px;
  }
  .mosaic--entry {
    width: 240px;
    height: 152px;
    top: -24px;
    left: -30px;
  }
  .mosaic--grand {
    width: 220px;
    height: 139px;
    right: -24px;
    bottom: -24px;
  }
  .mosaic--footer {
    width: 160px;
    height: 101px;
    bottom: -6px;
    right: -12px;
  }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  height: 760px;
}

.hero__layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.4s ease-in-out;
}

.hero__layer.is-active {
  opacity: 1;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(4, 33, 62, 0.72) 0%,
    rgba(4, 33, 62, 0.45) 45%,
    rgba(4, 33, 62, 0.82) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
}

.hero__logo {
  position: relative;
  width: 760px;
  max-width: 96%;
  margin: 0 auto 20px;
  filter: brightness(0) invert(1) drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45));
}

.hero__logo svg {
  display: block;
  width: 100%;
  height: auto;
}

.hero__headline {
  margin: 4px 0 34px;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: #ffffff;
  font-size: clamp(14px, 2.1vw, 23px);
  line-height: 1.2;
  max-width: 760px;
}

.hero__headline .accent {
  color: var(--lime);
}

.hero__cta {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid var(--lime);
  border-radius: 999px;
  background: transparent;
  color: var(--lime);
  margin-top: 4px;
  padding: 22px 70px;
  font-size: 24px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease,
    color 0.15s ease;
}

.hero__cta:hover,
.hero__cta:active {
  background: var(--lime);
  color: var(--navy);
  transform: translateY(-2px);
}

/* ---------- Entry Methods ---------- */

.entry-methods {
  padding: 56px 0 24px;
  position: relative;
  background: #ffffff;
  overflow: hidden;
}

.entry-methods__video-wrap {
  margin: 0 auto 44px;
  display: flex;
  justify-content: center;
}

.entry-methods__video {
  width: 100%;
  max-width: 900px;
  aspect-ratio: 647 / 175;
}

.entry-methods__video video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.entry-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.entry-card {
  position: relative;
  border-top: 5px solid var(--red);
  border-radius: 6px;
  padding: 26px 26px 108px;
  display: flex;
  flex-direction: column;
  text-align: left;
  box-shadow: var(--card-shadow);
  background-color: var(--sky-wash-pale);
}

.entry-card--teal {
  border-top-color: var(--teal);
}

.entry-card--lime {
  border-top-color: var(--lime);
}

.entry-card__title {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: 0.01em;
  color: var(--navy);
}

.entry-card__subtitle {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy);
  margin-top: 3px;
}

.entry-card__body {
  margin: 10px 0 20px;
  font-size: 15px;
  color: var(--navy);
  flex-grow: 1;
}

.entry-card__footer {
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: 26px;
}

.entry-card__alt {
  display: block;
  height: 1.4em;
  line-height: 1.4em;
  margin-top: 10px;
  overflow: hidden;
}

.legal-fineprint {
  font-size: 12px;
  line-height: 1.6;
  color: rgba(4, 33, 62, 0.72);
  max-width: 1000px;
  margin: 34px auto 0;
  padding: 0 24px;
}

.legal-fineprint a {
  color: var(--navy);
}

.legal-fineprint--footer {
  color: var(--muted-blue);
  margin: 28px auto 0;
}

.legal-fineprint--footer a {
  color: var(--lime);
}

/* ---------- Grand Prize ---------- */

.grand-prize {
  position: relative;
  background: var(--navy);
  color: #ffffff;
  overflow: hidden;
  padding: 72px 0;
  margin-top: 56px;
}

.grand-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.grand-prize__eyebrow {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lime);
  font-size: 15px;
}

.grand-prize__subtitle {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin: 8px 0 18px;
  color: #ffffff;
  font-size: 15px;
}

.grand-prize__headline {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin: 0 0 18px;
  color: #ffffff;
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.12;
}

.grand-prize__headline .accent {
  color: var(--red);
}

.grand-prize__copy {
  color: #c9d8e6;
  font-size: 15.5px;
  margin: 0;
}

.grand-prize__cta {
  margin-top: 26px;
}

.grand-prize__art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.grand-prize__clouds {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.9;
  animation: cloud-drift-slow 22s ease-in-out infinite alternate;
  pointer-events: none;
}

.grand-prize__plane {
  position: relative;
  width: 130%;
  max-width: none;
  display: block;
  animation: archer-drift 9s ease-in-out infinite;
}

@keyframes archer-drift {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(10px, -12px) rotate(1deg);
  }
  50% {
    transform: translate(-8px, 4px) rotate(-0.8deg);
  }
  75% {
    transform: translate(-12px, -8px) rotate(0.6deg);
  }
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
}

@keyframes cloud-drift-slow {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-40px);
  }
}

/* ---------- Prize table ---------- */

.prizes {
  padding: 72px 0;
  position: relative;
  background-color: var(--sky-wash-pale);
}

.prizes__intro {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 34px;
}

.prizes__eyebrow {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  font-size: 15px;
  margin-bottom: 6px;
}

.prizes__headline {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--navy);
  font-size: clamp(24px, 3vw, 34px);
  margin: 0;
}

/* Marquee */

.marquee {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto 48px;
  overflow: hidden;
}

.marquee__track {
  display: flex;
  width: max-content;
  gap: 24px;
  animation: prize-marquee 26s linear infinite;
}

@keyframes prize-marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.marquee__slide {
  flex: 0 0 auto;
  width: 160px;
  height: 160px;
  border-radius: 10px;
  overflow: hidden;
}

.marquee__slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Table */

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  /* soft edge fade hints that there's more table to scroll to on narrow screens */
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0,
    #000 16px,
    #000 calc(100% - 16px),
    transparent 100%
  );
  mask-image: linear-gradient(
    90deg,
    transparent 0,
    #000 16px,
    #000 calc(100% - 16px),
    transparent 100%
  );
}

.prize-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 15px;
  border-radius: 8px;
  overflow: hidden;
}

.prize-table th {
  color: var(--lime-header);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 20px;
  text-align: left;
  padding: 14px 20px;
}

.prize-table th:not(:first-child) {
  border-left: 1px solid rgba(255, 255, 255, 0.25);
}

.prize-table td {
  padding: 14px 20px;
  border-bottom: 1.5px solid var(--table-line);
}

.prize-table tr:last-child td {
  border-bottom: none;
}

.prize-table td:first-child {
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
}

.prize-table td:not(:first-child) {
  border-left: 1.5px solid var(--table-line);
}

.prize-table td.prize-table__winners {
  color: var(--teal);
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- Contributors ---------- */

.contributors {
  padding: 56px 0;
  background-color: var(--sky-wash-pale);
}

.contributors__heading {
  text-align: center;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 14px;
  color: var(--navy);
  margin: 0 0 30px;
}

.contrib-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 28px 40px;
  width: 100%;
}

.contrib-logos img {
  flex: 0 1 auto;
  height: 44px;
  width: auto;
  filter: brightness(0) saturate(100%) invert(9%) sepia(59%) saturate(2245%)
    hue-rotate(196deg) brightness(93%) contrast(96%);
  opacity: 0.55;
}

.contrib-logos img.logo-redbird {
  height: 60px;
  width: 120px;
}

.contrib-logos img.logo-breitling {
  height: 64px;
}

.contrib-logos img.logo-siriusxm {
  height: auto;
  width: 190px; /* very wide "landscape" lockup — matched by width, not height,
                   so it reads at the same visual scale as the squarer logos
                   instead of the ~390px it'd be at a matching 44px height */
}

/* ---------- Footer ---------- */

.site-footer {
  position: relative;
  background: var(--navy);
  color: #c9d8e6;
  overflow: hidden;
  padding: 56px 0 40px;
  text-align: center;
}

.site-footer__headline {
  color: #ffffff;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  font-size: 26px;
  margin: 0 0 18px;
}

.site-footer__watermark {
  margin-top: 40px;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
  filter: brightness(0) invert(1);
  opacity: 0.15;
  display: block;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .grand-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .grand-grid > .grand-prize__copy-col {
    order: 2;
    text-align: center;
  }
  .grand-grid > .grand-prize__art {
    order: 1;
    height: 260px;
  }
}

@media (max-width: 780px) {
  .hero {
    height: 640px;
  }
  .entry-cards {
    grid-template-columns: 1fr;
  }
  .contrib-logos {
    gap: 22px 30px;
  }
  .prize-table {
    min-width: 460px;
    font-size: 14px;
  }
  .prize-table th {
    font-size: 16px;
    padding: 12px 16px;
  }
  .prize-table td {
    padding: 12px 16px;
  }
}

@media (max-width: 520px) {
  .hero {
    height: 560px;
  }
  .hero__cta {
    padding: 16px 40px;
    font-size: 18px;
  }
  .marquee__slide {
    width: 120px;
    height: 120px;
  }
  .prize-table {
    min-width: 360px;
    font-size: 12.5px;
  }
  .prize-table th {
    font-size: 13px;
    letter-spacing: 0.02em;
    padding: 10px 12px;
  }
  .prize-table td {
    padding: 10px 12px;
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .hero__layer,
  .hero__cta,
  .grand-prize__plane,
  .grand-prize__clouds,
  .marquee__track {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- Focus visibility ---------- */

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 2px;
}
