/* v6.4.11/v6.4.12 home: door cards (outline glow only); whole card is the link.
   Phone (≤600) hover stays off, as in v6.2-phone.css / plan cards. No scroll JS. */

/* ----- Whole card is the clickable link (desktop/tablet). Phone already stretches .door-link. ----- */
@media (min-width: 601px) {
  #problems .door-grid .door {
    position: relative;
    isolation: isolate;
  }
  #problems .door-grid .door .door-link::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
  }
  #problems .door-grid .door {
    transition: border-color 180ms ease, box-shadow 180ms ease;
  }
}

/* v6.4.12 door states (Andres): outline glow only, background never changes.
   Only keyboard focus (:focus-visible on the link) or a real mouse hover styles the card.
   Mouse/tap focus (:focus-within without :focus-visible) and touch :hover fall back to rest,
   so nothing stays lit after a tap, a click, or Back. */
#problems .door-grid .door { --door-rest-bc: #ebe6f2; --door-rest-sh: 0 10px 30px #3e278d0a; }
html.dark #problems .door-grid .door { --door-rest-bc: #2a2a3a; }
@media (max-width: 600px) {
  #problems .door-grid .door { --door-rest-bc: var(--v62-line, #ebe6f2); --door-rest-sh: none; }
  html.dark #problems .door-grid .door { --door-rest-bc: #2a2a3a; }
}

/* Rest for pointer focus left behind by a click or tap */
#problems .door-grid .door:focus-within:not(:has(.door-link:focus-visible)):not(:hover) {
  border-color: var(--door-rest-bc);
  box-shadow: var(--door-rest-sh);
  outline: none;
  transform: none;
}
/* Touch / no-hover devices: :hover sticks after a tap, so it never styles the card */
@media (hover: none), (pointer: coarse), (pointer: none) {
  #problems .door-grid .door:is(:hover, :focus-within):not(:has(.door-link:focus-visible)) {
    border-color: var(--door-rest-bc);
    box-shadow: var(--door-rest-sh);
    outline: none;
    transform: none;
  }
}

/* Mouse hover (fine pointer only): violet border + outer ring, no fill */
@media (min-width: 601px) and (hover: hover) and (pointer: fine) {
  #problems .door-grid .door:hover {
    border-color: #6558E8;
    box-shadow: 0 0 0 1px rgba(101, 88, 232, 0.45), 0 8px 22px rgba(101, 88, 232, 0.18);
    outline: none;
  }
  html.dark #problems .door-grid .door:hover {
    border-color: #8f85ff;
    box-shadow: 0 0 0 1px rgba(143, 133, 255, 0.55), 0 8px 22px rgba(101, 88, 232, 0.34);
  }
}
/* Keyboard focus: same outline glow plus a 3px focus ring, no fill */
@media (min-width: 601px) {
  #problems .door-grid .door:has(.door-link:focus-visible) {
    border-color: #6558E8;
    box-shadow: 0 0 0 1px rgba(101, 88, 232, 0.45), 0 8px 22px rgba(101, 88, 232, 0.18), 0 0 0 4px rgba(101, 88, 232, 0.28);
    outline: none;
  }
  html.dark #problems .door-grid .door:has(.door-link:focus-visible) {
    border-color: #8f85ff;
    box-shadow: 0 0 0 1px rgba(143, 133, 255, 0.55), 0 8px 22px rgba(101, 88, 232, 0.34), 0 0 0 4px rgba(143, 133, 255, 0.35);
  }
}

/* Lift: fine-pointer hover or keyboard focus, only without reduced motion.
   !important beats html.m2 .rv1.in { transform:none } leftover reveal timing. */
@media (min-width: 601px) and (prefers-reduced-motion: no-preference) {
  #problems .door-grid .door {
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
  }
  #problems .door-grid .door:has(.door-link:focus-visible),
  html.m2 #problems .door-grid .door.rv1.in:has(.door-link:focus-visible) {
    transform: translateY(-2px) !important;
  }
}
@media (min-width: 601px) and (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
  #problems .door-grid .door:hover,
  html.m2 #problems .door-grid .door.rv1.in:hover {
    transform: translateY(-2px) !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  #problems .door-grid .door:hover,
  #problems .door-grid .door:focus-within,
  html.m2 #problems .door-grid .door.rv1.in:hover,
  html.m2 #problems .door-grid .door.rv1.in:focus-within {
    transform: none !important;
  }
}

/* ----- Pilot bubble: drop the right-hand intro line, don't leave a gap ----- */
#pilot .section-top {
  justify-content: flex-start;
  align-items: flex-start;
  gap: 0;
}

/* Every homepage reveal: visible by default. Later inline #plans .reveal{opacity:0}
   and the early .reveal{opacity:0} lose only when JS has advertised itself.
   !important is required so html:not(.js) and print beat later same-specificity rules. */
html:not(.js) .reveal,
html:not(.js) #plans .reveal,
html:not(.js) .rv1,
html:not(.js) .m2-rv,
html:not(.js) .hero .pill,
html:not(.js) .hero h1,
html:not(.js) .hero-copy,
html:not(.js) .hero-buttons,
html:not(.js) .hero-note,
html:not(.js) .xform{
  opacity:1 !important;
  transform:none !important;
  animation:none !important;
}
html.js .reveal:not(.in):not(.is-in),
html.js #plans .reveal:not(.in):not(.is-in){
  opacity:0;
  transform:translateY(8px);
}
@media (prefers-reduced-motion: reduce){
  .reveal,
  #plans .reveal,
  .rv1,
  .m2-rv{
    opacity:1;
    transform:none;
    transition:none;
  }
}
@media (scripting: none){
  .reveal,
  #plans .reveal,
  .rv1,
  .m2-rv,
  .hero .pill,
  .hero h1,
  .hero-copy,
  .hero-buttons,
  .hero-note,
  .xform{
    opacity:1 !important;
    transform:none !important;
    animation:none !important;
  }
}
@media print{
  .reveal,
  #plans .reveal,
  .rv1,
  .m2-rv,
  html.m2 .reveal,
  html.m2 .rv1,
  html.m2 .m2-rv,
  html.m2 .reveal.in,
  .hero .pill,
  .hero h1,
  .hero-copy,
  .hero-buttons,
  .hero-note,
  .xform{
    opacity:1 !important;
    transform:none !important;
    animation:none !important;
  }
}

@media print{
  .m3-h,
  .rh-pill,
  .rh-h1,
  .rh-sub,
  .rh-sub-m,
  html.m3-intro .m3-h,
  html.m3-intro .rh-dev.m3-h,
  .m2-rv,
  .m2-rv.m2-in,
  html.m2 .m2-rv,
  html.m3-intro .hero .pill,
  html.m3-intro .hero h1{
    opacity:1 !important;
    transform:none !important;
    animation:none !important;
  }
}
