/* =====================================================
   Tibb House Theme — Global Styles
   Works alongside the Tibb House Core plugin.
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,600&family=Inter:wght@300;400;500;600&display=swap');

/* ── Tokens ──
   Light palette, derived from the Tibb House crest logo (deep green +
   gold trefoil on an ivory medallion). The deep green is now reserved
   for text/accents/borders rather than large solid backgrounds, so the
   overall site reads as light and airy instead of dark-green-dominant. */
:root {
  --th-green:        #223a17;
  --th-green-mid:    #33511f;
  --th-green-light:  #eef2e6;
  --th-gold:         #bc904f;
  --th-gold-light:   #e4c68f;
  --th-cream:        #fbf8f0;
  --th-white:        #ffffff;
  --th-dark:         #223a17;
  --th-text:         #33392e;
  --th-muted:        #7a7f72;
  --th-border:       rgba(34,58,23,.12);
  --th-shadow-sm:    0 2px 8px rgba(34,58,23,.06);
  --th-shadow-md:    0 6px 24px rgba(34,58,23,.1);
  --th-radius:       12px;
  --th-radius-pill:  9999px;
  --th-font-heading: 'Cormorant Garamond', Georgia, serif;
  --th-font-body:    'Inter', system-ui, sans-serif;
  --th-nav-h:        72px;
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--th-font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--th-text);
  background: var(--th-cream);
  margin: 0;
  padding-top: var(--th-nav-h); /* offset for fixed nav */
  overflow-x: hidden; /* prevent horizontal scroll from absolute/wide elements */
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--th-green); }
a:hover { color: var(--th-gold); }

h1,h2,h3,h4,h5,h6 {
  font-family: var(--th-font-heading);
  color: var(--th-dark);
  line-height: 1.2;
  margin: 0 0 .6em;
}

/* =====================================================
   NAVIGATION
   ===================================================== */
/* Screen-reader only utility */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

#tibbhouse-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--th-nav-h);
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--th-border);
  z-index: 9000;
  transition: box-shadow .3s;
}

#tibbhouse-nav.scrolled {
  box-shadow: var(--th-shadow-md);
}

.th-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Logo */
.th-nav-logo {
  text-decoration: none;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.th-logo-svg {
  width: auto;
  height: 88px;
}

.th-nav-logo img {
  height: 88px;
  width: auto;
}

/* Menu */
.th-nav-menu {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.th-nav-menu > li > a {
  display: block;
  padding: 8px 16px;
  font-size: .85rem;
  font-weight: 500;
  color: var(--th-dark);
  text-decoration: none;
  border-radius: var(--th-radius-pill);
  border: 1px solid rgba(34,58,23,.18);
  transition: background .2s, color .2s, border-color .2s;
  letter-spacing: .02em;
}

.th-nav-menu > li > a:hover,
.th-nav-menu > li.current-menu-item > a,
.th-nav-menu > li.current-menu-ancestor > a {
  background: var(--th-green-light);
  color: var(--th-green);
}

/* CTA button in nav */
.th-nav-menu > li.menu-cta > a {
  background: var(--th-gold);
  color: var(--th-dark);
  font-weight: 600;
  padding: 8px 20px;
}

.th-nav-menu > li.menu-cta > a:hover {
  background: var(--th-green);
  color: var(--th-white);
}

/* Dropdown */
.th-nav-menu .sub-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 200px;
  background: var(--th-white);
  border: 1px solid var(--th-border);
  border-radius: var(--th-radius);
  box-shadow: var(--th-shadow-md);
  list-style: none;
  padding: 8px;
  margin: 0;
  z-index: 100;
}

.th-nav-menu li {
  position: relative;
}

.th-nav-menu li:hover > .sub-menu {
  display: block;
}

.th-nav-menu .sub-menu a {
  display: block;
  padding: 9px 14px;
  font-size: .83rem;
  color: var(--th-dark);
  text-decoration: none;
  border-radius: 8px;
  transition: background .15s;
}

.th-nav-menu .sub-menu a:hover {
  background: var(--th-green-light);
  color: var(--th-green);
}

/* Hamburger */
.th-nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--th-dark);
  border-radius: 8px;
  transition: background .2s;
}

.th-nav-toggle:hover { background: var(--th-green-light); }

.th-nav-toggle svg { display: block; }

/* Mobile nav */
@media (max-width: 800px) {
  .th-nav-toggle { display: flex; align-items: center; justify-content: center; }

  .th-nav-menu-wrap {
    position: fixed;
    top: var(--th-nav-h);
    left: 0;
    right: 0;
    bottom: 0;
    /* explicit height as belt-and-braces for mobile browsers */
    height: calc(100dvh - var(--th-nav-h));
    min-height: calc(100vh - var(--th-nav-h)); /* dvh fallback */
    background: rgba(10,61,46,.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 32px 5% 48px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 8999;
    box-sizing: border-box;
    /* hidden state */
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: visibility 0s linear .22s, opacity .22s ease, transform .22s ease;
  }

  .th-nav-menu-wrap.open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    transition-delay: 0s;
  }

  .th-nav-menu {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .th-nav-menu > li > a {
    color: rgba(255,255,255,.9);
    font-size: 1.1rem;
    padding: 12px 16px;
    width: 100%;
  }

  .th-nav-menu > li > a:hover,
  .th-nav-menu > li.current-menu-item > a {
    background: rgba(201,168,76,.15);
    color: var(--th-gold-light);
  }

  .th-nav-menu .sub-menu {
    position: static;
    display: block;
    background: none;
    border: none;
    box-shadow: none;
    padding-left: 16px;
  }

  .th-nav-menu .sub-menu a {
    color: rgba(255,255,255,.6);
  }

  .th-nav-menu > li.menu-cta > a {
    margin-top: 8px;
    background: var(--th-gold);
    color: var(--th-dark);
  }
}

/* =====================================================
   HERO (standard pages — not CPT pages)
   ===================================================== */
.tibbhouse-page-hero {
  background: linear-gradient(135deg, var(--th-cream) 0%, var(--th-green-light) 100%);
  padding: 72px 5%;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--th-border);
}

.tibbhouse-page-hero::before {
  content: '';
  position: absolute;
  top: -120px; right: -120px;
  width: 340px; height: 340px;
  background: radial-gradient(circle, rgba(188,144,79,.14) 0%, transparent 70%);
  border-radius: 50%;
}

.tibbhouse-page-hero h1 {
  font-family: var(--th-font-heading);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 600;
  color: var(--th-dark);
  margin: 0;
  position: relative;
}

/* =====================================================
   MAIN CONTENT AREA
   ===================================================== */
.tibbhouse-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 5%;
}

.tibbhouse-main.with-sidebar {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 60px;
  align-items: start;
}

/* ── Entry (standard posts / pages) ── */
.entry-content {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--th-text);
}

.entry-content h2 { font-size: 1.7rem; color: var(--th-green); margin-top: 2em; }
.entry-content h3 { font-size: 1.35rem; color: var(--th-dark); margin-top: 1.6em; }
.entry-content p  { margin: 0 0 1.2em; }
.entry-content a  { color: var(--th-green); text-decoration: underline; text-decoration-color: rgba(10,61,46,.3); }
.entry-content a:hover { color: var(--th-gold); }

