/* Reset & base */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  font-size: 16px;
}
@media (max-width: 767.98px) {
  html {
    font-size: 15px;
  }
}
@media (min-width: 768px) and (max-width: 1023.98px) {
  html {
    font-size: 15px;
  }
}

:root {
  --c-bg: #0b0f14;
  --c-surface: #0f1622;
  --c-surface-2: #0e141d;
  --c-panel: #121a27;
  --c-border: #233043;
  --c-text: #e6e9ee;
  --c-text-muted: #b4bdc9;
  --c-accent: #7aa2f7; /* soft blue */
  --c-accent-2: #8b5cf6; /* soft purple */
  --c-success: #4cc9a6; /* desaturated teal */
  --c-danger: #ef6b73;
  --shadow-soft: 0 10px 24px rgba(0, 0, 0, 0.35);
  --shadow-strong: 0 22px 60px rgba(0, 0, 0, 0.55);
}

body {
  margin: 0;
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial,
    sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: inherit;
  text-decoration: none;
}

/* Accessibility helpers */
.skiplink {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skiplink:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: 0.5rem 0.75rem;
  background: var(--c-panel);
  color: var(--c-text);
  border-radius: 0.5rem;
  box-shadow: var(--shadow-soft);
}

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

.wrap {
  max-width: 76rem;
  width: 100%;
  padding: 0 1rem;
  margin: 0 auto;
}

/* Buttons */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  color: #0b0f14;
  background: linear-gradient(
    135deg,
    var(--c-accent) 0%,
    var(--c-accent-2) 100%
  );
  box-shadow: 0 6px 22px rgba(122, 162, 247, 0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
@media (hover: hover) {
  .cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(139, 92, 246, 0.35);
    filter: saturate(1.05);
  }
}
.cta:active {
  transform: translateY(0);
}
.cta:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
}

/* Masthead */
.masthead {
  padding: 3rem 0;
  background: linear-gradient(
      180deg,
      rgba(11, 15, 20, 0.88) 0%,
      rgba(17, 24, 35, 0.88) 100%
    ),
    url("../img/bg-new.webp") center/cover no-repeat fixed;
}
@media (max-width: 767.98px) {
  .masthead {
    padding: 1.5rem 0;
    background-attachment: scroll;
  }
}
.masthead__title {
  text-align: center;
  margin: 0 0 1.1rem;
  font-size: clamp(1.8rem, 3.2vw + 1rem, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--c-text);
}
.masthead__title span {
  color: var(--c-accent);
}
.masthead__lead {
  text-align: center;
  font-size: clamp(1rem, 1vw + 0.8rem, 1.35rem);
  font-weight: 400;
  color: var(--c-text-muted);
  max-width: 62ch;
  margin: 0 auto;
}

/* Highlights */
.highlights {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  justify-items: center;
  padding: 0;
}
@media (max-width: 767.98px) {
  .highlights {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 1rem;
  }
}
.highlight {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 14px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
  transition: border-color 0.18s ease, transform 0.18s ease;
}
@media (hover: hover) {
  .highlight:hover {
    border-color: var(--c-accent);
    transform: translateY(-2px);
  }
}
@media (max-width: 767.98px) {
  .highlight {
    width: 32%;
    padding: 0.5rem;
    gap: 0.4rem;
  }
}
.highlight__icon {
  width: 2rem;
  height: 2rem;
  filter: brightness(0.95) contrast(1.05);
}
@media (max-width: 767.98px) {
  .highlight__icon {
    width: 1.2rem;
    height: 1.2rem;
  }
}
.highlight span {
  font-weight: 600;
  color: var(--c-text);
  font-size: 0.95rem;
}
@media (max-width: 767.98px) {
  .highlight span {
    font-size: 0.75rem;
    text-align: center;
  }
}

/* Listings */
.listings {
  padding: 2rem 0;
}
.listings__grid {
  padding: 0;
  display: grid;
  gap: 1.25rem;
}

