/* ==========================================================================
   Child Custody — page-specific styles
   Requires css/practice-common.css
   ========================================================================== */

@media (min-width: 768px) {
  .custody-page .section {
    padding-block: 8rem;
  }
}

/* --- Hero ----------------------------------------------------------------- */

.custody-hero {
  position: relative;
  overflow: hidden;
  padding-top: 10rem;
  padding-bottom: 7rem;
  border-bottom: 2px solid var(--color-ink-border);
  background-color: var(--color-paper);
  color: var(--color-ink);
}
.practice-hero__back{
   text-transform:uppercase; 
}
@media (min-width: 768px) {
  .custody-hero {
    padding-top: 12rem;
    padding-bottom: 9rem;
  }
}

.custody-hero__grid {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(15, 30, 38, 0.6) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 30, 38, 0.6) 1px, transparent 1px);
  background-size: 96px 96px;
}

.custody-hero__glow {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at top right, rgba(0, 164, 153, 0.12), transparent 60%);
}

.custody-hero.is-ready .custody-hero__grid {
  opacity: 0.05;
}

.custody-hero.is-ready .custody-hero__glow {
  opacity: 1;
}

.custody-hero__inner {
  position: relative;
  z-index: 2;
}

.custody-hero__content {
  max-width: 56rem;
}

.custody-hero__wordmark {
  position: absolute;
  right: -5rem;
  bottom: -5rem;
  z-index: 1;
  color: var(--color-ink-wordmark);
  font-family: var(--font-serif);
  font-size: clamp(8.5rem, 17vw, 18rem);
  font-style: italic;
  line-height: 0.9;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

.custody-hero__label {
  display: block;
  margin-bottom: 1.75rem;
  color: #9a9596;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1.5;
}

.custody-hero__title {
  max-width: 27ch;
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5vw, 4.25rem);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--color-ink);
}

@media (min-width: 1024px) {
  .custody-hero__title {
    font-size: 4.25rem;
  }
}

.custody-hero__title-accent {
  font-style: normal;
  font-weight: 600;
  color: var(--color-teal);
}

.custody-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 3rem;
}

.custody-hero__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 2.25rem;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.5rem;
  transition: all 0.3s ease;
}

.custody-hero__button-text {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.25;
  text-transform: uppercase;
}

@media (min-width: 768px) {
  .custody-hero__button-text {
    font-size: 0.86rem;
  }
}

.custody-hero__button--primary {
  background-color: var(--color-teal);
  color: var(--color-ink);
}

.custody-hero__button--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 50px -12px rgba(0, 164, 153, 0.55);
}

.custody-hero__button--secondary {
  border: 2px solid var(--color-ink);
  color: var(--color-ink);
}

.custody-hero__button--secondary:hover {
  background-color: var(--color-ink);
  color: var(--color-paper);
}

.custody-hero__button--secondary:hover .custody-hero__button-text {
  color: var(--color-paper);
}

