/* ==========================================================================
   CONFINITY HOME9 PREVIEW STYLES
   ========================================================================== */

.confinity-home9-rhythm {
  scroll-padding-top: 5.5rem;
  --home9-paper: var(--brand-cream);
  --home9-yellow: var(--brand-highlight-yellow, var(--function-warning-800));
  --home9-paper-soft: color-mix(in srgb, var(--brand-cream) 78%, var(--home9-yellow) 22%);
  --home9-butter: color-mix(in srgb, var(--home9-yellow) 18%, var(--brand-paper));
  --home9-honey: color-mix(in srgb, var(--brand-highlight-yellow) 30%, var(--brand-cream));

  /* Luminous afternoon golden field gradient (home5 integration) */
  background: linear-gradient(
    180deg,
    var(--home9-butter) 0%,
    color-mix(in srgb, var(--brand-sage) 18%, var(--brand-cream)) 36%,
    var(--home9-paper) 66%,
    var(--home9-honey) 100%
  );

  --home9-ink: var(--brand-ink);
  --home9-ink-muted: color-mix(in srgb, var(--brand-ink) 72%, var(--brand-cream) 28%);
  --home9-moss: var(--brand-moss);
  --home9-copper: var(--brand-copper-deep, #8e3f22); /* Dark sturdier copper for 4.5:1 color contrast compliance on light golden fields */
  --home9-rule: color-mix(in srgb, var(--brand-ink) 16%, transparent);
  --home9-stage: min(92rem, 100%);
  --home9-measure: 44rem;
  color: var(--home9-ink);
  --home9-focus: color-mix(in srgb, var(--home9-honey) 72%, white 28%);
  overflow-x: clip;
  overflow-y: visible;
}

@media (prefers-reduced-motion: no-preference) {
  html:has(.confinity-home9-rhythm) {
    scroll-behavior: smooth;
  }
}

.confinity-home9-section {
  width: 100%;
  display: grid;
  justify-items: center;
  padding: 6.5rem 1.5rem;
  position: relative;
}

.confinity-home9-section > * {
  width: min(var(--home9-stage), 100%);
}

@media (max-width: 48rem) {
  .confinity-home9-section {
    padding: 4.5rem 1rem;
  }
}

/* Custom Letterpress metallic styling for kickers */
.confinity-home9-kicker {
  margin: 0;
  color: var(--home9-copper);
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  animation: home9-soft-rise 750ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.confinity-home9-kicker--letterpress {
  text-shadow: 0px 1px 0px rgba(255, 255, 255, 0.42);
  color: color-mix(in srgb, var(--home9-copper) 90%, black 10%);
}

@keyframes home9-soft-rise {
  from {
    opacity: 0;
    transform: translateY(1rem) scale(0.995);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes home9-sunlit-glow {
  0% {
    box-shadow: 0 0 0 0 rgba(236, 195, 74, 0);
  }
  100% {
    box-shadow: 0 0 24px 2px rgba(236, 195, 74, 0.15);
  }
}

.confinity-home9-section-header {
  max-width: var(--home9-measure);
  text-align: center;
  display: grid;
  gap: 1.25rem;
  justify-items: center;
  margin-bottom: 3.5rem;
}

.confinity-home9-section-header p:last-child {
  max-width: 40rem;
  margin: 0;
  color: var(--home9-ink-muted);
}

/* Hero */
.confinity-home9-hero {
  min-height: min(34rem, calc(100svh - 1rem));
  align-items: center;
  padding-top: 5rem;
  padding-bottom: 5rem;
  overflow: visible;
}

@media (max-width: 48rem) {
  .confinity-home9-hero {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
}

.confinity-home9-hero__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem; /* Increased from 2rem for a more generous, premium gutter */
  align-items: center; /* Changed from start to center for perfect vertical alignment of text and graphic */
}

@media (min-width: 64rem) {
  .confinity-home9-hero__inner {
    grid-template-columns: minmax(0, 1.05fr) minmax(20rem, 0.95fr); /* Tuned ratios to give the copy slightly more breathing room */
    gap: 3.25rem;
  }
}

.confinity-home9-hero__copy {
  max-width: 48rem;
  min-inline-size: 0;
  width: 100%;
  display: grid;
  gap: 1.15rem;
  animation: home9-soft-rise 900ms cubic-bezier(0.16, 1, 0.3, 1) 100ms both;
}

.confinity-home9-hero__title {
  font-size: clamp(2.75rem, 5vw, 4.75rem);
  line-height: 1.05;
  letter-spacing: 0;
  max-width: 100%;
}

.confinity-home9-hero__sub {
  color: var(--home9-ink-muted);
}

.confinity-home9-whisper {
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.8rem;
  color: var(--home9-copper);
  margin: -0.25rem 0 0.5rem 0;
  font-style: italic;
  font-weight: 500;
}

/* Hero Actions spacing adjustments on mobile devices */
.confinity-home9-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  margin-top: 0.5rem;
}

.confinity-home9-hero__actions-primary {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

@media (max-width: 36rem) {
  .confinity-home9-hero__actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 1.25rem;
  }
  .confinity-home9-hero__actions-primary {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 1rem;
  }
  .confinity-home9-hero__org-link {
    text-align: center;
    width: 100%;
    justify-content: center;
    padding: 0.5rem 0;
  }
  .confinity-home9-hero__actions-primary .confinity-home9-text-link {
    text-align: center;
    width: 100%;
    padding: 0.5rem 0;
  }
}

.confinity-home9-hero__org-link {
  font-size: 0.88rem;
  font-weight: 600;
}

.confinity-home9-hero__stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1.15;
  background: var(--home9-paper-soft);
  border-radius: 1.5rem;
  border: 1px solid var(--home9-rule);
  overflow: visible;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.4) inset,
    0 12px 24px -8px color-mix(in srgb, var(--home9-copper) 14%, transparent),
    0 24px 48px -24px color-mix(in srgb, var(--home9-ink) 24%, transparent);
  animation: home9-soft-rise 1100ms cubic-bezier(0.16, 1, 0.3, 1) 200ms both;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.confinity-home9-hero__stage:hover {
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.5) inset,
    0 16px 28px -6px color-mix(in srgb, var(--home9-copper) 22%, transparent),
    0 32px 56px -20px color-mix(in srgb, var(--home9-ink) 28%, transparent);
}

.confinity-home9-hero__photo {
  position: relative;
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: 1.5rem;
  overflow: hidden;
}

/* Tactile DeckledCard Styling */
.confinity-home9-deckled {
  background-color: var(--brand-cream, #FAF9F5);
  box-shadow:
    0px 2px 4px rgba(0, 0, 0, 0.04),
    0px 12px 32px rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(139, 128, 100, 0.12);
  position: relative;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.confinity-home9-deckled::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.6);
  mask-image: linear-gradient(to bottom, black, transparent);
}

.confinity-home9-deckled:hover {
  transform: translateY(-2px);
  border-color: rgba(142, 63, 34, 0.24); /* Refined warm copper edge */
  box-shadow:
    0px 4px 8px rgba(0, 0, 0, 0.05),
    0px 18px 40px rgba(142, 63, 34, 0.06);
}

.confinity-home9-hero__phone {
  position: absolute;
  bottom: -1.5rem;
  left: 1.5rem;
  width: 18rem;
  border-radius: 1.25rem;
  padding: 1.25rem;
  z-index: 10;
  display: grid;
  gap: 1rem;
  animation: home9-soft-rise 1200ms cubic-bezier(0.16, 1, 0.3, 1) 400ms both;
}

@media (max-width: 64rem) {
  .confinity-home9-hero__phone {
    position: relative;
    bottom: auto;
    left: auto;
    width: 100%;
    margin-top: 1.5rem;
    box-sizing: border-box;
    display: none; /* Hide the overlapping redundant desktop mockup element on mobile to maximize clear view of Hero primary imagery */
  }
}

.confinity-home9-phone__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.74rem;
  color: var(--home9-ink-muted);
  border-bottom: 1px solid var(--home9-rule);
  padding-bottom: 0.5rem;
}

