/*
Theme Name: Fonthill Child
Theme URI: https://fonthill.co.uk
Description: Custom child theme for Fonthill Care Home (Awwwards-grade design)
Author: OpenClaw / Jarvis
Version: 2.0
Template: hello-elementor
*/

/* ============================================
   FONTHILL CARE HOME — AWWWARDS-GRADE DESIGN
   Custom CSS | V2.0 | 2026-02-17
   ============================================ */

/* ============================================
   1. GOOGLE FONTS IMPORT
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;600&amp;family=Nunito:wght@400;600;700&amp;family=Inter:wght@400;500;600&amp;family=JetBrains+Mono:wght@400&amp;display=swap');

/* ============================================
   2. CSS VARIABLES (DESIGN TOKENS)
   ============================================ */
:root {
  /* COLOURS */
  --warm-cream: #FAF7F2;
  --warm-white: #FFFFFF;
  --light-sage: #F0F4F0;
  --soft-sage: #8FA78F;
  --gentle-gold: #D4AF6A;
  --warm-charcoal: #2B2B2B;
  --medium-stone: #6B6B6B;
  --light-stone: #9A9A9A;
  --trust-blue: #5A8FA6;
  
  /* FONTS */
  --font-display: 'Cormorant Garamond', serif;
  --font-ui: 'Nunito', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  /* EASING CURVES */
  --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-fast: cubic-bezier(0.4, 0, 0.2, 1);
  
  /* DURATIONS */
  --duration-instant: 120ms;
  --duration-fast: 220ms;
  --duration-standard: 320ms;
  --duration-slow: 480ms;
  --duration-storytelling: 800ms;
  
  /* SHADOWS (WARM TINTED) */
  --shadow-sm: 0 1px 0 rgba(212,175,106,0.06) inset, 0 4px 16px rgba(143,167,143,0.04);
  --shadow-md: 0 2px 0 rgba(212,175,106,0.08) inset, 0 8px 32px rgba(143,167,143,0.06);
  --shadow-lg: 0 2px 0 rgba(212,175,106,0.10) inset, 0 12px 40px rgba(143,167,143,0.08), 0 0 60px rgba(212,175,106,0.06);
}

/* ============================================
   3. GLOBAL RESETS &amp; BASE STYLES
   ============================================ */
* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--medium-stone);
  letter-spacing: -0.011em;
  background-color: var(--warm-cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--warm-charcoal);
  margin: 0;
  font-weight: 600;
}

/* H1: Display Serif (Hero sections) */
h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

/* H2: Display Serif (Section headings) */
h2 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.015em;
}

/* H3: UI Sans (Card headings) */
h3 {
  font-family: var(--font-ui);
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

/* H4: UI Sans (Smaller headings) */
h4 {
  font-family: var(--font-ui);
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: 0;
}

p {
  margin: 0 0 20px 0;
}

a {
  color: var(--soft-sage);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-fast);
}

a:hover {
  color: var(--trust-blue);
}

/* ============================================
   4. TEXTURE OVERLAYS
   ============================================ */
.textured-background {
  position: relative;
}

.textured-background::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZmlsdGVyIGlkPSJub2lzZSI+PGZlVHVyYnVsZW5jZSB0eXBlPSJmcmFjdGFsTm9pc2UiIGJhc2VGcmVxdWVuY3k9IjAuOSIgbnVtT2N0YXZlcz0iNCIgLz48L2ZpbHRlcj48cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWx0ZXI9InVybCgjbm9pc2UpIiBvcGFjaXR5PSIwLjAyNSIvPjwvc3ZnPg==');
  opacity: 0.025;
  pointer-events: none;
  mix-blend-mode: multiply;
  z-index: 0;
}

.hero-grain::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZmlsdGVyIGlkPSJncmFpbiI+PGZlVHVyYnVsZW5jZSB0eXBlPSJmcmFjdGFsTm9pc2UiIGJhc2VGcmVxdWVuY3k9IjEuNSIgbnVtT2N0YXZlcz0iMyIgLz48L2ZpbHRlcj48cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWx0ZXI9InVybCgjZ3JhaW4pIiBvcGFjaXR5PSIwLjA1Ii8+PC9zdmc+');
  opacity: 0.05;
  pointer-events: none;
  mix-blend-mode: overlay;
  z-index: 1;
}

/* ============================================
   5. LUMINANCE-LAYERED CARDS
   ============================================ */