@media (prefers-reduced-motion: no-preference) {
  .custody-hero:not(.is-ready) .custody-hero__grid,
  .custody-hero:not(.is-ready) .custody-hero__glow {
    opacity: 0;
  }

  .custody-hero__grid,
  .custody-hero__glow {
    transition: opacity 0.9s ease;
  }

  .custody-hero.is-ready .custody-hero__glow {
    transition-delay: 0.05s;
    transition-duration: 1.1s;
  }

  .custody-hero:not(.is-ready) .hero-enter {
    opacity: 0;
    transform: translateY(28px);
  }

  .custody-hero .hero-enter {
    transition:
      opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
      transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .custody-hero:not(.is-ready) .hero-enter--wordmark {
    transform: translateY(16px);
  }

  .custody-hero .hero-enter--wordmark {
    transition-duration: 0.95s;
  }

  .custody-hero.is-ready .custody-hero__label.hero-enter {
    opacity: 1;
    transform: none;
    transition-delay: 0.1s;
  }

  .custody-hero.is-ready .custody-hero__title.hero-enter {
    opacity: 1;
    transform: none;
    transition-delay: 0.22s;
  }

  .custody-hero.is-ready .custody-hero__actions.hero-enter {
    opacity: 1;
    transform: none;
    transition-delay: 0.36s;
  }

  .custody-hero.is-ready .hero-enter--wordmark {
    opacity: 1;
    transform: none;
    transition-delay: 0.14s;
  }
}

@media (prefers-reduced-motion: reduce) {
  .custody-hero__grid {
    opacity: 0.05;
  }

  .custody-hero__glow {
    opacity: 1;
  }
}

/* --- Intro ---------------------------------------------------------------- */

.custody-page .section-intro__label {
  display: block;
  margin-bottom: 1.75rem;
  color: var(--color-teal);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  line-height: 1.5;
  text-transform: uppercase;
}

.custody-page .section-intro__title {
  max-width: 48rem;
  font-family: var(--font-serif);
  font-size: clamp(2.25rem, 4vw, 3.75rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--color-ink);
}

@media (min-width: 1024px) {
  .custody-page .section-intro__title {
    font-size: 3.75rem;
  }
}

.custody-page .section-intro__title-accent {
  font-style: normal;
  font-weight: 600;
  color: var(--color-ink);
}

.custody-page .section-intro__body {
  display: grid;
  gap: 1.25rem;
  max-width: 48rem;
  margin-top: 2.5rem;
}

.custody-page .section-intro__text {
  color: var(--color-ink-muted);
  font-size: 1.125rem;
  font-weight: 300;
  line-height: 1.625;
}

.custody-page .section-intro__highlight {
  color: var(--color-ink);
  font-weight: 600;
}

/* --- Process grid --------------------------------------------------------- */

.custody-page .section-process {
  background-color: var(--color-paper-muted-soft);
}

.custody-page .section-process__header {
  max-width: 48rem;
  margin-bottom: 3.5rem;
}

.custody-page .section-process__title {
  font-family: var(--font-serif);
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--color-ink);
}

@media (min-width: 1024px) {
  .custody-page .section-process__title {
    font-size: 3.5rem;
  }
}

.custody-page .section-process__title-accent {
  font-style: normal;
  font-weight: 600;
}

.custody-page .section-process__title-accent--teal {
  color: var(--color-teal);
}

.custody-page .section-process__intro {
  margin-top: 1.75rem;
  color: var(--color-ink-soft);
  font-size: 1.125rem;
  font-weight: 300;
  line-height: 1.625;
}

.custody-grid {
  display: grid;
  gap: 1px;
  background-color: var(--color-ink-border);
  grid-auto-rows: 1fr;
}

@media (min-width: 768px) {
  .custody-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.card-custody {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: var(--color-paper);
  padding: 2.25rem;
  transition: background-color 0.2s ease, opacity 0.65s ease, transform 0.65s ease;
}

@media (min-width: 768px) {
  .card-custody {
    padding: 2.75rem;
  }
}

.card-custody:hover {
  background-color: #fff;
}

@media (min-width: 768px) {
  .card-custody--wide {
    grid-column: span 2;
  }
}

.card-custody__header {
  margin-bottom: 1.5rem;
}

.card-custody__number {
  display: block;
  margin-bottom: 0.75rem;
  color: var(--color-teal-soft);
  font-family: var(--font-serif);
  font-size: 2.75rem;
  font-style: italic;
  font-weight: 600;
  line-height: 1;
}

.card-custody__title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--color-ink);
}

@media (min-width: 768px) {
  .card-custody__title {
    font-size: 1.55rem;
  }
}

.card-custody__divider {
  display: block;
  width: 3rem;
  height: 2px;
  margin-top: 1.25rem;
  background-color: rgba(0, 164, 153, 0.6);
}

.card-custody__body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
}

.card-custody__text {
  color: var(--color-ink-muted);
  font-size: 0.97rem;
  font-weight: 300;
  line-height: 1.625;
}

.card-custody__list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card-custody__list li {
  display: flex;
  gap: 0.75rem;
  color: var(--color-ink-muted);
  font-size: 0.97rem;
  font-weight: 300;
  line-height: 1.625;
}

.card-custody__list li::before {
  content: "";
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  margin-top: 0.5rem;
  border-radius: 50%;
  background-color: var(--color-teal);
}

