/* ============================================
   Above the Rest Garage Doors Arizona
   Global Stylesheet
   ============================================ */

/* ---- CSS Custom Properties (Design Tokens) ---- */
:root {
  /* Colors */
  --color-primary: #1a2332;
  --color-primary-light: #2a3a4f;
  --color-accent: #d4a017;
  --color-accent-hover: #b88a0e;
  --color-bg: #f5f5f5;
  --color-surface: #ffffff;
  --color-text: #333333;
  --color-text-light: #666666;
  --color-text-muted: #888888;
  --color-border: #e0e0e0;
  --color-success: #2e7d32;
  --color-error: #c62828;

  /* Typography */
  --font-body: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  --font-heading: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'SF Mono', Monaco, monospace;

  /* Scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Layout */
  --max-width: 1200px;
  --header-height: 70px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
}

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

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

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

a:hover, a:focus {
  color: var(--color-accent-hover);
  text-decoration: underline;
}

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

ul, ol {
  list-style: none;
}

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-primary);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
  margin-bottom: var(--space-4);
}

p:last-child {
  margin-bottom: 0;
}

/* ---- Layout Utilities ---- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

@media (max-width: 640px) {
  .container {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }
}

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

/* ---- Header ---- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(26, 35, 50, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  height: var(--header-height);
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

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

.site-logo {
  font-size: var(--text-lg);
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.site-logo:hover {
  color: var(--color-accent);
  text-decoration: none;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--color-accent);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-icon svg {
  width: 22px;
  height: 22px;
  color: var(--color-primary);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.site-nav a {
  color: rgba(255,255,255,0.85);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--color-accent);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: var(--space-2);
}

@media (max-width: 768px) {
  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-primary);
    flex-direction: column;
    padding: var(--space-6);
    gap: var(--space-4);
    border-top: 1px solid rgba(255,255,255,0.1);
  }

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

  .site-nav a {
    font-size: var(--text-base);
    padding: var(--space-2) 0;
  }

  .menu-toggle {
    display: block;
  }
}

/* ---- Main Content ---- */
main {
  min-height: calc(100vh - var(--header-height));
  padding-top: var(--header-height);
}

/* ---- Hero Section ---- */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--color-primary);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(26,35,50,0.97) 0%, rgba(42,58,79,0.92) 50%, rgba(26,35,50,0.95) 100%);
  z-index: 1;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 80px,
      rgba(212, 160, 23, 0.03) 80px,
      rgba(212, 160, 23, 0.03) 81px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 80px,
      rgba(212, 160, 23, 0.03) 80px,
      rgba(212, 160, 23, 0.03) 81px
    );
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 720px;
  padding: var(--space-8);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(212, 160, 23, 0.15);
  color: var(--color-accent);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(212, 160, 23, 0.3);
  margin-bottom: var(--space-6);
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  background: var(--color-accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero h1 {
  font-size: var(--text-5xl);
  color: #fff;
  margin-bottom: var(--space-6);
  line-height: 1.1;
}

.hero h1 .accent {
  color: var(--color-accent);
}

.hero-subtitle {
  font-size: var(--text-2xl);
  color: rgba(255,255,255,0.9);
  font-weight: 600;
  margin-bottom: var(--space-4);
}

.hero-description {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.7);
  line-height: 1.7;
  margin-bottom: var(--space-8);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-size: var(--text-base);
  font-weight: 600;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-primary);
  border-color: var(--color-accent);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  color: var(--color-primary);
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.4);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.6);
  color: #fff;
  text-decoration: none;
}

.btn:disabled,
.btn.is-placeholder {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ---- Section Styles (for future use) ---- */
.section {
  padding: var(--space-20) 0;
}

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

.section-title {
  text-align: center;
  margin-bottom: var(--space-12);
}

.section-title h2 {
  margin-bottom: var(--space-4);
}

.section-title p {
  color: var(--color-text-light);
  font-size: var(--text-lg);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ---- Coming Soon / Placeholder Page Styles ---- */
.coming-soon-main {
  background: var(--color-primary);
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-12) var(--space-6);
}

.coming-soon-content {
  max-width: 640px;
}

.coming-soon-content h1 {
  color: #fff;
  font-size: var(--text-4xl);
  margin-bottom: var(--space-4);
}

.coming-soon-content h2 {
  color: var(--color-accent);
  font-size: var(--text-2xl);
  margin-bottom: var(--space-6);
}

.coming-soon-content p {
  color: rgba(255,255,255,0.75);
  font-size: var(--text-lg);
  margin-bottom: var(--space-8);
}

.coming-soon-icon {
  width: 80px;
  height: 80px;
  background: rgba(212, 160, 23, 0.15);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-8);
  border: 2px solid rgba(212, 160, 23, 0.3);
}