.card-level-1 {
  background: rgba(255, 255, 255, 0.90);
  border: 1px solid rgba(143, 167, 143, 0.04);
  box-shadow: 0 1px 0 rgba(143, 167, 143, 0.06) inset;
  transition: all var(--duration-standard) var(--ease-smooth);
}

.card-level-2 {
  background: #FFFFFF;
  border: 1px solid rgba(143, 167, 143, 0.08);
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-standard) var(--ease-smooth);
}

.card-level-3,
.card-level-1:hover,
.card-level-2:hover {
  background: #FFFFFF;
  border: 1px solid rgba(143, 167, 143, 0.12);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

/* ============================================
   6. FEATURE CARDS WITH SPECULAR HIGHLIGHTS
   ============================================ */
.elementor-widget-icon-box {
  position: relative;
  background: rgba(255, 255, 255, 0.90);
  border: 1px solid rgba(143, 167, 143, 0.06);
  border-radius: 20px;
  padding: 40px 32px;
  overflow: hidden;
  transition: all var(--duration-standard) var(--ease-smooth);
  box-shadow: var(--shadow-sm);
}

/* Specular highlight blob (warm glow) */
.elementor-widget-icon-box::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -60px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(212, 175, 106, 0.18), transparent 70%);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--duration-standard) ease;
  filter: blur(40px);
  z-index: 0;
}

/* Hover state */
.elementor-widget-icon-box:hover {
  transform: translateY(-4px);
  border-color: rgba(143, 167, 143, 0.12);
  box-shadow: var(--shadow-lg);
}

.elementor-widget-icon-box:hover::before {
  opacity: 1;
}

/* Icon styling */
.elementor-icon-box-icon {
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.elementor-icon-box-icon .elementor-icon {
  color: var(--soft-sage);
  filter: drop-shadow(0 2px 8px rgba(143, 167, 143, 0.15));
}

/* Title */
.elementor-icon-box-title {
  font-family: var(--font-ui);
  font-size: 22px;
  font-weight: 600;
  color: var(--warm-charcoal);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
  position: relative;
  z-index: 1;
}

/* Description */
.elementor-icon-box-description {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--medium-stone);
  letter-spacing: -0.011em;
  position: relative;
  z-index: 1;
}

/* ============================================
   7. BUTTONS (PRIMARY &amp; SECONDARY)
   ============================================ */
.button,
.elementor-button,
.wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 18px 40px;
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 12px;
  transition: all var(--duration-fast) var(--ease-smooth);
  letter-spacing: 0.01em;
  cursor: pointer;
  border: none;
}

.button-primary,
.elementor-button.elementor-button-primary {
  background: var(--trust-blue);
  color: #FFFFFF;
  border: 1px solid rgba(90, 143, 166, 0.20);
  box-shadow: 
    0 2px 0 rgba(255, 255, 255, 0.15) inset,
    0 8px 24px rgba(90, 143, 166, 0.25);
}

.button-primary:hover,
.elementor-button.elementor-button-primary:hover {
  background: #4A7F96;
  transform: translateY(-2px);
  box-shadow:
    0 3px 0 rgba(255, 255, 255, 0.20) inset,
    0 12px 40px rgba(90, 143, 166, 0.35);
  color: #FFFFFF;
}

.button-secondary,
.elementor-button.elementor-button-secondary {
  background: rgba(255, 255, 255, 0.90);
  color: var(--warm-charcoal);
  border: 1px solid rgba(143, 167, 143, 0.15);
  box-shadow: 0 4px 16px rgba(143, 167, 143, 0.06);
}

.button-secondary:hover,
.elementor-button.elementor-button-secondary:hover {
  background: #FFFFFF;
  border-color: rgba(143, 167, 143, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(143, 167, 143, 0.10);
  color: var(--warm-charcoal);
}

/* ============================================
   8. HEADER STYLES (STICKY GLASS EFFECT)
   ============================================ */
#site-header {
  background: rgba(250, 247, 242, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(143, 167, 143, 0.08);
  box-shadow: 0 4px 16px rgba(143, 167, 143, 0.04);
  transition: all var(--duration-fast) var(--ease-smooth);
  position: sticky;
  top: 0;
  z-index: 1000;
}

#site-header.scrolled {
  background: rgba(250, 247, 242, 0.95);
  box-shadow: 0 4px 24px rgba(143, 167, 143, 0.08);
}

