﻿/* Can TV — grid layout ("Guide"). Layered on top of landing.css:
   same tokens, buttons, footer and download plumbing, different page silhouette.
   No full-bleed hero slider, no marquee rails — an editorial split hero plus a
   poster grid with a sticky section index. */

body.grid-layout {
  --bg: #08080f;
  --bg-2: #0c0c17;
  --panel: #10101d;
  --panel-2: #151527;
  --gold: #7c6cff;
  --gold-2: #a394ff;
  --line: rgba(255, 255, 255, .075);
  --line-2: rgba(255, 255, 255, .13);
  --max: 1240px;
  --radius: 14px;
  --radius-sm: 10px;
  background: var(--bg);
}

body.grid-layout ::selection { background: rgba(124, 108, 255, .35); }

/* ------------------------------------------------------------------ header */
.gnav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(8, 8, 15, .82);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.gnav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
  height: 62px;
  display: flex;
  align-items: center;
  gap: 14px;
}

body.grid-layout .brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 16px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  flex: 0 0 auto;
}

body.grid-layout .brand img { width: 26px; height: 26px; border-radius: 8px; }

.gnav-links {
  display: flex;
  gap: 22px;
  margin-left: 14px;
  flex: 1 1 auto;
  min-width: 0;
}

.gnav-links a {
  color: var(--dim);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: color .16s;
}

.gnav-links a:hover { color: var(--text); }

.gnav-cta { flex: 0 0 auto; padding: 10px 18px; font-size: 14px; }

body.grid-layout .lang-select { flex: 0 0 auto; }

/* -------------------------------------------------------------------- hero */
.gwrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px 48px;
}

.ghero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  gap: 44px;
  align-items: center;
  padding: 46px 0 34px;
}

.gh-copy { min-width: 0; }

.gh-copy .kicker {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--gold-2);
  margin-bottom: 14px;
}

/* the classic page marks the kicker with a red live dot; the grid uses a plain
   label, so the pseudo-element is dropped rather than inherited */
.gh-copy .kicker::before { content: none; }

/* the classic primary button is a gold→orange gradient with dark ink; the grid
   repaints it violet so the two pages don't share a visual signature */
body.grid-layout .btn-primary {
  background: linear-gradient(135deg, #8f7dff, #5a45ef);
  color: #fff;
  box-shadow: 0 12px 26px -14px rgba(124, 108, 255, .95);
}

body.grid-layout .btn-primary:hover { filter: brightness(1.08); }

.gh-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 5.4vw, 60px);
  line-height: 1.03;
  letter-spacing: -.025em;
  font-weight: 900;
  color: var(--text);
}

.gh-copy .lead {
  margin: 0 0 22px;
  font-size: clamp(14.5px, 1.5vw, 16.5px);
  line-height: 1.6;
  color: var(--dim);
  max-width: 46ch;
}

.gh-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }

.gh-meta {
  margin: 0 0 22px;
  font-size: 12.5px;
  color: var(--dim-2);
  letter-spacing: .01em;
}

.gh-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.gh-stats > div { min-width: 0; }

.gh-stats dt {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--dim-2);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gh-stats dd {
  margin: 0;
  font-size: clamp(17px, 2vw, 21px);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.01em;
}

/* poster collage on the right — the thing that replaces the hero slider */
.gmosaic {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
  height: clamp(300px, 33vw, 404px);
}

.gm-cell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
  min-height: 0;
}

.gm-cell.is-lead { grid-row: span 2; }

.gm-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s cubic-bezier(.2, .7, .3, 1);
}

.gm-cell:hover img { transform: scale(1.04); }

.gm-cell::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(8, 8, 15, .55));
  pointer-events: none;
}

/* ------------------------------------------------------------- section index */
.gindex-wrap {
  position: sticky;
  top: 62px;
  z-index: 30;
  background: linear-gradient(180deg, var(--bg) 70%, rgba(8, 8, 15, .92));
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}

.gindex {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 11px 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.gindex::-webkit-scrollbar { display: none; }

.gindex a {
  flex: 0 0 auto;
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--dim);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: color .16s, border-color .16s, background .16s;
}

.gindex a:hover {
  color: var(--text);
  border-color: rgba(124, 108, 255, .5);
  background: var(--panel-2);
}

/* ----------------------------------------------------------------- sections */
.gsec { margin-top: 34px; scroll-margin-top: 132px; }

