:root {
  --navy: #1b3a4b;
  --navy-dark: #122832;
  --amber: #e07a2f;
  --amber-light: #f4a261;
  --cream: #faf7f2;
  --warm-gray: #6b7280;
  --warm-gray-light: #e8e4df;
  --white: #ffffff;
  --text: #2d3748;
  --shadow: 0 4px 24px rgba(27, 58, 75, 0.08);
  --radius: 8px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--cream);
  line-height: 1.6;
}

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

a {
  color: var(--navy);
  text-decoration: none;
}

a:hover {
  color: var(--amber);
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

/* Launch banner */
.launch-banner {
  background: var(--navy);
  color: var(--white);
  text-align: center;
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
}

.launch-banner a {
  color: var(--amber-light);
  font-weight: 600;
}

.launch-banner a:hover {
  color: var(--white);
}

/* Header */
.site-header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
  gap: 1.5rem;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-link img {
  height: 48px;
  width: auto;
}

/* Light logo variant for dark backgrounds (footer, hero) */
.site-footer .footer-brand img,
.hero-logo img {
  content: url("../assets/hearth-comfort-trades-logo-light.png");
}

.logo-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
}

.logo-text span {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--warm-gray);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--navy);
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 1.75rem;
  align-items: center;
}

.main-nav a {
  font-weight: 500;
  font-size: 0.95rem;
}

.main-nav .nav-cta {
  background: var(--amber);
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
}

.main-nav .nav-cta:hover {
  background: var(--navy);
  color: var(--white);
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: var(--white);
  padding: 4.5rem 0 5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.18fr);
  gap: 1.25rem;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  margin-bottom: 1rem;
}

.hero-tagline {
  font-size: 1.25rem;
  color: var(--amber-light);
  margin-bottom: 1.25rem;
  font-weight: 500;
}

.hero-desc {
  opacity: 0.9;
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--amber);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--amber-light);
  color: var(--navy-dark);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-secondary:hover {
  border-color: var(--white);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}

.btn-outline:hover {
  background: var(--navy);
  color: var(--white);
}

.hero-visual {
  width: 100%;
  max-width: none;
}

.hero-triptych {
  display: flex;
  align-items: stretch;
  height: min(560px, 72vh);
  min-height: 420px;
  gap: 4px;
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--navy-dark);
}

.hero-panel {
  position: relative;
  flex: 1;
  min-width: 52px;
  overflow: hidden;
  cursor: pointer;
  transition: flex 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

.hero-panel:focus-visible {
  box-shadow: inset 0 0 0 2px var(--amber-light);
  z-index: 2;
}

.hero-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-panel figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.75rem 0.35rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  color: var(--white);
  background: linear-gradient(transparent, rgba(18, 40, 50, 0.94));
  pointer-events: none;
  white-space: nowrap;
}

/* Hover: expand focused panel, keep others as narrow strips */
@media (hover: hover) {
  .hero-triptych:hover .hero-panel {
    flex: 0.42;
  }

  .hero-triptych .hero-panel:hover {
    flex: 3.4;
  }

  .hero-triptych .hero-panel:hover img {
    transform: scale(1.03);
  }
}

/* Click / touch: same expand behavior via active state */
.hero-triptych.has-active .hero-panel {
  flex: 0.42;
}

.hero-panel.is-active {
  flex: 3.4;
}

.hero-panel.is-active img {
  transform: scale(1.03);
}

/* Legacy hero logo styles kept for reference pages */
.hero-logo {
  text-align: center;
}

.hero-logo img {
  max-width: 320px;
  margin: 0 auto;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.3));
}

.trust-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.9rem;
  opacity: 0.85;
}

.trust-bar span::before {
  content: "✓ ";
  color: var(--amber-light);
}

/* Sections */
section {
  padding: 4rem 0;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
}

.section-header h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  color: var(--navy);
  margin-bottom: 0.75rem;
}

.section-header p {
  color: var(--warm-gray);
  font-size: 1.05rem;
}

.bg-white {
  background: var(--white);
}

.bg-cream {
  background: var(--cream);
}

/* Service cards */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--amber);
  transition: transform 0.2s;
}

.service-card:hover {
  transform: translateY(-4px);
}