.entry-content img {
  border-radius: var(--th-radius);
  margin: 1.5em 0;
}

.entry-content ul, .entry-content ol {
  padding-left: 1.5em;
  margin: 0 0 1.2em;
}

.entry-content li { margin-bottom: .4em; }

.entry-content blockquote {
  border-left: 4px solid var(--th-gold);
  margin: 2em 0;
  padding: 1em 1.5em;
  background: var(--th-green-light);
  border-radius: 0 var(--th-radius) var(--th-radius) 0;
  font-family: var(--th-font-heading);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--th-green);
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: .9rem;
}

.entry-content th {
  background: var(--th-green);
  color: var(--th-white);
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
}

.entry-content td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--th-border);
}

.entry-content tr:nth-child(even) td { background: var(--th-green-light); }

/* ── Page breadcrumbs ── */
.tibbhouse-theme-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  color: var(--th-muted);
  margin-bottom: 28px;
}

.tibbhouse-theme-breadcrumbs a { color: var(--th-muted); text-decoration: none; }
.tibbhouse-theme-breadcrumbs a:hover { color: var(--th-green); }
.tibbhouse-theme-breadcrumbs .sep { opacity: .4; }

/* =====================================================
   SIDEBAR
   ===================================================== */
.tibbhouse-sidebar {
  position: sticky;
  top: calc(var(--th-nav-h) + 24px);
}

.widget {
  background: var(--th-white);
  border: 1px solid var(--th-border);
  border-radius: var(--th-radius);
  padding: 24px;
  margin-bottom: 24px;
}

.widget-title {
  font-family: var(--th-font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--th-green);
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--th-gold);
}

.widget ul { list-style: none; padding: 0; margin: 0; }
.widget ul li { padding: 7px 0; border-bottom: 1px solid var(--th-border); font-size: .88rem; }
.widget ul li:last-child { border-bottom: none; }
.widget ul li a { text-decoration: none; color: var(--th-text); }
.widget ul li a:hover { color: var(--th-green); }

/* =====================================================
   BLOG / POSTS LIST
   ===================================================== */
.tibbhouse-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}

.tibbhouse-post-card {
  background: var(--th-white);
  border-radius: var(--th-radius);
  overflow: hidden;
  border: 1px solid var(--th-border);
  transition: transform .25s, box-shadow .25s;
  display: flex;
  flex-direction: column;
}

.tibbhouse-post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--th-shadow-md);
}

.tibbhouse-post-card-thumb {
  height: 200px;
  overflow: hidden;
  background: var(--th-green-light);
}

.tibbhouse-post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}

.tibbhouse-post-card:hover .tibbhouse-post-card-thumb img {
  transform: scale(1.06);
}

.tibbhouse-post-card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tibbhouse-post-card-meta {
  font-size: .75rem;
  color: var(--th-muted);
  margin-bottom: 8px;
  letter-spacing: .05em;
}

.tibbhouse-post-card-title {
  font-family: var(--th-font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--th-dark);
  text-decoration: none;
  display: block;
  margin-bottom: 10px;
  line-height: 1.25;
}

.tibbhouse-post-card-title:hover { color: var(--th-green); }

.tibbhouse-post-card-excerpt {
  font-size: .88rem;
  color: var(--th-muted);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tibbhouse-post-card-footer {
  font-size: .82rem;
  font-weight: 600;
  color: var(--th-green);
  display: flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
}

/* =====================================================
   PAGINATION
   ===================================================== */
.navigation.pagination {
  margin-top: 48px;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.nav-links a,
.nav-links .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--th-dark);
  border: 1px solid var(--th-border);
  background: var(--th-white);
  transition: background .2s, color .2s, border-color .2s;
}

.nav-links a:hover {
  background: var(--th-green);
  color: var(--th-white);
  border-color: var(--th-green);
}

.nav-links .current {
  background: var(--th-green);
  color: var(--th-white);
  border-color: var(--th-green);
}

/* =====================================================
   FOOTER
   ===================================================== */
#tibbhouse-footer {
  background: var(--th-green-light);
  color: var(--th-text);
  padding: 72px 5% 0;
  margin-top: 80px;
  border-top: 1px solid var(--th-border);
}

.th-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.th-footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--th-border);
}

.th-footer-cta-link {
  color: var(--th-gold) !important;
  font-weight: 600;
}

.th-footer-contact {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.th-footer-contact a {
  font-size: .88rem;
  color: var(--th-text);
  text-decoration: none;
  word-break: break-word;
}

.th-footer-contact a:hover { color: var(--th-gold); }

.th-footer-brand img.th-logo-svg,
.th-footer-brand .th-nav-logo img,
.th-footer-brand img {
  height: 100px;
  width: auto;
  margin-bottom: 8px;
}

.th-footer-brand .th-logo-svg text { fill: var(--th-dark) !important; }
.th-footer-brand .th-logo-svg text:last-child { fill: var(--th-gold) !important; }

.th-footer-brand p {
  font-size: .88rem;
  line-height: 1.75;
  color: var(--th-muted);
  margin: 16px 0 24px;
  max-width: 320px;
}

.th-footer-social {
  display: flex;
  gap: 10px;
}

.th-footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--th-white);
  border: 1px solid var(--th-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--th-green);
  text-decoration: none;
  font-size: .75rem;
  font-weight: 700;
  transition: background .2s, color .2s;
}

.th-footer-social a:hover {
  background: var(--th-gold);
  border-color: var(--th-gold);
  color: var(--th-white);
}

.th-footer-col h4 {
  font-family: var(--th-font-body);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--th-green);
  margin-bottom: 20px;
}

.footer-widget-title {
  font-family: var(--th-font-body) !important;
  font-size: .7rem !important;
  font-weight: 700 !important;
  letter-spacing: .25em !important;
  text-transform: uppercase !important;
  color: var(--th-green) !important;
  margin-bottom: 20px !important;
}

.th-footer-col ul,
#tibbhouse-footer .widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.th-footer-col ul li a,
#tibbhouse-footer .widget ul li a {
  font-size: .88rem;
  color: var(--th-text);
  text-decoration: none;
  transition: color .2s;
}

.th-footer-col ul li a:hover,
#tibbhouse-footer .widget ul li a:hover {
  color: var(--th-gold);
}

.th-footer-nav {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-direction: column;
  gap: 10px;
}

.th-footer-bottom {
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: .8rem;
  color: var(--th-muted);
}

.th-footer-bottom a {
  color: var(--th-muted);
  text-decoration: none;
  transition: color .2s;
}

.th-footer-bottom a:hover { color: var(--th-gold); }

/* =====================================================
   404 / SEARCH / MISC
   ===================================================== */
.tibbhouse-404-wrap,
.tibbhouse-search-wrap {
  max-width: 640px;
  margin: 80px auto;
  padding: 0 5%;
  text-align: center;
}

.tibbhouse-404-wrap h1 {
  font-size: 8rem;
  font-family: var(--th-font-heading);
  color: var(--th-green);
  line-height: 1;
  margin-bottom: 8px;
}

.tibbhouse-404-wrap h2 {
  font-size: 1.8rem;
  color: var(--th-dark);
  margin-bottom: 12px;
}

