:root {
    --plum: #3D2E4F;          /* main text */
    --plum-soft: #6E6183;     /* secondary text */
    --paper: #FFFDF7;         /* page background */
    --sun: #F6B93B;           /* lion gold */
    --sun-soft: #FDEFD2;      /* pale gold surface */
    --coral: #FF7A59;         /* action / accent */
    --coral-deep: #E85F3E;
    --leaf: #3FA796;          /* teal-green support */
    --leaf-soft: #E2F3EF;
    --sky-soft: #EAF2FB;
    --radius: 18px;
    --shadow-card: 0 3px 8px rgba(61,46,79,.07), 0 14px 30px rgba(61,46,79,.10);
    --shadow-modal: 0 28px 70px rgba(61,46,79,.30);
  }

  * { margin: 0; padding: 0; box-sizing: border-box; }
  html { scroll-behavior: smooth; }

/* ---------- Optimized Body Background ---------- */
body {
  font-family: 'Nunito', sans-serif;
  color: var(--plum);
  background-color: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* Replaces background-attachment: fixed with a GPU-friendly isolated layer */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(
      rgba(255, 253, 247, 0.75),
      rgba(255, 253, 247, 0.75)
    ),
    url('../assets/images/tcrwebsitebg.png');
  background-repeat: repeat-y;
  background-position: top center;
  background-size: 100% auto;
  z-index: -1;
  pointer-events: none;
  transform: translateZ(0); /* Force isolated GPU compositing layer */
}

  .display { font-family: 'Baloo 2', sans-serif; line-height: 1.12; }

  /* ---------- Header ---------- */
  header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255,253,247,.93);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #F0EAD9;
  }

  .header-inner {
    max-width: 1060px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }

  .brand {
    font-family: 'Baloo 2', sans-serif;
    font-weight: 800;
    font-size: 1.08rem;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--plum);
  }

  .brand-mark {
    width: 50px; height: 50px;
    border-radius: 50%;
    background: var(--sun);
    display: grid;
    place-items: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 3px 0 rgba(61,46,79,.15);
  }

  .brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  nav { display: flex; gap: 2px; }

  nav button {
    font-family: 'Nunito', sans-serif;
    font-size: .95rem;
    font-weight: 700;
    color: var(--plum-soft);
    background: none;
    border: none;
    padding: 9px 14px;
    border-radius: 100px;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
  }

  nav button:hover { background: var(--sun-soft); color: var(--plum); }
  nav button:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }

  @media (max-width: 680px) { nav { display: none; } }

  /* ---------- Hero ---------- */
  .hero {
    max-width: 1060px;
    margin: 0 auto;
    padding: 76px 24px 56px;
    text-align: center;
    position: relative;
    overflow: hidden;
  }

  .hero-lion {
    width: 180px; 
    height: 180px;
    display: inline-block;
    margin-bottom: 10px;
    animation: peek 2s ease-in-out infinite;
  }

  .hero-lion img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
  }

  @keyframes peek {
    0%, 100% { transform: rotate(-4deg); }
    50% { transform: rotate(5deg); }
  }

  .hero-eyebrow {
    display: inline-block;
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--coral-deep);
    background: #FFEDE6;
    padding: 7px 16px;
    border-radius: 100px;
    margin-bottom: 20px;
  }

  .hero h1 {
    font-size: clamp(2.1rem, 5.6vw, 3.5rem);
    font-weight: 800;
    max-width: 720px;
    margin: 0 auto 18px;
  }

  .hero h1 .hl {
    color: var(--coral);
    position: relative;
    white-space: nowrap;
  }

  .hero h1 .hl::after {
    content: '';
    position: absolute;
    left: 2px; right: 2px; bottom: 6px;
    height: 12px;
    background: var(--sun-soft);
    border-radius: 6px;
    z-index: -1;
  }

  .hero .tagline {
    max-width: 540px;
    margin: 0 auto 32px;
    color: var(--plum-soft);
    font-size: 1.12rem;
    font-weight: 600;
  }

  .hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

  .btn {
    font-family: 'Baloo 2', sans-serif;
    font-size: 1.02rem;
    font-weight: 700;
    border-radius: 100px;
    padding: 13px 30px;
    cursor: pointer;
    border: none;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  }

  .btn:focus-visible { outline: 3px solid var(--plum); outline-offset: 2px; }

  .btn-primary {
    background: var(--coral);
    color: #fff;
    box-shadow: 0 4px 0 var(--coral-deep);
  }
  .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--coral-deep); }
  .btn-primary:active { transform: translateY(1px); box-shadow: 0 2px 0 var(--coral-deep); }

  .btn-ghost {
    background: #fff;
    color: var(--plum);
    border: 2px solid #EBE3D2;
  }
  .btn-ghost:hover { border-color: var(--sun); background: var(--sun-soft); }

  .hero-trust {
    margin-top: 30px;
    font-size: .9rem;
    font-weight: 700;
    color: var(--plum-soft);
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
  }

  .hero-trust span { display: inline-flex; align-items: center; gap: 7px; }
  .hero-trust svg { color: var(--leaf); flex-shrink: 0; }

  /* ---------- Section cards ---------- */
  .sections {
    max-width: 1060px;
    margin: 0 auto;
    padding: 8px 24px 90px;
  }

  .sections-label {
    text-align: center;
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--plum-soft);
    margin-bottom: 26px;
  }

  .card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 18px;
  }

  .card {
    text-align: left;
    background: #fff;
    border: 2px solid #F0EAD9;
    border-radius: var(--radius);
    padding: 26px 24px 22px;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .card:hover, .card:focus-visible {
    transform: translateY(-5px);
    box-shadow: var(--shadow-card);
  }
  .card:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }

  .card:nth-child(1):hover { border-color: var(--sun); }
  .card:nth-child(2):hover { border-color: var(--coral); }
  .card:nth-child(3):hover { border-color: var(--leaf); }
  .card:nth-child(4):hover { border-color: #7FA8E0; }

  .card-icon {
    width: 50px; height: 50px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 1.5rem;
    flex-shrink: 0;
  }
  .card:nth-child(1) .card-icon { background: var(--sun-soft); }
  .card:nth-child(2) .card-icon { background: #FFEDE6; }
  .card:nth-child(3) .card-icon { background: var(--leaf-soft); }
  .card:nth-child(4) .card-icon { background: var(--sky-soft); }

  .card h3 {
    font-family: 'Baloo 2', sans-serif;
    font-weight: 700;
    font-size: 1.18rem;
  }

  .card p { font-size: .94rem; color: var(--plum-soft); flex-grow: 1; }

  .card-cta {
    font-size: .9rem;
    font-weight: 800;
    color: var(--coral-deep);
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  .card-cta svg { transition: transform .18s ease; }
  .card:hover .card-cta svg { transform: translateX(4px); }

  #hero, #locations { scroll-margin-top: 76px; }

  /* ---------- Locations ---------- */
  .locations {
    max-width: 1060px;
    margin: 0 auto;
    padding: 8px 24px 90px;
  }

  .location-card {
    background: #fff;
    border: 2px solid #F0EAD9;
    border-radius: var(--radius);
    padding: 26px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
  }

  .location-info h3 {
    font-family: 'Baloo 2', sans-serif;
    font-weight: 700;
    font-size: 1.18rem;
    margin-bottom: 6px;
  }

  .location-info > p {
    font-size: .94rem;
    color: var(--plum-soft);
    font-weight: 600;
    margin-bottom: 12px;
  }

  .location-links {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
  }

  .location-links a {
    font-size: .9rem;
    font-weight: 800;
    color: var(--coral-deep);
    text-decoration: none;
  }
  .location-links a:hover { text-decoration: underline; }
  .location-links a:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }

  /* ---------- Testimonials ---------- */
  .testimonials {
    max-width: 1060px;
    margin: 0 auto;
    padding: 8px 24px 90px;
  }

  .testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 18px;
  }

  .testimonial {
    background: #fff;
    border: 2px solid #F0EAD9;
    border-radius: var(--radius);
    padding: 26px 24px 22px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  }
  .testimonial:hover { transform: translateY(-5px); box-shadow: var(--shadow-card); border-color: var(--sun); }

  .testimonial-stars { color: var(--sun); font-size: 1rem; letter-spacing: 2px; }

  .testimonial blockquote {
    font-size: .96rem;
    color: var(--plum);
    font-weight: 600;
    flex-grow: 1;
  }

  .testimonial figcaption {
    font-size: .88rem;
    font-weight: 800;
    color: var(--plum-soft);
  }

  /* ---------- Testimonial Image Cards ---------- */
.testimonial-card {
  background: #fff;
  border: 2px solid #F0EAD9;
  border-radius: var(--radius);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card);
  border-color: var(--sun);
}

