/* ============================================================================
   Conrad Legal Office — newconradlegaloffice.com
   File: assets/css/implied-warranty-habitability-california.css
   Page: Implied Warranty of Habitability — California Tenant Lawyer
   Depends on: tokens.css (imported first), components.css
   BEM blocks: .iw-hero, .iw-habitability, .iw-tenant-rights, .iw-faq, .iw-cta
   Breakpoints: 1024px, 768px, 480px
   ============================================================================ */

@import url('./tokens.css');


/* ============================================================================
   ANIMATION INFRASTRUCTURE
   Sections marked .js-animate receive .anim-ready when JS runs (non-reduced-
   motion), and .in-view when they enter the viewport via IntersectionObserver.
   ============================================================================ */

/* Respect reduced-motion: skip transitions entirely */
@media (prefers-reduced-motion: reduce) {
  .js-animate.anim-ready [data-anim],
  .js-animate.in-view [data-anim] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Initial hidden state — applied only after JS adds .anim-ready */
.js-animate.anim-ready [data-anim] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity   0.7s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Revealed state — applied when section scrolls into view */
.js-animate.in-view [data-anim] {
  opacity: 1;
  transform: none;
}

/* Staggered delays for child elements within an animated section */
.js-animate.in-view [data-anim]:nth-child(1) { transition-delay: 0ms; }
.js-animate.in-view [data-anim]:nth-child(2) { transition-delay: 100ms; }
.js-animate.in-view [data-anim]:nth-child(3) { transition-delay: 180ms; }
.js-animate.in-view [data-anim]:nth-child(4) { transition-delay: 260ms; }
.js-animate.in-view [data-anim]:nth-child(5) { transition-delay: 340ms; }
.js-animate.in-view [data-anim]:nth-child(6) { transition-delay: 420ms; }


/* ============================================================================
   SHARED LAYOUT UTILITIES
   Used across multiple sections.
   ============================================================================ */

/* Horizontal container: max-width centered with fluid inline padding */
.iw-hero__container,
.iw-habitability__container,
.iw-tenant-rights__container,
.iw-faq__container,
.iw-cta__container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 5rem);
}

/* Shared eyebrow label style (small uppercase label above section headings) */
.iw-hero__eyebrow,
.iw-habitability__eyebrow,
.iw-tenant-rights__eyebrow,
.iw-faq__eyebrow,
.iw-cta__eyebrow {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}


/* ============================================================================
   SECTION 1 — PAGE HERO
   Background: --color-blue-darkest
   ============================================================================ */

.iw-hero {
  position:         relative;
  background-color: var(--color-blue-darkest);
  padding-block:    7rem 6rem;
  overflow:         hidden;
}

/* Background image container */
.iw-hero__bg {
  position: absolute;
  inset:    0;
  z-index:  0;
}

.iw-hero__bg-img {
  width:           100%;
  height:          100%;
  object-fit:      cover;
  object-position: center;
  display:         block;
}

/* Dark overlay + radial glow */
.iw-hero__bg::after {
  content:    '';
  position:   absolute;
  inset:      0;
  background:
    radial-gradient(
      ellipse 80% 50% at 50% 0%,
      rgba(60, 60, 117, 0.25) 0%,
      transparent 70%
    ),
    linear-gradient(
      to right,
      rgba(9, 9, 55, 0.88) 0%,
      rgba(9, 9, 55, 0.65) 60%,
      rgba(9, 9, 55, 0.45) 100%
    );
}

.iw-hero__container {
  position: relative;
  z-index:  1;
}

/* ── Back link ─────────────────────────────────────────────────────────────── */

.iw-hero__back {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--fw-regular);
  color: var(--color-white-alpha-80);
  text-decoration: none;
  margin-bottom: 2.5rem;
  transition: color 0.2s ease;
}