.confinity-home9-phone__memory {
  display: grid;
  gap: 0.5rem;
}

.confinity-home9-phone__memory p {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.15;
}

.confinity-home9-phone__memory small {
  font-size: 0.8rem;
  color: var(--home9-ink-muted);
}

.confinity-home9-phone__facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  border-top: 1px solid var(--home9-rule);
  padding-top: 0.75rem;
  margin-top: 0.5rem;
}

.confinity-home9-phone__facts dt {
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.62rem;
  text-transform: uppercase;
  color: var(--home9-copper);
}

.confinity-home9-phone__facts dd {
  font-size: 0.74rem;
  font-weight: 600;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Trust strip inside hero */
.confinity-home9-hero-trust {
  border: none;
  margin: 0;
  padding: 1rem 0 0 0;
  display: grid;
  gap: 0.5rem;
  border-top: 1px solid var(--home9-rule);
  margin-top: 0.5rem;
}

.confinity-home9-hero-trust__seal {
  font-size: 0.88rem;
  font-weight: 600;
  margin: 0;
  color: var(--home9-moss);
}

.confinity-home9-hero-trust__claims {
  margin: 0;
  font-size: 0.82rem;
  color: var(--home9-ink-muted);
  display: flex;
  flex-wrap: wrap;
  column-gap: 0.5rem;
  row-gap: 0.25rem;
}

.confinity-home9-hero-trust__link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Voice Hook */
.confinity-home9-voice-hook {
  padding-top: 2.5rem;
  padding-bottom: 3.5rem;
}

@media (max-width: 48rem) {
  .confinity-home9-voice-hook {
    padding-top: 2.25rem;
    padding-bottom: 3.25rem;
  }
}

.confinity-hero-microcapture-shell--home9 {
  width: 100%;
  max-width: 44rem;
  margin-inline: auto;
}

.confinity-home9-voice-hook__bridge {
  font-size: 0.88rem;
  font-family: var(--font-geist-mono), monospace;
  color: var(--home9-copper);
  margin: 1.5rem 0 0 0;
  text-align: center;
}

/* Product Theatre */
.confinity-home9-product-theatre {
  padding-top: 5.5rem; /* Increased from 2rem to match the rhythmic spacing signature of the page */
  padding-bottom: 7.5rem; /* Increased from 5.5rem to elevate the section spacing rhythm */
}

@media (max-width: 48rem) {
  .confinity-home9-product-theatre {
    padding-top: 3.5rem;
    padding-bottom: 5rem;
  }
}

.confinity-home9-stage {
  max-width: var(--home9-stage);
  width: 100%;
  display: grid;
  gap: 3rem;
  justify-items: center;
}

.confinity-home9-stage-heading {
  display: grid;
  gap: 0.75rem;
  max-width: var(--home9-measure);
  margin-inline: auto;
  text-align: center;
}

.confinity-home9-theatre__whisper {
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.88rem;
  color: var(--home9-copper);
  font-style: italic;
  margin: 0;
}

/* Home10 Style Side-by-Side Grid Layout */
.confinity-home9-theatre-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3.5rem;
  align-items: center;
  width: 100%;
}

