@layer base {
  :root {
    --tm-scroll-track: rgba(125, 107, 93, 0.12);
    --tm-scroll-thumb: linear-gradient(
      180deg,
      rgba(158, 137, 118, 0.96) 0%,
      rgba(125, 107, 93, 0.92) 100%
    );
    --tm-scroll-thumb-hover: linear-gradient(
      180deg,
      rgba(180, 158, 138, 0.98) 0%,
      rgba(109, 90, 76, 0.96) 100%
    );
  }

  html.lenis,
  html.lenis body {
    height: auto;
  }

  .lenis.lenis-smooth {
    scroll-behavior: auto !important;
  }

  .lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
  }

  html {
    scrollbar-width: thin;
    scrollbar-color: rgba(125, 107, 93, 0.88) rgba(125, 107, 93, 0.12);
  }

  body::-webkit-scrollbar {
    width: 12px;
  }

  body::-webkit-scrollbar-track {
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.42),
        rgba(245, 241, 235, 0.18)
      ),
      var(--tm-scroll-track);
    border-left: 1px solid rgba(158, 137, 118, 0.1);
  }

  body::-webkit-scrollbar-thumb {
    background: var(--tm-scroll-thumb);
    border-radius: 999px;
    border: 2px solid rgba(245, 241, 235, 0.82);
    box-shadow:
      0 8px 20px rgba(125, 107, 93, 0.16),
      inset 0 1px 1px rgba(255, 255, 255, 0.3);
  }

  body::-webkit-scrollbar-thumb:hover {
    background: var(--tm-scroll-thumb-hover);
  }

  body::-webkit-scrollbar-corner {
    background: transparent;
  }

  body.tm-warm-theme {
    background: #f5f1eb;
    color: #3f3b34;
  }

  .material-symbols-outlined {
    font-family: "Material Symbols Outlined";
    font-style: normal;
    font-weight: normal;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    display: inline-block;
    -webkit-font-smoothing: antialiased;
    font-variation-settings:
      "FILL" 0,
      "wght" 300,
      "GRAD" 0,
      "opsz" 24;
  }
}

@layer components {
  .tm-scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    z-index: 80;
    pointer-events: none;
    overflow: hidden;
    background: linear-gradient(
      90deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(158, 137, 118, 0.08) 50%,
      rgba(255, 255, 255, 0) 100%
    );
  }

  .tm-scroll-progress__bar {
    position: absolute;
    inset: 0;
    transform-origin: left center;
    transform: scaleX(0);
    background: linear-gradient(
      90deg,
      rgba(212, 183, 157, 0.92) 0%,
      rgba(158, 137, 118, 0.98) 38%,
      rgba(125, 107, 93, 0.98) 100%
    );
    box-shadow:
      0 0 24px rgba(158, 137, 118, 0.34),
      0 0 8px rgba(125, 107, 93, 0.24);
  }

  .tm-scroll-progress__glow {
    position: absolute;
    top: 50%;
    left: -10%;
    width: 22%;
    height: 18px;
    opacity: 0;
    filter: blur(12px);
    transform: translateY(-50%);
    background: radial-gradient(
      circle,
      rgba(212, 183, 157, 0.55) 0%,
      rgba(212, 183, 157, 0) 72%
    );
    transition: opacity 200ms ease;
  }

  #navbar {
    position: fixed;
    inset-inline: 0;
    top: 0;
    z-index: 50;
  }

  #mobileMenu {
    z-index: 40;
  }

  .premium-blur {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .serif-heading,
  .serif-text,
  .serif-font {
    font-family: "Playfair Display", "Newsreader", serif;
  }

  body.tm-warm-theme #navbar {
    border: 1px solid rgba(158, 137, 118, 0.18);
    box-shadow: 0 10px 30px rgba(158, 137, 118, 0.08);
    background: rgba(251, 249, 246, 0.82);
  }

  body.tm-warm-theme #navbar .brand-wordmark,
  body.tm-warm-theme #line1,
  body.tm-warm-theme #line2 {
    color: #3f3b34;
    background-color: #3f3b34;
  }

  body.tm-warm-theme .book-now-btn,
  body.tm-warm-theme .mobile-contact-link {
    background-color: #9e8976;
    border-color: #9e8976;
    color: #fff;
    transition:
      color 150ms cubic-bezier(0.4, 0, 0.2, 1),
      background-color 150ms cubic-bezier(0.4, 0, 0.2, 1),
      border-color 150ms cubic-bezier(0.4, 0, 0.2, 1);
  }

  body.tm-warm-theme .book-now-btn:hover,
  body.tm-warm-theme .mobile-contact-link:hover {
    background: #7d6b5d;
    border-color: #7d6b5d;
    color: #fff;
  }

  body.tm-warm-theme .brand-lockup {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
  }

  body.tm-warm-theme .brand-mark-wrap {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    border-radius: 9999px;
    width: 2.75rem;
    height: 2.75rem;
    background: transparent;
    border: none;
    padding-left: 0;
  }

  body.tm-warm-theme .brand-mark {
    height: 2.3rem;
    width: auto;
    max-width: none;
  }

  body.tm-warm-theme .brand-wordmark {
    display: inline-block;
    white-space: nowrap;
    background: transparent;
    font-weight: 600;
    text-transform: uppercase;
    color: #7d6b5d;
    opacity: 1;
    text-shadow: none;
    line-height: 1;
    letter-spacing: 0.18em;
    font-size: 1rem;
  }

  body.tm-warm-theme #mobileMenu {
    background: rgba(245, 241, 232, 0.96);
  }

  body.tm-warm-theme #mobileMenu a {
    color: #3f3b34;
  }

  body.tm-warm-theme #mobileMenu a:hover,
  body.tm-warm-theme #homeFooter a:hover,
  body.tm-warm-theme #homeFooter .tm-footer-link:hover {
    color: #9e8976;
  }

  body.tm-warm-theme #homeFooter {
    background: linear-gradient(
      180deg,
      rgba(245, 241, 235, 0.35),
      rgba(251, 248, 241, 0.92)
    );
    border-color: transparent;
  }

  body.tm-warm-theme #homeFooter .tm-footer-shell {
    border: 1px solid rgba(158, 137, 118, 0.14);
    background: radial-gradient(
        circle at top left,
        rgba(212, 199, 184, 0.22),
        transparent 32%
      ),
      linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.82),
        rgba(251, 248, 241, 0.96)
      );
    box-shadow:
      0 28px 60px rgba(111, 98, 89, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.55);
  }

  body.tm-warm-theme #homeFooter .tm-footer-card {
    border: 1px solid rgba(158, 137, 118, 0.1);
    background: rgba(255, 255, 255, 0.54);
    box-shadow: 0 16px 32px rgba(125, 107, 93, 0.08);
    backdrop-filter: blur(10px);
    height: 100%;
    display: flex;
    flex-direction: column;
  }

  body.tm-warm-theme #homeFooter h2,
  body.tm-warm-theme #homeFooter h4 {
    color: #9e8976;
  }

  /* Keep footer section headings visible even when utility classes set white text */
  #homeFooter h4 {
    color: #9e8976 !important;
    opacity: 1;
  }

  body.tm-warm-theme #homeFooter p,
  body.tm-warm-theme #homeFooter li,
  body.tm-warm-theme #homeFooter a,
  body.tm-warm-theme #homeFooter .tm-footer-link,
  body.tm-warm-theme #homeFooter .text-slate-400,
  body.tm-warm-theme #homeFooter .text-slate-500 {
    color: #716a61;
  }

  body.tm-warm-theme #homeFooter .tm-footer-kicker {
    color: #a69080;
  }

  body.tm-warm-theme #homeFooter .tm-footer-social {
    background: linear-gradient(
      135deg,
      rgba(158, 137, 118, 0.92),
      rgba(125, 107, 93, 0.96)
    );
    border-color: rgba(158, 137, 118, 0.24);
    color: #fff;
    box-shadow: 0 14px 28px rgba(125, 107, 93, 0.18);
  }

  body.tm-warm-theme #homeFooter .tm-footer-social:hover {
    background: linear-gradient(
      135deg,
      rgba(125, 107, 93, 0.96),
      rgba(96, 81, 70, 0.98)
    );
    color: #fff;
    transform: translateY(-2px);
  }

  body.tm-warm-theme #homeFooter .tm-footer-divider {
    border-color: rgba(158, 137, 118, 0.16);
    align-items: stretch;
  }

  body.tm-warm-theme #homeFooter .tm-footer-divider > div {
    height: 100%;
  }

  body.tm-warm-theme #homeFooter .tm-footer-shell > .mt-8 {
    border-top: none;
  }
}

