/* ==========================================================================
   Allied Insurance, personal.html page styles (Pass 1)
   Loads AFTER styles.css. Adds ONLY page-scoped rules: the inner-page hero
   VARIANT (a shorter dark band, distinct from the home 100vh video hero) and
   the two rich cover sections. Reuses the locked system: .split, .col-media,
   .col-text, .headline, .section-body, .btn, .cta-support, .beat tokens.
   Nothing here overrides a shared class globally.
   ========================================================================== */

/* ---- PAGE HERO (variant): short dark band, image + scrim, bottom-left copy -- */
.page-hero {
  position: relative;
  background: var(--brand-dark);
  min-height: 62vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.page-hero-media {
  position: absolute;
  inset: 0;
  background: var(--brand-dark) url("../img/webp/personal-hero.webp") center 38% / cover no-repeat;
  animation: pageHeroFade .8s ease both; /* CSS-only fade; no-JS safe, reduced-motion killed globally */
}
@keyframes pageHeroFade { from { opacity: 0; } to { opacity: 1; } }
/* legibility scrim + warm grade into the green/gold world */
.page-hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(103deg, rgba(31, 33, 18, 0.92) 0%, rgba(31, 33, 18, 0.62) 44%, rgba(31, 33, 18, 0.30) 100%),
    linear-gradient(180deg, rgba(31, 33, 18, 0.10) 0%, rgba(31, 33, 18, 0.20) 52%, rgba(73, 111, 54, 0.58) 100%),
    radial-gradient(120% 92% at 90% 10%, rgba(217, 138, 43, 0.18) 0%, rgba(217, 138, 43, 0) 55%);
}
.page-hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding: 178px var(--gutter) 78px;
}
.page-hero-eyebrow {
  display: inline-block;
  color: var(--accent-soft);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.page-hero h1 {
  font-size: clamp(40px, 5.6vw, 60px);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.02em;
  max-width: 16ch;
}
.page-hero h1 .beat-gold { display: block; color: var(--accent-soft); }
.page-hero h1 .beat-cream { display: block; color: var(--on-dark); }
.page-hero-sub {
  color: var(--on-dark-70);
  font-size: 18px;
  line-height: 1.6;
  max-width: 52ch;
  margin-top: 22px;
}
.page-hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

/* ---- COVER SECTIONS (reuse .split; alternate surface / cream) --------------- */
.cover-section { padding-block: var(--section-pad); }
.cover-section--surface { background: var(--surface); }
.cover-section--cream { background: var(--canvas); }
.cover-section .col-media { min-height: 560px; }
.cover-section .col-media img { min-height: 560px; }

/* image-left variant on desktop (text stays first in DOM -> mobile shows text first) */
@media (min-width: 981px) {
  .cover-section--flip .col-media { order: -1; }
}

.cover-eyebrow {
  display: inline-block;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

/* real cover list: gold-check items, two columns on desktop */
.cover-list {
  list-style: none;
  margin: 30px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px 26px;
}
.cover-list li {
  position: relative;
  padding-left: 28px;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
}
.cover-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 8px;
  height: 14px;
  border: solid var(--accent);
  border-width: 0 2px 2px 0;
  transform: rotate(43deg);
}
.cover-cta { margin-top: 34px; }

@media (max-width: 980px) {
  .cover-section .col-media,
  .cover-section .col-media img { min-height: 460px; }
  /* keep text above image on mobile for both variants */
  .cover-section .split .col-media { order: 2; }
  .cover-section .split .col-text { order: 1; }
}

@media (max-width: 560px) {
  .page-hero { min-height: 74vh; }
  .page-hero-inner { padding: 150px var(--gutter) 60px; }
  .page-hero h1 { font-size: clamp(34px, 10vw, 44px); }
  .cover-list { grid-template-columns: 1fr; gap: 11px; }
  .cover-section .col-media,
  .cover-section .col-media img { min-height: 340px; }
}

/* ==========================================================================
   PASS-2 FACELIFT, personal.html page-scoped catalog components
   Shared components (084 reveal, 011/029/062 tilt, 016 counter, 204 lottie,
   145/013 buttons, 020 canvas) attach via styles.css + app.js. Only the
   page-specific 075 Feature Switcher and 187/319 Flip Cards live here.
   ========================================================================== */

/* ---- accent row in the Personal header: 204 lottie + 016 counter --------- */
.cover-accent {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 26px 0 4px;
  flex-wrap: wrap;
}
.cover-accent .al-lottie { flex: none; }
.cover-accent .al-stat__label { max-width: 22ch; }

/* ---- 075 Feature Switcher (personal vs motor, at a glance) ---------------- */
.pv-switch { background: var(--canvas); padding-block: var(--section-pad); }
.pv-switch__head { max-width: 40ch; margin-bottom: 40px; }
.pv-switch__head .cover-eyebrow { color: var(--accent); }

.al-switch {
  display: grid;
  grid-template-columns: minmax(240px, 330px) 1fr;
  gap: clamp(20px, 3vw, 44px);
  align-items: stretch;
}
.al-switch__tabs { display: flex; flex-direction: column; gap: 12px; }
.al-switch__tab {
  position: relative;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 18px 20px 18px 24px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color .2s ease, background-color .2s ease, transform .2s ease;
}
.al-switch__tab::before {
  content: "";
  position: absolute;
  left: 0; top: 12px; bottom: 12px;
  width: 3px;
  border-radius: 3px;
  background: var(--accent);
  opacity: 0;
  transition: opacity .2s ease;
}
.al-switch__tab:hover { border-color: var(--accent-soft); }
.al-switch__tab.is-active { border-color: var(--accent); background: var(--surface); }
.al-switch__tab.is-active::before { opacity: 1; }
.al-switch__tab-title {
  display: block;
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.al-switch__tab.is-active .al-switch__tab-title { color: var(--accent-deep); }
.al-switch__tab-desc {
  display: block;
  margin-top: 5px;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--ink-70);
}

.al-switch__stage {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: clamp(24px, 3vw, 40px);
  display: flex;
}
.al-switch__panel { width: 100%; }
.al-switch__panel[hidden] { display: none; }
.al-switch__panel.is-active { animation: alSwitchIn .42s ease both; }
@keyframes alSwitchIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.al-switch__lead {
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.5;
  color: var(--ink);
  max-width: 40ch;
}
.al-switch__chips {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.al-switch__chips li {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-70);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 8px 15px;
  background: var(--canvas);
}
.al-switch__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-deep);
  transition: gap .2s ease;
}
.al-switch__link:hover { gap: 13px; }