/* CARD — vertical stack on desktop, compact column on mobile */
.listing-card {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  width: 100%;
  padding: 1.1rem 1.1rem 1.1rem calc(1.1rem + 28px);
  border-radius: 18px;
  background: var(--c-surface);
  box-shadow: var(--shadow-soft);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.listing-card::before {
  /* gradient border via masking */
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: 18px;
  background: linear-gradient(
    135deg,
    rgba(122, 162, 247, 0.65),
    rgba(139, 92, 246, 0.65)
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.listing-card::after {
  /* subtle diagonal pattern */
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.07;
  mix-blend-mode: overlay;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    45deg,
    #fff 0 2px,
    transparent 2px 10px
  );
}
@media (hover: hover) {
  .listing-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-strong);
  }
}

/* Featured label */
.listing-card--prime {
  isolation: isolate;
}
.listing-card--prime::marker {
  content: none;
}
.listing-card--prime::after {
  content: "Editor’s Pick";
  position: absolute;
  top: -11px;
  left: 14px;
  z-index: 2;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(
    135deg,
    var(--c-accent) 0%,
    var(--c-accent-2) 100%
  );
  color: #0b0f14;
  padding: 0.28rem 0.5rem;
  border-radius: 7px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

/* Left ribbon rank (desktop) / Top ribbon (mobile) */
.listing-card__rankbox {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 36px;
}
.listing-card__rankbox::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 0;
  background: linear-gradient(
    180deg,
    rgba(122, 162, 247, 0.25),
    rgba(139, 92, 246, 0.25)
  );
  clip-path: none;
  opacity: 0.35;
}
.listing-card__rank {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  font-size: 1.2rem;
  letter-spacing: 0.01em;
  transform: none;
  opacity: 0.8;
}
@media (max-width: 767.98px) {
  .listing-card {
    padding: 2.3rem 0.65rem 0.65rem 0.65rem;
  }
  .listing-card__rankbox {
    left: 0;
    right: 0;
    top: 0;
    height: 28px;
    width: auto;
    bottom: auto;
  }
  .listing-card__rankbox::before {
    border-radius: 12px 12px 0 0;
    clip-path: polygon(0 0, 100% 0, 50% 100%, 0 100%);
  }
  .listing-card__rank {
    transform: none;
    font-size: 0.9rem;
  }
}

/* Brand row */
.listing-card__brand {
  width: 100%;
  display: grid;
  grid-template-columns: 140px 1fr;
  grid-auto-rows: min-content;
  gap: 0.4rem 1rem;
  align-items: center;
  background: transparent;
  border: 0;
  padding: 0 0 0.75rem;
  border-bottom: 1px solid var(--c-border);
  margin-bottom: 0.75rem;
}
.brandmark {
  width: 140px;
  height: 60px;
  color: var(--c-text);
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
}
.brandmark__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.score {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}
.score__row {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 0.5rem;
}
.score__value {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--c-accent);
}
.score__stars {
  width: 70px;
  height: 12px;
  object-fit: contain;
  filter: brightness(1.1);
}
.score__reviews {
  font-weight: 600;
  color: var(--c-text-muted);
  font-size: 0.82rem;
}
.divider {
  display: none;
}
@media (max-width: 767.98px) {
  .score {
    align-items: center;
  }
  .score__row {
    justify-content: center;
  }
  .score__reviews {
    margin: 0.5rem 0;
  }
  .brandmark {
    margin: 0 auto;
  }
  .listing-card__perks li {
    font-size: 0.9rem;
  }
}

