/* ==========================================================================
   Dave's Decks, Steps & Material Delivery Service

   Palette:
   - Forest Green (Maine woods)      : #2D4A3E
   - Deep Spruce (header/footer)     : #1B2F28
   - Warm Maple (Canadian warmth)    : #C4883A
   - Copper Accent (metal craft)     : #B87333
   - Weathered Wood (backgrounds)    : #F5F0E8
   - Bark (text)                     : #2C2416
   - Hearthstone (card backgrounds)  : #EDE6D8
   - Slate (subtle borders)          : #8B9A8E
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: Georgia, 'Times New Roman', serif;
  color: #2C2416;
  line-height: 1.7;
  background: #F5F0E8;
}

.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ==========================================================================
   Emergency Banner
   ========================================================================== */

.emergency-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #C0392B;
  color: #fff;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.45rem 1rem;
  text-align: center;
  transition: background 0.2s;
}

.emergency-banner:hover {
  background: #A93226;
}

.emergency-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
  flex-shrink: 0;
  animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.emergency-banner {
  display: flex;
  width: 100%;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.topnav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.topnav.scrolled {
  background: rgba(27, 47, 40, 0.97);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.nav-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  color: #F5F0E8;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

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

.nav-links a {
  color: #F5F0E8;
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: #C4883A;
}

.nav-cta {
  background: #C4883A;
  color: #1B2F28 !important;
  padding: 0.5rem 1.2rem;
  border-radius: 3px;
  font-weight: 700;
  transition: background 0.2s !important;
}

.nav-cta:hover {
  background: #B87333 !important;
  color: #F5F0E8 !important;
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #F5F0E8;
  margin: 5px 0;
  transition: transform 0.3s, opacity 0.3s;
}

@media (max-width: 680px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(27, 47, 40, 0.97);
    flex-direction: column;
    padding: 1rem 1.5rem 1.5rem;
    gap: 0;
  }

  .nav-links li {
    padding: 0.6rem 0;
  }

  .topnav.open .nav-links {
    display: flex;
  }

  .topnav.open .nav-toggle span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .topnav.open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }
  .topnav.open .nav-toggle span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url('images/hero-banner.png') center center / cover no-repeat;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(27, 47, 40, 0.7) 0%,
    rgba(27, 47, 40, 0.5) 40%,
    rgba(27, 47, 40, 0.75) 100%
  );
}

.hero-content {
  position: relative;
  text-align: center;
  color: #F5F0E8;
  padding: 6rem 1.5rem 4rem;
  max-width: 800px;
}