.tibbhouse-404-wrap p { color: var(--th-muted); margin-bottom: 28px; }

.th-search-form {
  display: flex;
  gap: 8px;
  max-width: 480px;
  margin: 0 auto 32px;
}

.th-search-form input[type="search"] {
  flex: 1;
  padding: 12px 18px;
  border: 1.5px solid var(--th-border);
  border-radius: var(--th-radius-pill);
  font-family: var(--th-font-body);
  font-size: .95rem;
  color: var(--th-text);
  background: var(--th-white);
  outline: none;
  transition: border-color .2s;
}

.th-search-form input[type="search"]:focus {
  border-color: var(--th-green);
}

.th-search-form button {
  background: var(--th-green);
  color: var(--th-white);
  border: none;
  border-radius: var(--th-radius-pill);
  padding: 12px 24px;
  font-family: var(--th-font-body);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}

.th-search-form button:hover { background: var(--th-gold); color: var(--th-dark); }

.th-back-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--th-green);
  color: var(--th-white);
  padding: 14px 32px;
  border-radius: var(--th-radius-pill);
  text-decoration: none;
  font-weight: 600;
  font-size: .9rem;
  transition: background .2s, transform .2s;
}

.th-back-home:hover {
  background: var(--th-gold);
  color: var(--th-dark);
  transform: translateY(-2px);
}

/* =====================================================
   RESPONSIVE — base grid breakpoints
   ===================================================== */
@media (max-width: 900px) {
  .tibbhouse-main.with-sidebar { grid-template-columns: 1fr; }
  .tibbhouse-sidebar { position: static; }
  .th-footer-grid { grid-template-columns: 1fr 1fr; }
  .th-footer-brand { grid-column: 1 / -1; }
  .th-home-about-inner { grid-template-columns: 1fr; }
  .th-home-about-visual { order: -1; }
}

/* =====================================================
   MOBILE OPTIMISATION
   ===================================================== */

/* ── Tablet + phone (≤ 768px) ── */
@media (max-width: 768px) {

  /* Nav — shrink height, smaller logo */
  :root { --th-nav-h: 68px; }
  .th-nav-logo-img { height: 56px !important; }

  /* Hero — centre everything, tighter padding */
  .th-home-hero {
    min-height: 100svh !important;
    min-height: 100vh !important; /* fallback */
  }
  .th-home-hero > div:last-child {
    padding: 56px 6% 72px !important;
    text-align: center !important;
  }
  .th-home-hero h1 {
    text-align: center !important;
    max-width: 100% !important;
  }
  .th-home-hero p {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  /* badge pill — centre */
  .th-home-hero .th-reveal-init:first-child {
    margin-left: auto;
    margin-right: auto;
  }
  /* CTA buttons — full-width stack */
  .th-home-hero div[style*="display:flex"] {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }
  .th-home-hero div[style*="display:flex"] a {
    text-align: center !important;
  }

  /* Disable parallax on mobile — saves battery, avoids jank */
  [data-parallax] {
    transform: none !important;
    will-change: auto !important;
  }

  /* Carousel sections */
  .th-homepage-section { padding: 56px 0 !important; }
  .th-carousel-track > * { width: min(288px, 82vw) !important; }
  .th-carousel-nav { display: none !important; } /* swipe on mobile */

  /* Section heading row */
  .th-homepage-section [style*="display:flex"][style*="justify-content:space-between"] {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
    margin-bottom: 28px !important;
  }

  /* Quote band */
  div[style*="padding:60px 5%"] {
    padding: 44px 6% !important;
  }

  /* About — full-width single column on mobile */
  .th-home-about { padding: 56px 5%; }
  .th-home-about-inner {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    width: 100%;
  }
  .th-home-about-visual { display: none !important; }
  .th-home-about-inner > div:first-child {
    width: 100%;
    box-sizing: border-box;
    text-align: center;
  }
  .th-home-about-inner > div:first-child h2 { text-align: center !important; }
  .th-home-about-inner > div:first-child p {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .th-home-about-inner > div:first-child a { display: flex; justify-content: center; }

  /* CTA band */
  .th-home-cta-band { padding: 56px 5%; }
  .th-home-cta-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
  }
  .th-home-cta-inner > div:last-child {
    flex-direction: column !important;
    width: 100%;
  }
  .th-home-cta-inner > div:last-child a {
    text-align: center !important;
  }

  /* Footer */
  .th-footer-grid { grid-template-columns: 1fr; gap: 36px; }

  /* Preloader — smaller badge */
  .th-preloader-logo { width: 140px !important; height: 140px !important; }
  .th-preloader-ring { width: 180px !important; height: 180px !important; }

  /* Reduce animation distances on mobile — less movement feels better on small screens */
  @media (prefers-reduced-motion: no-preference) {
    .th-reveal-init,
    .th-reveal-init[data-reveal="up"]    { transform: translateY(28px) !important; }
    .th-reveal-init[data-reveal="left"]  { transform: translateX(-28px) !important; }
    .th-reveal-init[data-reveal="right"] { transform: translateX(28px) !important; }
    .th-reveal-init[data-reveal="scale"] { transform: scale(.95) !important; }
    /* Faster reveals on mobile */
    .th-reveal-init { transition-duration: .65s !important; }
  }
}

/* ── Small phones (≤ 480px) ── */
@media (max-width: 480px) {
  body { padding-top: var(--th-nav-h); }

  /* Nav inner padding */
  .th-nav-inner { padding: 0 4%; }

  /* Hero — full bleed on tiny screens */
  .th-home-hero > div:last-child { padding: 48px 4% 64px !important; }

  /* Cards slightly wider */
  .th-carousel-track { padding-left: 4%; padding-right: 4%; }
  .th-carousel-track > * { width: 86vw !important; }

  /* Section headings */
  .th-homepage-section > div { padding: 0 4% !important; }

  /* About */
  .th-home-about { padding: 48px 4%; }

  /* CTA */
  .th-home-cta-band { padding: 48px 4%; }

  /* Footer */
  .th-footer-inner { padding: 48px 4% 32px; }

  /* Smaller post grids */
  .tibbhouse-posts-grid { grid-template-columns: 1fr; }
  .tibbhouse-404-wrap h1 { font-size: 5rem; }
}

/* =====================================================
   PRELOADER — new logo + premium animation
   ===================================================== */

/* Override plugin defaults with the new design */
#tibbhouse-preloader {
  background: #fbf8f0 !important;
  transition: opacity .8s cubic-bezier(.4,0,.2,1), visibility .8s ease !important;
  animation: none !important;
}
#tibbhouse-preloader.th-fade-out {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* New logo: full PNG badge */
.th-preloader-logo {
  width: 180px !important;
  height: 180px !important;
  border-radius: 0 !important;
  object-fit: contain !important;
  animation: th-logo-reveal 1s cubic-bezier(.34,1.56,.64,1) .1s both,
             th-logo-glow 3s ease-in-out 1.2s infinite !important;
  filter: drop-shadow(0 0 0px rgba(188,144,79,0));
}

/* Spinning ring around the logo */
.th-preloader-ring {
  width: 220px !important;
  height: 220px !important;
  margin-bottom: 32px !important;
}
.th-preloader-ring::before {
  border: 2px solid rgba(188,144,79,.2) !important;
  border-top-color: #bc904f !important;
  border-right-color: rgba(188,144,79,.5) !important;
  animation: th-ring-spin 2s linear infinite !important;
}