/* Offer medallion row */
.listing-card__offer {
  align-self: center;
  width: 160px;
  height: 160px;
  border-radius: 18px;
  background: radial-gradient(
    100% 100% at 50% 0%,
    rgba(122, 162, 247, 0.18) 0%,
    rgba(17, 24, 35, 0.35) 60%,
    rgba(17, 24, 35, 0.9) 100%
  );
  border: 1px solid var(--c-border);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.45),
    inset 0 10px 28px rgba(122, 162, 247, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  text-align: center;
}
.listing-card__offer span:nth-child(1),
.listing-card__offer span:nth-child(3) {
  font-size: 0.9rem;
  color: var(--c-text-muted);
}
.listing-card__offer span:nth-child(2) {
  font-size: 2rem;
  font-weight: 800;
  color: var(--c-accent);
  letter-spacing: -0.02em;
  text-shadow: 0 2px 10px rgba(122, 162, 247, 0.25);
}
@media (min-width: 768px) and (max-width: 1023.98px) {
  .listing-card__brand {
    grid-template-columns: 120px 180px;
    justify-content: space-between;
  }
  .listing-card__cta {
    margin-top: 0.75rem;
  }
  .score {
    align-items: center;
  }
  .listing-card__offer {
    width: 140px;
    height: 140px;
  }
  .listing-card__offer span:nth-child(2) {
    font-size: 1.6rem;
  }
}
@media (max-width: 767.98px) {
  .listing-card__brand {
    grid-template-columns: 120px 180px;
    justify-content: space-between;
    padding: 0;
  }
  .listing-card__offer {
    width: 140px;
    height: 140px;
  }
  .listing-card__offer span:nth-child(2) {
    font-size: 1.35rem;
  }
}

/* Perks stepper row */
.listing-card__perks {
  position: relative;
  margin-bottom: 0.75rem;
}
.listing-card__perks ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
}

.listing-card__perks li {
  position: relative;
  padding-left: 1.5rem;
  font-weight: 500;
  color: var(--c-text);
}
.listing-card__perks li::before {
  content: "";
  position: absolute;
  left: -0.05rem;
  top: 0.25rem;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: var(--c-accent);
  box-shadow: 0 0 0 4px rgba(122, 162, 247, 0.15);
}
.listing-card__perks img {
  display: none;
}
@media (max-width: 767.98px) {
  .listings {
    padding: 1rem 0;
  }
  .listing-card__perks {
    padding: 0.5rem 0;
    margin-bottom: 0.5rem;
    max-width: 50%;
  }
  .listing-card__perks ul::before {
    left: 0.5rem;
  }
}

/* CTA panel row */
.listing-card__cta {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  justify-content: center;
  padding: 1rem;
  border-radius: 14px;
  background: linear-gradient(
    180deg,
    rgba(35, 48, 67, 0.35),
    rgba(35, 48, 67, 0.05)
  );
  border: 1px solid var(--c-border);
}
.payment-badges {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 0.35rem;
}
.payment-badges img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: grayscale(10%) brightness(1.12);
}
@media (max-width: 767.98px) {
  .listing-card__cta {
    padding: 0.75rem;
    border-radius: 12px;
    margin-top: 0.75rem;
  }
}

/* Info content */
.info {
  padding: 2rem 0;
}
.info__title {
  font-size: clamp(1.25rem, 1.2vw + 1rem, 2rem);
  font-weight: 700;
  margin: 1.25rem 0 0.75rem;
  color: var(--c-text);
}
.info__subtitle {
  font-size: clamp(1.05rem, 1vw + 0.5rem, 1.5rem);
  font-weight: 600;
  margin: 1rem 0 0.5rem;
  color: var(--c-text);
}
.info__text {
  color: var(--c-text-muted);
  margin-bottom: 1rem;
}
.info__list {
  list-style: disc;
  padding-left: 1.25rem;
  margin: 0 0 1rem;
}
.info__list li {
  margin-bottom: 0.5rem;
}
.info__link {
  color: var(--c-accent);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
@media (hover: hover) {
  .info__link:hover {
    color: var(--c-accent-2);
  }
}

/* Tables */
.info__table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0 1rem;
  background: var(--c-panel);
  border: 1px solid var(--c-border);
  border-radius: 10px;
  overflow: hidden;
}
.info__table th,
.info__table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--c-border);
}
.info__table thead th {
  background: var(--c-surface-2);
  color: var(--c-text);
  font-weight: 700;
}
@media (max-width: 600px) {
  .info {
    padding: 1rem 0;
  }
  .info__table {
    display: block;
    overflow-x: auto;
  }
  .info__table th,
  .info__table td {
    min-width: 140px;
    font-size: 0.9rem;
  }
}

/* Footer */
.sitefoot {
  padding: 2rem 0;
  border-top: 1px solid var(--c-border);
  background: linear-gradient(
    180deg,
    rgba(17, 24, 35, 0.3) 0%,
    rgba(11, 15, 20, 1) 100%
  );
}
.sitefoot__grid {
  display: grid;
  gap: 2rem;
}

