/* =========================================================================
   Atlas Water Heaters — static rebuild
   Design tokens ported from the original Tailwind/shadcn theme (index.css).
   ========================================================================= */

:root {
  /* Core palette (HSL triplets from the original theme) */
  --background: 210 20% 98%;
  --foreground: 222 47% 11%;
  --border: 214 32% 91%;
  --card: 0 0% 100%;
  --card-foreground: 222 47% 11%;
  --primary: 222 47% 15%;
  --primary-foreground: 210 40% 98%;
  --secondary: 210 40% 96.1%;
  --muted: 210 40% 96.1%;
  --muted-foreground: 215 16% 47%;
  --accent: 24 90% 55%;
  --accent-foreground: 0 0% 100%;

  /* Convenience solid colors */
  --c-background: hsl(var(--background));
  --c-foreground: hsl(var(--foreground));
  --c-border: hsl(var(--border));
  --c-card: hsl(var(--card));
  --c-primary: hsl(var(--primary));
  --c-primary-fg: hsl(var(--primary-foreground));
  --c-muted: hsl(var(--muted));
  --c-muted-fg: hsl(var(--muted-foreground));
  --c-accent: hsl(var(--accent));
  --c-accent-fg: hsl(var(--accent-foreground));

  --radius: 0.5rem;

  /* Signature "chunky flat" shadow stack from the original theme */
  --shadow-sm: 0px 2px 0px 0px hsl(222 47% 11% / 0.05), 0px 1px 2px -1px hsl(222 47% 11% / 0.1);
  --shadow-md: 0px 2px 0px 0px hsl(222 47% 11% / 0.05), 0px 2px 4px -1px hsl(222 47% 11% / 0.1);
  --shadow-lg: 0px 2px 0px 0px hsl(222 47% 11% / 0.05), 0px 4px 6px -1px hsl(222 47% 11% / 0.1);
  --shadow-xl: 0px 2px 0px 0px hsl(222 47% 11% / 0.05), 0px 8px 10px -1px hsl(222 47% 11% / 0.1);
  --shadow-2xl: 0 25px 50px -12px hsl(222 47% 11% / 0.25);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ---------- Reset & base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  border: 0 solid var(--c-border);
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-sans);
  color: var(--c-foreground);
  background: var(--c-background);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

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

.icon {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 80rem; /* max-w-7xl */
  margin-inline: auto;
  padding-inline: 1rem;
}

@media (min-width: 768px) {
  .container { padding-inline: 2rem; }
}

.section { padding-block: 6rem; }

.section-head {
  text-align: center;
  max-width: 42rem;
  margin: 0 auto 4rem;
}