/* Add a second outer ring */
.th-preloader-ring::after {
  content: '';
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 1px solid rgba(188,144,79,.15);
  border-bottom-color: rgba(188,144,79,.4);
  animation: th-ring-spin 3.5s linear infinite reverse;
}

/* Text colours on dark bg */
.th-preloader-name {
  color: #0a3d2e !important;
  font-size: 1.4rem !important;
  letter-spacing: .3em !important;
  animation: th-fade-in-up .7s ease .6s both !important;
}
.th-preloader-tagline {
  color: rgba(34,58,23,.5) !important;
  letter-spacing: .3em !important;
  animation: th-fade-in-up .7s ease .8s both !important;
}
.th-preloader-bar {
  background: rgba(34,58,23,.1) !important;
  width: 120px !important;
  margin-top: 28px !important;
}
.th-preloader-bar::after {
  background: linear-gradient(90deg, transparent, #bc904f, transparent) !important;
  width: 60% !important;
}

@keyframes th-logo-reveal {
  from { opacity: 0; transform: scale(.7) translateY(16px); filter: drop-shadow(0 0 0px rgba(188,144,79,0)); }
  to   { opacity: 1; transform: scale(1) translateY(0);    filter: drop-shadow(0 0 20px rgba(188,144,79,.3)); }
}
@keyframes th-logo-glow {
  0%, 100% { filter: drop-shadow(0 0 12px rgba(188,144,79,.25)) drop-shadow(0 0 32px rgba(188,144,79,.1)); }
  50%       { filter: drop-shadow(0 0 24px rgba(188,144,79,.5)) drop-shadow(0 0 56px rgba(188,144,79,.2)); }
}

/* Nav logo */
.th-nav-logo-img {
  height: 88px;
  width: auto;
  display: block;
}

/* =====================================================
   REVEAL-ON-SCROLL ANIMATION — enhanced
   ===================================================== */
@media (prefers-reduced-motion: no-preference) {

  /* ── Base state (hidden) ── */
  .th-reveal-init {
    opacity: 0;
    transition: opacity .95s cubic-bezier(.22,1,.36,1),
                transform .95s cubic-bezier(.22,1,.36,1);
  }

  /* ── Directional variants ── */
  .th-reveal-init,
  .th-reveal-init[data-reveal="up"]    { transform: translateY(52px); }
  .th-reveal-init[data-reveal="down"]  { transform: translateY(-40px); }
  .th-reveal-init[data-reveal="left"]  { transform: translateX(-64px); }
  .th-reveal-init[data-reveal="right"] { transform: translateX(64px); }
  .th-reveal-init[data-reveal="fade"]  { transform: none; }
  .th-reveal-init[data-reveal="scale"] { transform: scale(.90); }
  .th-reveal-init[data-reveal="tilt"]  { transform: translateY(40px) rotate(-1.5deg); }

  /* ── Stagger delays ── */
  .th-reveal-init[data-delay="1"] { transition-delay: .10s; }
  .th-reveal-init[data-delay="2"] { transition-delay: .22s; }
  .th-reveal-init[data-delay="3"] { transition-delay: .34s; }
  .th-reveal-init[data-delay="4"] { transition-delay: .46s; }
  .th-reveal-init[data-delay="5"] { transition-delay: .58s; }

  /* ── Revealed state ── */
  .th-reveal-init.th-revealed {
    opacity: 1;
    transform: none;
  }

  /* ── Auto-stagger: direct children of a [data-stagger] parent ── */
  [data-stagger] > * {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity .8s cubic-bezier(.22,1,.36,1),
                transform .8s cubic-bezier(.22,1,.36,1);
  }
  [data-stagger].th-revealed > *:nth-child(1)  { opacity: 1; transform: none; transition-delay: .05s; }
  [data-stagger].th-revealed > *:nth-child(2)  { opacity: 1; transform: none; transition-delay: .15s; }
  [data-stagger].th-revealed > *:nth-child(3)  { opacity: 1; transform: none; transition-delay: .25s; }
  [data-stagger].th-revealed > *:nth-child(4)  { opacity: 1; transform: none; transition-delay: .35s; }
  [data-stagger].th-revealed > *:nth-child(5)  { opacity: 1; transform: none; transition-delay: .45s; }
  [data-stagger].th-revealed > *:nth-child(6)  { opacity: 1; transform: none; transition-delay: .55s; }
  [data-stagger].th-revealed > *:nth-child(n+7){ opacity: 1; transform: none; transition-delay: .65s; }
}

/* =====================================================
   CAROUSEL (Featured content sections)
   ===================================================== */
.th-carousel-wrap {
  position: relative;
}

.th-carousel-track {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--th-gold) transparent;
}

.th-carousel-track::-webkit-scrollbar { height: 6px; }
.th-carousel-track::-webkit-scrollbar-thumb { background: var(--th-border); border-radius: 6px; }

.th-carousel-track > * {
  scroll-snap-align: start;
  flex: 0 0 auto;
  width: min(320px, 84vw);
}

.th-carousel-nav {
  display: flex;
  gap: 8px;
}

.th-carousel-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--th-border);
  background: var(--th-white);
  color: var(--th-green);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}

.th-carousel-btn:hover {
  background: var(--th-green);
  border-color: var(--th-green);
  color: var(--th-white);
}

.th-carousel-btn svg { width: 18px; height: 18px; }

/* =====================================================
   HOMEPAGE — About & Contact/CTA sections
   ===================================================== */
.th-home-about {
  background: var(--th-white);
  padding: 90px 5%;
}

.th-home-about-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.th-home-about-visual {
  aspect-ratio: 4 / 3;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--th-cream) 0%, var(--th-green-light) 100%);
  border: 1px solid var(--th-border);
  position: relative;
  overflow: hidden;
}

.th-home-about-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(188,144,79,.4) 1.5px, transparent 1.5px);
  background-size: 22px 22px;
  opacity: .6;
  pointer-events: none;
  z-index: 0;
}
/* Hide the dot pattern when a real image is inside */
.th-home-about-visual img {
  position: relative;
  z-index: 1;
  border-radius: 20px;
}
.th-home-about-visual:has(img)::before {
  display: none;
}

.th-home-cta-band {
  background: linear-gradient(135deg, var(--th-cream) 0%, var(--th-green-light) 100%);
  padding: 90px 5%;
  text-align: left;
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--th-border);
  border-bottom: 1px solid var(--th-border);
}

.th-home-cta-band::before {
  content: '';
  position: absolute;
  top: -140px; right: -140px;
  width: 420px; height: 420px;
  background: rgba(188,144,79,.12);
  border-radius: 50%;
}

.th-home-cta-inner {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

/* =====================================================
   SECTION BREATHING ROOM
   ===================================================== */

/* Carousel sections — generous vertical padding */
.th-homepage-section {
  padding: 100px 0;
}

/* Standard pages — more room */
.tibbhouse-page-hero {
  padding: 96px 5% 88px;
}

.tibbhouse-main {
  padding: 80px 5%;
}

/* About & CTA already have 90px — increase slightly */
.th-home-about {
  padding: 110px 5%;
}

.th-home-cta-band {
  padding: 110px 5%;
}

/* Divider / quote band */
.th-home-quote-band {
  padding: 88px 5% !important;
}

/* =====================================================
   HERO SPLIT GRID LAYOUT
   ===================================================== */
.th-home-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 104px 5%;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
  width: 100%;
}

