/* =========================================================
   Arizona Kitchen Quotes -- Layout & Component Styles
   Navy / Gold / Cream, per brand-standards.md v2. Tokens in theme.css.
   ========================================================= */

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, p, ul, figure { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.6;
  background: var(--color-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }

/* ---------- Color zones ---------- */
.zone-navy  { background: var(--color-primary);   color: var(--color-text-on-primary); }
.zone-paper { background: var(--color-bg);        color: var(--color-text); }
.zone-sage  { background: var(--color-secondary); color: var(--color-text-on-primary); }

/* ---------- Layout helpers ---------- */
.container {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}
section, .footer {
  padding: var(--space-2xl) 0;
}
@media (min-width: 1024px) {
  section, .footer { padding: var(--space-3xl) 0; }
}

/* Anchor-link targets: keep the fixed header from covering the section
   label/heading, and leave a peek of the previous section for context. */
section[id] {
  scroll-margin-top: calc(var(--nav-height) + var(--space-lg));
}

.section-label {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-label);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-md);
}
.zone-navy .section-label,
.zone-sage .section-label { color: var(--color-accent); }

.section-heading {
  font-size: var(--text-h2);
  max-width: 18ch;
  margin-bottom: var(--space-md);
}

.lede {
  font-size: var(--text-lead);
  max-width: 42ch;
  color: var(--color-text-muted);
  margin-bottom: var(--space-xl);
}
.zone-navy .lede,
.zone-sage .lede { color: rgba(255, 255, 255, 0.78); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 12px 24px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: opacity 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-on-primary);
}
.btn-primary:hover { opacity: 0.92; }
.btn-secondary {
  background: var(--color-surface);
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-secondary:hover { background: rgba(28, 53, 87, 0.06); }

.zone-navy .btn-primary,
.zone-sage .btn-primary {
  background: var(--color-accent);
  color: var(--color-primary);
}
.zone-navy .btn-secondary {
  background: transparent;
  color: var(--color-text-on-primary);
  border-color: rgba(255, 255, 255, 0.4);
}
.zone-navy .btn-secondary:hover { background: rgba(255, 255, 255, 0.08); }

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

/* =========================================================
   Header / Nav
   ========================================================= */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.brand {
  display: flex;
  align-items: center;
}
.brand img { width: 160px; height: 40px; }
@media (min-width: 640px) {
  .brand img { width: 180px; height: 45px; }
}

.nav-links {
  display: none;
  align-items: center;
  gap: var(--space-xl);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-primary);
}
.nav-links a {
  position: relative;
  padding: 4px 0;
  transition: color 0.2s var(--ease-out);
}
.nav-links a:hover,
.nav-links a.is-active { color: var(--color-accent); }
.nav-cta { display: none; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-primary);
  cursor: pointer;
}
.nav-toggle svg { width: 18px; height: 18px; }

.mobile-menu {
  position: fixed;
  inset: var(--nav-height) 0 0 0;
  z-index: 99;
  background: var(--color-primary);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-xl);
  padding: var(--space-2xl) var(--space-lg);
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out), visibility 0.25s;
}
.mobile-menu.is-open {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}
.mobile-menu a {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--color-text-on-primary);
}
.mobile-menu a.is-active { color: var(--color-accent); }
.mobile-menu .btn { align-self: flex-start; margin-top: var(--space-md); }

@media (min-width: 1024px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
  .nav-toggle, .mobile-menu { display: none; }
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  overflow: hidden;
  padding-top: calc(var(--nav-height) + var(--space-2xl));
}
.hero-graphic {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-width-content);
  text-align: center;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-label {
  font-size: var(--text-label);
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-lg);
}
.hero h1 {
  font-size: var(--text-hero);
  max-width: 16ch;
  margin-bottom: var(--space-md);
}
.hero h1 em {
  font-style: italic;
  color: var(--color-accent);
}
.hero .tagline {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: var(--text-h3);
  color: var(--color-accent);
  margin-bottom: var(--space-lg);
}
.hero .lede {
  margin: 0 auto var(--space-xl);
  text-align: center;
  color: rgba(255, 255, 255, 0.78);
}
.hero .btn-group { justify-content: center; }

.benefit-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  list-style: none;
  max-width: 48ch;
  margin: 0 auto;
  text-align: left;
  color: rgba(255, 255, 255, 0.78);
}
.benefit-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
}
.benefit-list li::before {
  content: "\2713";
  flex-shrink: 0;
  color: var(--color-accent);
  font-weight: 700;
}

