:root {
  /* Brand Colors from Cozy Castle Logo */
  --color-slate-dark: #3E4D48; /* Text/Headings - Dark Grey */
  --color-blue: #38B6FF; /* Primary Brand Blue */
  --color-yellow: #FFB703; /* Accent Yellow */
  --color-green: #8BC34A; /* Trust Green / Action */
  
  /* Palette Extended */
  --color-blue-light: #E8F6FF;
  --color-green-light: #F0F8EC;
  --color-red-light: #FEF2F2;
  --color-red: #EF4444;
  --color-bg-white: #FFFFFF;
  --color-bg-gray: #F8F9FA;
  
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  
  --shadow-sm: 0 4px 6px -1px rgba(62, 77, 72, 0.1);
  --shadow-md: 0 10px 15px -3px rgba(62, 77, 72, 0.1);
  --shadow-lg: 0 20px 25px -5px rgba(62, 77, 72, 0.1);
  
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  color: var(--color-slate-dark);
  line-height: 1.6;
  background-color: var(--color-bg-white);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}

p {
  font-size: 1.125rem;
  color: #55625D;
  margin-bottom: 1.5rem;
}

a {
  text-decoration: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Base Actions */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.125rem;
  padding: 16px 32px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  text-align: center;
}

.btn-primary {
  background-color: var(--color-green);
  color: white;
  box-shadow: 0 4px 14px rgba(139, 195, 74, 0.4);
}

.btn-primary:hover {
  background-color: #7CB342;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 195, 74, 0.6);
}

.btn-secondary {
  background-color: var(--color-blue);
  color: white;
}

.btn-secondary:hover {
  background-color: #2CA5EC;
  transform: translateY(-2px);
}

/* Sticky Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  padding: 16px 0;
  transition: all 0.3s ease;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-placeholder {
  display: block;
}

.header-logo {
  height: 60px; /* Adjust based on actual logo proportion to fit header */
  width: auto;
  display: block;
  object-fit: contain;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.phone-number {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-slate-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.phone-number i { color: var(--color-blue); }

.get-quote-btn {
  padding: 12px 24px;
  font-size: 1rem;
}

/* Hero Section */
.hero {
  padding: 180px 0 100px;
  background: linear-gradient(135deg, var(--color-blue-light) 0%, rgba(255,255,255,0) 100%);
}

.hero .container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 64px;
  align-items: center;
}

.hero-content h1 {
  font-size: 4rem;
  margin-bottom: 24px;
  color: var(--color-slate-dark);
}

.hero-content h1 span {
  color: var(--color-blue);
}

.hero-content p {
  font-size: 1.25rem;
  margin-bottom: 32px;
  max-width: 90%;
}

.social-strip-detailed {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 32px;
  margin-top: 40px;
}

.trust-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--color-slate-dark);
  text-align: center;
  transition: transform 0.2s, background-color 0.2s;
  padding: 16px;
  border-radius: 12px;
  flex: 1; /* evenly space them */
}

.trust-card:hover {
  transform: translateY(-4px);
  background-color: var(--color-bg-gray);
}

.trust-card .stars {
  color: #FFB703;
  font-size: 1rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 3px;
}

.trust-card .stars span {
  color: var(--color-slate-dark);
  font-family: Arial, sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  margin-right: 6px;
}

.homestars-badge {
  width: 130px;
  margin-bottom: 16px;
  border-radius: 4px;
  overflow: hidden;
  font-family: Arial, sans-serif;
}

.hs-top {
  background-color: #00B1FF;
  color: white;
  font-weight: 800;
  font-size: 1.1rem;
  padding: 6px 0;
}

.hs-bottom {
  background-color: #71717A;
  color: white;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 1.5px;
  padding: 4px 0;
}

.google-logo {
  font-family: 'Product Sans', Arial, sans-serif;
  font-weight: 700;
  font-size: 1.7rem;
  letter-spacing: -1px;
  line-height: 1;
}

.google-reviews-text {
  color: #71717A;
  font-size: 0.9rem;
  margin-bottom: 12px;
  font-family: Arial, sans-serif;
}

.trust-company {
  font-style: italic;
  font-weight: 500;
  font-size: 1.15rem;
  margin-bottom: 4px;
  color: #27272A;
}

.trust-desc {
  color: #71717A;
  font-size: 0.85rem;
}

.hero-form-card {
  background: white;
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 10;
  border-top: 6px solid var(--color-green);
  display: flex;
  flex-direction: column;
}

.finance-badge {
  background-color: var(--color-red-light);
  color: var(--color-red);
  padding: 8px 16px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: -10px auto 20px;
  border: 1px solid rgba(239, 68, 68, 0.2);
  width: fit-content;
}

.hero-form-card h3 {
  font-size: 1.75rem;
  margin-bottom: 8px;
  text-align: center;
}