/* =====================================================
   HERO GOLDEN DECORATIVE FRAME
   ===================================================== */
.th-hero-frame-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: 540px;
  min-height: 320px;
  border-radius: 20px;
  /* Background lives here so it's always visible regardless of child positioning */
  background: linear-gradient(145deg, #f7f3ea 0%, #edf4e8 55%, #ede0cc 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Subtle dot pattern overlay */
.th-hero-frame-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(188,144,79,.2) 1.2px, transparent 1.2px);
  background-size: 20px 20px;
  opacity: .45;
  pointer-events: none;
  z-index: 0;
}

/* SVG border sits on top, pointer-events off so it doesn't block inner content */
.th-hero-frame-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

/* ── Outer border: draws in on page load ── */
.th-gold-border-main {
  fill: none;
  stroke: url(#thGoldGrad);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1760;
  stroke-dashoffset: 1760;
  animation: th-border-draw 2.6s cubic-bezier(.4,0,.2,1) .5s forwards;
}

/* ── Traveling wave highlight — appears after draw-in ── */
.th-gold-border-wave {
  fill: none;
  stroke: rgba(232,204,150,.9);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 60 1700;
  stroke-dashoffset: 0;
  opacity: 0;
  animation:
    th-wave-appear .6s ease 3.4s forwards,
    th-wave-travel 5.5s linear 3.4s infinite;
}

/* ── Inner accent border ── */
.th-gold-border-inner {
  fill: none;
  stroke: rgba(188,144,79,.35);
  stroke-width: 1;
  stroke-linecap: round;
  stroke-dasharray: 1672;
  stroke-dashoffset: 1672;
  animation: th-border-draw 2.9s cubic-bezier(.4,0,.2,1) 1s forwards;
}

/* ── Corner jewel dots ── */
.th-gold-corner {
  fill: var(--th-gold);
  opacity: 0;
  animation: th-corner-pop .5s cubic-bezier(.34,1.56,.64,1) 3.1s forwards;
}
.th-gold-corner:nth-child(2) { animation-delay: 3.2s; }
.th-gold-corner:nth-child(3) { animation-delay: 3.3s; }
.th-gold-corner:nth-child(4) { animation-delay: 3.4s; }

/* ── Frame interior (normal flow, sits in the flex wrap) ── */
.th-hero-frame-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 36px;
  width: 100%;
  height: 100%;
}

/* ── Islamic geometric ornament ── */
.th-hero-ornament {
  position: relative;
  z-index: 1;
  opacity: 0;
  transform: scale(.78) translateY(10px);
  animation:
    th-ornament-in 1.4s cubic-bezier(.34,1.56,.64,1) 3.2s forwards,
    th-ornament-float 6s ease-in-out 4.8s infinite;
}

/* ─────────────── Keyframes ─────────────── */
@keyframes th-border-draw {
  to { stroke-dashoffset: 0; }
}

@keyframes th-wave-appear {
  to { opacity: 1; }
}

@keyframes th-wave-travel {
  0%   { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -1760; }
}

@keyframes th-corner-pop {
  from { opacity: 0; transform: scale(0); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes th-ornament-in {
  from { opacity: 0; transform: scale(.78) translateY(10px); }
  to   { opacity: 1; transform: scale(1)   translateY(0);    }
}

@keyframes th-ornament-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-7px); }
}

/* ── Responsive ── */
@media (max-width: 960px) {
  .th-home-hero-inner {
    grid-template-columns: 1fr;
    gap: 44px;
    padding: 80px 5% 64px;
  }
  .th-hero-frame-wrap {
    max-height: 300px;
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 768px) {
  .th-hero-frame-wrap { display: none; }
  .th-homepage-section { padding: 72px 0 !important; }
  .th-home-about       { padding: 72px 5%; }
  .th-home-cta-band    { padding: 72px 5%; }
}

/* =====================================================
   SECTION-LEVEL SCROLL FADE
   ===================================================== */
@media (prefers-reduced-motion: no-preference) {
  .th-section-fade {
    opacity: 0;
    transform: translateY(28px);
    transition:
      opacity 1.2s cubic-bezier(.22,1,.36,1),
      transform 1.2s cubic-bezier(.22,1,.36,1);
  }
  .th-section-fade.th-revealed {
    opacity: 1;
    transform: none;
  }
}

/* Ensure th-reveal-init inside hero fires immediately (above the fold) */
.th-home-hero .th-reveal-init {
  /* Already handled by IntersectionObserver firing at load */
}

/* =====================================================
   AMBIENT HERO ANIMATIONS (breathe / glow)
   ===================================================== */

/* Hero right-side golden glow — breathes slowly */
@media (prefers-reduced-motion: no-preference) {
  .th-home-hero::after {
    content: '';
    position: absolute;
    top: -10%;
    right: -5%;
    width: 60%;
    height: 120%;
    background: radial-gradient(ellipse at 60% 45%,
      rgba(188,144,79,.10) 0%,
      rgba(188,144,79,.04) 40%,
      transparent 70%);
    pointer-events: none;
    z-index: 0;
    animation: th-hero-glow 9s ease-in-out infinite;
    border-radius: 50%;
  }

  @keyframes th-hero-glow {
    0%, 100% { opacity: .6;  transform: scale(1)    translateY(0); }
    50%       { opacity: 1;  transform: scale(1.12) translateY(-20px); }
  }

  /* Hero left-side green glow — slower drift */
  .th-home-hero::before {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -5%;
    width: 55%;
    height: 110%;
    background: radial-gradient(ellipse at 30% 60%,
      rgba(34,58,23,.07) 0%,
      transparent 65%);
    pointer-events: none;
    z-index: 0;
    animation: th-hero-green-drift 13s ease-in-out infinite;
    border-radius: 50%;
  }

  @keyframes th-hero-green-drift {
    0%, 100% { opacity: .5;  transform: scale(1)    translateY(0); }
    50%       { opacity: .9; transform: scale(1.08) translateY(24px); }
  }
}

/* =====================================================
   HERO FRAME — subtle inset shadow to distinguish from hero bg
   ===================================================== */
.th-hero-frame-wrap {
  box-shadow:
    inset 0 0 0 1px rgba(188,144,79,.15),
    0 24px 80px rgba(34,58,23,.08),
    0 4px 16px rgba(188,144,79,.08);
}

/* Slight inset that hints at the border area even before draw-in */
.th-hero-frame-wrap::after {
  content: '';
  position: absolute;
  inset: 8px;
  border-radius: 16px;
  border: 1px dashed rgba(188,144,79,.22);
  pointer-events: none;
  z-index: 1;
}


/* =====================================================
   BUTTON HOVER & CLICK ANIMATIONS
   All pill CTA buttons (border-radius:9999px in inline style)
   ===================================================== */
a[style*="9999px"] {
  position: relative;
  overflow: hidden;
  transition:
    transform   0.28s cubic-bezier(.34,1.56,.64,1),
    box-shadow  0.25s ease,
    filter      0.2s  ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Shimmer sweep — appears on hover, sweeps left-to-right */
a[style*="9999px"]::before {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 55%;
  height: 100%;
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(255,255,255,0.24) 50%,
    transparent 100%
  );
  transform: skewX(-18deg);
  transition: left 0.55s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
  border-radius: inherit;
}

/* Ripple ring — flashes on click */
a[style*="9999px"]::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(255,255,255,0.45);
  transition: box-shadow 0.35s ease;
  pointer-events: none;
}

