/* ============================================
   Jay Cartwright Construction — Styles
   Teal + Slate Grey | Confident Corporate
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  --teal-50: #f0fdfa;
  --teal-100: #ccfbf1;
  --teal-200: #99f6e4;
  --teal-400: #2dd4bf;
  --teal-500: #14b8a6;
  --teal-600: #0d9488;
  --teal-700: #0f766e;
  --teal-800: #115e59;
  --teal-900: #134e4a;
  
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --slate-950: #020617;
  
  --white: #ffffff;
  --black: #000000;
  
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Open Sans', sans-serif;
  
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--slate-800);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

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

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  white-space: nowrap;
}

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

.btn-primary:hover {
  background: var(--teal-700);
  border-color: var(--teal-700);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

.btn-outline:hover {
  background: var(--white);
  color: var(--teal-700);
  transform: translateY(-2px);
}

.btn-white {
  background: var(--white);
  color: var(--teal-700);
  border-color: var(--white);
}

.btn-white:hover {
  background: var(--teal-50);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1.05rem;
}

.btn-full {
  width: 100%;
  justify-content: center;
  padding: 16px 28px;
}

/* --- Section Shared --- */
.section-tag {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--teal-600);
  background: var(--teal-50);
  padding: 6px 14px;
  border-radius: 50px;
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 16px;
  color: var(--slate-900);
}

.section-desc {
  font-size: 1.1rem;
  color: var(--slate-500);
  max-width: 600px;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header .section-desc {
  margin: 0 auto;
}

/* --- Navbar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--slate-200);
  transition: box-shadow var(--transition);
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--slate-900);
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--teal-600);
  border-radius: var(--radius-sm);
  color: var(--white);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--slate-600);
  position: relative;
}

.nav-links a:not(.btn):hover {
  color: var(--teal-600);
}

.nav-links a:not(.btn)::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--teal-600);
  transition: width var(--transition);
}

.nav-links a:not(.btn):hover::after {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--slate-700);
  border-radius: 2px;
  transition: all var(--transition);
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--slate-900);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(2, 6, 23, 0.85) 0%,
    rgba(15, 23, 42, 0.75) 50%,
    rgba(17, 94, 89, 0.6) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 120px 24px 80px;
  max-width: 860px;
}

.hero-headline {
  font-size: clamp(2.25rem, 6vw, 4rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.hero-headline span {
  color: var(--teal-400);
}

.hero-sub {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--slate-300);
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--slate-300);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 8px 16px;
  border-radius: 50px;
  backdrop-filter: blur(4px);
}

.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: var(--slate-400);
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-8px); }
  60% { transform: translateX(-50%) translateY(-4px); }
}

/* --- Services --- */
.services {
  padding: 100px 0;
  background: var(--slate-50);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  border: 1px solid var(--slate-200);
  transition: all var(--transition);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: var(--teal-200);
}

.service-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--teal-50);
  border: 1px solid var(--teal-100);
  border-radius: var(--radius-md);
  color: var(--teal-600);
  margin-bottom: 20px;
  transition: all var(--transition);
}

.service-card:hover .service-icon {
  background: var(--teal-600);
  border-color: var(--teal-600);
  color: var(--white);
}

.service-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
  color: var(--slate-900);
}

.service-card p {
  font-size: 0.95rem;
  color: var(--slate-500);
  line-height: 1.7;
}

/* --- About --- */
.about {
  padding: 100px 0;
  background: var(--white);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about-image {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-xl);
}

.about-stat {
  position: absolute;
  bottom: 24px;
  left: 24px;
  background: var(--teal-600);
  color: var(--white);
  padding: 20px 28px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-xl);
}

.about-stat .stat-number {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.about-stat .stat-label {
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0.9;
}

.about-content .section-title {
  text-align: left;
}

.about-text {
  color: var(--slate-600);
  margin-bottom: 16px;
  line-height: 1.8;
}

.about-features {
  margin-top: 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--slate-700);
}

.feature svg {
  color: var(--teal-600);
  flex-shrink: 0;
}

/* --- Projects --- */
.projects {
  padding: 100px 0;
  background: var(--slate-50);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.project-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
}

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

.project-card:hover img {
  transform: scale(1.08);
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.85) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  transition: background var(--transition);
}

.project-card:hover .project-overlay {
  background: linear-gradient(to top, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.3) 100%);
}

.project-category {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--teal-400);
  margin-bottom: 6px;
}

.project-overlay h4 {
  font-size: 1.1rem;
  color: var(--white);
  font-weight: 700;
}