@media (max-width: 768px) {
  #homeFooter .tm-footer-shell {
    padding: 1.25rem !important;
    border-radius: 1.75rem !important;
  }

  #homeFooter .tm-footer-card {
    padding: 1.35rem !important;
    border-radius: 1.5rem !important;
  }

  #homeFooter .tm-footer-card ul {
    font-size: 0.95rem !important;
    line-height: 1.65 !important;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  #homeFooter .tm-footer-card li {
    margin: 0 !important;
  }

  #homeFooter .tm-footer-card li + li {
    margin-top: 0.9rem !important;
  }

  #homeFooter .tm-footer-card li a {
    display: inline !important;
    white-space: normal !important;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  #homeFooter .tm-footer-card li:last-child {
    max-width: none !important;
  }

  #homeFooter .tm-footer-social {
    width: 42px !important;
    height: 42px !important;
  }

  #homeFooter .tm-footer-card .flex.items-center.gap-4.pt-5 {
    gap: 0.85rem !important;
    padding-top: 1.1rem !important;
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  #homeFooter .tm-footer-shell {
    padding: 1rem !important;
  }

  #homeFooter .tm-footer-card {
    padding: 1rem !important;
  }

  #homeFooter .tm-footer-card h4 {
    margin-bottom: 1rem !important;
  }

  #homeFooter .tm-footer-card ul {
    font-size: 0.86rem !important;
    line-height: 1.55 !important;
  }

  #homeFooter .tm-footer-card li + li {
    margin-top: 0.8rem !important;
  }

  #homeFooter .tm-footer-card .flex.items-center.gap-4.pt-5 {
    justify-content: flex-start !important;
    gap: 0.7rem !important;
  }
}

.tm-toast {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 99999;
  width: min(24rem, calc(100vw - 2rem));
  margin: 0 !important;
  padding: 1rem 1.25rem !important;
  border-radius: 0.75rem;
  border: none;
  background: #22c55e !important;
  color: white !important;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateX(400px);
  pointer-events: none;
  transition: all 220ms ease;
  visibility: hidden;
  animation: none;
}

.tm-toast.tm-toast-error {
  background: #ef4444 !important;
}

.tm-toast.tm-toast-show {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
  visibility: visible;
}

@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

@media (max-width: 640px) {
  .tm-toast {
    top: auto;
    right: 10px;
    bottom: 10px;
    left: 10px;
    width: auto;
  }
}