.iw-hero__back:hover,
.iw-hero__back:focus-visible {
  color: var(--color-white);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.iw-hero__back [data-lucide] {
  width: var(--icon-size-sm);
  height: var(--icon-size-sm);
  flex-shrink: 0;
}

/* ── Eyebrow ───────────────────────────────────────────────────────────────── */

.iw-hero__eyebrow {
  color: var(--color-red);
  margin-bottom: 1rem;
}

/* ── Heading ───────────────────────────────────────────────────────────────── */

.iw-hero__title {
  font-family: var(--font-serif);
  font-weight: var(--fw-light);
  font-size: var(--text-h1);
  line-height: 1.05;
  color: var(--color-white);
  margin-bottom: 1rem;
}

/* ── Sub-heading ───────────────────────────────────────────────────────────── */

.iw-hero__subhead {
  font-family: var(--font-sans);
  font-size: var(--text-h5);
  font-weight: var(--fw-regular);
  color: var(--color-red-light);
  margin-bottom: 1.75rem;
}

/* ── Intro paragraph ───────────────────────────────────────────────────────── */

.iw-hero__intro {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--color-white);
  opacity: 0.75;
  max-width: 700px;
  margin-bottom: 2.5rem;
}

/* ── CTA row ───────────────────────────────────────────────────────────────── */

.iw-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}


/* ── Hero entrance keyframe (applies to the section itself) ────────────────── */

@keyframes iw-hero-fade-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.iw-hero {
  animation: iw-hero-fade-in 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}


/* ============================================================================
   SECTION 2 — UNDERSTANDING HABITABILITY
   Background: --color-beige
   Layout: text (left) + image (right) split
   ============================================================================ */

.iw-habitability {
  background-color: var(--color-beige);
  padding-block: clamp(4rem, 8vw, 7rem);
}

/* ── Section header — centered, full width ───────────────────────────────── */

.iw-habitability__header {
  text-align:    center;
  margin-bottom: clamp(2.5rem, 4vw, 4rem);
}

.iw-habitability__eyebrow {
  color: var(--color-red-dark);
}

.iw-habitability__title {
  font-family:   var(--font-serif);
  font-weight:   var(--fw-regular);
  font-size:     var(--text-h2);
  color:         var(--color-blue-darkest);
  line-height:   1.1;
  margin-bottom: 1rem;
}

.iw-habitability__body {
  font-family:   var(--font-sans);
  font-size:     var(--text-base);
  line-height:   1.65;
  color:         var(--color-blue);
  opacity:       0.8;
  max-width:     60ch;
  margin-inline: auto;
}

/* ── Card grid ───────────────────────────────────────────────────────────── */

.iw-habitability__cards {
  display:               grid;
  grid-template-columns: repeat(4, 1fr);
  gap:                   clamp(1rem, 1.5vw, 1.25rem);
}

/* ── Individual card ─────────────────────────────────────────────────────── */

.iw-habitability__card-inner {
  position:         relative;
  border-radius:    10px;
  overflow:         hidden;
  background-color: var(--color-blue-darkest);
  aspect-ratio:     3 / 4;
  display:          flex;
  flex-direction:   column;
}

/* ── Card image ──────────────────────────────────────────────────────────── */

.iw-habitability__card-media {
  position: absolute;
  inset:    0;
  z-index:  0;
}