.card-custody__list-text {
  flex: 1;
  min-width: 0;
}

.card-custody__list-label {
  color: var(--color-ink);
  font-weight: 600;
}

.card-custody__closing {
  color: var(--color-ink-soft);
  font-size: 0.97rem;
  font-style: normal;
  font-weight: 300;
  line-height: 1.625;
}

/* --- FAQ ------------------------------------------------------------------ */

.custody-page .section-faq__title {
  margin-bottom: 3.5rem;
  font-family: var(--font-serif);
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--color-ink);
}

@media (min-width: 1024px) {
  .custody-page .section-faq__title {
    font-size: 3.5rem;
  }
}

.custody-page .section-faq__title-accent {
  font-style: normal;
  font-weight: 600;
}

.custody-page .section-faq__title-accent--teal {
  color: var(--color-teal);
}

.custody-page .section-faq__list {
  display: grid;
  gap: 1rem;
  background: none;
}

.custody-page .section-faq .faq-item {
  border-left: 2px solid var(--color-teal-border);
  background-color: var(--color-paper-muted);
  padding: 1.75rem 1.75rem 1.75rem 2rem;
  transition: border-color 0.2s ease;
}

@media (min-width: 768px) {
  .custody-page .section-faq .faq-item {
    padding: 2.25rem 2.25rem 2.25rem 2.5rem;
  }
}

.custody-page .section-faq .faq-item:hover,
.custody-page .section-faq .faq-item[open] {
  border-left-color: var(--color-teal);
}

.custody-page .section-faq .faq-item__question {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  cursor: pointer;
  list-style: none;
}

.custody-page .section-faq .faq-item__question::-webkit-details-marker {
  display: none;
}

.custody-page .section-faq .faq-item__label {
  flex: 1;
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 500;
  line-height: 1.333;
  color: var(--color-ink);
}

.custody-page .section-faq .faq-item__toggle {
  flex-shrink: 0;
  color: var(--color-teal);
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 300;
  line-height: 1;
  transition: transform 0.2s ease;
}

.custody-page .section-faq .faq-item[open] .faq-item__toggle {
  transform: rotate(45deg);
}

.custody-page .section-faq .faq-item__answer {
  max-width: 48rem;
  margin-top: 1.25rem;
  color: var(--color-ink-muted);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.75;
}

@media (min-width: 768px) {
  .custody-page .section-faq .faq-item__answer {
    font-size: 1.125rem;
  }
}

/* --- Related -------------------------------------------------------------- */

.custody-page .section-related {
  background-color: var(--color-paper-muted-soft);
}

.custody-page .section-related__title {
  margin-bottom: 3.5rem;
  font-family: var(--font-serif);
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--color-ink);
}

@media (min-width: 1024px) {
  .custody-page .section-related__title {
    font-size: 3.5rem;
  }
}

.custody-page .section-related__title-accent {
  font-style: normal;
  font-weight: 600;
}

.custody-page .section-related__title-accent--teal {
  color: var(--color-teal);
}

.custody-page .section-related__grid {
  display: grid;
  gap: 1px;
  background-color: var(--color-ink-border);
}

@media (min-width: 640px) {
  .custody-page .section-related__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .custody-page .section-related__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.custody-page .card-related {
  display: block;
  background-color: var(--color-paper);
  padding: 2rem;
  transition: background-color 0.2s ease;
}

.custody-page .card-related:hover {
  background-color: #fff;
}

.custody-page .card-related__title {
  margin-bottom: 0.75rem;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.333;
  letter-spacing: -0.022em;
  color: var(--color-ink);
}

.custody-page .card-related__text {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  font-size: 0.875rem;
  font-weight: 300;
  line-height: 1.625;
  color: var(--color-ink-faint);
}

.custody-page .card-related__link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  color: #9a9596;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.custody-page .card-related:hover .card-related__link {
  color: var(--color-ink);
}

.custody-page .card-related:hover .card-related__link .icon--arrow {
  transform: translateX(4px);
}

.custody-page .icon--arrow {
  stroke: currentColor;
  fill: none;
  transition: transform 0.2s ease;
}