/* ── Hover state ── */
a[style*="9999px"]:hover::before {
  left: 130%;
}

a[style*="9999px"]:hover {
  transform: translateY(-4px) scale(1.025);
  filter: brightness(1.08) saturate(1.1);
  box-shadow:
    0 10px 32px rgba(188,144,79,.28),
    0 3px 8px  rgba(188,144,79,.15);
}

/* ── Active / click press ── */
a[style*="9999px"]:active {
  transform: translateY(1px) scale(0.96) !important;
  filter: brightness(0.94) !important;
  box-shadow: 0 2px 8px rgba(188,144,79,.18) !important;
  transition:
    transform  0.07s ease,
    filter     0.07s ease,
    box-shadow 0.07s ease;
}

a[style*="9999px"]:active::after {
  box-shadow: 0 0 0 6px rgba(255,255,255,0.25);
  transition: box-shadow 0.07s ease;
}

/* ── Also style theme-class buttons consistently ── */
.th-btn {
  transition:
    transform   0.28s cubic-bezier(.34,1.56,.64,1),
    box-shadow  0.25s ease,
    filter      0.2s  ease !important;
}
.th-btn:hover {
  transform: translateY(-4px) scale(1.025) !important;
  filter: brightness(1.08) !important;
}
.th-btn:active {
  transform: translateY(1px) scale(0.96) !important;
  transition: transform 0.07s ease, box-shadow 0.07s ease !important;
}

/* =====================================================
   HEADING HOVER — gentle grow + colour warmup
   Targets headings in all major homepage sections
   ===================================================== */
.th-home-hero h1,
.th-homepage-section h2,
.th-home-about h2,
.th-home-cta-band h2,
.tibbhouse-page-hero h1,
.entry-content h2,
.entry-content h3 {
  transition:
    transform 0.32s cubic-bezier(.34,1.56,.64,1),
    color     0.2s  ease;
  cursor: default;
  will-change: transform;
}

.th-home-hero h1:hover {
  transform: scale(1.025) translateY(-2px);
  transform-origin: left center;
}

.th-homepage-section h2:hover,
.th-home-about h2:hover,
.th-home-cta-band h2:hover {
  transform: scale(1.03) translateY(-2px);
  transform-origin: left center;
  color: var(--th-gold);
}

.tibbhouse-page-hero h1:hover {
  transform: scale(1.022) translateY(-2px);
  transform-origin: left center;
}

.entry-content h2:hover,
.entry-content h3:hover {
  transform: scale(1.02) translateY(-1px);
  transform-origin: left center;
  color: var(--th-green);
}

/* =====================================================
   HERO — ANIMATED SECTION BORDER RING
   ===================================================== */
.th-hero-border-ring {
  position: absolute;
  inset: 14px;
  pointer-events: none;
  z-index: 2;
}
.th-hero-border-ring.th-hero-border-ring-inner {
  inset: 27px;
}

/* Horizontal bars */
.th-hbr-t,
.th-hbr-b {
  position: absolute;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, #e8cc96 0%, #bc904f 50%, #8a5c1a 100%);
}
.th-hero-border-ring-inner .th-hbr-t,
.th-hero-border-ring-inner .th-hbr-b {
  height: 1px;
  background: rgba(188,144,79,.42);
}

