/* Coast Custom Contracting — Styles */

:root {
  --color-navy: #1a2f4a;
  --color-navy-dark: #0f1a28;
  --color-teal: #2b9fd4;
  --color-teal-light: #4db3e0;
  --color-sand: #f7f5f1;
  --color-sand-dark: #ebe7e0;
  --color-white: #ffffff;
  --color-text: #2c3e44;
  --color-text-muted: #5a6b72;
  --color-border: #d4cfc6;

  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "DM Sans", system-ui, sans-serif;

  --shadow-sm: 0 1px 3px rgba(26, 47, 74, 0.08);
  --shadow-md: 0 4px 24px rgba(26, 47, 74, 0.12);
  --shadow-lg: 0 12px 48px rgba(26, 47, 74, 0.18);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --header-height: 80px;
  --transition: 0.25s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100%;
}

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

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

a:hover {
  color: var(--color-teal-light);
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-navy);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  margin: 0 0 1rem;
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  margin: 0 0 1rem;
}

h3 {
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
}

p {
  margin: 0 0 1rem;
}

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

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.container {
  width: min(1120px, calc(100% - 2.5rem));
  max-width: 100%;
  margin-inline: auto;
}

.narrow {
  max-width: 720px;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.75rem 1.25rem;
  background: var(--color-teal);
  color: var(--color-white);
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100%;
  z-index: 1000;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.site-header.scrolled {
  border-bottom-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  height: 100%;
  min-width: 0;
}

.logo {
  display: flex;
  align-items: center;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.logo:hover {
  color: inherit;
  opacity: 0.9;
}

.logo-img {
  height: 48px;
  width: auto;
  max-width: min(240px, calc(100vw - 7.5rem));
  object-fit: contain;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  flex-shrink: 0;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-navy);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-list a {
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.9375rem;
}

.nav-list a:hover {
  color: var(--color-teal);
}

.nav-cta {
  padding: 0.625rem 1.25rem;
  background: var(--color-teal);
  color: var(--color-white) !important;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.nav-cta:hover {
  background: var(--color-teal-light);
  color: var(--color-white) !important;
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding-top: var(--header-height);
  background:
    linear-gradient(120deg, rgba(15, 26, 40, 0.82) 0%, rgba(26, 47, 74, 0.72) 45%, rgba(43, 159, 212, 0.35) 100%),
    url("../images/hero.jpg") center center / cover no-repeat;
  color: var(--color-white);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 30%, rgba(43, 159, 212, 0.2) 0%, transparent 55%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  padding-block: 4rem 5rem;
  max-width: 720px;
}

.hero-eyebrow {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 1rem;
}

.hero h1 {
  color: var(--color-white);
  max-width: 18ch;
  letter-spacing: -0.01em;
}

.hero-lead {
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  color: rgba(255, 255, 255, 0.9);
  max-width: 52ch;
  margin-bottom: 1.75rem;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}

.hero-tags li {
  padding: 0.375rem 0.875rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.hero-tags li:not(:last-child)::after {
  content: none;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform 0.15s ease;
  text-decoration: none;
}

.btn:active {
  transform: scale(0.98);
}

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

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

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

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--color-white);
  color: var(--color-white);
}

.btn-full {
  width: 100%;
}

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

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

.section-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-teal);
  margin-bottom: 0.5rem;
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin-inline: auto;
  margin-bottom: 3rem;
}

.intro {
  color: var(--color-text-muted);
}

.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.intro-content .section-label {
  margin-bottom: 1rem;
}

.intro-lead {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 600;
  line-height: 1.45;
  color: var(--color-navy);
  margin-bottom: 1.25rem;
}

.intro-image {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.intro-image img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
}

/* Positioning statement */
.positioning-content {
  text-align: center;
}

.positioning-statement {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.625rem);
  font-weight: 600;
  line-height: 1.5;
  color: var(--color-navy);
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: 4rem;
  align-items: center;
}

.about-image {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.about-image img {
  width: 100%;
  height: 100%;
  min-height: 480px;
  object-fit: cover;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.stat-card {
  padding: 1.25rem 1rem;
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  text-align: center;
  border: 1px solid var(--color-border);
}

.stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-teal);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.service-card {
  padding: 2rem;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
}

.service-card:hover {
  box-shadow: var(--shadow-md);
  border-color: transparent;
  transform: translateY(-3px);
}

.service-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1.25rem;
  color: var(--color-teal);
}