.section-head h2 {
  font-size: clamp(1.875rem, 1.4rem + 1.8vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.section-head p {
  color: var(--c-muted-fg);
  font-size: 1.125rem;
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-muted-fg);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: background-color .2s, box-shadow .2s, transform .2s, color .2s;
  white-space: nowrap;
}

.btn-sm { height: 2.5rem; padding-inline: 1rem; font-size: 0.875rem; }
.btn-md { height: 2.75rem; padding-inline: 1.25rem; font-size: 0.9375rem; }
.btn-lg { height: 3.5rem; padding-inline: 2rem; font-size: 1.125rem; }

.btn-accent {
  background: var(--c-accent);
  color: var(--c-accent-fg);
  box-shadow: var(--shadow-sm);
}
.btn-accent:hover {
  background: hsl(24 90% 55% / 0.9);
  box-shadow: var(--shadow-lg);
}

.btn-ghost-light {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(4px);
}
.btn-ghost-light:hover { background: rgba(255, 255, 255, 0.2); }

.btn-white {
  background: #fff;
  color: var(--c-accent);
  border-radius: 9999px;
  box-shadow: var(--shadow-xl);
  font-weight: 700;
}
.btn-white:hover { background: rgba(255, 255, 255, 0.9); }

.btn-block { width: 100%; }

@media (min-width: 640px) {
  .btn-auto { width: auto; }
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  padding-block: 0.5rem;
  transition: background-color .3s, box-shadow .3s, padding .3s;
}
.site-header.scrolled {
  background: #fff;
  box-shadow: var(--shadow-md);
  padding-block: 0.25rem;
}

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

.brand {
  display: flex;
  align-items: center;
  height: 112px;
  overflow: hidden;
  background: none;
  color: var(--c-primary);
}
/* Logo sized 70% larger than the previous 3rem / 3.75rem */
.brand .logo { height: 5.1rem; width: auto; object-fit: contain; }
@media (min-width: 768px) { .brand .logo { height: 6.375rem; } }

.nav-desktop {
  display: none;
  align-items: center;
  gap: 2rem;
  font-weight: 500;
  color: hsl(var(--foreground) / 0.8);
}
.nav-desktop a { transition: color .2s; }
.nav-desktop a:hover { color: var(--c-primary); }

.header-actions {
  display: none;
  align-items: center;
  gap: 1.5rem;
}

.phone-inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--c-primary);
  font-weight: 700;
  font-size: 1.125rem;
}
.phone-inline .icon { width: 20px; height: 20px; }

.menu-toggle {
  display: inline-flex;
  padding: 0.5rem;
  background: none;
  color: var(--c-foreground);
}
.menu-toggle .icon { width: 24px; height: 24px; }
.menu-toggle .icon-close { display: none; }
.menu-toggle.open .icon-open { display: none; }
.menu-toggle.open .icon-close { display: block; }

/* Mobile nav */
.nav-mobile {
  position: absolute;
  top: 100%;
  inset-inline: 0;
  background: #fff;
  border-top: 1px solid var(--c-border);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height .3s ease, opacity .3s ease;
}
.nav-mobile.open { max-height: 30rem; opacity: 1; }

.nav-mobile-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
}
.nav-mobile a {
  padding-block: 0.5rem;
  font-weight: 500;
  border-bottom: 1px solid hsl(var(--border) / 0.5);
}
.nav-mobile .phone-inline { justify-content: center; padding-top: 0.5rem; }