.service-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.service-card h3 {
  color: var(--navy);
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.service-card p {
  color: var(--warm-gray);
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

.service-card a {
  font-weight: 600;
  color: var(--amber);
}

.service-card a:hover {
  color: var(--navy);
}

/* Why us */
.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.why-item {
  display: flex;
  gap: 1rem;
}

.why-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: var(--navy);
  color: var(--amber-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.why-item h3 {
  color: var(--navy);
  margin-bottom: 0.35rem;
  font-size: 1.05rem;
}

.why-item p {
  color: var(--warm-gray);
  font-size: 0.95rem;
}

/* CTA band */
.cta-band {
  background: var(--navy);
  color: var(--white);
  text-align: center;
  padding: 3.5rem 0;
}

.cta-band h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 0.75rem;
}

.cta-band p {
  opacity: 0.9;
  margin-bottom: 1.5rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* Page hero (inner pages) */
.page-hero {
  background: var(--navy);
  color: var(--white);
  padding: 3rem 0;
}

.page-hero h1 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  margin-bottom: 0.5rem;
}

.page-hero p {
  opacity: 0.9;
  font-size: 1.1rem;
  max-width: 640px;
}

.breadcrumb {
  font-size: 0.85rem;
  margin-bottom: 1rem;
  opacity: 0.7;
}

.breadcrumb a {
  color: var(--amber-light);
}

/* Content */
.content {
  padding: 3rem 0 4rem;
}

.content-narrow {
  max-width: 760px;
  margin: 0 auto;
}

.content h2 {
  color: var(--navy);
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
}

.content h2:first-child {
  margin-top: 0;
}

.content h3 {
  color: var(--navy);
  font-size: 1.15rem;
  margin: 1.5rem 0 0.75rem;
}

.content p {
  margin-bottom: 1rem;
  color: var(--text);
}

.content ul,
.content ol {
  margin: 0 0 1rem 1.5rem;
  color: var(--text);
}

.content li {
  margin-bottom: 0.5rem;
}

.content a:not(.btn) {
  color: var(--amber);
  font-weight: 500;
}

.content a:not(.btn):hover {
  color: var(--navy);
}

a.btn,
button.btn {
  text-decoration: none;
  font-family: inherit;
}

a.btn-primary,
button.btn-primary {
  color: var(--white);
}

a.btn-primary:hover,
button.btn-primary:hover {
  color: var(--navy-dark);
}

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

a.btn-secondary:hover {
  color: var(--white);
}

a.btn-outline {
  color: var(--navy);
}

a.btn-outline:hover {
  color: var(--white);
}

.highlight-box {
  background: var(--white);
  border-left: 4px solid var(--amber);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow);
}

.hearth-meaning p {
  color: var(--text);
  font-size: 1.05rem;
  margin-bottom: 1rem;
}

.hearth-meaning p:last-child {
  margin-bottom: 0;
}

.hearth-meaning-link {
  margin-top: 1.25rem;
  font-weight: 600;
}

.hearth-meaning-link a {
  color: var(--amber);
}

.hearth-meaning-link a:hover {
  color: var(--navy);
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

th,
td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--warm-gray-light);
}

th {
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
}

tr:nth-child(even) {
  background: var(--white);
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--warm-gray-light);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: 2px solid var(--amber);
  border-color: var(--amber);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-note {
  font-size: 0.85rem;
  color: var(--warm-gray);
  margin-top: 1rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-info h3 {
  color: var(--navy);
  margin-bottom: 1rem;
}

.contact-info p {
  margin-bottom: 0.75rem;
  color: var(--warm-gray);
}

.contact-info strong {
  color: var(--navy);
}

/* Service list */
.service-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem 2rem;
  list-style: none;
  margin: 1rem 0 1.5rem;
}

.service-list li::before {
  content: "→ ";
  color: var(--amber);
  font-weight: 600;
}

/* Footer */
.site-footer {
  background: var(--navy-dark);
  color: rgba(255, 255, 255, 0.8);
  padding: 3rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand img {
  height: 40px;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.5;
}

.footer-col h4 {
  color: var(--white);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.5rem;
}

.footer-col a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.footer-col a:hover {
  color: var(--amber-light);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.6;
}

/* Responsive */
@media (max-width: 900px) {
  .hero-grid,
  .services-grid,
  .why-grid,
  .contact-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .service-list {
    grid-template-columns: 1fr;
  }

  .nav-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: var(--shadow);
    padding: 1rem;
  }

  .main-nav.open {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .header-inner {
    position: relative;
    flex-wrap: wrap;
  }

  .hero-visual {
    max-width: min(100%, 520px);
    margin: 0 auto;
  }

  .hero-triptych {
    min-height: 360px;
    height: min(480px, 58vh);
  }
}