/* ---------- Embedded form ---------- */
.form-cta {
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: var(--space-sm);
}
.form-embed {
  margin-top: var(--space-xl);
  max-width: 640px;
}
.form-embed iframe {
  display: block;
  width: 100%;
  height: 1620px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}
@media (max-width: 480px) {
  .form-embed iframe { height: 1820px; }
}

/* =========================================================
   Numbered grids -- Why AZQ / How It Works
   ========================================================= */
.benefits-grid,
.steps-grid {
  display: grid;
  gap: var(--space-2xl);
  margin-top: var(--space-xl);
}
.benefit-item .numeral,
.step-item .numeral {
  display: block;
  font-family: var(--font-heading);
  font-size: var(--text-numeral);
  font-weight: 700;
  line-height: 1;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}
.benefit-item h3,
.step-item h3 {
  font-size: var(--text-h3);
  color: var(--color-primary);
  margin-bottom: var(--space-xs);
}
.benefit-item p,
.step-item p {
  color: var(--color-text-muted);
  max-width: 32ch;
}
@media (min-width: 860px) {
  .benefits-grid { grid-template-columns: repeat(4, 1fr); }
  .steps-grid { grid-template-columns: repeat(3, 1fr); }
  .benefits-grid,
  .steps-grid {
    border-top: 1px solid var(--color-border);
    padding-top: var(--space-2xl);
  }
}

/* =========================================================
   Kitchen Design Inspiration -- gallery
   ========================================================= */
.gallery-grid {
  display: grid;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}
.gallery-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.gallery-card .card-visual {
  aspect-ratio: 16 / 9;
}
.gallery-card .card-visual svg { width: 100%; height: 100%; }
.gallery-card .tag {
  font-size: var(--text-label);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin: var(--space-md) var(--space-md) 0;
}
.gallery-card h3 {
  font-size: var(--text-h3);
  color: var(--color-primary);
  margin: var(--space-xs) var(--space-md) 0;
}
.gallery-card p {
  color: var(--color-text-muted);
  margin: var(--space-xs) var(--space-md) var(--space-md);
}
@media (min-width: 860px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

/* =========================================================
   App preview -- real intake screenshots
   ========================================================= */
.app-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xl);
  margin-top: var(--space-2xl);
}
.app-preview-frame {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface);
  box-shadow: var(--shadow-md);
}
.app-preview-frame .mockup-bar {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-primary);
}
.app-preview-frame .mockup-bar span {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  display: inline-block;
}
.app-preview-frame img { width: 100%; }
.app-preview-frame.is-desktop { width: 100%; max-width: 640px; }
.app-preview-frame.is-mobile { width: 100%; max-width: 240px; }
@media (min-width: 860px) {
  .app-preview { flex-direction: row; align-items: flex-start; justify-content: center; }
}

/* =========================================================
   Get Your Quote CTA
   ========================================================= */
.quote-cta {
  text-align: center;
}
.quote-cta .container {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.quote-cta h2 {
  font-size: var(--text-h2);
  max-width: 18ch;
  margin-bottom: var(--space-md);
}
.quote-cta .lede { text-align: center; }
.quote-cta .btn-group { justify-content: center; }
.quote-note {
  margin-top: var(--space-lg);
  font-size: var(--text-small);
  color: rgba(255, 255, 255, 0.6);
}

/* =========================================================
   Arizona Contractor Network
   ========================================================= */
#contractors {
  text-align: center;
}
#contractors .container {
  display: flex;
  flex-direction: column;
  align-items: center;
}
#contractors h2 {
  font-size: var(--text-h2);
  max-width: 20ch;
  margin-bottom: var(--space-md);
}
#contractors .lede { text-align: center; }
#contractors .btn-group { justify-content: center; }

/* =========================================================
   Footer
   ========================================================= */
.footer-top {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  font-size: var(--text-small);
  font-weight: 600;
}
.footer-nav a:hover { color: var(--color-accent); }
.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding-top: var(--space-lg);
  font-size: var(--text-small);
  color: rgba(255, 255, 255, 0.6);
}
.footer-credit {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  transition: opacity 0.2s var(--ease-out);
}
.footer-credit:hover { opacity: 0.8; }
.footer-credit img { height: 24px; width: auto; }
@media (min-width: 860px) {
  .footer-top { flex-direction: row; align-items: center; justify-content: space-between; }
  .footer-bottom { flex-direction: row; justify-content: space-between; align-items: center; }
}

/* =========================================================
   Scroll-reveal (restrained -- see js/animations.js)
   ========================================================= */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