.hero h1 {
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 1rem;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.tagline {
  font-size: 1.25rem;
  font-style: italic;
  color: #C4883A;
  margin-bottom: 2.5rem;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}

.cta-button {
  display: inline-block;
  background: #C4883A;
  color: #1B2F28;
  text-decoration: none;
  padding: 1rem 2.8rem;
  font-size: 1.1rem;
  font-family: Georgia, serif;
  font-weight: 700;
  border-radius: 3px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.cta-button:hover {
  background: #B87333;
  color: #F5F0E8;
  transform: translateY(-1px);
}

/* ==========================================================================
   Sections — shared
   ========================================================================== */

section {
  padding: 4.5rem 0;
}

section h2 {
  font-size: 1.8rem;
  color: #2D4A3E;
  margin-bottom: 0.5rem;
  text-align: center;
}

/* ==========================================================================
   Services
   ========================================================================== */

.services {
  background: #F5F0E8;
}

.service-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

@media (min-width: 720px) {
  .service-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.service-card {
  background: #EDE6D8;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(44, 36, 22, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(44, 36, 22, 0.14);
}

.service-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.service-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.service-card:hover .service-img img {
  transform: scale(1.04);
}

.service-body {
  padding: 1.5rem;
  border-top: 3px solid #B87333;
}

.service-body h3 {
  font-size: 1.15rem;
  color: #2D4A3E;
  margin-bottom: 0.5rem;
}

.service-body h3 a {
  color: #2D4A3E;
  text-decoration: none;
  border-bottom: 2px solid #C4883A;
  transition: color 0.2s;
}

.service-body h3 a:hover {
  color: #B87333;
}

/* Emergency banner within sections */
section .emergency-banner {
  margin-bottom: 2rem;
  border-radius: 4px;
}

.service-body p {
  font-size: 0.95rem;
  line-height: 1.65;
}

/* ==========================================================================
   Gallery
   ========================================================================== */

.gallery {
  background: #1B2F28;
  color: #F5F0E8;
}

.gallery h2 {
  color: #F5F0E8;
}

.gallery-intro {
  text-align: center;
  color: #8B9A8E;
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

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

@media (min-width: 720px) {
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.gallery-item {
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
}

.gallery-item.gallery-wide {
  grid-column: span 2;
  aspect-ratio: 2 / 1;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease, filter 0.4s ease;
  filter: brightness(0.85);
}

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

/* ==========================================================================
   About
   ========================================================================== */

.about {
  position: relative;
  overflow: hidden;
}

.about-bg {
  position: absolute;
  inset: 0;
  background: url('images/about-texture.png') center center / cover no-repeat;
  opacity: 0.08;
}

.about-inner {
  position: relative;
}

.about h2 {
  color: #2D4A3E;
}

.about p {
  max-width: 720px;
  margin: 0 auto 1.25rem;
  text-align: center;
  font-size: 1.1rem;
}

.about strong {
  color: #B87333;
}

/* ==========================================================================
   Contact
   ========================================================================== */

.contact {
  background: #2D4A3E;
  color: #F5F0E8;
  text-align: center;
}

.contact h2 {
  color: #F5F0E8;
}

.contact-intro {
  color: #8B9A8E;
  margin-bottom: 2.5rem;
  font-size: 1.1rem;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
}

@media (min-width: 540px) {
  .contact-methods {
    flex-direction: row;
    justify-content: center;
  }
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(245, 240, 232, 0.07);
  border: 1px solid rgba(196, 136, 58, 0.25);
  padding: 2rem 2.5rem;
  border-radius: 6px;
  min-width: 240px;
  text-decoration: none;
  color: #F5F0E8;
  transition: background 0.25s, border-color 0.25s, transform 0.25s;
}

.contact-card:hover {
  background: rgba(196, 136, 58, 0.12);
  border-color: #C4883A;
  transform: translateY(-2px);
}

.contact-icon {
  width: 36px;
  height: 36px;
  color: #C4883A;
  margin-bottom: 0.75rem;
}

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

.contact-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #8B9A8E;
  margin-bottom: 0.3rem;
}

.contact-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: #F5F0E8;
}

/* ==========================================================================
   Footer
   ========================================================================== */

footer {
  background: #141F1B;
  color: #8B9A8E;
  text-align: center;
  padding: 2rem 1.5rem;
}

.footer-inner p {
  font-size: 0.85rem;
}

.footer-tagline {
  margin-top: 0.3rem;
  font-style: italic;
  font-size: 0.8rem;
  color: #6B7A6E;
}

/* ==========================================================================
   Page Hero (subpages)
   ========================================================================== */

.page-hero {
  position: relative;
  padding: 8rem 1.5rem 4rem;
  background: linear-gradient(135deg, #1B2F28 0%, #2D4A3E 60%, #3A5A4A 100%);
  text-align: center;
  overflow: hidden;
}

.page-hero-content {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
  color: #F5F0E8;
}

.page-hero h1 {
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

/* Nav active state */
.nav-links a.active {
  color: #C4883A;
}

/* ==========================================================================
   Delivery Page
   ========================================================================== */

.delivery-intro {
  background: #F5F0E8;
  padding: 4rem 0;
}

.delivery-highlight {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 640px) {
  .delivery-highlight {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

.delivery-vehicle,
.delivery-area {
  text-align: center;
}

.delivery-vehicle h2,
.delivery-area h2 {
  font-size: 1.3rem;
  color: #2D4A3E;
  margin-bottom: 0.75rem;
}

.delivery-vehicle p,
.delivery-area p {
  font-size: 1.05rem;
  max-width: 400px;
  margin: 0 auto;
}

/* ---- Pricing ---- */

.pricing {
  background: #EDE6D8;
  padding: 4.5rem 0;
}

.pricing h2 {
  text-align: center;
  color: #2D4A3E;
  margin-bottom: 0.25rem;
}

.pricing-subtitle {
  text-align: center;
  color: #8B9A8E;
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
}

.price-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 2.5rem;
}

@media (min-width: 540px) {
  .price-grid {
    flex-direction: row;
    justify-content: center;
  }
}

.price-card {
  background: #F5F0E8;
  border-radius: 6px;
  padding: 2rem 2.5rem;
  text-align: center;
  min-width: 240px;
  box-shadow: 0 4px 16px rgba(44, 36, 22, 0.08);
  border-top: 3px solid #8B9A8E;
}

.price-card-main {
  border-top-color: #C4883A;
}

.price-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8B9A8E;
  margin-bottom: 0.5rem;
}

.price-amount {
  font-size: 2.8rem;
  font-weight: 700;
  color: #2D4A3E;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.price-amount span {
  font-size: 1.1rem;
  font-weight: 400;
  color: #8B9A8E;
}

.price-desc {
  font-size: 0.9rem;
  color: #2C2416;
  max-width: 220px;
  margin: 0 auto;
}

/* ---- Price Example ---- */

.price-example {
  max-width: 440px;
  margin: 0 auto 2rem;
  background: #F5F0E8;
  border-radius: 6px;
  padding: 1.5rem 2rem;
  box-shadow: 0 2px 8px rgba(44, 36, 22, 0.06);
}

.price-example h3 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8B9A8E;
  margin-bottom: 0.75rem;
  text-align: center;
}

.price-example table {
  width: 100%;
  border-collapse: collapse;
}

.price-example td {
  padding: 0.4rem 0;
  font-size: 0.95rem;
}

.price-right {
  text-align: right;
  white-space: nowrap;
}

.price-total td {
  border-top: 2px solid #B87333;
  padding-top: 0.6rem;
  font-size: 1.05rem;
}

.price-notes {
  text-align: center;
  max-width: 500px;
  margin: 0 auto;
}

.price-notes p {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.price-notes a {
  color: #B87333;
  text-decoration: none;
  font-weight: 700;
}

.price-notes a:hover {
  color: #C4883A;
}

/* ---- Rate Columns ---- */

.rate-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 640px) {
  .rate-columns {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}

.rate-tier {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tier-label {
  text-align: center;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.6rem 1.5rem;
  border-radius: 4px;
  margin: 0;
}

.tier-residential {
  background: #2D4A3E;
  color: #C4883A;
}

.tier-commercial {
  background: #2C2416;
  color: #C4883A;
}

.rate-tier .price-card {
  min-width: unset;
}

.price-example h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8B9A8E;
  margin-bottom: 0.75rem;
  text-align: center;
}

/* ---- Urgent Sidebar ---- */

.urgent-bar {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: 88px;
  background: #C0392B;
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.3);
  transition: width 0.3s ease;
  cursor: pointer;
  overflow: hidden;
}

.urgent-bar:hover {
  width: 280px;
}

.urgent-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 0.75rem;
  text-align: center;
  color: #fff;
  white-space: nowrap;
}

.urgent-icon {
  width: 40px;
  height: 40px;
  color: #fff;
  margin-bottom: 1rem;
  flex-shrink: 0;
  animation: pulse 2s ease-in-out infinite;
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.1); }
}

.urgent-label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  margin-bottom: 1rem;
}

