/* ============================================================
   BLACKBURN EXCAVATING — landing.css
   Water & Septic landing page. Self-contained — no @import.
   ============================================================ */


/* ----------------------------------------------------------
   1. DESIGN TOKENS
---------------------------------------------------------- */
:root {
  --color-black:      #0F0F0F;
  --color-charcoal:   #1F1F1F;
  --color-yellow:     #F5C518;
  --color-yellow-dk:  #d4a716;
  --color-off-white:  #FAFAF7;
  --color-stone:      #E8E5DE;
  --color-grey:       #4A4A4A;

  --font-headline: 'Archivo Black', Georgia, serif;
  --font-body:     'Inter', system-ui, -apple-system, sans-serif;

  --dur-fast:  150ms;
  --dur-base:  250ms;
  --dur-slow:  400ms;
  --ease-out:  cubic-bezier(0, 0, 0.2, 1);

  --radius-btn: 4px;

  --gap-d: 32px;
  --gap-t: 24px;
  --gap-m: 16px;
}


/* ----------------------------------------------------------
   2. RESET & BASE
---------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--color-black);
  background-color: var(--color-off-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
}

address {
  font-style: normal;
}

button {
  font-family: inherit;
}


/* ----------------------------------------------------------
   3. SKIP LINK
---------------------------------------------------------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: var(--color-yellow);
  color: var(--color-black);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius-btn);
  z-index: 9999;
  transition: top var(--dur-fast);
}

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


/* ----------------------------------------------------------
   4. CONTAINER
---------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left:  clamp(20px, 5vw, 80px);
  padding-right: clamp(20px, 5vw, 80px);
}


/* ----------------------------------------------------------
   5. TYPOGRAPHY
---------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-headline);
  line-height: 1.05;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-grey);
}

.eyebrow--yellow {
  color: var(--color-yellow);
}


/* ----------------------------------------------------------
   6. BUTTONS
---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8125rem 1.875rem;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
  border-radius: var(--radius-btn);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition:
    background-color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
}

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

@media (prefers-reduced-motion: no-preference) {
  .btn-primary:hover {
    background-color: var(--color-yellow-dk);
    border-color: var(--color-yellow-dk);
    transform: scale(1.02);
  }
}

.btn-primary:focus-visible {
  outline: 2px solid var(--color-yellow);
  outline-offset: 3px;
  border-radius: 2px;
}

.btn--full {
  width: 100%;
}

.btn--sticky {
  height: 56px;
  font-size: 16px;
}


/* ----------------------------------------------------------
   7. HERO
---------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(to right, rgba(15,15,15,0.85) 0%, rgba(15,15,15,0.45) 100%),
    url('../images/water-installation.png') center / cover no-repeat;
  color: var(--color-off-white);
}

/* Top bar */
.hero-topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem clamp(20px, 5vw, 80px);
}

.hero-logo .logo-img {
  height: 70px;
  width: auto;
}

.hero-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: clamp(15px, 1.5vw, 18px);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--color-off-white);
  padding: 0.625rem 1.25rem;
  border: 1.5px solid rgba(245, 197, 24, 0.5);
  border-radius: 100px;
  background: rgba(245, 197, 24, 0.08);
  transition:
    color var(--dur-fast),
    background-color var(--dur-fast),
    border-color var(--dur-fast);
}

.hero-phone svg {
  flex-shrink: 0;
  color: var(--color-yellow);
}

.hero-phone:hover {
  color: var(--color-yellow);
  background: rgba(245, 197, 24, 0.16);
  border-color: var(--color-yellow);
}

.hero-phone:focus-visible {
  outline: 2px solid var(--color-yellow);
  outline-offset: 4px;
  border-radius: 100px;
}

/* Content block */
.hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem clamp(20px, 5vw, 80px) 5rem;
  max-width: 860px;
}

.hero-h1 {
  font-size: clamp(48px, 7vw, 70px);
  line-height: 1.0;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-top: 0.75rem;
  margin-bottom: 1.25rem;
}