/* Vertical bars */
.th-hbr-r,
.th-hbr-l {
  position: absolute;
  width: 2px;
  height: 0;
  background: linear-gradient(180deg, #e8cc96 0%, #bc904f 50%, #8a5c1a 100%);
}
.th-hero-border-ring-inner .th-hbr-r,
.th-hero-border-ring-inner .th-hbr-l {
  width: 1px;
  background: rgba(188,144,79,.42);
}

/* Placement */
.th-hbr-t { top: 0;    left: 0;  }
.th-hbr-r { top: 0;    right: 0; }
.th-hbr-b { bottom: 0; right: 0; }
.th-hbr-l { bottom: 0; left: 0;  }

/* Outer ring — clockwise draw */
.th-hbr-t { animation: th-hbr-w 1.3s cubic-bezier(.4,0,.2,1) .25s forwards; }
.th-hbr-r { animation: th-hbr-h 1s   cubic-bezier(.4,0,.2,1) 1.55s forwards; }
.th-hbr-b { animation: th-hbr-w 1.3s cubic-bezier(.4,0,.2,1) 2.55s forwards; }
.th-hbr-l { animation: th-hbr-h 1s   cubic-bezier(.4,0,.2,1) 3.85s forwards; }

/* Inner ring — slight delay behind outer */
.th-hero-border-ring-inner .th-hbr-t { animation: th-hbr-w 1.3s cubic-bezier(.4,0,.2,1) .65s forwards; }
.th-hero-border-ring-inner .th-hbr-r { animation: th-hbr-h 1s   cubic-bezier(.4,0,.2,1) 1.95s forwards; }
.th-hero-border-ring-inner .th-hbr-b { animation: th-hbr-w 1.3s cubic-bezier(.4,0,.2,1) 2.95s forwards; }
.th-hero-border-ring-inner .th-hbr-l { animation: th-hbr-h 1s   cubic-bezier(.4,0,.2,1) 4.25s forwards; }

@keyframes th-hbr-w { from { width: 0; } to { width: 100%; } }
@keyframes th-hbr-h { from { height: 0; } to { height: 100%; } }

/* =====================================================
   HERO — CORNER ORNAMENTS
   ===================================================== */
.th-hero-corner {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  animation: th-hcorner-in .55s cubic-bezier(.34,1.56,.64,1) 4.9s forwards;
}
.th-hc-tl { top: 4px;    left: 4px;    }
.th-hc-tr { top: 4px;    right: 4px;   animation-delay: 5.0s; }
.th-hc-bl { bottom: 4px; left: 4px;    animation-delay: 5.1s; }
.th-hc-br { bottom: 4px; right: 4px;   animation-delay: 5.2s; }

@keyframes th-hcorner-in {
  from { opacity: 0; transform: scale(.55); }
  to   { opacity: 1; transform: scale(1);   }
}

/* =====================================================
   HERO — MID-EDGE + TOP ORNAMENTS
   ===================================================== */
.th-hero-mid-ornament {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  animation: th-hfade 1.2s ease 5.2s forwards;
}
.th-hmo-l { left: 18px;  }
.th-hmo-r { right: 18px; }

.th-hero-top-diamond {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  animation: th-hfade 1s ease 5.4s forwards;
}

@keyframes th-hfade { from { opacity: 0; } to { opacity: 1; } }

/* =====================================================
   HERO — DECORATIVE RIGHT COLUMN
   ===================================================== */
.th-hero-decor-col {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  height: 100%;
  min-height: 400px;
}

/* Lift inner grid above decorative layers */
.th-home-hero-inner { z-index: 4; }

/* ── Main Islamic star ── */
.th-hero-star-main {
  position: relative;
  z-index: 1;
  opacity: 0;
  transform: scale(.82) translateY(18px);
  animation:
    th-star-reveal 1.4s cubic-bezier(.34,1.56,.64,1) 2.8s forwards,
    th-star-float  8s ease-in-out 4.4s infinite;
}

@keyframes th-star-reveal {
  from { opacity: 0; transform: scale(.82) translateY(18px); }
  to   { opacity: 1; transform: scale(1)   translateY(0);    }
}
@keyframes th-star-float {
  0%,100% { transform: translateY(0)     rotate(0deg);   }
  33%      { transform: translateY(-11px) rotate(.7deg);  }
  66%      { transform: translateY(-5px)  rotate(-.5deg); }
}

/* ── Floating satellite ornaments ── */
.th-hero-float-1,
.th-hero-float-2,
.th-hero-float-3,
.th-hero-float-4 {
  position: absolute;
  pointer-events: none;
  opacity: 0;
  z-index: 2;
}
.th-hero-float-1 { top: 2%;    left: 5%;   animation: th-hfade .8s ease 3.5s forwards, th-fa 7s ease-in-out 4.5s infinite; }
.th-hero-float-2 { top: 8%;    right: 4%;  animation: th-hfade .8s ease 3.7s forwards, th-fb 9s ease-in-out 4.7s infinite; }
.th-hero-float-3 { bottom: 6%; left: 8%;   animation: th-hfade .8s ease 3.9s forwards, th-fc 6s ease-in-out 4.9s infinite; }
.th-hero-float-4 { bottom: 10%;right: 3%;  animation: th-hfade .8s ease 4.1s forwards, th-fd 8s ease-in-out 5.1s infinite; }

@keyframes th-fa { 0%,100% { transform: translateY(0)    rotate(0deg);   } 50% { transform: translateY(-13px) rotate(18deg);  } }
@keyframes th-fb { 0%,100% { transform: translateY(0)    rotate(0deg);   } 50% { transform: translateY(11px)  rotate(-15deg); } }
@keyframes th-fc { 0%,100% { transform: translateY(0)    rotate(0deg);   } 50% { transform: translateY(-9px)  rotate(22deg);  } }
@keyframes th-fd { 0%,100% { transform: translateY(0)    rotate(0deg);   } 50% { transform: translateY(15px)  rotate(-20deg); } }

/* ── Brand label below star ── */
.th-hero-decor-label {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: .88rem;
  font-weight: 600;
  color: #bc904f;
  letter-spacing: .3em;
  text-transform: uppercase;
  opacity: 0;
  animation: th-hfade 1s ease 3.8s forwards;
}
.th-hero-decor-line {
  display: block;
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #bc904f, transparent);
}

/* =====================================================
   RESPONSIVE — hide decorative extras on small screens
   ===================================================== */
@media (max-width: 960px) {
  .th-hero-mid-ornament,
  .th-hero-top-diamond { display: none; }
  .th-hero-decor-col   { min-height: 280px; }
  .th-hero-star-main svg { width: 240px; height: 240px; }
}
/* ── Mobile: show golden elements (adapted sizing) ── */
@media (max-width: 768px) {
  /* Border rings — show but thinner */
  .th-hero-border-ring { display: block; inset: 8px; }
  .th-hero-border-ring.th-hero-border-ring-inner { inset: 18px; }
  .th-hbr-t, .th-hbr-b { height: 1px !important; }
  .th-hbr-r, .th-hbr-l { width: 1px !important; }

  /* Corner ornaments — show, smaller */
  .th-hero-corner { display: block; transform: scale(.7); }
  .th-hc-tl { top: 0;    left: 0;    transform-origin: top left;     }
  .th-hc-tr { top: 0;    right: 0;   transform-origin: top right;    }
  .th-hc-bl { bottom: 0; left: 0;    transform-origin: bottom left;  }
  .th-hc-br { bottom: 0; right: 0;   transform-origin: bottom right; }

  /* Mid-edge + top diamond — hide (too cramped) */
  .th-hero-mid-ornament,
  .th-hero-top-diamond { display: none; }

  /* Decor column — show below text, centered, smaller */
  .th-hero-decor-col {
    display: flex;
    min-height: 220px;
    margin-top: 8px;
  }
  .th-hero-star-main svg { width: 200px !important; height: 200px !important; }

  /* Hide satellite ornaments on mobile — too cluttered */
  .th-hero-float-1,
  .th-hero-float-2,
  .th-hero-float-3,
  .th-hero-float-4 { display: none; }
}

/* =====================================================
   CONTACT PAGE
   ===================================================== */

/* Hero tweaks */
.th-contact-hero { text-align: center; }
.th-contact-hero-inner { position: relative; z-index: 2; }
.th-contact-eyebrow {
  display: inline-block;
  font-family: var(--th-font-body);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--th-gold);
  margin-bottom: 14px;
}
.th-contact-hero-sub {
  font-size: 1.1rem;
  color: var(--th-muted);
  margin: 12px 0 0;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.65;
}

/* Two-column wrapper */
.th-contact-wrap {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 56px;
  align-items: start;
  padding-top: 56px;
  padding-bottom: 80px;
}

/* ── Info panel ── */
.th-contact-info { position: sticky; top: calc(var(--th-nav-h) + 32px); }

.th-contact-info-card {
  background: var(--th-white);
  border: 1px solid var(--th-border);
  border-radius: 20px;
  padding: 40px 36px;
  box-shadow: var(--th-shadow-sm);
  position: relative;
  overflow: hidden;
}

/* Subtle gold gradient corner */
.th-contact-info-card::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(188,144,79,.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.th-contact-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px; height: 56px;
  background: var(--th-green-light);
  border-radius: 50%;
  margin-bottom: 24px;
}

.th-contact-info-heading {
  font-family: var(--th-font-heading);
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--th-dark);
  margin-bottom: 12px;
}

.th-contact-info-lead {
  font-size: .93rem;
  color: var(--th-muted);
  line-height: 1.75;
  margin-bottom: 32px;
}

/* Contact detail items */
.th-contact-details {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.th-contact-details li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.th-contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  background: var(--th-green-light);
  border-radius: 10px;
  color: var(--th-green);
  flex-shrink: 0;
  margin-top: 2px;
}

.th-contact-details li > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.th-contact-detail-label {
  font-size: .73rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--th-muted);
}

.th-contact-details a,
.th-contact-details span:not(.th-contact-detail-label) {
  font-size: .9rem;
  color: var(--th-text);
  text-decoration: none;
  line-height: 1.5;
}

.th-contact-details a:hover { color: var(--th-green); }

/* Privacy promise pill */
.th-contact-promise {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(188,144,79,.08);
  border: 1px solid rgba(188,144,79,.2);
  border-radius: var(--th-radius-pill);
  padding: 8px 16px;
  font-size: .8rem;
  color: var(--th-text);
}