.iw-habitability__card-img {
  width:      100%;
  height:     100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.iw-habitability__card-inner:hover .iw-habitability__card-img {
  transform: scale(1.06);
}

/* ── Card text overlay ───────────────────────────────────────────────────── */

.iw-habitability__card-body {
  position:       relative;
  z-index:        1;
  margin-top:     auto;
  padding:        clamp(1rem, 2vw, 1.5rem);
  padding-top:    clamp(3rem, 5vw, 4rem);
  background:     linear-gradient(
                    to top,
                    rgba(13, 13, 29, 0.92) 0%,
                    rgba(13, 13, 29, 0.65) 55%,
                    transparent 100%
                  );
  display:        flex;
  flex-direction: column;
  gap:            0.35rem;
}

/* ── Icon badge ──────────────────────────────────────────────────────────── */

.iw-habitability__card-icon {
  display:          flex;
  align-items:      center;
  justify-content:  center;
  width:            2.25rem;
  height:           2.25rem;
  border-radius:    50%;
  background-color: rgba(221, 68, 68, 0.2);
  border:           1px solid rgba(221, 68, 68, 0.35);
  color:            var(--color-red-light);
  margin-bottom:    0.25rem;
}

.iw-habitability__card-icon [data-lucide] {
  width:        1rem;
  height:       1rem;
  stroke-width: 2.25;
}

/* ── Card title + description ────────────────────────────────────────────── */

.iw-habitability__card-title {
  font-family: var(--font-serif);
  font-size:   var(--text-h5);
  font-weight: var(--fw-regular);
  color:       var(--color-white);
  line-height: 1.25;
  margin:      0;
}

.iw-habitability__card-desc {
  font-family: var(--font-sans);
  font-size:   var(--text-xs);
  font-weight: var(--fw-regular);
  color:       var(--color-white);
  opacity:     0.7;
  line-height: 1.5;
  margin:      0;
  transition:  opacity 0.15s ease;
}

.iw-habitability__card-inner:hover .iw-habitability__card-desc {
  opacity:    1;
  transition: opacity 0.3s ease;
}

/* ── Card clickable cursor ────────────────────────────────────────────────── */

.iw-habitability__card-inner {
  cursor: pointer;
}

/* ── Card CTA — hidden by default, revealed on mobile tap ────────────────── */

.iw-habitability__card-cta {
  display:        flex;
  gap:            0.5rem;
  flex-wrap:      wrap;
  max-height:     0;
  overflow:       hidden;
  opacity:        0;
  transition:     max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                  opacity 0.3s ease,
                  margin-top 0.4s ease;
  margin-top:     0;
}

/* Phone: switch to flex layout so expanded card takes full width */
@media (max-width: 768px) {
  .iw-habitability__cards {
    display:   flex;
    flex-wrap: wrap;
    gap:       clamp(0.75rem, 1.5vw, 1rem);
  }

  /* Default: each card takes ~half width, smooth size transitions */
  .iw-habitability__card {
    flex:       0 0 calc(50% - 0.5rem);
    min-width:  0;
    transition: flex-basis 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .iw-habitability__card-inner {
    transition: aspect-ratio 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                min-height   0.5s cubic-bezier(0.16, 1, 0.3, 1);
  }

  /* Expanded: card takes full width, pushes others down */
  .iw-habitability__card:has(.is-expanded) {
    flex: 0 0 100%;
  }

  .iw-habitability__card-inner.is-expanded {
    aspect-ratio: auto;
    min-height:   280px;
  }

  .iw-habitability__card-inner.is-expanded .iw-habitability__card-body {
    padding-bottom: clamp(1.5rem, 3vw, 2rem);
  }

  .iw-habitability__card-inner.is-expanded .iw-habitability__card-cta {
    max-height:     none;
    opacity:        1;
    margin-top:     0.75rem;
    flex-direction: column;
  }

  .iw-habitability__card-inner.is-expanded .iw-habitability__card-cta .btn {
    justify-content: center;
  }

}

/* Small phone: single column always */
@media (max-width: 480px) {
  .iw-habitability__card {
    flex: 0 0 100%;
  }
}

/* Extended description shown on phone expand */
.iw-habitability__card-cta-desc {
  font-family: var(--font-sans);
  font-size:   var(--text-xs);
  color:       var(--color-white);
  opacity:     0.75;
  line-height: 1.55;
  margin:      0;
  flex-basis:  100%;
}

/* Desktop + tablet: hide in-card CTAs — modal handles it */
@media (min-width: 769px) {
  .iw-habitability__card-cta {
    display: none;
  }
}

/* ── Desktop modal ───────────────────────────────────────────────────────── */

.iw-card-modal {
  position:   fixed;
  inset:      0;
  z-index:    10001;
  display:    flex;
  align-items:     center;
  justify-content: center;
  opacity:    0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.iw-card-modal.is-open {
  opacity:    1;
  visibility: visible;
}

.iw-card-modal__backdrop {
  position:   absolute;
  inset:      0;
  background: rgba(13, 13, 29, 0.6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.iw-card-modal__content {
  position:       relative;
  z-index:        1;
  display:        grid;
  grid-template-columns: 1fr 1fr;
  max-width:      900px;
  width:          90vw;
  max-height:     80vh;
  border-radius:  12px;
  overflow:       hidden;
  background:     var(--color-beige);
  box-shadow:     0 20px 60px rgba(13, 13, 29, 0.35);
  transform:      scale(0.92) translateY(20px);
  transition:     transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.iw-card-modal.is-open .iw-card-modal__content {
  transform: none;
}

/* Close button */
.iw-card-modal__close {
  position:        absolute;
  top:             1rem;
  right:           1rem;
  z-index:         2;
  width:           2.5rem;
  height:          2.5rem;
  border-radius:   50%;
  border:          none;
  background:      rgba(13, 13, 29, 0.06);
  color:           var(--color-blue-darkest);
  font-size:       1.5rem;
  line-height:     1;
  cursor:          pointer;
  display:         flex;
  align-items:     center;
  justify-content: center;
  transition:      background 0.2s ease;
}

.iw-card-modal__close:hover {
  background: rgba(13, 13, 29, 0.15);
}

/* Modal image */
.iw-card-modal__media {
  min-height: 350px;
}

.iw-card-modal__media img {
  width:      100%;
  height:     100%;
  object-fit: cover;
  display:    block;
}

/* Modal text */
.iw-card-modal__body {
  display:        flex;
  flex-direction: column;
  justify-content: center;
  gap:            1rem;
  padding:        clamp(2rem, 3vw, 3rem);
}

.iw-card-modal__icon {
  display:          flex;
  align-items:      center;
  justify-content:  center;
  width:            2.75rem;
  height:           2.75rem;
  border-radius:    50%;
  background-color: rgba(221, 68, 68, 0.1);
  border:           1px solid rgba(221, 68, 68, 0.25);
  color:            var(--color-red-dark);
}

.iw-card-modal__icon [data-lucide] {
  width:        1.25rem;
  height:       1.25rem;
  stroke-width: 2.25;
}

.iw-card-modal__title {
  font-family: var(--font-serif);
  font-size:   var(--text-h4);
  font-weight: var(--fw-regular);
  color:       var(--color-blue-darkest);
  line-height: 1.2;
  margin:      0;
}

.iw-card-modal__desc {
  font-family: var(--font-sans);
  font-size:   var(--text-sm);
  color:       var(--color-blue);
  opacity:     0.8;
  line-height: 1.6;
  margin:      0;
}

.iw-card-modal__cta {
  display:    flex;
  gap:        0.75rem;
  flex-wrap:  wrap;
  margin-top: 0.5rem;
}

/* Hide modal on phone — in-card CTAs handle it */
@media (max-width: 768px) {
  .iw-card-modal {
    display: none;
  }
}

/* ── Card grid responsive ────────────────────────────────────────────────── */

@media (max-width: 1024px) and (min-width: 769px) {
  .iw-habitability__cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .iw-habitability__card-inner {
    aspect-ratio: 4 / 3;
  }
}


/* ============================================================================
   SECTION 3 — YOUR RIGHTS AS A TENANT
   Background: --color-blue-dark
   Layout: image (left) + text (right) split — reversed from Section 2
   ============================================================================ */

.iw-tenant-rights {
  background-color: var(--color-blue-dark);
  padding-block: clamp(4rem, 8vw, 7rem);
}

/* ── Two-column split (image left, text right) ────────────────────────────── */

.iw-tenant-rights__container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: center;
}

/* ── Image column ─────────────────────────────────────────────────────────── */

.iw-tenant-rights__media {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

.iw-tenant-rights__img {
  width: 100%;
  height: 100%;
  min-height: 400px;
  object-fit: cover;
  display: block;
  border-radius: 8px;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.iw-tenant-rights__media:hover .iw-tenant-rights__img {
  transform: scale(1.03);
}

/* ── Image hover caption with gradient overlay ───────────────────────────── */

.iw-tenant-rights__img-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 1.25rem 1.25rem;
  background: linear-gradient(
    to top,
    rgba(13, 13, 29, 0.85) 0%,
    rgba(13, 13, 29, 0.45) 60%,
    transparent 100%
  );
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
  pointer-events: none;
  border-radius: 0 0 8px 8px;
}

.iw-tenant-rights__media:hover .iw-tenant-rights__img-caption {
  opacity: 1;
  transform: translateY(0);
}

.iw-tenant-rights__img-caption-text {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--fw-regular);
  line-height: 1.5;
  color: var(--color-white);
  margin: 0;
}

/* ── Text column ──────────────────────────────────────────────────────────── */

.iw-tenant-rights__eyebrow {
  color: var(--color-red);
}

.iw-tenant-rights__title {
  font-family: var(--font-serif);
  font-weight: var(--fw-regular);
  font-size: var(--text-h2);
  color: var(--color-white);
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

.iw-tenant-rights__body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-white);
  opacity: 0.75;
  margin-bottom: 1.5rem;
}

/* ── Rights checklist ─────────────────────────────────────────────────────── */

.iw-tenant-rights__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.iw-tenant-rights__item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

/* Checkmark circle */
.iw-tenant-rights__check {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background-color: rgba(221, 68, 68, 0.2);
  color: var(--color-red-light);
  margin-top: 0.1em;
}

.iw-tenant-rights__check [data-lucide] {
  width: 0.875rem;
  height: 0.875rem;
  stroke-width: 2.5;
}

/* Text block next to checkmark */
.iw-tenant-rights__item-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.iw-tenant-rights__item-title {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--fw-bold);
  color: var(--color-white);
  display: block;
}

.iw-tenant-rights__item-desc {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--color-white);
  opacity: 0.65;
  display: block;
}

/* ── Detail paragraph (expanded context) ──────────────────────────────────── */

.iw-tenant-rights__detail {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--color-white);
  opacity: 0.6;
  margin-bottom: 1.5rem;
}

/* ── Cross-link ───────────────────────────────────────────────────────────── */

.iw-tenant-rights__cross-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
  color: var(--color-red-light);
  text-decoration: none;
  transition: color 0.2s ease, gap 0.2s ease;
}