.hero-sub {
  font-size: clamp(16px, 1.4vw, 18px);
  line-height: 1.6;
  color: rgba(250, 250, 247, 0.8);
  max-width: 560px;
  margin-bottom: 2rem;
}

/* Hero fade-up on load */
@media (prefers-reduced-motion: no-preference) {
  .hero-content .eyebrow {
    opacity: 0;
    transform: translateY(18px);
    animation: hero-fade-up var(--dur-slow) var(--ease-out) 150ms forwards;
  }
  .hero-h1 {
    opacity: 0;
    transform: translateY(22px);
    animation: hero-fade-up var(--dur-slow) var(--ease-out) 250ms forwards;
  }
  .hero-sub {
    opacity: 0;
    transform: translateY(18px);
    animation: hero-fade-up var(--dur-slow) var(--ease-out) 350ms forwards;
  }
  .hero-content .btn {
    opacity: 0;
    transform: translateY(14px);
    animation: hero-fade-up var(--dur-slow) var(--ease-out) 450ms forwards;
  }

  @keyframes hero-fade-up {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}


/* ----------------------------------------------------------
   8. GRID SECTION
   Desktop (≥1024px): 4-col grid, yellow tile spans 2 rows.
   Tablet (768–1023px): yellow tile full-width, rest 3-col.
   Mobile (<768px): single column.
---------------------------------------------------------- */
.grid-section {
  background-color: #00000015;
  padding: clamp(64px, 8vw, 120px) 0;
}

/* Wider container for the grid — gives tiles more horizontal room */
.grid-section .container {
  max-width: 1540px;
  padding-left:  clamp(20px, 3vw, 48px);
  padding-right: clamp(20px, 3vw, 48px);
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* All tiles */
.tile {
  position: relative;
  padding: clamp(20px, 2.5vw, 36px);
  display: flex;
  flex-direction: column;
}

/* Hover lift + yellow bottom-border slide */
.tile--light,
.tile--dark {
  transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
}

.tile--light::after,
.tile--dark::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-yellow);
  transition: width 200ms var(--ease-out);
}

@media (prefers-reduced-motion: no-preference) {
  .tile--light:hover,
  .tile--dark:hover {
    transform: translateY(-4px);
  }
  .tile--light:hover::after,
  .tile--dark:hover::after {
    width: 100%;
  }
}


/* Yellow tile — tall, spans 2 rows */
.tile--yellow {
  background-color: var(--color-yellow);
  color: var(--color-black);
  grid-row: span 2;
}

/* Decorative corner bracket — yellow tile */
.tile--yellow::before {
  content: '';
  position: absolute;
  top: 20px;
  right: 20px;
  width: 16px;
  height: 16px;
  border-top: 2px solid rgba(15, 15, 15, 0.4);
  border-right: 2px solid rgba(15, 15, 15, 0.4);
}

.tile-eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-black);
  opacity: 0.55;
  margin-bottom: 1.125rem;
}

.tile-h2 {
  font-size: clamp(26px, 2.6vw, 38px);
  line-height: 1.1;
  color: var(--color-black);
  margin-bottom: 1.25rem;
}

.tile-h3 {
  font-size: clamp(18px, 1.8vw, 24px);
  line-height: 1.2;
  margin-bottom: 0.875rem;
}

.tile-body {
  font-size: 16px;
  line-height: 1.65;
  flex: 1;
}

/* CTA button at bottom of yellow tile */
.tile-cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  align-self: flex-start;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--color-black);
  background: rgba(15, 15, 15, 0.1);
  border: 1.5px solid rgba(15, 15, 15, 0.35);
  border-radius: var(--radius-btn);
  padding: 0.625rem 1.125rem;
  transition:
    background-color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
}

.tile-cta:hover {
  background: rgba(15, 15, 15, 0.18);
  border-color: rgba(15, 15, 15, 0.7);
}

@media (prefers-reduced-motion: no-preference) {
  .tile-cta:hover {
    transform: scale(1.02);
  }
}

.tile-cta:focus-visible {
  outline: 2px solid var(--color-black);
  outline-offset: 3px;
  border-radius: var(--radius-btn);
}