@media (min-width: 64rem) {
  .confinity-home9-theatre-layout {
    grid-template-columns: minmax(18rem, 0.82fr) minmax(28rem, 1.18fr);
    gap: 5rem;
  }
}

/* World-class mobile selector navigation for the product theatre */
.confinity-home9-theatre-mobile-nav {
  display: none;
}

@media (max-width: 64rem) {
  .confinity-home9-theatre-mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    padding: 1.25rem;
    border-radius: 1.25rem;
    background: rgba(139, 128, 100, 0.03);
    border: 1px solid rgba(139, 128, 100, 0.06);
    margin-bottom: -1rem; /* Draw the content closer for responsive integration */
  }

  .confinity-home9-theatre-mobile-nav__label {
    font-family: var(--font-geist-mono), monospace;
    font-size: 0.75rem;
    color: var(--home9-copper);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 600;
  }

  .confinity-home9-theatre-mobile-nav__row {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    width: 100%;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Hide default scrollbar on Firefox */
  }

  .confinity-home9-theatre-mobile-nav__row::-webkit-scrollbar {
    display: none; /* Hide default scrollbar on Chrome/Safari */
  }

  .confinity-home9-theatre-mobile-nav__btn {
    flex: 0 0 auto;
    background: var(--brand-paper, #fffdf8);
    border: 1px solid rgba(139, 128, 100, 0.12);
    color: var(--home9-ink-muted);
    padding: 0.5rem 1.15rem;
    font-family: var(--font-secondary), sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    border-radius: 1.5rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .confinity-home9-theatre-mobile-nav__btn[data-active="true"] {
    background: var(--home9-copper);
    color: var(--home9-paper);
    border-color: var(--home9-copper);
    box-shadow: 0 4px 12px rgba(142, 63, 34, 0.15);
    font-weight: 600;
  }
}

.confinity-home9-theatre-controls {
  display: grid;
  gap: 1.25rem;
}

@media (max-width: 64rem) {
  .confinity-home9-theatre-controls {
    display: none; /* Hide the vertical tabs sidebar on mobile/tablet */
  }
}

.confinity-home9-theatre-tab {
  background: transparent;
  border: none;
  text-align: left;
  padding: 1.5rem 0; /* Expanded from 1.25rem for a more dignified vertical breathing space */
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 500;
  color: color-mix(in srgb, var(--home9-ink-muted) 50%, transparent); /* Slightly softened normal state to maximize active state contrast */
  cursor: pointer;
  border-bottom: 1.5px solid color-mix(in srgb, var(--home9-ink) 8%, transparent);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
}

.confinity-home9-theatre-tab:hover {
  color: var(--home9-copper);
  border-bottom-color: color-mix(in srgb, var(--home9-copper) 40%, transparent);
  padding-left: 0.5rem; /* Luxurious, smooth horizontal micro-slide on hover to denote interactivity */
}

.confinity-home9-theatre-tab[aria-selected="true"] {
  color: var(--home9-ink);
  border-bottom-color: var(--home9-copper);
  border-bottom-width: 2.5px;
  padding-left: 0.75rem; /* Distinct horizontal shift when selected for a beautiful tactile feedback */
  padding-bottom: calc(1.5rem - 1px);
}

.confinity-home9-theatre-display {
  width: 100%;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow:
    0 4px 16px rgba(0,0,0,0.015),
    0 16px 48px rgba(142, 63, 34, 0.04);
  background: var(--brand-cream, #FAF9F5);
  border: 1px solid var(--home9-rule);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.confinity-home9-theatre-display:hover {
  transform: translateY(-2px); /* Beautiful subtle elevation shift on hover */
  box-shadow:
    0 6px 24px rgba(0,0,0,0.02),
    0 24px 64px rgba(142, 63, 34, 0.07);
}

.confinity-home9-theatre-pane {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
}

.confinity-home9-theatre-pane[hidden] {
  display: none !important;
}

.confinity-home9-theatre-pane__desc {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--home9-ink-muted);
}

.confinity-home9-theatre-pane__viewport {
  width: 100%;
}

/* Custom steps strip on Voice tab panel */
.confinity-home9-theatre__voice-steps {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-geist), sans-serif;
  font-size: 0.9rem;
  padding: 0.5rem 1.25rem;
  background: rgba(139, 128, 100, 0.05);
  border-radius: 0.75rem;
  border: 1px solid rgba(139, 128, 100, 0.08);
  flex-wrap: wrap;
  justify-content: center;
}

@media (max-width: 48rem) {
  .confinity-home9-theatre__voice-steps {
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.25rem;
    width: 100%;
    align-items: center;
  }
}

.confinity-home9-theatre__voice-step {
  display: flex;
  gap: 0.25rem;
}

.confinity-home9-theatre__voice-step strong {
  color: var(--home9-copper);
}

.confinity-home9-theatre__voice-step span {
  color: var(--home9-ink-muted);
}

.confinity-home9-theatre__voice-arrow {
  color: var(--home9-copper);
  font-weight: bold;
  transition: transform 0.2s ease;
}

@media (max-width: 48rem) {
  .confinity-home9-theatre__voice-arrow {
    transform: rotate(90deg);
    margin: 0.15rem 0;
  }
}

.confinity-home9-theatre__footer-caption {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--home9-ink-muted);
}