.site-logo {
  transition: transform var(--duration-fast) var(--ease-fast);
}

.site-logo:hover {
  transform: scale(1.02);
}

/* Navigation menu items */
.site-navigation a {
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 600;
  color: var(--warm-charcoal);
  padding: 8px 16px;
  position: relative;
  transition: color var(--duration-fast) var(--ease-fast);
}

.site-navigation a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 16px;
  right: 16px;
  height: 2px;
  background: var(--soft-sage);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--duration-standard) var(--ease-smooth);
}

.site-navigation a:hover::after,
.site-navigation a.current-menu-item::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ============================================
   9. HERO SECTION ENHANCEMENTS
   ============================================ */
.hero-section {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center 35%;
  overflow: hidden;
}

/* Hero background gradient overlay */
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(250, 247, 242, 0.15) 0%,
    rgba(250, 247, 242, 0) 30%,
    rgba(250, 247, 242, 0.85) 100%);
  z-index: 1;
}

/* Hero glass content box */
.hero-content-box {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(143, 167, 143, 0.10);
  border-radius: 20px;
  padding: 56px 48px;
  box-shadow: var(--shadow-md), 0 0 60px rgba(212, 175, 106, 0.04);
  transition: all var(--duration-standard) var(--ease-bounce);
  max-width: 700px;
}

@media (max-width: 767px) {
  .hero-section {
    min-height: 70vh;
  }
  
  .hero-content-box {
    padding: 40px 28px;
    border-radius: 16px;
  }
}

/* ============================================
   10. SCROLL INDICATOR
   ============================================ */
.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
  color: rgba(43, 43, 43, 0.6);
  animation: scroll-bounce 2s ease-in-out infinite;
  cursor: pointer;
}

.scroll-text {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-family: var(--font-ui);
}

.scroll-indicator svg {
  width: 24px;
  height: 24px;
}

@keyframes scroll-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* ============================================
   11. BENTO GRID GALLERY
   ============================================ */
.bento-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 48px;
}

.bento-item {
  position: relative;
  background-size: cover;
  background-position: center;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all var(--duration-standard) var(--ease-smooth);
}

/* Grid sizes */
.bento-large {
  grid-column: span 2;
  grid-row: span 2;
  aspect-ratio: 16/9;
}

.bento-medium {
  grid-column: span 1;
  aspect-ratio: 4/3;
}

.bento-small {
  grid-column: span 1;
  aspect-ratio: 1/1;
}

.bento-item:hover {
  transform: scale(1.02);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(143, 167, 143, 0.15);
}

/* Overlay */
.bento-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, 
    rgba(143, 167, 143, 0) 0%, 
    rgba(143, 167, 143, 0.85) 100%);
  display: flex;
  align-items: flex-end;
  padding: 24px;
  opacity: 0;
  transition: opacity 280ms ease;
}

.bento-item:hover .bento-overlay {
  opacity: 1;
}

.bento-caption {
  font-family: var(--font-ui);
  font-size: 18px;
  font-weight: 600;
  color: #FFFFFF;
  letter-spacing: -0.01em;
}

@media (max-width: 767px) {
  .bento-gallery {
    grid-template-columns: 1fr;
  }
  
  .bento-large,
  .bento-medium,
  .bento-small {
    grid-column: span 1;
    aspect-ratio: 4/3;
  }
}

/* ============================================
   12. IMAGE REVEAL ANIMATIONS
   ============================================ */
.image-reveal-container {
  overflow: hidden;
  border-radius: 16px;
  position: relative;
}

.image-reveal-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.15);
  opacity: 0;
  transition: all var(--duration-storytelling) var(--ease-smooth);
}

.image-reveal-container.is-visible img {
  transform: scale(1);
  opacity: 1;
}

/* ============================================
   13. TESTIMONIAL CARDS
   ============================================ */
.testimonial-card {
  background: var(--warm-cream);
  border: 1px solid rgba(143, 167, 143, 0.08);
  border-radius: 24px;
  padding: 48px;
  max-width: 900px;
  margin: 0 auto;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 32px;
  align-items: start;
}

.quote-mark {
  color: rgba(212, 175, 106, 0.30);
  width: 80px;
  height: 80px;
}

.testimonial-text {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.6;
  font-style: italic;
  color: var(--warm-charcoal);
  margin: 0 0 32px 0;
  letter-spacing: -0.01em;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid rgba(143, 167, 143, 0.10);
}