.coming-soon-icon svg {
  width: 40px;
  height: 40px;
  color: var(--color-accent);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-accent);
  font-weight: 500;
  margin-top: var(--space-8);
}

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

/* ---- Footer ---- */
.site-footer {
  background: #111827;
  color: rgba(255,255,255,0.7);
  padding: var(--space-12) 0 var(--space-6);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-10);
  margin-bottom: var(--space-10);
}

.footer-brand {
  grid-column: 1 / -1;
}

@media (min-width: 768px) {
  .footer-brand {
    grid-column: span 2;
  }
}

.footer-brand .logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: #fff;
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-4);
}

.footer-brand .logo svg {
  width: 28px;
  height: 28px;
  color: var(--color-accent);
}

.footer-brand p {
  font-size: var(--text-sm);
  line-height: 1.6;
  color: rgba(255,255,255,0.6);
  max-width: 320px;
}

.footer-col h4 {
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-4);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer-col a {
  color: rgba(255,255,255,0.6);
  font-size: var(--text-sm);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

.footer-col a.is-placeholder {
  color: rgba(255,255,255,0.35);
  cursor: default;
}

.footer-col a.is-placeholder:hover {
  color: rgba(255,255,255,0.35);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: var(--space-6);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.footer-bottom p {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.45);
  margin: 0;
}

.footer-bottom-links {
  display: flex;
  gap: var(--space-6);
}

.footer-bottom-links a {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.45);
}

.footer-bottom-links a:hover {
  color: var(--color-accent);
}

/* Social icons */
.social-links {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.social-links a {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.social-links a:hover {
  background: var(--color-accent);
}

.social-links a:hover svg {
  color: var(--color-primary);
}

.social-links svg {
  width: 18px;
  height: 18px;
  color: rgba(255,255,255,0.6);
}

/* ---- Page Content (for placeholder policy pages) ---- */
.page-content {
  padding: var(--space-12) 0;
}

.page-header {
  background: var(--color-primary);
  padding: var(--space-16) 0 var(--space-10);
  text-align: center;
}

.page-header h1 {
  color: #fff;
  font-size: var(--text-4xl);
}

.page-header p {
  color: rgba(255,255,255,0.7);
  font-size: var(--text-lg);
  margin-top: var(--space-4);
}

.content-block {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  margin-bottom: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.content-block h2 {
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 2px solid var(--color-border);
}

.content-block h3 {
  margin-top: var(--space-6);
  margin-bottom: var(--space-3);
  color: var(--color-primary-light);
}

.content-block ul {
  list-style: disc;
  padding-left: var(--space-6);
  margin-bottom: var(--space-4);
}

.content-block ul li {
  margin-bottom: var(--space-2);
}

/* Placeholder label style */
.placeholder-label {
  display: inline-block;
  background: rgba(212, 160, 23, 0.1);
  color: var(--color-accent);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--color-accent);
  margin-left: var(--space-2);
}

/* ---- 404 Page ---- */
.error-page {
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-12) var(--space-6);
  background: var(--color-primary);
}

.error-content {
  max-width: 520px;
}

.error-code {
  font-size: clamp(6rem, 15vw, 10rem);
  font-weight: 800;
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: var(--space-4);
  opacity: 0.8;
}

.error-content h1 {
  color: #fff;
  font-size: var(--text-3xl);
  margin-bottom: var(--space-4);
}

.error-content p {
  color: rgba(255,255,255,0.7);
  font-size: var(--text-lg);
  margin-bottom: var(--space-8);
}

/* ---- Responsive Adjustments ---- */
@media (max-width: 640px) {
  :root {
    --text-4xl: 1.875rem;
    --text-5xl: 2.25rem;
    --text-6xl: 3rem;
  }

  .hero h1 {
    font-size: var(--text-3xl);
  }

  .hero-subtitle {
    font-size: var(--text-xl);
  }

  .hero-description {
    font-size: var(--text-base);
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .coming-soon-content h1 {
    font-size: var(--text-3xl);
  }

  .page-header h1 {
    font-size: var(--text-3xl);
  }

  .section {
    padding: var(--space-12) 0;
  }
}

/* ---- Print Styles ---- */
@media print {
  .site-header,
  .site-footer {
    display: none;
  }

  main {
    padding-top: 0;
  }
}