/* --- Testimonials --- */
.testimonials {
  padding: 100px 0;
  background: var(--white);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.testimonial-card {
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  transition: all var(--transition);
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--teal-200);
}

.testimonial-quote {
  margin-bottom: 20px;
  color: var(--teal-600);
}

.testimonial-text {
  font-size: 0.95rem;
  color: var(--slate-600);
  line-height: 1.8;
  margin-bottom: 24px;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
}

.author-info {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--slate-900);
}

.author-location {
  font-size: 0.8rem;
  color: var(--slate-400);
}

/* --- CTA Section --- */
.cta {
  padding: 100px 0;
  background: linear-gradient(135deg, var(--slate-900) 0%, var(--teal-900) 100%);
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.cta-content {
  position: relative;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.cta h2 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  color: var(--white);
  margin-bottom: 20px;
}

.cta p {
  font-size: 1.1rem;
  color: var(--slate-300);
  margin-bottom: 40px;
  line-height: 1.7;
}

.cta-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* --- Contact --- */
.contact {
  padding: 100px 0;
  background: var(--slate-50);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.contact-info .section-title {
  text-align: left;
}

.contact-desc {
  color: var(--slate-500);
  margin-bottom: 36px;
  line-height: 1.7;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 32px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.contact-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--teal-50);
  border: 1px solid var(--teal-100);
  border-radius: var(--radius-md);
  color: var(--teal-600);
  flex-shrink: 0;
}

.contact-item strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--slate-900);
  margin-bottom: 4px;
}

.contact-item p {
  font-size: 0.95rem;
  color: var(--slate-600);
  line-height: 1.6;
}

.contact-item a {
  color: var(--teal-600);
  font-weight: 600;
}

.contact-item a:hover {
  color: var(--teal-700);
  text-decoration: underline;
}

.map-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

/* --- Contact Form --- */
.contact-form-wrapper {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-lg);
}

.contact-form-wrapper h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
  color: var(--slate-900);
}

.form-note {
  font-size: 0.9rem;
  color: var(--slate-500);
  margin-bottom: 28px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--slate-700);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--slate-800);
  background: var(--slate-50);
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--teal-500);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--slate-400);
}

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

.form-success {
  display: none;
  text-align: center;
  padding: 40px 20px;
}

.form-success svg {
  color: var(--teal-600);
  margin-bottom: 16px;
}

.form-success h4 {
  font-size: 1.3rem;
  margin-bottom: 8px;
  color: var(--slate-900);
}

.form-success p {
  color: var(--slate-500);
  font-size: 0.95rem;
}

/* --- Footer --- */
.footer {
  background: var(--slate-900);
  color: var(--slate-400);
  padding: 64px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--slate-800);
}

.footer-brand p {
  margin-top: 16px;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--slate-400);
}

.footer-links h4,
.footer-contact h4 {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-200);
  margin-bottom: 20px;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--slate-400);
}

.footer-links a:hover {
  color: var(--teal-400);
}

.footer-contact p {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  margin-bottom: 12px;
  color: var(--slate-400);
}

.footer-contact a {
  color: var(--teal-400);
}

.footer-contact a:hover {
  color: var(--teal-300);
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 24px 0;
  font-size: 0.85rem;
  color: var(--slate-500);
}

/* --- Reveal Animations --- */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
  }
  
  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .services-grid,
  .projects-grid,
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--slate-200);
    box-shadow: var(--shadow-lg);
    transform: translateY(-120%);
    opacity: 0;
    transition: all var(--transition);
    pointer-events: none;
  }
  
  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
  
  .mobile-menu-btn {
    display: flex;
  }
  
  .mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
  }
  
  .mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
  
  .hero-cta {
    flex-direction: column;
  }
  
  .hero-cta .btn {
    width: 100%;
    justify-content: center;
  }
  
  .hero-badges {
    gap: 12px;
  }
  
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .about-content .section-title {
    text-align: center;
  }
  
  .about-features {
    grid-template-columns: 1fr;
  }
  
  .services-grid,
  .projects-grid,
  .testimonials-grid {
    grid-template-columns: 1fr;
  }
  
  .cta-buttons {
    flex-direction: column;
  }
  
  .cta-buttons .btn {
    width: 100%;
    justify-content: center;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  
  .contact-form-wrapper {
    padding: 28px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }
  
  .hero-content {
    padding: 100px 16px 60px;
  }
  
  .section-header {
    margin-bottom: 40px;
  }
  
  .services,
  .about,
  .projects,
  .testimonials,
  .cta,
  .contact {
    padding: 64px 0;
  }
}