.testimonial-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: calc(var(--radius) - 6px);
  object-fit: contain;
}

/* ---------- Optimized Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  /* Removed expensive backdrop-filter: blur(4px) */
  background: rgba(61, 46, 79, 0.65);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
  will-change: opacity; /* Hints the browser to prep GPU layer */
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--paper);
  border-radius: 22px;
  max-width: 620px;
  width: 100%;
  max-height: min(84vh, 740px);
  overflow-y: auto;
  box-shadow: var(--shadow-modal);
  transform: translateY(18px) scale(.97);
  transition: transform .22s ease;
  will-change: transform; /* Isolates modal paint steps */
}

.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  /* Changed from position: sticky to static to prevent expensive layout calculations during scale transform */
  position: relative;
  background: var(--paper);
  padding: 26px 30px 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 2px solid #F0EAD9;
  z-index: 1;
}

  .modal-header h2 {
    font-family: 'Baloo 2', sans-serif;
    font-weight: 800;
    font-size: 1.55rem;
    line-height: 1.15;
  }

  .modal-eyebrow {
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--coral-deep);
    display: block;
    margin-bottom: 5px;
  }

  .modal-close {
    background: var(--sun-soft);
    border: none;
    width: 40px; height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: grid;
    place-items: center;
    color: var(--plum);
    flex-shrink: 0;
    transition: background .15s ease, transform .15s ease;
  }
  .modal-close:hover { background: var(--sun); transform: rotate(90deg); }
  .modal-close:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }

  .modal-body { padding: 22px 30px 30px; }
  .modal-body > p { color: var(--plum-soft); margin-bottom: 16px; font-weight: 600; }

  .modal-body ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 18px;
  }

  .modal-body li {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: #fff;
    border: 2px solid #F0EAD9;
    border-radius: 14px;
    padding: 14px 16px;
    font-size: .95rem;
  }

  .li-emoji { font-size: 1.3rem; line-height: 1.3; flex-shrink: 0; }
  .modal-body li strong { display: block; font-size: 1rem; color: var(--plum); font-weight: 800; }
  .modal-body li span { color: var(--plum-soft); font-size: .92rem; }

  .modal-footer { padding: 0 30px 28px; display: flex; gap: 10px; flex-wrap: wrap; }

  /* Contact bits */
  .contact-quick {
    display: grid;
    gap: 10px;
    margin-bottom: 20px;
  }
  .contact-quick a {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 2px solid #F0EAD9;
    border-radius: 14px;
    padding: 13px 16px;
    text-decoration: none;
    color: var(--plum);
    font-weight: 700;
    font-size: .95rem;
    transition: border-color .15s ease, transform .15s ease;
  }
  .contact-quick a:hover { border-color: var(--coral); transform: translateY(-2px); }
  .contact-quick a:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }
  .contact-quick .cq-icon {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: var(--sun-soft);
    display: grid;
    place-items: center;
    font-size: 1.1rem;
    flex-shrink: 0;
  }
  .contact-quick small { display: block; font-weight: 600; color: var(--plum-soft); }

  .field { margin-bottom: 14px; }
  .field-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
  }
  .field label { display: block; font-size: .88rem; font-weight: 800; margin-bottom: 6px; }
  .field input, .field textarea {
    width: 100%;
    font-family: 'Nunito', sans-serif;
    font-size: .95rem;
    font-weight: 600;
    padding: 12px 15px;
    border: 2px solid #EBE3D2;
    border-radius: 12px;
    color: var(--plum);
    background: #fff;
    transition: border-color .15s ease;
  }
  .field input:focus, .field textarea:focus {
    outline: none;
    border-color: var(--coral);
    box-shadow: 0 0 0 4px rgba(255,122,89,.15);
  }
  .form-success {
    display: none;
    background: var(--leaf-soft);
    color: #1E6B5C;
    border-radius: 12px;
    padding: 14px 16px;
    font-weight: 800;
    margin-top: 14px;
  }
  .form-error {
    display: none;
    background: #FFEDE6;
    color: var(--coral-deep);
    border-radius: 12px;
    padding: 14px 16px;
    font-weight: 800;
    margin-top: 14px;
  }

  /* ---------- Footer ---------- */
  footer {
    border-top: 2px solid #F0EAD9;
    padding: 30px 24px;
    text-align: center;
    color: var(--plum-soft);
    font-size: .9rem;
    font-weight: 600;
  }
  footer strong { color: var(--plum); }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
    html { scroll-behavior: auto; }
  }


  /* ---------- Testimonial Image Cards ---------- */