.confinity-home9-theatre__footer-caption Link {
  text-decoration: underline;
}

.confinity-home9-theatre__voice-cta-container {
  margin-top: 1rem;
}

.confinity-home9-theatre__voice-cta {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

.confinity-home9-theatre__voice-banner {
  display: flex;
  gap: 0.5rem;
  font-weight: 600;
  background-color: var(--home9-honey);
  padding: 0.75rem 1.5rem;
  border-radius: 2rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Scene Scenes */
.confinity-home9-scene {
  width: 100%;
  display: grid;
  justify-items: center;
  position: relative;
}

.confinity-home9-scene--heart {
  background: linear-gradient(
    180deg,
    var(--home9-paper),
    color-mix(in srgb, var(--brand-sand) 22%, var(--home9-paper))
  );
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4.5rem;
  width: 100%;
}

.confinity-home9-scene--together {
  background: color-mix(in srgb, var(--brand-moss) 8%, var(--brand-paper) 92%);
  padding: 0;
  width: 100%;
}

.confinity-home9-scene--close {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--brand-highlight-yellow) 20%, var(--home9-paper)),
    color-mix(in srgb, var(--brand-sage) 14%, var(--brand-cream) 86%)
  );
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
}

/* InView Scroll Animation */
.confinity-home9-inview-target {
  opacity: 0;
  transform: translateY(2rem) scale(0.99);
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

@media (prefers-reduced-motion: reduce) {
  .confinity-home9-inview-target {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

.confinity-home9-inview-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Remembrance & Keepsakes */
.confinity-home9-remembrance,
.confinity-home9-keepsakes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
  align-items: center;
  width: 100%;
  padding: 6.5rem 0; /* Clear vertical padding to make them distinct, high-impact chapters */
}

@media (min-width: 64rem) {
  .confinity-home9-remembrance {
    grid-template-columns: minmax(20rem, 0.85fr) minmax(0, 1.15fr); /* Perfect asymmetrical balance of visual and word measure */
    gap: 7.5rem; /* Expanded from 6rem for unmatched elegance */
    padding: 8.5rem 0; /* Generous vertical breathing space */
  }
  .confinity-home9-keepsakes {
    grid-template-columns: minmax(0, 1.15fr) minmax(20rem, 0.85fr);
    gap: 7.5rem; /* Expanded from 6rem for unmatched elegance */
    padding: 8.5rem 0; /* Generous vertical breathing space */
  }
}

@media (max-width: 64rem) {
  .confinity-home9-remembrance .confinity-home9-remembrance__image {
    order: 1;
    margin-bottom: 2rem;
  }
  .confinity-home9-remembrance .confinity-home9-remembrance__copy {
    order: 2;
    margin-top: 1rem;
  }
  .confinity-home9-keepsakes .confinity-home9-keepsakes__spread { /* Updated from .confinity-home9-keepsakes__media to .confinity-home9-keepsakes__spread to match the revised DOM */
    order: 1;
    margin-bottom: 2rem;
  }
  .confinity-home9-keepsakes .confinity-home9-keepsakes__copy {
    order: 2;
    margin-top: 1rem;
  }
}

.confinity-home9-remembrance__image {
  position: relative;
  width: 100%;
  max-width: 42rem;
  justify-self: center;
  aspect-ratio: 4 / 3;
  background-color: var(--home9-paper-soft);
  border-radius: 1.5rem;
  border: 1.5px solid rgba(139, 128, 100, 0.16);
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.4) inset,
    0 8px 24px -12px color-mix(in srgb, var(--home9-copper) 20%, transparent),
    0 16px 40px -16px color-mix(in srgb, var(--home9-ink) 24%, transparent);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.confinity-home9-keepsakes__spread {
  position: relative;
  width: 100%;
  aspect-ratio: 1.25;
  background-color: var(--home9-paper-soft);
  border-radius: 1.5rem;
  border: 1.5px solid rgba(139, 128, 100, 0.16);
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.4) inset,
    0 8px 24px -12px color-mix(in srgb, var(--home9-copper) 20%, transparent),
    0 16px 40px -16px color-mix(in srgb, var(--home9-ink) 24%, transparent);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.confinity-home9-remembrance__image:hover,
.confinity-home9-keepsakes__spread:hover {
  transform: scale(1.008) translateY(-3px);
  border-color: rgba(142, 63, 34, 0.28);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.5) inset,
    0 16px 36px -8px color-mix(in srgb, var(--home9-copper) 28%, transparent),
    0 32px 56px -16px color-mix(in srgb, var(--home9-ink) 28%, transparent);
}

.confinity-home9-image {
  object-fit: cover;
}

.confinity-home9-remembrance__copy,
.confinity-home9-keepsakes__copy {
  display: grid;
  gap: 1.5rem;
}

.confinity-home9-blockquote {
  margin: 0;
  border-left: 3px solid var(--home9-copper);
  padding-left: 1.25rem;
  display: grid;
  gap: 0.5rem;
}

.confinity-home9-blockquote p {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-style: italic;
  font-weight: 500;
  line-height: 1.3;
}

.confinity-home9-blockquote cite {
  font-size: 0.88rem;
  font-style: normal;
  color: var(--home9-ink-muted);
}

.confinity-home9-keepsakes__permanence {
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.88rem;
  color: var(--home9-copper);
  margin: 0;
}

.confinity-home9-keepsakes__list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.confinity-home9-keepsake-item {
  border-top: 1px solid var(--home9-rule);
  padding-top: 0.75rem;
}

.confinity-home9-keepsake-item span {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--home9-copper);
}

