/* File: src/css/specific/info.css
   Purpose: Lean Info page with calm intro, clear spacing, equal-width cards,
            and an auto-scrolling gallery thumb strip.
*/

:root {
  --content-pad: 20px;
  --thumb: 72px;            /* size for gallery strip thumbnails */
}

/* Base page sizing */
.content.info-page {
  padding: var(--content-pad);
  font-size: clamp(1rem, 1.05rem + 0.2vw, 1.15rem);
}

.info-wrap {
  max-width: 980px;
  margin: 0 auto;
  line-height: 1.65;
}

/* Intro / hero */
.info-hero { padding-bottom: 10px; margin-bottom: 28px; }
.info-hero.center { text-align: center; }
.info-hero .intro { font-size: clamp(1.35rem, 1.8vw, 1.8rem); line-height: 1.25; margin: 0 0 12px; font-weight: 600; }
.info-hero .lede { opacity: .95; margin-top: 10px; }
.info-hero .text-link { text-decoration: underline; }

/* explicit spacer under intro, scales on big screens */
.intro-gap { height: 16px; }
@media (min-width: 1920px) { .intro-gap { height: 20px; } }
@media (min-width: 2560px) { .intro-gap { height: 24px; } }
@media (min-width: 3840px) { .intro-gap { height: 28px; } }

/* Sections */
.info-section { margin: 24px 0; }
.info-section.cards-only { margin-top: 12px; }

/* Cards grid */
.cards { display: grid; grid-template-columns: 1fr; gap: 18px; }

/* Width guards so content can't force columns to widen */
.card, .card-link, .thumbs { min-width: 0; }
.thumbs { max-width: 100%; }

/* Card link fills the grid cell */
.card-link { display: block; text-decoration: none; color: inherit; height: 100%; }

/* Optional legacy height hint (keep or remove) */
.cards.equal .card { min-height: 300px; }

.card {
  height: 100%;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform .08s ease, border-color .15s ease, background .15s ease;
  overflow: hidden;               /* inner scrollers stay inside */
}
.card:hover { transform: translateY(-1px); }

.card .kicker {
  font-size: .98em;
  letter-spacing: .02em;
  text-transform: uppercase;
  opacity: .9;
  margin: 0 0 6px;
}

.card p {
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Gallery: horizontal thumbs preview (no scroll-snap!) */
.thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 6px;
  margin: 2px 0 8px;
  scrollbar-width: none;      /* Firefox hide */
  user-select: none;
  will-change: scroll-position;
  /* subtle edge fade to hint scroll */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
}
.thumbs::-webkit-scrollbar { display: none; } /* WebKit hide */

.thumbs .thumb {
  flex: 0 0 var(--thumb);
  height: var(--thumb);
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.12);
  /* glossy hint under the inline background-image */
  background-image: radial-gradient(120% 100% at 0 0, rgba(255,255,255,.22), rgba(255,255,255,.06));
  background-size: cover;
  background-position: center;
  /* NO scroll-snap-align here */
}

/* Icon sizing */
.icon-obsy { width: 18px; height: 18px; vertical-align: -3px; }
.icon-compare { width: 26px; height: 14px; vertical-align: -1px; opacity: .9; }

/* Bottom section */
.info-final { margin: 32px 0 8px; }
.info-final.center { text-align: center; }
.info-final .lede.small { font-size: .98em; opacity: .9; margin-bottom: 12px; }

/* Buttons */
.cta-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.center .cta-buttons { justify-content: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 14px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.18);
  text-decoration: none; line-height: 1.1;
  transition: transform .08s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.28); font-weight: 600; }
.btn-ghost  { background: transparent; border-color: rgba(255,255,255,.18); }

/* Wider layout & spacing on larger screens */
@media (min-width: 880px) {
  /* minmax(0,1fr) prevents children from widening columns */
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
}
@media (min-width: 1440px) {
  .info-wrap { max-width: 1300px; }
  .content.info-page { font-size: clamp(1.08rem, 0.8rem + 0.5vw, 1.35rem); }
  .cards { gap: 22px; }
}
@media (min-width: 1920px) {
  .info-wrap { max-width: 1600px; }
  .content.info-page { font-size: clamp(1.12rem, 0.9rem + 0.6vw, 1.45rem); }
  .cards { gap: 24px; }
}
@media (min-width: 2560px) {
  .info-wrap { max-width: 2000px; }
  .content.info-page { font-size: clamp(1.2rem, 0.95rem + 0.8vw, 1.6rem); }
  .cards { gap: 26px; }
}
@media (min-width: 3840px) {
  .info-wrap { max-width: 2400px; }
  .content.info-page { font-size: clamp(1.28rem, 0.9rem + 1.2vw, 1.9rem); }
  .cards { gap: 28px; }
}

/* Larger thumbs on wider screens */
@media (min-width: 1281px) { :root { --thumb: 84px; } }