.testimonial-card {
  background: #fff;
  border: 2px solid #F0EAD9;
  border-radius: var(--radius);
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.testimonial-card:hover,
.testimonial-card:focus-visible {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card);
  border-color: var(--sun);
}

.testimonial-card:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 2px;
}

.testimonial-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: calc(var(--radius) - 6px);
  object-fit: contain;
}

/* ---------- Full Image Viewer Modal ---------- */
.modal-image-container {
  max-width: 700px;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  position: relative;
  display: flex;
  justify-content: center;
}

.modal-image-container img {
  width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: var(--shadow-modal);
  background: #fff;
}

.floating-close {
  position: absolute;
  top: -16px;
  right: -16px;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ---------- Floating Back to Top Button ---------- */
.back-to-top-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 90;
  font-family: 'Baloo 2', sans-serif;
  font-size: .95rem;
  font-weight: 700;
  background: #fff;
  color: var(--plum);
  border: 2px solid #EBE3D2;
  border-radius: 100px;
  padding: 10px 20px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(61,46,79,.15);
  transition: transform .2s ease, opacity .2s ease, background .2s ease, border-color .2s ease;
  opacity: 0;
  pointer-events: none;
}

.back-to-top-btn.visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top-btn:hover {
  border-color: var(--sun);
  background: var(--sun-soft);
  transform: translateY(-3px);
}

.back-to-top-btn:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 2px;
}