.confinity-home9-keepsake-item p {
  margin: 0.25rem 0 0 0;
  font-size: 0.88rem;
  color: var(--home9-ink-muted);
}

/* Institutions */
.confinity-home9-institutions {
  padding-top: 8.5rem; /* Spacious breathing space */
  padding-bottom: 8.5rem;
}

.confinity-home9-institutions__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4.5rem;
  align-items: center; /* Changed from start to center for perfect asymmetrical text-and-image balance */
}

@media (min-width: 64rem) {
  .confinity-home9-institutions__inner {
    grid-template-columns: minmax(18rem, 0.85fr) 1.15fr; /* Perfectly mirrors the asymmetry of our layouts */
    gap: 7.5rem; /* Generous gap for premium editorial layout signature */
  }
}

/* Organisations section - order on small viewports */
@media (max-width: 64rem) {
  .confinity-home9-institutions .confinity-home9-organisations__media {
    order: 1;
    margin-bottom: 2rem;
  }
  .confinity-home9-institutions .confinity-home9-organisations__copy {
    order: 2;
    margin-top: 1rem;
  }
}

.confinity-home9-organisations__media {
  position: relative;
  width: 100%;
  aspect-ratio: 1.15;
  background-color: var(--home9-paper-soft);
  border-radius: 1.5rem;
  border: 1.5px solid rgba(139, 128, 100, 0.16);
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.4) inset,
    0 8px 24px -12px color-mix(in srgb, var(--home9-copper) 20%, transparent),
    0 16px 40px -16px color-mix(in srgb, var(--home9-ink) 24%, transparent);
  margin: 0;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.confinity-home9-organisations__media:hover {
  transform: scale(1.008) translateY(-3px);
  border-color: rgba(142, 63, 34, 0.28);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.5) inset,
    0 16px 36px -8px color-mix(in srgb, var(--home9-copper) 28%, transparent),
    0 32px 56px -16px color-mix(in srgb, var(--home9-ink) 28%, transparent);
}