.notice__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.notice__text {
  color: var(--c-text-muted);
}
.notice__text + .notice__text {
  margin-top: 0.5rem;
}

.trustmarks {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}
.trustmarks__link {
  display: inline-flex;
  padding: 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--c-border);
  background: var(--c-panel);
}
.trustmarks__link img {
  width: 140px;
  height: 46px;
  object-fit: contain;
}
.trustmarks__link:first-child img {
  width: 46px;
  height: 46px;
}

.footlinks {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}
.footlinks__link {
  color: var(--c-accent);
}
@media (hover: hover) {
  .footlinks__link:hover {
    color: var(--c-accent-2);
    text-decoration: underline;
    text-underline-offset: 3px;
  }
}

/* Utilities & responsive */
@media (max-width: 767.98px) {
  .listings__grid {
    gap: 0.75rem;
  }
}

/* Focus states for links */
a:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* Desktop compact card layout */
@media (min-width: 1024px) {
  .listings__grid {
    gap: 1rem;
  }
  .listing-card {
    display: grid;
    grid-template-columns: 300px 180px 1fr 1fr;
    grid-auto-rows: 1fr;
    align-items: center;
    padding: 1rem 1rem 1rem 46px;
    gap: 1rem;
  }
  .listing-card__brand {
    grid-column: 1;
    border: 0;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 120px 1fr;
    align-items: center;
    gap: 0.5rem;
  }
  .brandmark {
    width: 120px;
    height: 48px;
  }
  .score {
    align-items: flex-start;
  }
  .score__row {
    gap: 0.35rem;
    width: 100%;
  }
  .score__value {
    font-size: 0.9rem;
  }
  .score__reviews {
    width: 100%;
    text-align: center;
    font-size: 0.75rem;
  }
  .score__stars {
    width: 64px;
    height: 12px;
  }

  /* Compact offer (pill) */
  .listing-card__offer {
    grid-column: 2;
    width: 100%;
    height: auto;
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(
      180deg,
      rgba(35, 48, 67, 0.35),
      rgba(35, 48, 67, 0.05)
    );
    border: 1px solid var(--c-border);
    box-shadow: none;
    margin: 0;
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
  }
  .listing-card__offer span:nth-child(1),
  .listing-card__offer span:nth-child(3) {
    font-size: 0.85rem;
    color: var(--c-text-muted);
  }
  .listing-card__offer span:nth-child(2) {
    font-size: 1.25rem;
    font-weight: 800;
    text-shadow: none;
  }

  /* Perks inline and clamped */
  .listing-card__perks {
    grid-column: 3;
    position: relative;
    border: 0;
    margin: 0;
  }
  .listing-card__perks ul {
    flex-direction: column;
    gap: 0.25rem;
    flex-wrap: nowrap;
    max-height: none;
    overflow: visible;
  }
  .listing-card__perks ul::before {
    display: block;
    left: 0.5rem;
    top: 0.1rem;
    bottom: 0.1rem;
    width: 2px;
    background: linear-gradient(
      180deg,
      rgba(122, 162, 247, 0.2),
      rgba(139, 92, 246, 0.9),
      rgba(122, 162, 247, 0.2)
    );
  }
  .listing-card__perks li {
    padding-left: 1.25rem;
    font-size: 0.85rem;
  }
  .listing-card__perks li::before {
    display: block;
    width: 0.6rem;
    height: 0.6rem;
    box-shadow: 0 0 0 3px rgba(122, 162, 247, 0.15);
    left: 0;
    top: 0.25rem;
  }

  /* CTA compact */
  .listing-card__cta {
    padding: 0.5rem;
    gap: 0.5rem;
  }
  .payment-badges {
    gap: 0.25rem;
  }

  /* Tighten vertical rhythm */
  .listing-card .brandmark,
  .listing-card .score,
  .listing-card .listing-card__offer,
  .listing-card .listing-card__perks,
  .listing-card .listing-card__cta {
    margin-bottom: 0;
  }
}