/* ── Form panel ── */
.th-contact-form-wrap {
  background: var(--th-white);
  border: 1px solid var(--th-border);
  border-radius: 20px;
  padding: 44px 48px;
  box-shadow: var(--th-shadow-sm);
}

.th-contact-form-heading {
  font-family: var(--th-font-heading);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--th-dark);
  margin-bottom: 28px;
}

/* Alert */
.th-contact-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: .88rem;
  margin-bottom: 24px;
}

/* Field layout */
.th-contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.th-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.th-label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--th-dark);
  letter-spacing: .02em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.th-required {
  color: var(--th-gold);
  font-size: 1rem;
  line-height: 1;
}

.th-optional {
  font-weight: 400;
  color: var(--th-muted);
  font-size: .78rem;
  letter-spacing: 0;
}

/* Input wrapper (icon + input) */
.th-input-wrap {
  position: relative;
}

.th-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--th-muted);
  pointer-events: none;
  transition: color .2s;
}

.th-input {
  width: 100%;
  padding: 13px 16px 13px 44px;
  border: 1.5px solid var(--th-border);
  border-radius: 12px;
  font-family: var(--th-font-body);
  font-size: .95rem;
  color: var(--th-text);
  background: var(--th-cream);
  outline: none;
  transition: border-color .2s, background .2s, box-shadow .2s;
  box-sizing: border-box;
}

.th-input::placeholder { color: var(--th-muted); opacity: .7; }

.th-input:focus {
  border-color: var(--th-green);
  background: var(--th-white);
  box-shadow: 0 0 0 3px rgba(34,58,23,.07);
}

.th-input-wrap:focus-within .th-input-icon { color: var(--th-green); }

/* Textarea */
.th-textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--th-border);
  border-radius: 12px;
  font-family: var(--th-font-body);
  font-size: .95rem;
  color: var(--th-text);
  background: var(--th-cream);
  outline: none;
  resize: vertical;
  min-height: 140px;
  line-height: 1.65;
  transition: border-color .2s, background .2s, box-shadow .2s;
  box-sizing: border-box;
}

.th-textarea::placeholder { color: var(--th-muted); opacity: .7; }

.th-textarea:focus {
  border-color: var(--th-green);
  background: var(--th-white);
  box-shadow: 0 0 0 3px rgba(34,58,23,.07);
}

/* Submit row */
.th-field-submit {
  flex-direction: row;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* CTA button — reused on success screen too */
.th-contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--th-green);
  color: var(--th-white);
  border: none;
  border-radius: var(--th-radius-pill);
  padding: 14px 32px;
  font-family: var(--th-font-body);
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s, transform .15s, box-shadow .2s;
  white-space: nowrap;
}

.th-contact-btn:hover {
  background: var(--th-gold);
  color: var(--th-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(188,144,79,.3);
}

.th-contact-btn:active { transform: translateY(0); }

.th-form-note {
  font-size: .78rem;
  color: var(--th-muted);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.5;
}

/* ── Success state ── */
.th-contact-success {
  text-align: center;
  padding: 48px 24px;
}

.th-contact-success-icon {
  width: 64px; height: 64px;
  background: var(--th-green-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--th-green);
}

.th-contact-success h2 {
  font-family: var(--th-font-heading);
  font-size: 1.8rem;
  color: var(--th-dark);
  margin-bottom: 12px;
}

.th-contact-success p {
  color: var(--th-muted);
  font-size: .95rem;
  margin-bottom: 28px;
  line-height: 1.7;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .th-contact-wrap {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .th-contact-info { position: static; }
}

@media (max-width: 600px) {
  .th-contact-form-wrap { padding: 28px 20px; }
  .th-contact-info-card { padding: 28px 20px; }
  .th-field-submit { flex-direction: column; align-items: stretch; }
  .th-contact-btn { justify-content: center; }
  .th-form-note { justify-content: center; }
}

/* =====================================================
   MEDICAL CONCERNS BAND + PRIVATE BUTTON
   ===================================================== */

.th-medical-band {
  background: #0d1b12;
  border-top: 1px solid rgba(188,144,79,.15);
  padding: 56px 5%;
}

.th-medical-band-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

/* Shield icon circle */
.th-medical-band-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px; height: 60px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(188,144,79,.1);
  border: 1px solid rgba(188,144,79,.25);
  color: var(--th-gold);
}

/* Copy block */
.th-medical-band-copy {
  flex: 1;
  min-width: 220px;
}

.th-medical-band-copy h3 {
  font-family: var(--th-font-heading);
  font-size: 1.55rem;
  font-weight: 600;
  color: #f5f0e8;
  margin-bottom: 6px;
}

.th-medical-band-copy p {
  font-size: .88rem;
  color: rgba(245,240,232,.5);
  line-height: 1.7;
  margin: 0;
  max-width: 480px;
}

/* ── The unique private button ── */
.th-private-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  padding: 14px 26px;
  background: linear-gradient(135deg, #1a2e1c 0%, #0d1b0e 100%);
  border: 1px solid rgba(188,144,79,.4);
  border-radius: 6px;   /* deliberately not a pill — feels different, deliberate */
  text-decoration: none;
  overflow: hidden;
  cursor: pointer;
  transition: border-color .3s, box-shadow .3s, transform .2s;
  /* Pulse ring on the border */
  box-shadow:
    0 0 0 0 rgba(188,144,79,0),
    inset 0 1px 0 rgba(255,255,255,.05);
  animation: th-private-pulse 3.5s ease-in-out infinite;
}

/* Shimmer sweep across button */
.th-private-btn-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg,
    transparent 30%,
    rgba(188,144,79,.18) 50%,
    transparent 70%
  );
  background-size: 200% 100%;
  animation: th-private-shimmer 3s ease-in-out infinite;
  pointer-events: none;
}

.th-private-btn-icon {
  color: var(--th-gold);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.th-private-btn-label {
  font-family: var(--th-font-body);
  font-size: .88rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: #f5f0e8;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
  transition: color .2s;
}

.th-private-btn-arrow {
  color: rgba(188,144,79,.7);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transition: transform .2s, color .2s;
}

/* Hover */
.th-private-btn:hover {
  border-color: var(--th-gold);
  box-shadow:
    0 0 0 3px rgba(188,144,79,.15),
    0 8px 28px rgba(0,0,0,.4),
    inset 0 1px 0 rgba(255,255,255,.08);
  transform: translateY(-2px);
  animation: none;
}

.th-private-btn:hover .th-private-btn-label { color: var(--th-gold); }
.th-private-btn:hover .th-private-btn-arrow {
  color: var(--th-gold);
  transform: translate(2px, -2px);
}

/* Active */
.th-private-btn:active { transform: translateY(0); box-shadow: none; }

/* Keyframes */
@keyframes th-private-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(188,144,79,0),   inset 0 1px 0 rgba(255,255,255,.05); }
  50%       { box-shadow: 0 0 0 6px rgba(188,144,79,.1), inset 0 1px 0 rgba(255,255,255,.05); }
}

@keyframes th-private-shimmer {
  0%   { background-position: 200% 0; }
  60%  { background-position: -200% 0; }
  100% { background-position: -200% 0; }
}

/* Responsive */
@media (max-width: 768px) {
  .th-medical-band-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }
  .th-private-btn { width: 100%; justify-content: center; }
}