.confinity-home9-organisations__copy {
  display: grid;
  gap: 1.5rem;
}

.confinity-home9-org-first-line {
  color: var(--home9-ink-muted);
  border-bottom: 1px solid var(--home9-rule);
  padding-bottom: 1rem;
  margin: 0;
}

.confinity-home9-org-chips {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.confinity-home9-org-chip {
  display: inline-flex;
  align-items: center;
  font-size: 0.88rem;
  font-weight: 600;
  background-color: rgba(139, 128, 100, 0.06);
  border: 1px solid rgba(139, 128, 100, 0.12);
  padding: 0.4rem 1rem;
  border-radius: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  line-height: 1.2;
}

.confinity-home9-org-chip:hover {
  transform: translateY(-1px);
  background-color: var(--home9-honey);
  border-color: var(--home9-copper);
  box-shadow: 0 4px 10px rgba(142, 63, 34, 0.08);
}

.confinity-home9-org-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  width: 100%;
}

@media (min-width: 36rem) {
  .confinity-home9-org-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 36rem) {
  .confinity-home9-org-cards {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .confinity-home9-org-card {
    min-height: auto;
    align-items: stretch;
    text-align: center;
  }
  .confinity-home9-org-card .confinity-home9-primary-cta,
  .confinity-home9-org-card .confinity-home9-text-link {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

.confinity-home9-org-card {
  border-radius: 1.25rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: flex-start;
  min-height: 100%;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.confinity-home9-org-card:hover {
  transform: translateY(-3px);
  border-color: rgba(142, 63, 34, 0.18);
  box-shadow:
    0px 4px 8px rgba(0, 0, 0, 0.02),
    0px 18px 40px rgba(142, 63, 34, 0.04),
    0 0 24px 2px rgba(236, 195, 74, 0.06) inset;
}

.confinity-home9-org-card p {
  margin: 0;
  flex-grow: 1;
}

/* Trust Ribbon */
.confinity-home9-trust-ribbon {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4.5rem;
  border-bottom: 1px solid var(--home9-rule);
  padding-top: 8.5rem; /* Generous breathing room above */
  padding-bottom: 8.5rem;
  width: 100%;
}

@media (max-width: 48rem) {
  .confinity-home9-trust-ribbon {
    padding-top: 5rem;
    padding-bottom: 5rem;
  }
}

@media (min-width: 64rem) {
  .confinity-home9-trust-ribbon {
    grid-template-columns: minmax(18rem, 0.85fr) 1.15fr;
    gap: 7.5rem; /* Spacious, premium editorial signature gap */
    align-items: center; /* Beautifully vertically aligned */
  }
}

.confinity-home9-trust-ribbon__intro {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.confinity-home9-trust-intro-body {
  color: var(--home9-ink-muted);
}

.confinity-home9-trust-header-link {
  font-weight: 600;
  font-size: 0.95rem;
}

.confinity-home9-trust-ribbon__links {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 36rem) {
  .confinity-home9-trust-ribbon__links {
    grid-template-columns: repeat(2, 1fr);
  }
}

.confinity-home9-trust-link {
  background-color: rgba(255, 255, 255, 0.42);
  border: 1px solid var(--home9-rule);
  border-radius: 1.25rem;
  padding: 1.25rem;
  display: flex;
  gap: 1rem;
  align-items: start;
  text-decoration: none;
  color: inherit;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.confinity-home9-trust-link:hover {
  transform: translateY(-2px);
  background-color: var(--brand-paper);
  border-color: rgba(142, 63, 34, 0.24);
  box-shadow:
    0px 4px 8px rgba(0, 0, 0, 0.02),
    0px 16px 32px rgba(142, 63, 34, 0.04);
}

.confinity-home9-trust-link__icon {
  background-color: var(--home9-honey);
  color: var(--brand-ink);
  border-radius: 0.75rem;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.confinity-home9-trust-link span:last-child {
  display: grid;
  gap: 0.25rem;
}

.confinity-home9-trust-link strong {
  font-size: 0.95rem;
  font-weight: 700;
}

.confinity-home9-trust-link small {
  font-size: 0.82rem;
  color: var(--home9-ink-muted);
}

/* Pricing */
.confinity-home9-pricing {
  border-bottom: 1px solid var(--home9-rule);
  padding-top: 8.5rem; /* Generous breathing room above */
  padding-bottom: 8.5rem;
  width: 100%;
}

@media (max-width: 48rem) {
  .confinity-home9-pricing {
    padding-top: 5rem;
    padding-bottom: 5rem;
  }
}

.confinity-home9-pricing__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  width: 100%;
  max-width: 52rem;
  margin-inline: auto;
  margin-top: 3.5rem; /* Expanded top margin for perfect separation of description copy and the cards grid */
}

@media (min-width: 48rem) {
  .confinity-home9-pricing__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.confinity-home9-price-slip {
  border-radius: 1.5rem;
  padding: 2.25rem 2rem;
  display: grid;
  gap: 1.25rem;
  align-content: start;
  position: relative; /* Ensure pinned badge absolute placement is scoped to the card wrapper */
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.confinity-home9-price-slip:hover {
  transform: translateY(-5px);
  border-color: rgba(142, 63, 34, 0.2);
  box-shadow:
    0px 1px 0px rgba(255, 255, 255, 0.5) inset,
    0px 6px 12px rgba(0, 0, 0, 0.02),
    0px 24px 48px rgba(142, 63, 34, 0.05),
    0 0 32px 4px rgba(236, 195, 74, 0.08) inset; /* Sunlit inner warm glow */
}

.confinity-home9-price-slip--featured:hover {
  border-color: color-mix(in srgb, var(--home9-copper) 80%, black 20%);
  box-shadow:
    0px 1px 0px rgba(255, 255, 255, 0.6) inset,
    0px 8px 16px rgba(142, 63, 34, 0.03),
    0px 28px 56px rgba(142, 63, 34, 0.07),
    0 0 36px 6px rgba(236, 195, 74, 0.12) inset; /* More pronounced sunlit inner glow for the featured option */
}

.confinity-home9-price-slip__tag {
  margin: 0;
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--home9-copper);
}

.confinity-home9-price-slip__price {
  margin: 0;
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
}

.confinity-home9-price-slip__price span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--home9-ink-muted);
  margin-left: 0.25rem;
}

.confinity-home9-price-slip p:last-of-type {
  margin: 0;
  color: var(--home9-ink-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  min-height: 3rem;
}

.confinity-home9-price-slip--featured {
  background-color: var(--home9-honey);
  border: 1px solid var(--home9-copper);
}

.confinity-home9-price-slip__pin {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  margin: 0;
  background-color: var(--home9-copper);
  color: var(--brand-cream);
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.62rem;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 1rem;
}

/* Pricing section footers alignment adjustments on mobile devices */
.confinity-home9-pricing-foot-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 3rem;
  flex-wrap: wrap;
  width: 100%;
}

.confinity-home9-pricing-foot,
.confinity-home9-pricing-org-link {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

@media (max-width: 48rem) {
  .confinity-home9-pricing-foot-container {
    flex-direction: column;
    gap: 1.25rem;
    align-items: center;
    text-align: center;
    width: 100%;
  }
  .confinity-home9-pricing-foot,
  .confinity-home9-pricing-org-link {
    width: 100%;
    justify-content: center;
  }
}

@media (min-width: 48rem) {
  .confinity-home9-pricing-foot + .confinity-home9-pricing-org-link::before {
    content: "·";
    margin-right: 1.5rem;
    color: var(--home9-copper);
    font-weight: bold;
    font-size: 1.2rem;
    pointer-events: none;
  }
}

/* Founder */
.confinity-home9-founder {
  padding-top: 8.5rem; /* Generous breathing room above */
  padding-bottom: 8.5rem; /* Beautiful balance before footer */
}

.confinity-home9-founder__inner {
  max-width: var(--home9-measure);
  margin-inline: auto;
  display: grid;
  gap: 1.5rem;
  text-align: center;
  justify-items: center;
}

.confinity-home9-founder-body {
  color: var(--home9-ink-muted);
}

.confinity-home9-founder-whisper {
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.8rem;
  color: var(--home9-copper);
  margin: 0;
  font-style: italic;
}

.confinity-home9-founder__actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}

.confinity-home9-founder__sign-off {
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.88rem;
  color: var(--home9-copper);
}

/* Base utility overrides */
.confinity-home9-primary-cta,
.confinity-home9-price-slip--featured button {
  border-width: 1px !important;
  border-style: solid !important;
  border-color: var(--home9-copper) !important;
}

.confinity-home9-text-link {
  color: var(--home9-copper);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
  text-decoration-color: color-mix(in srgb, var(--home9-copper) 32%, transparent);
  transition: text-decoration-color 0.3s ease, color 0.3s ease, opacity 0.3s ease;
}

.confinity-home9-text-link:hover {
  text-decoration-color: var(--home9-copper);
  opacity: 0.95;
}

/* Custom Highlight styles on em inside editorial displays */
.confinity-home9-rhythm .confinity-type-display-editorial em {
  font-family: var(--font-display-editorial-italic, var(--font-display));
  font-weight: inherit;
  font-style: italic;
  color: var(--home9-copper);
  text-shadow: none;
  display: inline-block;
  padding-right: 0.16em;
  margin-right: -0.08em;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.confinity-home9-rhythm .confinity-type-display-editorial:hover em {
  transform: skewX(-1.5deg) scale(1.015);
}
