/* Flettons v2 — home page */

/* Hero ------------------------------------------------------------------ */
.hero {
  position: relative; isolation: isolate; color: var(--on-dark); background: var(--ink);
  min-height: calc(100svh - var(--header-h)); display: grid; grid-template-rows: 1fr auto;
}
.hero__media { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.hero__video { width: 100%; height: 100%; object-fit: cover; object-position: 62% center; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(12, 13, 15, 0.94) 0%, rgba(12, 13, 15, 0.82) 34%, rgba(12, 13, 15, 0.42) 62%, rgba(12, 13, 15, 0.18) 100%),
    linear-gradient(0deg, rgba(12, 13, 15, 1) 0%, rgba(12, 13, 15, 0.55) 22%, rgba(12, 13, 15, 0) 52%),
    linear-gradient(180deg, rgba(12, 13, 15, 0.6) 0%, rgba(12, 13, 15, 0) 18%);
}
.hero__in { width: min(var(--wrap), 100% - var(--gutter) * 2); margin-inline: auto; align-self: center; padding: clamp(48px, 8vh, 96px) 0 clamp(64px, 10vh, 120px); }
.hero__title {
  font-family: var(--serif);
  font-size: clamp(3rem, 1.6rem + 5.4vw, 7rem);
  line-height: 0.98; letter-spacing: -0.02em;
  font-variation-settings: "SOFT" 40, "opsz" 144;
  max-width: 12ch;
}
.hero__title em { font-style: italic; font-weight: 300; }
.hero__lead { max-width: 34rem; margin-top: 30px; font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem); line-height: 1.55; color: var(--on-dark-muted); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 26px; font-size: 0.92rem; color: var(--on-dark-muted); }
.hero__meta li { display: inline-flex; align-items: center; gap: 10px; }
.hero__meta li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-bright); }
.hero__proof {
  position: absolute; right: var(--gutter); bottom: 176px;
  display: grid; gap: 18px; padding: 22px 24px;
  border: 1px solid var(--line-dark); border-radius: var(--r);
  background: rgba(12, 13, 15, 0.55); backdrop-filter: blur(14px);
}
.hero__rating { display: grid; gap: 2px; font-size: 0.9rem; color: var(--on-dark-muted); }
.hero__rating strong { color: var(--on-dark); font-size: 1.05rem; }
.hero__rics { width: 128px; height: auto; opacity: .95; }

.stats { margin: 0; border-top: 1px solid var(--line-dark); display: grid; grid-template-columns: repeat(4, 1fr); width: min(var(--wrap), 100% - var(--gutter) * 2); margin-inline: auto; }
.stats > div { padding: 26px 28px 30px 0; min-height: 132px; }
.stats > div + div { padding-left: 28px; border-left: 1px solid var(--line-dark); }
.stats dt { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--on-dark-muted); }
.stats dd { margin: 8px 0 0; font-family: var(--serif); font-size: clamp(2rem, 1.4rem + 1.8vw, 3.1rem); line-height: 1; font-variation-settings: "SOFT" 20, "opsz" 72; font-variant-numeric: tabular-nums; }
.stats dd span { font-size: 0.5em; margin-left: 4px; color: var(--on-dark-muted); font-family: var(--sans); font-weight: 500; }

/* Survey comparison ----------------------------------------------------- */
.plans { display: grid; grid-template-columns: 0.72fr; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; grid-template-rows: repeat(6, auto); border-top: 1px solid var(--ink); }
.plans__labels, .plan { display: grid; grid-template-rows: subgrid; grid-row: span 6; }
.plans__labels .plans__cell { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding-left: 0; }
.plans__cell { padding: 22px 24px; border-bottom: 1px solid var(--line); font-size: 0.98rem; line-height: 1.5; color: var(--text); }
.plans__cell--head { padding-top: 34px; padding-bottom: 26px; }
.plan__level { display: flex; align-items: center; gap: 12px; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; color: var(--accent-ink); margin-bottom: 14px; }
.plan__badge { padding: 4px 9px; border-radius: 999px; background: var(--accent); color: #fff; letter-spacing: 0.06em; font-size: 0.68rem; }
.plan__name { font-family: var(--serif); font-size: clamp(1.7rem, 1.3rem + 1vw, 2.3rem); font-weight: 400; line-height: 1.1; letter-spacing: -0.01em; font-variation-settings: "SOFT" 40, "opsz" 48; }
.plans__cell--price { display: flex; align-items: baseline; gap: 10px; }
.plans__cell--price .price-label { font-size: 0.85rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.plans__cell--price .price { font-family: var(--serif); font-weight: 400; font-size: clamp(2.2rem, 1.6rem + 1.6vw, 3.2rem); line-height: 1; letter-spacing: -0.02em; font-variation-settings: "SOFT" 20, "opsz" 72; }
.plans__cell--list { display: grid; align-content: start; gap: 10px; }
.plans__cell--list li { position: relative; padding-left: 26px; }
.plans__cell--list li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 14px; height: 8px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg) translateY(-2px); }
.plans__cell--cta { border-bottom: 0; padding-top: 26px; padding-bottom: 34px; }
.plan--featured { background: var(--ink); color: var(--on-dark); margin-top: -1px; border-radius: var(--r) var(--r) 0 0; box-shadow: 0 30px 80px -30px rgba(12, 13, 15, 0.55); }
.plan--featured .plans__cell { color: var(--on-dark); border-bottom-color: var(--line-dark); padding-inline: 30px; }
.plan--featured .plan__level { color: var(--accent-bright); }
.plan--featured .plan__badge { background: var(--accent-bright); color: var(--ink); }
.plan--featured .plans__cell--price .price-label { color: var(--on-dark-muted); }
.plan--featured .plans__cell--list li::before { border-color: var(--accent-bright); }
.plan--featured .plans__cell--head { padding-top: 40px; }
.plans__foot { margin-top: 30px; color: var(--muted); font-size: 0.98rem; }
.plans__foot a { color: var(--accent-ink); font-weight: 600; }