.service-icon svg {
  width: 100%;
  height: 100%;
}

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

/* Gallery */
.section-dark {
  background: var(--color-navy-dark);
  color: var(--color-white);
}

.section-dark h2 {
  color: var(--color-white);
}

.section-dark .section-label {
  color: var(--color-teal-light);
}

.gallery-lead {
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.0625rem;
  margin: 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: auto auto;
  gap: 1.25rem;
}

.gallery-item {
  position: relative;
  margin: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.gallery-item--wide {
  grid-column: 1 / -1;
  aspect-ratio: 21 / 9;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

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

.gallery-item figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(transparent, rgba(15, 26, 40, 0.85));
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.95);
}

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  padding: 2rem;
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.feature-card h3 {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--color-navy);
}

.feature-card h3::before {
  content: "";
  display: block;
  width: 32px;
  height: 3px;
  background: var(--color-teal);
  border-radius: 2px;
  margin-bottom: 1rem;
}

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

/* Service Area */
.service-area-content {
  text-align: center;
  max-width: 640px;
}

.service-area-lead {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

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

.area-list li {
  padding: 0.5rem 1.125rem;
  background: var(--color-sand);
  border-radius: 100px;
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--color-navy);
}

/* Contact */
.section-contact {
  background: var(--color-navy);
  color: var(--color-white);
}

.section-contact h2 {
  color: var(--color-white);
}

.section-contact .section-label {
  color: var(--color-teal-light);
}

.section-contact p {
  color: rgba(255, 255, 255, 0.85);
}

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

.contact-grid > * {
  min-width: 0;
}

.contact-details {
  margin-top: 2rem;
}

.contact-details li {
  margin-bottom: 1.25rem;
}

.contact-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 0.25rem;
}

.contact-details a {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-white);
}

.contact-details a:hover {
  color: var(--color-teal-light);
}

.contact-form-wrapper {
  background: var(--color-white);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-width: 0;
  max-width: 100%;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
  min-width: 0;
  max-width: 100%;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  min-width: 0;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-navy);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-sand);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-teal);
  box-shadow: 0 0 0 3px rgba(42, 122, 122, 0.15);
}

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

.honeypot {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}

.form-status {
  text-align: center;
  font-size: 0.9375rem;
  font-weight: 500;
  min-height: 1.5rem;
}

.form-status.success {
  color: var(--color-teal);
}

.form-status.error {
  color: #c0392b;
}

/* Footer */
.site-footer {
  background: var(--color-navy-dark);
  color: rgba(255, 255, 255, 0.7);
  padding-block: 3rem;
}

.footer-inner {
  display: grid;
  gap: 1.5rem;
  text-align: center;
}

.footer-brand .logo-name {
  color: var(--color-white);
  font-family: var(--font-display);
  font-size: 1.125rem;
  display: block;
  margin-bottom: 0.5rem;
}

.footer-logo-wrap {
  display: inline-block;
  padding: 0.625rem 1rem;
  margin-bottom: 1rem;
  background: rgba(255, 255, 255, 0.96);
  border-radius: var(--radius-sm);
}

.footer-logo {
  height: 40px;
  width: auto;
  margin-inline: auto;
}

.footer-brand p {
  font-size: 0.9375rem;
  max-width: 480px;
  margin-inline: auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}

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

.footer-copy {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 0.5rem;
}

/* Responsive */
@media (max-width: 900px) {
  .intro-grid,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .about-image {
    order: -1;
  }

  .about-image img {
    min-height: 280px;
  }

  .about-stats {
    grid-template-columns: 1fr;
  }

  .gallery-item--wide {
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 768px) {
  .logo-img {
    height: 40px;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    transform: translateY(-110%);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--transition), opacity var(--transition), visibility var(--transition);
  }

  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-list li {
    border-bottom: 1px solid var(--color-sand-dark);
  }

  .nav-list a {
    display: block;
    padding: 1rem 0;
  }

  .nav-cta {
    text-align: center;
    margin-top: 0.5rem;
  }

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

  .section {
    padding-block: 3.5rem;
  }

  .contact-form-wrapper {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

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

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

  .gallery-item--wide {
    grid-column: auto;
    aspect-ratio: 4 / 3;
  }
}