.hero-form-card p.subtitle {
  text-align: center;
  font-size: 1rem;
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.form-group input {
  width: 100%;
  padding: 16px;
  border: 2px solid #E2E8F0;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--color-blue);
}

.submit-btn {
  width: 100%;
  margin-top: 8px;
  padding: 20px;
  font-size: 1.25rem;
}

.form-microcopy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 0.85rem;
  color: #64748B;
  text-align: center;
}

.form-microcopy i {
  color: var(--color-green);
}

/* Problem Comparison Section */
.problem-section {
  padding: 100px 0;
  background-color: var(--color-bg-white);
  text-align: center;
}

.section-header {
  margin-bottom: 64px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.section-header h2 {
  font-size: 2.75rem;
  margin-bottom: 24px;
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: left;
}

.card {
  padding: 40px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  backface-visibility: hidden;
  -webkit-font-smoothing: subpixel-antialiased;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.card-bad {
  background-color: var(--color-red-light);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.card-good {
  background-color: var(--color-green-light);
  border: 2px solid var(--color-green);
  z-index: 2;
  transform: translateY(-8px); /* Protrude upwards without blurring */
  box-shadow: var(--shadow-md);
}

.card-good:hover {
  transform: translateY(-13px);
}

.card-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 24px;
}

.card-bad .card-icon {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--color-red);
}

.card-good .card-icon {
  background-color: var(--color-green);
  color: white;
}

.card h3 {
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.card ul {
  list-style: none;
}

.card ul li {
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 1.05rem;
}

.card-bad ul li i { color: var(--color-red); margin-top: 4px; }
.card-good ul li i { color: var(--color-green); margin-top: 4px; font-weight: 800; }

/* Value Proposition Grids */
.value-section {
  padding: 100px 0;
  background-color: var(--color-bg-gray);
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  margin-top: 64px;
}

.value-item {
  background: white;
  padding: 40px;
  border-radius: var(--radius-md);
  display: flex;
  gap: 24px;
  box-shadow: var(--shadow-sm);
}

.value-icon {
  width: 64px;
  height: 64px;
  background-color: var(--color-blue-light);
  color: var(--color-blue);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
}

.value-item h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

/* FAQ Section */
.faq-section {
  padding: 100px 0;
  background-color: white;
}

.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

details {
  background: var(--color-bg-gray);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  overflow: hidden;
}

summary {
  padding: 24px;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: '\f078'; /* FontAwesome chevron-down */
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  color: var(--color-blue);
  transition: transform 0.3s;
}

details[open] summary::after {
  transform: rotate(180deg);
}

.faq-content {
  padding: 0 24px 24px;
  font-size: 1.1rem;
}

/* CTA Footer Section */
.cta-section {
  padding: 100px 0;
  background-color: var(--color-slate-dark);
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at top right, rgba(56, 182, 255, 0.2) 0%, transparent 60%);
}

.cta-section h2 {
  color: white;
  margin-bottom: 24px;
  font-size: 3rem;
  position: relative;
  z-index: 2;
}

.cta-section p {
  color: rgba(255,255,255,0.8);
  margin-bottom: 40px;
  font-size: 1.25rem;
  position: relative;
  z-index: 2;
}

.cta-section .btn {
  font-size: 1.25rem;
  padding: 20px 48px;
  position: relative;
  z-index: 2;
}

/* Horizontal CTA Form */
.horizontal-form {
  display: flex;
  gap: 16px;
  max-width: 900px;
  margin: 40px auto 0;
  align-items: stretch;
  position: relative;
  z-index: 2;
}

.horizontal-form .form-group {
  margin-bottom: 0;
  flex: 1;
}

.horizontal-form input {
  height: 56px;
  margin-bottom: 0;
  color: var(--color-slate-dark);
}

.horizontal-form .btn {
  margin-top: 0;
  height: 56px;
  white-space: nowrap;
}

.cta-microcopy {
  color: rgba(255, 255, 255, 0.7);
  margin-top: 16px;
  font-size: 0.9rem;
  position: relative;
  z-index: 2;
}

/* Responsive */
@media (max-width: 1024px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .social-strip-detailed {
    flex-direction: column;
    align-items: center;
    gap: 40px;
    margin: 40px auto 0;
  }
  
  .hero-content h1 {
    font-size: 3rem;
  }
  
  .hero-form-card {
    max-width: 500px;
    margin: 0 auto;
  }
  
  .comparison-grid {
    grid-template-columns: 1fr;
  }
  
  .card-good {
    transform: none;
    order: -1; /* Bring best option to top on mobile */
  }
  
  .card-good:hover { transform: translateY(-5px); }
}

@media (max-width: 768px) {
  .header-actions {
    display: none;
  }
  
  .value-grid {
    grid-template-columns: 1fr;
  }
  
  .hero {
    padding-top: 140px;
  }
  
  .horizontal-form {
    flex-direction: column;
  }
  
  .horizontal-form .btn {
    width: 100%;
  }
}

/* Animations */
.fade-in-hidden {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}

.fade-in-visible {
  opacity: 1;
  transform: none;
}