.iw-tenant-rights__cross-link:hover,
.iw-tenant-rights__cross-link:focus-visible {
  color: var(--color-white);
  gap: 0.6rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.iw-tenant-rights__cross-link [data-lucide] {
  width: var(--icon-size-sm);
  height: var(--icon-size-sm);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.iw-tenant-rights__cross-link:hover [data-lucide] {
  transform: translateX(3px);
}


/* ============================================================================
   SECTION 4 — FAQ ACCORDION
   Background: --color-beige
   ============================================================================ */

.iw-faq {
  background-color: var(--color-beige);
  padding-block: clamp(4rem, 8vw, 7rem);
}

/* ── Section header ────────────────────────────────────────────────────────── */

.iw-faq__header {
  max-width: 640px;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.iw-faq__eyebrow {
  color: var(--color-red-dark);
}

.iw-faq__title {
  font-family: var(--font-serif);
  font-weight: var(--fw-regular);
  font-size: var(--text-h2);
  color: var(--color-blue-darkest);
  line-height: 1.1;
}

/* ── FAQ list wrapper ──────────────────────────────────────────────────────── */

.iw-faq__list {
  max-width: 820px;
  display: flex;
  flex-direction: column;
  gap: 0; /* Items share borders, no gap */
}

/* ── FAQ item (wrapper around trigger + panel) ─────────────────────────────── */

.iw-faq__item {
  border-top: 1px solid var(--color-gray-subtle);
}

.iw-faq__item:last-child {
  border-bottom: 1px solid var(--color-gray-subtle);
}

/* Active item: subtle bg tint on the whole row */
.iw-faq__item.is-open {
  background-color: rgba(13, 13, 29, 0.02);
}

/* ── Trigger button ────────────────────────────────────────────────────────── */

.iw-faq__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.5rem;
  padding-inline: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  transition:
    background-color 0.25s ease,
    padding-inline 0.25s ease,
    margin-inline 0.25s ease,
    width 0.25s ease;
}

.iw-faq__trigger:hover {
  background-color: rgba(13, 13, 29, 0.03);
  padding-inline: 1rem;
  margin-inline: -1rem;
  width: calc(100% + 2rem);
}

.iw-faq__trigger:hover .iw-faq__question {
  color: var(--color-red-dark);
}

/* Active trigger background */
.iw-faq__item.is-open .iw-faq__trigger {
  background-color: rgba(13, 13, 29, 0.04);
  padding-inline: 1rem;
  margin-inline: -1rem;
  width: calc(100% + 2rem);
}

/* Focus ring for accessibility */
.iw-faq__trigger:focus-visible {
  outline: 2px solid var(--color-red-dark);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Question text */
.iw-faq__question {
  font-family: var(--font-sans);
  font-size: var(--text-h5);
  font-weight: var(--fw-regular);
  color: var(--color-blue-darkest);
  transition: color 0.25s ease;
  line-height: 1.3;
  flex: 1;
}

/* Chevron icon wrapper */
.iw-faq__chevron {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--color-red-dark);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.iw-faq__chevron [data-lucide] {
  width: var(--icon-size-lg);
  height: var(--icon-size-lg);
}

/* Rotate chevron 180deg when item is open */
.iw-faq__item.is-open .iw-faq__chevron {
  transform: rotate(180deg);
}

/* ── Collapsible panel ─────────────────────────────────────────────────────── */

.iw-faq__panel {
  overflow: hidden;

  /* Smooth height animation: max-height transitions between 0 and a large value */
  max-height: 0;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Remove the HTML [hidden] attribute's display:none so we can animate */
.iw-faq__panel[hidden] {
  /* Override browser's default hidden behaviour — height handles visibility */
  display: block;
  visibility: hidden;
}

/* When panel is open (JS removes [hidden] and sets max-height via style) */
.iw-faq__item.is-open .iw-faq__panel {
  visibility: visible;
  max-height: 500px;
}

/* Answer text */
.iw-faq__answer {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-blue);
  opacity: 0.85;
  padding-bottom: 1.75rem;
}


/* ============================================================================
   SECTION 5 — CTA
   Background: --color-blue-darkest
   ============================================================================ */

.iw-cta {
  background-color: var(--color-blue-darkest);
  padding-block: clamp(4.5rem, 9vw, 8rem);

  /* Subtle radial highlight from center */
  background-image: radial-gradient(
    ellipse 70% 60% at 50% 100%,
    rgba(60, 60, 117, 0.3) 0%,
    transparent 65%
  );
}

.iw-cta__container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.iw-cta__eyebrow {
  color: var(--color-red);
}

/* ── Heading ───────────────────────────────────────────────────────────────── */

.iw-cta__title {
  font-family: var(--font-serif);
  font-weight: var(--fw-light);
  font-size: var(--text-h3);
  color: var(--color-white);
  line-height: 1.15;
  margin-bottom: 1.25rem;
  max-width: 700px;
}

/* ── Body text ─────────────────────────────────────────────────────────────── */

.iw-cta__body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-white);
  opacity: 0.7;
  max-width: 600px;
  margin-bottom: 2.5rem;
}

/* ── Button row ────────────────────────────────────────────────────────────── */

.iw-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}