.gsec-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.gsec-head h2 {
  margin: 0;
  font-size: clamp(19px, 2.3vw, 23px);
  font-weight: 800;
  letter-spacing: -.015em;
  color: var(--text);
}

.gsec-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold-2);
  background: rgba(124, 108, 255, .13);
  border: 1px solid rgba(124, 108, 255, .28);
  border-radius: 999px;
  padding: 2px 8px;
  line-height: 1.5;
}

.gsec-head p {
  flex: 1 1 100%;
  margin: 0;
  font-size: 13px;
  color: var(--dim-2);
}

/* Fixed column counts instead of auto-fill: every section holds 6-8 cards, so
   auto-fill at 1440 left one orphan on a second row (7 columns for 8 items).
   8 / 4 / 3 / 2 divides those counts evenly at each width. */
.ggrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

@media (min-width: 1180px) {
  .ggrid { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 12px; }
}

.gposter {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s ease, border-color .2s, box-shadow .2s;
}

.gposter:hover,
.gposter:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(124, 108, 255, .5);
  box-shadow: 0 16px 34px -20px rgba(0, 0, 0, .95);
}

.gp-art {
  display: block;
  position: relative;
  aspect-ratio: 2 / 3;
  background: var(--panel-2);
  overflow: hidden;
}

.gp-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .45s cubic-bezier(.2, .7, .3, 1);
}

.gposter:hover .gp-art img { transform: scale(1.05); }

.gp-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 7px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: rgba(8, 8, 15, .78);
  color: var(--text);
  backdrop-filter: blur(6px);
}

.gp-badge.is-hot { background: rgba(255, 77, 79, .9); color: #fff; }
.gp-badge.is-new { background: rgba(124, 108, 255, .92); color: #fff; }
.gp-badge.is-gold { background: rgba(255, 179, 71, .92); color: #1a1204; }

.gp-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  padding: 9px 10px 0;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.32;
  color: var(--text);
}

.gp-sub {
  display: block;
  padding: 3px 10px 10px;
  font-size: 11.5px;
  color: var(--dim-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* panels further down: keep them, just tighten the rhythm to match the grid */
body.grid-layout .promo-panel,
body.grid-layout .highlights,
body.grid-layout .compare,
body.grid-layout .install,
body.grid-layout .faq {
  margin-top: 46px;
}

body.grid-layout .sticky-cta .btn-primary {
  box-shadow: 0 10px 26px -12px rgba(124, 108, 255, .8);
}

/* --------------------------------------------------------------- responsive */
@media (max-width: 980px) {
  .ghero {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 30px 0 24px;
  }

  .gmosaic {
    height: 240px;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 1fr;
  }

  .gm-cell.is-lead { grid-row: auto; }

  .gh-stats { max-width: 520px; }
}

@media (max-width: 820px) {
  .gnav-links { display: none; }
  .gnav-inner { gap: 10px; }
  .gh-copy .lead { max-width: none; }
}

@media (max-width: 700px) {
  .gwrap { padding: 0 16px 40px; }
  .gnav-inner { padding: 0 16px; height: 58px; }
  .gindex-wrap { top: 58px; }

  .ggrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 11px;
  }

  .gp-title { font-size: 12.5px; }
  .gp-sub { padding: 2px 9px 9px; font-size: 11px; }
}

/* "TÉLÉSPECTATEURS" is one unbreakable word — four columns of ~85px can only
   ellipsise it, so drop to a 2×2 block and let each label breathe. */
@media (max-width: 520px) {
  .gh-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; }
  .gh-stats dt { white-space: normal; letter-spacing: .06em; }
}

@media (max-width: 430px) {
  .gh-copy h1 { font-size: clamp(28px, 8.6vw, 38px); }
  .gmosaic { height: 190px; gap: 8px; }
  .gh-stats dt {
    font-size: 10px;
    letter-spacing: .05em;
    line-height: 1.25;
  }
  .gh-stats dd { font-size: 17px; }
  .gnav-cta { padding: 9px 13px; font-size: 13px; }
  .gsec { margin-top: 28px; }
}

@media (max-width: 379px) {
  .gnav-inner { gap: 7px; }
  body.grid-layout .brand span { display: none; }
  .gnav-cta { padding: 8px 11px; font-size: 12.5px; }
  .ggrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