/* Off-white trust tiles */
.tile--light {
  background-color: var(--color-off-white);
  border: 1px solid var(--color-stone);
  color: var(--color-charcoal);
}

/* Decorative corner bracket — light tiles */
.tile--light::before {
  content: '';
  position: absolute;
  top: 16px;
  right: 16px;
  width: 13px;
  height: 13px;
  border-top: 2px solid var(--color-yellow);
  border-right: 2px solid var(--color-yellow);
}

.tile--light .tile-h3 {
  color: var(--color-charcoal);
}

.tile--light .tile-body {
  color: var(--color-grey);
}


/* Charcoal process-step tiles */
.tile--dark {
  background-color: var(--color-charcoal);
  color: var(--color-off-white);
}

.tile--dark .tile-h3 {
  color: var(--color-off-white);
}

.tile--dark .tile-body {
  color: rgba(250, 250, 247, 0.7);
}

.tile-num {
  display: block;
  font-family: var(--font-headline);
  font-size: clamp(28px, 3vw, 40px);
  color: var(--color-yellow);
  line-height: 1;
  margin-bottom: 1.125rem;
}


/* Tablet — 3-col, yellow tile full width */
@media (max-width: 1023px) {
  .tile-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .tile--yellow {
    grid-column: 1 / -1;
    grid-row: auto;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1.25rem 2rem;
    align-items: flex-start;
  }

  .tile--yellow .tile-eyebrow {
    flex: 0 0 100%;
    margin-bottom: 0;
  }

  .tile--yellow .tile-h2 {
    flex: 0 0 100%;
    margin-bottom: 0;
  }

  .tile--yellow .tile-body {
    flex: 1;
  }

  .tile--yellow .tile-cta {
    flex: 0 0 auto;
    align-self: flex-end;
    margin-top: 0;
  }
}

/* Mobile — single column */
@media (max-width: 767px) {
  .tile-grid {
    grid-template-columns: 1fr;
    gap: var(--gap-m);
  }

  /* Reset all tablet flex overrides on the yellow tile */
  .tile--yellow {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
  }

  .tile--yellow .tile-eyebrow {
    flex: none;
    margin-bottom: 1.125rem;
  }

  .tile--yellow .tile-h2 {
    flex: none;
    margin-bottom: 1.25rem;
  }

  .tile--yellow .tile-body {
    flex: 1;
  }

  .tile--yellow .tile-cta {
    flex: none;
    align-self: flex-start;
    margin-top: 20px;
    display: block;
    width: 100%;
  }
}


/* ----------------------------------------------------------
   9. FORM SECTION
---------------------------------------------------------- */
.form-section {
  background-color: var(--color-charcoal);
  background-image: radial-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 28px 28px;
  color: var(--color-off-white);
  padding: clamp(64px, 8vw, 120px) 0;
  scroll-margin-top: 0;
}

.form-section > .container {
  max-width: 840px;
}

.form-header {
  text-align: center;
  margin-bottom: 2.75rem;
}

.form-h2 {
  font-size: clamp(36px, 4.5vw, 56px);
  line-height: 1.05;
  color: var(--color-off-white);
  margin-top: 0.625rem;
  margin-bottom: 0.75rem;
}

.form-sub {
  font-size: 17px;
  color: rgba(250, 250, 247, 0.65);
}

/* Form layout */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin-bottom: 1.25rem;
}

.form-field label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-yellow);
}

.req-mark {
  color: var(--color-yellow);
  margin-left: 2px;
}

.form-field input,
.form-field select,
.form-field textarea {
  background-color: #2c2c2c;
  border: 1px solid rgba(232, 229, 222, 0.3);
  color: var(--color-off-white);
  font-family: var(--font-body);
  font-size: 16px;
  padding: 0.75rem 1rem;
  border-radius: 2px;
  outline: none;
  width: 100%;
  transition: border-color var(--dur-fast);
  -webkit-appearance: none;
  appearance: none;
}

.form-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23FAFAF7' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.form-field select option {
  background-color: var(--color-charcoal);
  color: var(--color-off-white);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--color-yellow);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: rgba(250, 250, 247, 0.3);
}