/* ---- 029/011/062 cover panels (tilt cards) in the Personal section ------- */
.cover-panels {
  margin-top: 34px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.cover-panel { padding: 20px 20px 22px; }
.cover-panel .cp-body { transform: translateZ(18px); }
.cover-panel .cp-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
}
.cover-panel .cp-list { list-style: none; margin: 0; padding: 0; }
.cover-panel .cp-list li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-70);
  margin-top: 6px;
}
.cover-panel .cp-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---- 187/319 Flip Cards (motor cover types) ------------------------------ */
.flip-panels {
  margin-top: 30px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.al-flip {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
  height: 158px;
  perspective: 1000px; /* catalog 187 default depth */
}
.al-flip__inner {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform .6s ease-in-out; /* catalog 187 default duration + easing */
  will-change: transform;
}
.al-flip:hover .al-flip__inner,
.al-flip:focus-visible .al-flip__inner,
.al-flip.is-flipped .al-flip__inner { transform: rotateY(180deg); }
.al-flip__face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: var(--r-card);
  padding: 20px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  text-align: left;
}
.al-flip__face--front {
  background: var(--surface);
  border: 1px solid var(--line);
}
.al-flip__kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.al-flip__title {
  margin-top: 8px;
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.al-flip__hint {
  margin-top: auto;
  font-size: 12.5px;
  color: var(--ink-70);
  opacity: 0.85;
}
.al-flip__face--back {
  background: radial-gradient(120% 140% at 12% 0%, #5c8446 0%, #496f36 55%, #3c5c2c 100%);
  transform: rotateY(180deg);
  color: var(--on-dark);
}
.al-flip__back-text { font-size: 15px; line-height: 1.5; color: var(--on-dark); }

/* ==========================================================================
   COVER AT A GLANCE: 152 Digit Up + 088 Draggable Carousel
   ========================================================================== */
.pv-browse { background: var(--surface); padding-block: var(--section-pad); }
.pv-browse__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px 40px; flex-wrap: wrap; margin-bottom: 34px;
}
.pv-browse__intro { max-width: 30ch; }
.pv-browse .headline { max-width: 18ch; }

/* ---- 152 Digit Up (a real year rolls up) -------------------------------- */
.pv-digit { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.pv-digit__num {
  font-size: clamp(44px, 6vw, 66px); font-weight: 700; line-height: 1;
  letter-spacing: -.02em; color: var(--accent); font-variant-numeric: tabular-nums;
}
.pv-digit__lbl { font-size: 14px; color: var(--ink-70); margin-top: 6px; }

/* ---- 088 Draggable Carousel (drag / swipe / arrows / arrow-keys) -------- */
.pv-carousel { position: relative; }
.pv-carousel__track {
  display: flex; gap: 16px;
  overflow-x: auto; scroll-snap-type: x proximity;
  padding-bottom: 6px;
  -ms-overflow-style: none; scrollbar-width: none;
  cursor: grab;
}
.pv-carousel__track::-webkit-scrollbar { display: none; }
.pv-carousel__track.is-grab { cursor: grabbing; scroll-snap-type: none; }
.pv-carousel__track:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.pv-card {
  flex: 0 0 clamp(216px, 62vw, 288px);
  scroll-snap-align: start;
  border: 1px solid var(--line); border-radius: var(--r-card);
  background: var(--canvas);
  padding: 22px 22px 24px;
  user-select: none;
  transition: border-color .2s ease, transform .2s ease;
}
.pv-card:hover { border-color: var(--accent-soft); transform: translateY(-2px); }
.pv-card__tag {
  display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--brand-green); margin-bottom: 14px;
}
.pv-card__tag--motor { color: var(--accent-deep); }
.pv-card__title { font-size: 19px; font-weight: 600; color: var(--ink); }
.pv-card__desc { font-size: 15px; color: var(--ink-70); margin-top: 8px; line-height: 1.5; }
.pv-carousel__nav { display: flex; gap: 10px; margin-top: 22px; }
.pv-carousel__btn {
  width: 44px; height: 44px; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.pv-carousel__btn:hover { background: var(--accent); border-color: var(--accent); color: var(--surface); }
.pv-carousel__btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pv-carousel__btn svg { width: 18px; height: 18px; }

/* ---- responsive ---------------------------------------------------------- */
@media (max-width: 980px) {
  .al-switch { grid-template-columns: 1fr; }
  .al-switch__tabs { flex-direction: row; }
  .al-switch__tab { flex: 1; }
  .cover-panels { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .al-switch__tabs { flex-direction: column; }
  .cover-panels { grid-template-columns: 1fr; }
  .flip-panels { grid-template-columns: 1fr; }
  .al-flip { height: 138px; }
}

@media (prefers-reduced-motion: reduce) {
  .al-switch__panel.is-active { animation: none !important; }
  .al-flip__inner { transition: none !important; }
  .al-flip:hover .al-flip__inner,
  .al-flip:focus-visible .al-flip__inner { transform: none; }
  .cover-panel .cp-body { transform: none !important; }
}