.urgent-bar:hover .urgent-label {
  writing-mode: horizontal-tb;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.urgent-radius {
  font-size: 0;
  opacity: 0;
  transition: opacity 0.3s, font-size 0.3s;
  font-weight: 700;
  color: #FDE8E8;
  margin-bottom: 0.5rem;
}

.urgent-bar:hover .urgent-radius {
  font-size: 0.85rem;
  opacity: 1;
}

.urgent-text {
  font-size: 0;
  opacity: 0;
  transition: opacity 0.3s, font-size 0.3s;
  white-space: normal;
  max-width: 240px;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.urgent-bar:hover .urgent-text {
  font-size: 0.9rem;
  opacity: 1;
}

.urgent-cta {
  font-size: 0;
  opacity: 0;
  transition: opacity 0.3s, font-size 0.3s;
  background: #fff;
  color: #C0392B;
  padding: 0.7rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 700;
  line-height: 1.4;
}

.urgent-cta span {
  font-size: 0.85em;
  font-weight: 400;
}

.urgent-bar:hover .urgent-cta {
  font-size: 0.95rem;
  opacity: 1;
}

/* Shift page content for urgent bar */
.delivery-page {
  margin-right: 88px;
}

@media (max-width: 680px) {
  .urgent-bar {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 64px;
    flex-direction: row;
  }

  .urgent-bar:hover {
    width: 100%;
    height: auto;
    max-height: 50vh;
  }

  .urgent-inner {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0.75rem 1rem;
    gap: 0.5rem;
  }

  .urgent-icon {
    width: 28px;
    height: 28px;
    margin: 0;
  }

  .urgent-label {
    writing-mode: horizontal-tb;
    font-size: 0.8rem;
    margin: 0;
  }

  .urgent-bar:hover .urgent-inner {
    flex-direction: column;
    padding: 1.5rem;
  }

  .urgent-bar:hover .urgent-label {
    font-size: 1rem;
  }

  .delivery-page {
    margin-right: 0;
    margin-bottom: 64px;
  }
}

/* ---- How It Works ---- */

.how-it-works {
  background: #F5F0E8;
  padding: 4.5rem 0;
}

.how-it-works h2 {
  text-align: center;
  color: #2D4A3E;
  margin-bottom: 2rem;
}

.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .steps-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step-card {
  text-align: center;
  padding: 1.5rem;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #2D4A3E;
  color: #C4883A;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.step-card h3 {
  font-size: 1.1rem;
  color: #2D4A3E;
  margin-bottom: 0.5rem;
}

.step-card p {
  font-size: 0.95rem;
  max-width: 280px;
  margin: 0 auto;
}

/* ==========================================================================
   Mobile refinements
   ========================================================================== */

@media (max-width: 480px) {
  .hero {
    min-height: 75vh;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .tagline {
    font-size: 1.05rem;
  }

  section {
    padding: 3rem 0;
  }

  section h2 {
    font-size: 1.4rem;
  }

  .contact-card {
    min-width: unset;
    width: 100%;
  }
}

@media (min-width: 481px) and (max-width: 720px) {
  .hero h1 {
    font-size: 2.2rem;
  }
}