/* Date input color fix on webkit */
.form-field input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1) opacity(0.4);
  cursor: pointer;
}

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

#contact-form .btn--full {
  margin-top: 0.375rem;
}

/* Success state */
#form-success {
  text-align: center;
  padding: 3rem 1rem;
}

.success-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.125rem;
}

.success-icon {
  color: var(--color-yellow);
  width: 56px;
  height: 56px;
}

.success-msg {
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 600;
  color: var(--color-off-white);
  max-width: 480px;
}

.success-msg:focus {
  outline: none;
}

.form-reset-link {
  background: none;
  border: none;
  color: rgba(250, 250, 247, 0.5);
  font-size: 14px;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  transition: color var(--dur-fast);
}

.form-reset-link:hover {
  color: var(--color-off-white);
}

.form-reassure {
  text-align: center;
  margin-top: 2rem;
  font-size: 15px;
  color: rgba(250, 250, 247, 0.45);
}

.tel-link {
  color: var(--color-yellow);
  font-weight: 600;
}

.tel-link:hover {
  text-decoration: underline;
}

/* Focus visible global */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-yellow);
  outline-offset: 2px;
}

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


/* ----------------------------------------------------------
   10. FOOTER
---------------------------------------------------------- */
.footer {
  background-color: var(--color-black);
  color: var(--color-off-white);
  padding: 1.75rem 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-logo-link img {
  height: 32px;
  width: auto;
}

.footer-contact {
  font-size: 14px;
  color: rgba(250, 250, 247, 0.55);
  flex: 1;
  text-align: center;
  line-height: 1.5;
}

.footer-contact a {
  color: rgba(250, 250, 247, 0.8);
  transition: color var(--dur-fast);
}

.footer-contact a:hover {
  color: var(--color-yellow);
}

.footer-copy {
  font-size: 13px;
  color: rgba(250, 250, 247, 0.3);
}

@media (max-width: 768px) {
  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 0.875rem;
  }

  .footer-contact {
    font-size: 13px;
  }
}


/* ----------------------------------------------------------
   11. STICKY MOBILE CTA
---------------------------------------------------------- */
.sticky-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  padding: 0.625rem 1rem;
  background-color: var(--color-black);
  box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.35);
}

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

.sticky-cta.is-hidden {
  display: none !important;
}

/* Push page content above sticky bar on mobile */
@media (max-width: 768px) {
  .footer {
    padding-bottom: calc(1.75rem + 56px + 1.25rem);
  }
}


/* ----------------------------------------------------------
   12. MOBILE POLISH
   Breakpoints: 768px (tablet/mobile boundary), 480px (small phone)
---------------------------------------------------------- */

/* Hero topbar — shrink logo + phone pill */
@media (max-width: 768px) {
  .hero-logo .logo-img {
    height: 48px;
  }

  .hero-phone {
    font-size: 14px;
    padding: 0.4375rem 0.875rem;
    gap: 0.375rem;
  }

  .hero-phone svg {
    width: 16px;
    height: 16px;
  }

  /* Less bottom padding — page is shorter on phone */
  .hero-content {
    padding-bottom: 3rem;
  }

  /* Slightly smaller body text on mobile */
  body {
    font-size: 16px;
  }
}

/* Small phones — tighten tile padding and hero H1 floor */
@media (max-width: 480px) {
  .hero-topbar {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-content {
    padding-left: 16px;
    padding-right: 16px;
  }

  /* Tighter tile padding so content breathes better */
  .tile {
    padding: 20px;
  }

  /* Let form labels and inputs scale down slightly */
  .form-field label {
    font-size: 11px;
  }

  .form-field input,
  .form-field select,
  .form-field textarea {
    font-size: 15px;
    padding: 0.625rem 0.875rem;
  }
}


/* ----------------------------------------------------------
   13. SCROLL REVEAL
   .reveal → .is-visible added by IntersectionObserver.
   Reduced motion: elements visible immediately.
---------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition:
      opacity var(--dur-slow) var(--ease-out),
      transform var(--dur-slow) var(--ease-out);
  }

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