.author-photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(143, 167, 143, 0.20);
}

.author-name {
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 600;
  color: var(--warm-charcoal);
}

.author-relationship {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--light-stone);
  margin-top: 2px;
}

@media (max-width: 767px) {
  .testimonial-card {
    padding: 32px 24px;
  }
  
  .testimonial-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .quote-mark {
    width: 60px;
    height: 60px;
  }
  
  .testimonial-text {
    font-size: 19px;
  }
}

/* ============================================
   14. CTA PHONE HERO
   ============================================ */
.cta-phone-hero {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-ui);
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 700;
  color: var(--warm-charcoal);
  text-decoration: none;
  margin: 32px 0;
  padding: 20px 32px;
  background: rgba(255, 255, 255, 0.90);
  border: 1px solid rgba(143, 167, 143, 0.15);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  transition: all var(--duration-fast) var(--ease-bounce);
}

.cta-phone-hero:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: rgba(143, 167, 143, 0.25);
  box-shadow: var(--shadow-lg);
  color: var(--warm-charcoal);
}

.cta-phone-hero:active {
  transform: translateY(-1px) scale(1.01);
}

.phone-icon {
  color: var(--soft-sage);
  flex-shrink: 0;
  width: 32px;
  height: 32px;
}

@media (max-width: 767px) {
  .cta-phone-hero {
    width: 100%;
    justify-content: center;
    padding: 16px 24px;
  }
}

/* ============================================
   15. FOOTER STYLES
   ============================================ */
#site-footer {
  background: linear-gradient(135deg, #2B2B2B 0%, #1B1B1B 100%);
  color: rgba(255, 255, 255, 0.70);
  padding: 80px 0 40px;
  position: relative;
  overflow: hidden;
}

/* Warm glow accents */
#site-footer::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(143, 167, 143, 0.08), transparent 70%);
  pointer-events: none;
  filter: blur(80px);
}

#site-footer::after {
  content: '';
  position: absolute;
  bottom: -200px;
  right: 10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(212, 175, 106, 0.06), transparent 70%);
  pointer-events: none;
  filter: blur(80px);
}

#site-footer a {
  color: rgba(255, 255, 255, 0.85);
  transition: color var(--duration-fast) var(--ease-fast);
}

#site-footer a:hover {
  color: var(--gentle-gold);
}

#site-footer h3,
#site-footer h4 {
  color: #FFFFFF;
  margin-bottom: 16px;
}

/* ============================================
   16. FORM STYLES (CONTACT FORM 7)
   ============================================ */
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea {
  width: 100%;
  padding: 16px 20px;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--warm-charcoal);
  background: rgba(255, 255, 255, 0.90);
  border: 1px solid rgba(143, 167, 143, 0.08);
  border-radius: 12px;
  transition: all var(--duration-fast) var(--ease-fast);
  margin-bottom: 16px;
}

.wpcf7-form input:focus,
.wpcf7-form textarea:focus {
  outline: none;
  border-color: rgba(143, 167, 143, 0.30);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(143, 167, 143, 0.08);
}

.wpcf7-form input[type="submit"] {
  background: var(--trust-blue);
  color: #FFFFFF;
  border: 1px solid rgba(90, 143, 166, 0.20);
  padding: 18px 40px;
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-smooth);
  box-shadow: 
    0 2px 0 rgba(255, 255, 255, 0.15) inset,
    0 8px 24px rgba(90, 143, 166, 0.25);
}

.wpcf7-form input[type="submit"]:hover {
  background: #4A7F96;
  transform: translateY(-2px);
  box-shadow:
    0 3px 0 rgba(255, 255, 255, 0.20) inset,
    0 12px 40px rgba(90, 143, 166, 0.35);
}

/* ============================================
   17. RESPONSIVE UTILITIES
   ============================================ */
@media (max-width: 767px) {
  body {
    font-size: 16px;
  }
  
  .button-row {
    flex-direction: column;
    gap: 12px;
  }
  
  .button {
    width: 100%;
  }
}

/* ============================================
   18. ACCESSIBILITY &amp; MOTION PREFERENCES
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus visible styles */
*:focus-visible {
  outline: 3px solid rgba(143, 167, 143, 0.50);
  outline-offset: 2px;
}

/* ============================================
   END OF CUSTOM CSS
   ============================================ */