/* ============================================================================
   RESPONSIVE — 1024px (tablet landscape)
   ============================================================================ */

@media (max-width: 1024px) {

  /* Tenant rights: two-column → stack */
  .iw-tenant-rights__container {
    grid-template-columns: 1fr;
  }

  /* Image goes below text on stack */
  .iw-tenant-rights__media {
    order: 2;
    max-width: 600px;
  }

  .iw-tenant-rights__content {
    order: 1;
  }

  /* Dust image: center when stacked */
  .iw-tenant-rights__media {
    margin-inline: auto;
  }
}


/* ============================================================================
   RESPONSIVE — below 1024px (tablet/mobile)
   Tenant rights: caption + zoom triggered on scroll via .is-in-view class
   ============================================================================ */

@media (max-width: 1024px) {

  .iw-tenant-rights__media.is-in-view .iw-tenant-rights__img-caption {
    opacity: 1;
    transform: translateY(0);
  }

  .iw-tenant-rights__media.is-in-view .iw-tenant-rights__img {
    transform: scale(1.03);
  }
}


/* ============================================================================
   RESPONSIVE — 768px (tablet portrait / large mobile)
   ============================================================================ */

@media (max-width: 768px) {

  /* Hero: reduce top padding */
  .iw-hero {
    padding-block: 5rem 4rem;
  }

  /* Images: reduce min-height */
  .iw-tenant-rights__img {
    min-height: 280px;
  }

  /* FAQ: question font size reduction */
  .iw-faq__question {
    font-size: var(--text-base);
  }
}


/* ============================================================================
   RESPONSIVE — 480px (small mobile)
   ============================================================================ */

@media (max-width: 480px) {

  /* Hero: tighter top padding */
  .iw-hero {
    padding-block: 4rem 3.5rem;
  }

  /* Hero CTA: stack buttons vertically */
  .iw-hero__cta {
    flex-direction: column;
    align-items: flex-start;
  }

  /* CTA actions: stack */
  .iw-cta__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .iw-cta__actions .btn {
    justify-content: center;
    width: 100%;
  }

  /* Images: shorter on small screens */
  .iw-tenant-rights__img {
    min-height: 220px;
  }

  /* FAQ trigger: tighter vertical padding */
  .iw-faq__trigger {
    padding-block: 1.25rem;
  }
}

/* Keyboard focus indicator for interactive habitability cards */
.iw-habitability__card-inner:focus-visible {
  outline: 3px solid var(--color-red-light);
  outline-offset: 4px;
  border-radius: 8px;
}
