/* ============================================================
   Plumb Smart Level — Style Sheet
   Color Palette: Deep Navy / Steel Gray / Safety Amber
   ============================================================ */

/* ---------- Design Tokens ---------- */
:root {
  --color-primary: #1b3a5c;
  --color-primary-dark: #102a45;
  --color-primary-light: #26537e;
  --color-accent: #f59e0b;
  --color-accent-dark: #d97706;
  --color-accent-light: #fbbf24;
  --color-surface: #ffffff;
  --color-surface-alt: #f1f5f9;
  --color-surface-dark: #e2e8f0;
  --color-text: #1e293b;
  --color-text-muted: #64748b;
  --color-text-light: #94a3b8;
  --color-success: #16a34a;
  --color-danger: #dc2626;

  --font-body: "Montserrat", system-ui, sans-serif;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
  --transition: 0.25s ease;
  --max-width: 1140px;
}

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

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

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-surface);
  -webkit-font-smoothing: antialiased;
}

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

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

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

ul,
ol {
  list-style: none;
}

/* ---------- Utilities ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.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;
}

.section-heading {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-heading h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.section-heading p {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  max-width: 640px;
  margin: 0 auto;
}

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition),
    box-shadow var(--transition);
  background: var(--color-accent);
  color: var(--color-primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.button:hover {
  background: var(--color-accent-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.button--outline {
  background: transparent;
  color: var(--color-surface);
  border: 2px solid rgba(255, 255, 255, 0.6);
}

.button--outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
  color: #fff;
  box-shadow: none;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--color-primary-dark);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
}

.brand img {
  height: 38px;
  width: auto;
  border-radius: 4px;
}

.brand:hover {
  color: var(--color-accent);
}

.nav-toggle {
  display: none;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0.25rem;
}

.primary-nav {
  display: flex;
  gap: 0.15rem;
}

.primary-nav a {
  display: block;
  padding: 0.5rem 0.85rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.82rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}

.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-accent);
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(145deg, var(--color-primary-dark) 0%, var(--color-primary) 50%, var(--color-primary-light) 100%);
  color: #fff;
  padding: 7rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  position: relative;
}

.hero-content h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.hero-content .tagline {
  font-size: 1.15rem;
  opacity: 0.9;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

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

.hero-figure img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

/* ---------- Feature Pills ---------- */
.features-bar {
  background: var(--color-surface);
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--color-surface-dark);
}

.features-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-surface-dark);
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-primary);
  transition: transform var(--transition), box-shadow var(--transition);
}

.feature-pill:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.feature-pill .icon {
  font-size: 1rem;
}

/* ---------- Content Sections ---------- */
.section {
  padding: 4.5rem 0;
}

.section--alt {
  background: var(--color-surface-alt);
}

.section--dark {
  background: var(--color-primary-dark);
  color: #fff;
}

.section--dark .section-heading h2 {
  color: #fff;
}

.section--dark .section-heading p {
  color: rgba(255, 255, 255, 0.7);
}

/* ---------- Problem / Solution ---------- */
.ps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.ps-card {
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  position: relative;
}

.ps-card--problem {
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.ps-card--solution {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.ps-card .label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
}

.ps-card--problem .label {
  background: #fee2e2;
  color: #b91c1c;
}

.ps-card--solution .label {
  background: #dcfce7;
  color: #15803d;
}

.ps-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--color-primary);
}

.ps-card-img {
  width: 100%;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  object-fit: cover;
  max-height: 220px;
}

.ps-card p {
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ---------- Video ---------- */
.video-wrapper {
  max-width: 800px;
  margin: 0 auto;
}

.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Story / About ---------- */
.story-content {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.story-content p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
}

.story-content p:last-child {
  margin-bottom: 0;
}

/* ---------- How It Works ---------- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  counter-reset: step;
}

.step-card {
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-surface-dark);
  counter-increment: step;
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.step-card::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-accent);
  font-size: 1.3rem;
  font-weight: 700;
}

.step-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.step-card p {
  font-size: 0.92rem;
  color: var(--color-text-muted);
}

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.gallery-grid figure {
  overflow: hidden;
  border-radius: var(--radius-md);
  cursor: pointer;
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-grid figure:hover img {
  transform: scale(1.05);
}

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

.contact-info h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: white;
}

.contact-info p {
  color: white;
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.contact-form .form-group {
  margin-bottom: 1.25rem;
}

.contact-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.35rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  border: 1px solid var(--color-surface-dark);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(27, 58, 92, 0.15);
}

.contact-form textarea {
  resize: vertical;
  min-height: 130px;
}

.contact-form .honeypot {
  position: absolute;
  left: -9999px;
}

.form-note {
  font-size: 0.78rem;
  color: var(--color-text-light);
  margin-top: 0.75rem;
}

/* ---------- Social Share ---------- */
.social-share {
  padding: 2.5rem 0;
  background: var(--color-surface-alt);
  border-top: 1px solid var(--color-surface-dark);
}

.social-list {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.social-list img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: transform var(--transition), box-shadow var(--transition);
}

.social-list img:hover {
  transform: scale(1.12);
  box-shadow: var(--shadow-md);
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--radius-md);
}

.lightbox-caption {
  text-align: center;
  color: rgba(255, 255, 255, 0.8);
  padding: 0.75rem 0;
  font-size: 0.9rem;
}

.lightbox-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

/* ---------- Footer ---------- */
footer {
  background: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  padding: 1.5rem 0;
  font-size: 0.85rem;
}

/* ---------- Notice Card (Thank You / Construction) ---------- */
.notice-card {
  text-align: center;
  padding: 4rem 2rem;
  max-width: 600px;
  margin: 0 auto;
}

.notice-card h1 {
  font-size: 2rem;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.notice-card p {
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

/* ---------- Blog Article ---------- */
.article {
  max-width: 760px;
  margin: 0 auto;
}

.article h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.article p {
  margin-bottom: 1.25rem;
  line-height: 1.75;
  color: var(--color-text-muted);
}

.article ul {
  margin: 1.5rem 0;
  padding-left: 0;
}

.article li {
  position: relative;
  padding: 0.75rem 0 0.75rem 1.75rem;
  line-height: 1.65;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-surface-dark);
}

.article li:last-child {
  border-bottom: none;
}

.article li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.1rem;
  width: 8px;
  height: 8px;
  background: var(--color-accent);
  border-radius: 50%;
}

.article li strong {
  color: var(--color-primary);
}

/* ---------- 3D Viewer Embed ---------- */
.responsive-media {
  max-width: 800px;
  margin: 0 auto;
}

.embed-placeholder {
  position: relative;
}

.sketchfab-embed-wrapper iframe {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.embed-caption {
  text-align: center;
  font-size: 0.8rem;
  color: var(--color-text-light);
  margin-top: 0.75rem;
}

.embed-caption a {
  color: var(--color-primary);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-figure {
    max-width: 480px;
    margin: 0 auto;
  }

  .ps-grid {
    grid-template-columns: 1fr;
  }

  .steps-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin: 0 auto;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .primary-nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--color-primary-dark);
    padding: 0.5rem 1rem 1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  }

  .primary-nav.is-open {
    display: flex;
  }

  .primary-nav a {
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
  }

  .hero {
    padding: 6rem 0 3rem;
  }

  .section {
    padding: 3rem 0;
  }

  .features-list {
    gap: 0.5rem;
  }

  .feature-pill {
    font-size: 0.78rem;
    padding: 0.45rem 0.85rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .hero-content h1 {
    font-size: 1.75rem;
  }
}