@media (min-width: 1024px) {
  .nav-desktop { display: flex; }
  .header-actions { display: flex; }
  .menu-toggle { display: none; }
  .nav-mobile { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-top: 6rem;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  /* Fallback gradient shows if hero-bg.jpg is not present */
  background:
    url('hero-bg.jpg') right center / auto 100% no-repeat,
    radial-gradient(120% 120% at 80% 20%, hsl(222 47% 22%), hsl(222 47% 11%));
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to right,
    hsl(var(--primary) / 0.95),
    hsl(var(--primary) / 0.75),
    hsl(var(--primary) / 0.1)
  );
}
.hero .container {
  position: relative;
  z-index: 2;
  padding-top: 4rem;
  padding-bottom: 6rem;
  color: #fff;
}
.hero-content { max-width: 42rem; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.badge .icon { width: 16px; height: 16px; color: var(--c-accent); }

.hero h1 {
  font-size: clamp(2.75rem, 1.8rem + 4.5vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}
.hero h1 .accent-gradient {
  background: linear-gradient(to right, hsl(var(--accent)), #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.25rem);
  color: rgba(255, 255, 255, 0.8);
  max-width: 36rem;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
@media (min-width: 640px) {
  .hero-actions { flex-direction: row; }
}

.hero-social-proof {
  margin-top: 3rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
}
.avatar-stack { display: flex; }
.avatar-stack .avatar { margin-left: -0.5rem; }
.avatar-stack .avatar:first-child { margin-left: 0; }
.avatar {
  height: 2.5rem;
  width: 2.5rem;
  border-radius: 9999px;
  border: 2px solid var(--c-primary);
  background: hsl(var(--primary-foreground) / 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.avatar .icon { width: 16px; height: 16px; color: var(--c-accent); fill: var(--c-accent); }

/* ---------- Locations ---------- */
.grid {
  display: grid;
  gap: 1.5rem;
}
.grid-cities { grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-cities { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-cities { grid-template-columns: repeat(3, 1fr); } }

.city-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 100%;
  padding: 2rem;
  background: #fff;
  border: 1px solid hsl(var(--border) / 0.5);
  border-radius: var(--radius);
  transition: border-color .3s, box-shadow .3s, transform .3s;
  overflow: hidden;
}
.city-card:hover {
  border-color: hsl(var(--primary) / 0.3);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.city-icon {
  height: 3rem;
  width: 3rem;
  border-radius: 9999px;
  background: hsl(var(--primary) / 0.05);
  color: var(--c-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color .2s, color .2s;
}
.city-card:hover .city-icon { background: var(--c-primary); color: #fff; }
.city-name { font-size: 1.25rem; font-weight: 700; }
.city-state { color: var(--c-muted-fg); font-weight: 500; }
.city-chevron {
  position: absolute;
  top: 0; right: 0;
  padding: 1rem;
  color: var(--c-primary);
  opacity: 0;
  transform: translateX(0.5rem);
  transition: opacity .2s, transform .2s;
}
.city-card:hover .city-chevron { opacity: 1; transform: translateX(0); }

.locations-note {
  margin-top: 3rem;
  text-align: center;
  color: var(--c-muted-fg);
}
.locations-note a { color: var(--c-primary); font-weight: 600; }
.locations-note a:hover { text-decoration: underline; }

/* ---------- Services ---------- */
.services {
  background: hsl(var(--muted) / 0.5);
  border-top: 1px solid hsl(var(--border) / 0.5);
  border-bottom: 1px solid hsl(var(--border) / 0.5);
}
.grid-services { grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 768px) { .grid-services { grid-template-columns: repeat(2, 1fr); } }

.service-card {
  background: #fff;
  padding: 2rem;
  border-radius: 1rem;
  border: 1px solid hsl(var(--border) / 0.5);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s;
}
.service-card:hover { box-shadow: var(--shadow-md); }
.service-icon {
  height: 3.5rem;
  width: 3.5rem;
  border-radius: 0.75rem;
  background: hsl(var(--primary) / 0.1);
  color: var(--c-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}
.service-icon .icon { width: 28px; height: 28px; }
.service-card h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.75rem; }
.service-card p { color: var(--c-muted-fg); line-height: 1.7; }

.services-footnote {
  margin-top: 3rem;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-muted-fg);
}

/* ---------- About / The Atlas Standard ---------- */
.about {
  background: var(--c-primary);
  color: var(--c-primary-fg);
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
  align-items: center;
}
@media (min-width: 1024px) { .about-grid { grid-template-columns: repeat(2, 1fr); } }

.about h2 {
  font-size: clamp(1.875rem, 1.2rem + 2.6vw, 3rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
}
.about-lead {
  color: hsl(var(--primary-foreground) / 0.8);
  font-size: 1.125rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}
.trust-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 640px) { .trust-grid { grid-template-columns: repeat(2, 1fr); } }
.trust-item { display: flex; align-items: center; gap: 0.75rem; }
.trust-item .icon { color: var(--c-accent); }
.trust-item span { font-weight: 600; font-size: 1.125rem; }

.about-quote {
  position: relative;
  height: 500px;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-2xl);
  background: hsl(var(--primary-foreground) / 0.1);
  border: 2px solid rgba(255, 255, 255, 0.1);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.about-quote .bar {
  width: 6rem;
  height: 0.5rem;
  background: var(--c-accent);
  border-radius: 9999px;
  margin-bottom: 2rem;
}
.about-quote h3 { font-size: 1.875rem; font-weight: 700; line-height: 1.3; margin-bottom: 1rem; }
.about-quote p { color: hsl(var(--primary-foreground) / 0.6); }

/* ---------- Testimonials ---------- */
.grid-testimonials { grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 768px) { .grid-testimonials { grid-template-columns: repeat(3, 1fr); } }

.testimonial-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--c-card);
  padding: 2rem;
  border-radius: 1rem;
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-sm);
}
.stars { display: flex; align-items: center; gap: 0.25rem; margin-bottom: 1.5rem; }
.stars .icon { width: 20px; height: 20px; color: var(--c-accent); fill: var(--c-accent); }
.testimonial-quote {
  color: hsl(var(--foreground) / 0.9);
  font-style: italic;
  font-size: 1.125rem;
  line-height: 1.7;
  flex-grow: 1;
  margin-bottom: 2rem;
}
.testimonial-name { font-weight: 700; }
.testimonial-city { font-size: 0.875rem; color: var(--c-muted-fg); }

/* ---------- CTA band ---------- */
.cta {
  position: relative;
  background: var(--c-accent);
  padding-block: 5rem;
  overflow: hidden;
}
.cta-texture {
  position: absolute;
  inset: 0;
  background-image: url('https://www.transparenttextures.com/patterns/cubes.png');
  opacity: 0.1;
}
.cta .container {
  position: relative;
  z-index: 1;
  max-width: 64rem;
  text-align: center;
}
.cta h2 {
  font-size: clamp(2.25rem, 1.6rem + 2.6vw, 3rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 2rem;
}
.cta-actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
}
@media (min-width: 640px) { .cta-actions { flex-direction: row; } }
.cta-phone {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.cta-phone .muted { opacity: 0.8; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--c-foreground);
  color: #fff;
  padding-top: 5rem;
  padding-bottom: 2.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: repeat(4, 1fr); } }

.footer-brand { display: flex; flex-direction: column; gap: 1.5rem; }
.footer-brand .logo { height: 3.25rem; width: auto; object-fit: contain; }
/* Original forced the logo to white on the dark footer (brightness-0 invert) */
.footer-logo { filter: brightness(0) invert(1); }
.footer-brand p { color: rgba(255, 255, 255, 0.6); line-height: 1.7; max-width: 20rem; }

.socials { display: flex; gap: 1rem; }
.social {
  height: 2.5rem;
  width: 2.5rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color .2s;
}
.social:hover { background: var(--c-accent); }
.social .icon { width: 20px; height: 20px; }

.footer-col h4 { font-size: 1.125rem; font-weight: 700; margin-bottom: 1.5rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1rem; }
.footer-col a,
.footer-col button {
  color: rgba(255, 255, 255, 0.7);
  background: none;
  padding: 0;
  transition: color .2s;
  text-align: left;
}
.footer-col a:hover,
.footer-col button:hover { color: #fff; }

.footer-address {
  font-style: normal;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.footer-address .phone {
  padding-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #fff;
  font-weight: 700;
}
.footer-address .phone .icon { color: var(--c-accent); width: 20px; height: 20px; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
  text-align: center;
}
.footer-bottom .legal { display: flex; gap: 1.5rem; }
.footer-bottom a:hover { color: #fff; }
@media (min-width: 768px) {
  .footer-bottom { flex-direction: row; justify-content: space-between; text-align: left; }
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* Hero load-in stagger */
.hero-anim {
  opacity: 0;
  transform: translateY(20px);
  animation: heroIn .6s ease forwards;
}
.hero-anim.d1 { animation-delay: .0s; }
.hero-anim.d2 { animation-delay: .1s; }
.hero-anim.d3 { animation-delay: .2s; }
.hero-anim.d4 { animation-delay: .3s; }
.hero-anim.d5 { animation-delay: .4s; }
@keyframes heroIn {
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; }
  .reveal, .hero-anim { transition: none; animation: none; opacity: 1; transform: none; }
}

:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
}
