/* Fort Worth Roofing Supply - Premium Website Styles */
/* Production-ready, clean, minimalist, conversion-focused */
/* Complements Tailwind CDN classes with custom polish, animations, components */

:root {
  --color-primary: #012853;
  --color-accent: #1181f2;
  --color-accent-hover: #0e6ad1;
  --color-dark: #020617;
  --color-slate: #1e2937;
  --color-muted: #64748b;
  --color-light: #f8fafc;
  --color-white: #ffffff;
  --color-success: #15803d;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius: 0.5rem;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* Premium Typography & Base */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  color: var(--color-slate);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
h2 { font-size: clamp(1.875rem, 3.5vw, 3rem); }

/* Buttons - Premium CTAs */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 9999px;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
  white-space: nowrap;
}

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

.btn-primary:hover {
  background-color: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

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

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

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

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

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

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

/* Sticky Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  transition: box-shadow 0.2s ease;
  border-bottom: 1px solid #e2e8f0;
}

.nav.scrolled {
  box-shadow: var(--shadow-sm);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--color-primary);
}

.logo img {
  display: block;
  max-height: 100%;
}

.logo-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  font-weight: 500;
  font-size: 0.9375rem;
}

.nav-links a {
  color: var(--color-slate);
  text-decoration: none;
  transition: color 0.15s ease;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.phone-link {
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
  font-size: 0.9375rem;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

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

/* Mobile Menu */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  cursor: pointer;
  z-index: 101;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--color-primary);
  transition: 0.3s;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  background: var(--color-white);
  border-bottom: 1px solid #e2e8f0;
  padding: 1.5rem;
  z-index: 99;
  flex-direction: column;
  gap: 1rem;
  box-shadow: var(--shadow-md);
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  color: var(--color-slate);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0;
  font-size: 1.0625rem;
}

.mobile-menu .nav-actions {
  flex-direction: column;
  align-items: stretch;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

/* Hero Section - Large, impactful like Tesla/Apple */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 72px;
  background: linear-gradient(rgba(2, 6, 23, 0.65), rgba(2, 6, 23, 0.55)), url('../assets/images/1.jpg') center/cover no-repeat;
  color: var(--color-white);
}

.hero-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.hero h1 {
  max-width: 18ch;
  margin-bottom: 1.25rem;
}

.hero p {
  max-width: 48ch;
  font-size: 1.25rem;
  opacity: 0.95;
  margin-bottom: 2rem;
}

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

/* Sections */
.section {
  padding: 5rem 0;
}

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

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

.section-header h2 {
  margin-bottom: 0.75rem;
}

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

/* Cards & Features */
.card {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid #f1f5f9;
}

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

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 9999px;
  background: #e0f0fe;
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

/* Services Grid */
.service-card {
  background: var(--color-white);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 2rem;
  transition: var(--transition);
}

.service-card:hover {
  border-color: var(--color-accent);
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 4 / 3;
  cursor: pointer;
  background: #e2e8f0;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover img {
  transform: scale(1.06);
}

.gallery-item .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2,6,23,0.75), transparent 55%);
  opacity: 0;
  transition: opacity 0.2s ease;
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
  color: white;
  font-weight: 500;
}

.gallery-item:hover .overlay {
  opacity: 1;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.96);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.lightbox.open {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 1100px;
  width: 100%;
}

.lightbox img {
  max-height: 82vh;
  width: 100%;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  background: rgba(255,255,255,0.1);
  border: none;
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  transition: background 0.2s;
  z-index: 10;
}

.lightbox-close { top: 1rem; right: 1rem; }
.lightbox-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1rem; top: 50%; transform: translateY(-50%); }

.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover {
  background: rgba(255,255,255,0.25);
}

.lightbox-caption {
  text-align: center;
  color: #cbd5e1;
  margin-top: 1rem;
  font-size: 0.9375rem;
}

/* Form Styling - Mobile friendly, premium */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.375rem;
  color: var(--color-slate);
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius);
  font-size: 1rem;
  transition: var(--transition);
  background: white;
  color: var(--color-slate);
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(194, 65, 15, 0.1);
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* Trust / Brand logos row */
.brand-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2.5rem 3rem;
  opacity: 0.75;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.5px;
  color: var(--color-muted);
}

/* Why Choose / Highlights */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

/* Reviews / Feedback */
.feedback-card {
  background: white;
  border-radius: var(--radius);
  padding: 1.75rem;
  border-left: 5px solid var(--color-accent);
  box-shadow: var(--shadow-sm);
}

.feedback-meta {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--color-muted);
  font-weight: 500;
}

/* Service Area */
.area-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.5rem 1.5rem;
  font-size: 1rem;
}

/* Sticky Mobile CTAs */
.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid #e2e8f0;
  padding: 0.75rem 1rem;
  display: flex;
  gap: 0.75rem;
  z-index: 90;
  box-shadow: 0 -4px 10px rgb(0 0 0 / 0.06);
}

.sticky-cta .btn {
  flex: 1;
  padding: 0.875rem 1rem;
  font-size: 0.95rem;
}

@media (min-width: 768px) {
  .sticky-cta {
    display: none;
  }
}

/* Contact Info */
.contact-info {
  background: var(--color-light);
  border-radius: var(--radius);
  padding: 2rem;
}

.contact-info-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.contact-info-item:last-child {
  margin-bottom: 0;
}

.contact-info-item .icon {
  width: 42px;
  flex-shrink: 0;
  color: var(--color-accent);
}

/* Map */
.map-container {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid #e2e8f0;
}

/* Footer */
.footer {
  background: var(--color-primary);
  color: #cbd5e1;
  padding: 3rem 0 1.5rem;
}

.footer a {
  color: #cbd5e1;
  text-decoration: none;
}

.footer a:hover {
  color: white;
}

/* Success Toast */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--color-success);
  color: white;
  padding: 1rem 1.75rem;
  border-radius: 9999px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Animations & Reveals */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Utility */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.text-accent {
  color: var(--color-accent);
}

.divider {
  height: 1px;
  background: linear-gradient(to right, transparent, #e2e8f0, transparent);
}

/* Schema / Hidden */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .nav-links, .nav-actions .phone-link, .nav-actions .btn {
    display: none;
  }
  
  .hamburger {
    display: flex;
  }
  
  .hero {
    min-height: 92vh;
    background-position: 35% center;
  }
  
  .hero h1 {
    font-size: 2.35rem;
  }
  
  .section {
    padding: 3.5rem 0;
  }
}

/* Print styles */
@media print {
  .nav, .sticky-cta, .btn, .lightbox { display: none !important; }
  body { font-size: 12pt; }
}

/* Footer logo visibility on dark background (helps with provided logo asset) */
.footer img[alt="Fort Worth Roofing Supply"] {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
  max-height: 28px;
}