/* --- Testimonial (centered) ----------------------------------------------- */

.custody-page .section-testimonial--centered {
  text-align: center;
}

.custody-page .section-testimonial__label {
  display: block;
  margin-bottom: 1.75rem;
  color: var(--color-teal);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  line-height: 1.5;
  text-transform: uppercase;
}

.custody-page .section-testimonial__stars {
  display: flex;
  justify-content: center;
  gap: 0.375rem;
  margin-bottom: 2.5rem;
  color: var(--color-teal);
}

.custody-page .section-testimonial__quote--large {
  position: relative;
  margin: 0 auto;
  max-width: 48rem;
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.025em;
  color: var(--color-ink);
}

.custody-page .section-testimonial__quote-mark {
  position: absolute;
  top: -2.25rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--color-teal-faint);
  font-family: var(--font-serif);
  font-size: clamp(3.75rem, 8vw, 4.5rem);
  font-weight: 500;
  line-height: 1;
  pointer-events: none;
}

.custody-page .section-testimonial__quote p {
  padding-top: 0.5rem;
}

.custody-page .section-testimonial__quote-accent {
  font-style: normal;
  font-weight: 600;
}

.custody-page .section-testimonial__author {
  margin-top: 2.5rem;
  color: var(--color-ink-faint);
  font-size: 1rem;
  font-weight: 300;
  letter-spacing: 0.025em;
}

.custody-page .section-testimonial__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 3rem;
  color: var(--color-teal);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.custody-page a.section-testimonial__link {
  color: #9a9596;
}

.custody-page .section-testimonial__link:hover {
  color: var(--color-ink);
}

.custody-page .section-testimonial__link:hover .icon--arrow {
  transform: translateX(4px);
}

/* --- Closing CTA ---------------------------------------------------------- */

.custody-cta {
  position: relative;
  overflow: hidden;
  padding-block: 6rem;
  background-color: var(--color-ink);
  color: var(--color-paper);
}

@media (min-width: 768px) {
  .custody-cta {
    padding-block: 9rem;
  }
}

.custody-cta__background {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.custody-cta__background img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transform: scale(1.05);
  filter: blur(11px);
}

.custody-cta__overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(35, 31, 32, 0.6);
}

.custody-cta__grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.04;
  pointer-events: none;
  background-image:
    linear-gradient(#faf8f5 1px, transparent 1px),
    linear-gradient(90deg, #faf8f5 1px, transparent 1px);
  background-size: 96px 96px;
}

.custody-cta .container {
  position: relative;
  z-index: 2;
}

.custody-cta__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.custody-cta__title {
  width: auto;
  max-width: none;
  font-family: var(--font-serif);
  font-size: 2.25rem;
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--color-paper);
}

@media (min-width: 768px) {
  .custody-cta__title {
    font-size: 3rem;
  }
}

@media (min-width: 1024px) {
  .custody-cta__title {
    font-size: 3.75rem;
    line-height: 1.02;
    letter-spacing: -0.025em;
  }
}

.custody-cta__title-accent {
  font-style: normal;
  font-weight: 600;
  color: var(--color-paper);
}

.custody-cta__subtitle {
  max-width: 42rem;
  margin-top: 1.75rem;
  color: rgba(250, 248, 245, 0.8);
  font-weight: 300;
  font-size: 1.125rem;
  line-height: 1.625;
}

@media (min-width: 768px) {
  .custody-cta__subtitle {
    font-size: 1.25rem;
    line-height: 1.625;
  }
}

.custody-cta__actions {
  margin-top: 2.5rem;
}

.custody-cta__button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 2.25rem;
  background-color: var(--color-teal);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  white-space: nowrap;
  transition: background-color 0.3s ease;
}

.custody-page a.custody-cta__button {
  color: var(--color-ink);
}

.custody-cta__button .icon--arrow {
  stroke: currentColor;
  fill: none;
  transition: transform 0.2s ease;
}

.custody-cta__button:hover {
  background-color: var(--color-paper);
}

.custody-cta__button:hover .icon--arrow {
  transform: translateX(4px);
}