/* Case studies ---------------------------------------------------------- */
.cases { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.cases__photo { margin: 0; position: sticky; top: calc(var(--header-h) + 24px); }
.cases__photo img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; object-position: center 40%; border-radius: var(--r); }
.cases__photo figcaption { margin-top: 14px; font-size: 0.9rem; color: var(--on-dark-muted); line-height: 1.5; max-width: 34rem; }
.cases__photo figcaption span { color: var(--accent-bright); font-weight: 600; margin-right: 8px; }
.cases__list { display: grid; border-top: 1px solid var(--line-dark); }
.case { display: grid; grid-template-columns: minmax(150px, 0.55fr) 1fr; gap: 20px 32px; padding: 34px 0; border-bottom: 1px solid var(--line-dark); }
.case__figure { font-family: var(--serif); font-size: clamp(2.4rem, 1.6rem + 2.2vw, 3.6rem); line-height: 1; letter-spacing: -0.02em; font-variation-settings: "SOFT" 20, "opsz" 72; color: var(--on-dark); }
.case__body { display: grid; gap: 10px; }
.case__body h3 { color: var(--on-dark); font-size: 1.2rem; }
.case__body p { color: var(--on-dark-muted); font-size: 0.98rem; }
.case__body .link { margin-top: 4px; font-size: 0.95rem; }

/* Real inspections (cards rendered by site-video-cards.js) -------------- */
.videos { margin-top: clamp(64px, 7vw, 100px); padding-top: clamp(40px, 4vw, 56px); border-top: 1px solid var(--line-dark); }
.videos__head { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; margin-bottom: 28px; }
.videos__head h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); font-variation-settings: "SOFT" 40, "opsz" 48; }
.videos__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.videos .inspection-card__play { top: 37.5%; }

/* Responsive ------------------------------------------------------------ */
@media (max-width: 1279px) {
  .hero__proof { position: static; margin: 36px auto 0; width: min(var(--wrap), 100% - var(--gutter) * 2); grid-template-columns: 1fr auto; align-items: center; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .stats > div:nth-child(-n + 2) { border-bottom: 1px solid var(--line-dark); }
  .plans { grid-template-columns: none; grid-auto-columns: minmax(0, 1fr); grid-template-rows: repeat(6, auto); }
  .plans__labels { display: none; }
  .cases { grid-template-columns: 1fr; }
  .cases__photo { position: static; }
  .cases__photo img { aspect-ratio: 16 / 10; }
  .videos__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .hero { min-height: auto; }
  .hero__in { padding: 64px 0 40px; }
  .hero__title { max-width: none; }
  .hero__cta .btn { width: 100%; }
  .hero__proof { grid-template-columns: 1fr; }
  .hero__rics { width: 112px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats > div { padding: 18px 14px 20px 0; min-height: 0; }
  .stats > div + div { padding-left: 14px; }
  .stats dd { font-size: 1.9rem; }
  .plans { display: grid; grid-auto-flow: row; grid-template-columns: 1fr; grid-template-rows: none; gap: 20px; border-top: 0; }
  .plan { grid-template-rows: none; grid-row: auto; border: 1px solid var(--line); border-radius: var(--r); background: rgba(255, 255, 255, 0.4); }
  .plan--featured { margin: 0; border-radius: var(--r); background: var(--ink); border-color: var(--ink); }
  .plans__cell { padding: 16px 22px; }
  .plans__cell[data-label]::before { display: block; content: attr(data-label); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
  .plans__cell--price[data-label]::before { display: none; }
  .plan--featured .plans__cell[data-label]::before { color: var(--on-dark-muted); }
  .plans__cell--cta { padding-bottom: 24px; }
  .case { grid-template-columns: 1fr; gap: 12px; padding: 26px 0; }
  .videos__grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .videos .inspection-card__play { width: 48px; height: 48px; }
}

@media (max-width: 480px) {
  .videos__grid { grid-template-columns: 1fr; }
}
