/* styles.css — Pinturas Fiorentino */

/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
  /* Color palette — warm, professional painting business brand */
  --color-primary:        #1a2744;   /* Deep navy — headings, header bg */
  --color-primary-light:  #253560;   /* Lighter navy — hover states */
  --color-accent:         #c0622a;   /* Terracotta — CTAs, highlights */
  --color-accent-hover:   #a0501f;   /* Darker terracotta — button hover */
  --color-text:           #1e1e1e;   /* Near-black — body text (contrast ≥ 4.5:1 on white) */
  --color-text-muted:     #4a4a4a;   /* Dark grey — secondary text */
  --color-bg:             #faf8f5;   /* Warm off-white — page background */
  --color-bg-alt:         #f0ece5;   /* Slightly darker off-white — alternate sections */
  --color-white:          #ffffff;
  --color-border:         #ddd5c8;   /* Warm light border */

  /* Header */
  --header-bg:            #1a2744;   /* Deep navy — sufficient contrast for white nav links */
  --header-height:        64px;

  /* Typography */
  --font-family-base:     'Georgia', 'Times New Roman', serif;
  --font-family-ui:       'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --font-size-base:       1rem;       /* 16px */
  --font-size-sm:         0.875rem;   /* 14px */
  --font-size-lg:         1.125rem;   /* 18px */
  --font-size-xl:         1.5rem;     /* 24px */
  --font-size-2xl:        2rem;       /* 32px */
  --font-size-3xl:        2.75rem;    /* 44px */
  --font-size-4xl:        3.5rem;     /* 56px */
  --line-height-base:     1.6;
  --line-height-heading:  1.2;
  --font-weight-normal:   400;
  --font-weight-medium:   500;
  --font-weight-bold:     700;

  /* Spacing scale */
  --space-1:   0.25rem;   /*  4px */
  --space-2:   0.5rem;    /*  8px */
  --space-3:   0.75rem;   /* 12px */
  --space-4:   1rem;      /* 16px */
  --space-5:   1.25rem;   /* 20px */
  --space-6:   1.5rem;    /* 24px */
  --space-8:   2rem;      /* 32px */
  --space-10:  2.5rem;    /* 40px */
  --space-12:  3rem;      /* 48px */
  --space-16:  4rem;      /* 64px */
  --space-20:  5rem;      /* 80px */
  --space-24:  6rem;      /* 96px */

  /* Border radius */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0, 0, 0, 0.12);
  --shadow-md:  0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-lg:  0 8px 24px rgba(0, 0, 0, 0.18);

  /* Transitions */
  --transition-fast:   150ms ease;
  --transition-base:   250ms ease;
  --transition-slow:   400ms ease;

  /* Layout */
  --container-max:     1200px;
  --container-padding: var(--space-4);
}

/* ============================================================
   CSS RESET / NORMALIZE BASELINE
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-family-ui);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-base);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-heading);
  color: var(--color-primary);
}

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

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

.section-padding {
  padding-block: var(--space-16);
}

/* ============================================================
   STICKY HEADER / NAV
   ============================================================ */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  background-color: var(--header-bg);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
}

#site-header nav {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  /* On mobile, allow horizontal scroll if links overflow */
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
}

#site-header nav::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

#site-header nav a {
  font-family: var(--font-family-ui);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-white);
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  padding-block: var(--space-2);
  border-bottom: 2px solid transparent;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

#site-header nav a:hover,
#site-header nav a:focus-visible {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
  outline: none;
}

#site-header nav a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Nav logo link — no underline, no border */
.nav__logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-right: var(--space-4);
  border-bottom: none !important;
}

.nav__logo-link:hover,
.nav__logo-link:focus-visible {
  border-bottom: none !important;
}

/* Nav logo image */
.nav__logo {
  height: 54px;
  width: auto;
  display: block;
}


  padding-top: var(--header-height);
}

/* ============================================================
   SECTION BASE STYLES
   ============================================================ */
section {
  padding-block: var(--space-20);
}

section:nth-child(even) {
  background-color: var(--color-bg-alt);
}

.section-title {
  font-size: var(--font-size-2xl);
  color: var(--color-primary);
  margin-bottom: var(--space-4);
  text-align: center;
}

.section-subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-muted);
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: var(--space-12);
}

/* ============================================================
   BUTTON BASE STYLES
   ============================================================ */
.btn {
  display: inline-block;
  padding: var(--space-3) var(--space-8);
  font-family: var(--font-family-ui);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: background-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
  cursor: pointer;
  border: 2px solid transparent;
}

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

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

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

/* ============================================================
   HERO SECTION
   ============================================================ */
#hero {
  /* Fallback: primary navy if image doesn't load */
  background-color: var(--color-primary);
  /* Background image with dark gradient overlay for text readability */
  background-image:
    linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.55) 0%,
      rgba(0, 0, 0, 0.45) 100%
    ),
    url('images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  /* Full-width, full-viewport height minus header */
  min-height: calc(100vh - var(--header-height));
  padding-block: var(--space-16);

  /* Center content */
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: var(--space-6);
}

.hero__title {
  font-family: var(--font-family-base);
  font-size: var(--font-size-2xl);   /* 32px on mobile */
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-heading);
  color: var(--color-white);
  /* Subtle text shadow for extra legibility over the image */
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.hero__tagline {
  font-family: var(--font-family-ui);
  font-size: var(--font-size-lg);    /* 18px on mobile */
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-base);
  color: var(--color-white);
  max-width: 600px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.hero__cta {
  margin-top: var(--space-2);
  /* Slightly larger padding for the hero CTA */
  padding: var(--space-4) var(--space-10);
  font-size: var(--font-size-lg);
}

/* --- Hero responsive: Tablet 768px+ --- */
@media (min-width: 768px) {
  .hero__title {
    font-size: var(--font-size-3xl);   /* 44px */
  }

  .hero__tagline {
    font-size: var(--font-size-xl);    /* 24px */
  }
}

/* --- Hero responsive: Desktop 1024px+ --- */
@media (min-width: 1024px) {
  .hero__title {
    font-size: var(--font-size-4xl);   /* 56px */
  }

  .hero__tagline {
    font-size: var(--font-size-xl);    /* 24px */
    max-width: 700px;
  }
}

/* --- Hero responsive: Wide 1920px+ --- */
@media (min-width: 1920px) {
  .hero__title {
    font-size: 4.5rem;   /* 72px */
  }

  .hero__tagline {
    font-size: var(--font-size-2xl);   /* 32px */
    max-width: 800px;
  }
}

/* ============================================================
   RESPONSIVE BREAKPOINTS — MOBILE-FIRST
   ============================================================
   Base:    320px+  (default styles above)
   Tablet:  768px+
   Desktop: 1024px+
   Wide:    1920px+
   ============================================================ */

/* --- Tablet: 768px+ --- */
@media (min-width: 768px) {
  :root {
    --container-padding: var(--space-8);
    --font-size-base:    1rem;
  }

  #site-header nav {
    gap: var(--space-8);
  }

  #site-header nav a {
    font-size: var(--font-size-base);
  }

  .section-title {
    font-size: var(--font-size-3xl);
  }

  section {
    padding-block: var(--space-24);
  }
}

/* --- Desktop: 1024px+ --- */
@media (min-width: 1024px) {
  :root {
    --container-padding: var(--space-10);
  }

  #site-header nav {
    gap: var(--space-10);
  }

  .section-title {
    font-size: var(--font-size-3xl);
  }
}

/* --- Wide: 1920px+ --- */
@media (min-width: 1920px) {
  :root {
    --container-max:     1440px;
    --container-padding: var(--space-12);
    --font-size-base:    1.125rem;
  }

  #site-header nav a {
    font-size: var(--font-size-lg);
  }

  .section-title {
    font-size: var(--font-size-4xl);
  }
}

/* ============================================================
   ABOUT SECTION
   ============================================================ */
#about {
  background-color: var(--color-bg-alt);
}

/* Two-column layout on desktop: text left, highlights right */
.about__container {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
  align-items: start;
}

/* Section heading */
.about__heading {
  font-size: var(--font-size-2xl);
  color: var(--color-primary);
  margin-bottom: var(--space-6);
  position: relative;
  text-align: center;
}

/* Decorative underline accent on the heading */
.about__heading::after {
  content: '';
  display: block;
  width: 56px;
  height: 4px;
  background-color: var(--color-accent);
  border-radius: var(--radius-sm);
  margin-top: var(--space-3);
  margin-inline: auto;
}
  width: 56px;
  height: 4px;
  background-color: var(--color-accent);
  border-radius: var(--radius-sm);
  margin-top: var(--space-3);
}

/* Description paragraph */
.about__description {
  font-size: var(--font-size-lg);
  line-height: var(--line-height-base);
  color: var(--color-text-muted);
  max-width: 60ch;
}

/* Highlights list — reset list styles */
.about__highlights {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

/* Individual highlight card */
.about__highlight-card {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

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

/* Icon */
.about__highlight-icon {
  display: block;
  font-size: 2rem;
  margin-bottom: var(--space-3);
  line-height: 1;
}

/* Card title */
.about__highlight-title {
  font-family: var(--font-family-ui);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}

/* Card description */
.about__highlight-desc {
  font-size: var(--font-size-sm);
  line-height: var(--line-height-base);
  color: var(--color-text-muted);
}

/* --- About: Tablet 768px+ — highlights in 2-column grid --- */
@media (min-width: 768px) {
  .about__highlights {
    grid-template-columns: repeat(2, 1fr);
  }

  .about__heading {
    font-size: var(--font-size-3xl);
  }
}

/* --- About: Desktop 1024px+ — two-column layout (text | highlights) --- */
@media (min-width: 1024px) {
  .about__container {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
    align-items: center;
  }

  .about__description {
    max-width: 100%;
  }
}

/* ============================================================
   SERVICES SECTION
   ============================================================ */
#services {
  background-color: var(--color-bg);
}

/* Grid container — mobile-first: 1 column */
.services__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

/* Individual service card */
.service-card {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8) var(--space-6);
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

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

/* Icon — large centered emoji at top of card */
.service-card__icon {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: var(--space-5);
}

/* Service title */
.service-card__title {
  font-family: var(--font-family-ui);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}

/* Service description */
.service-card__desc {
  font-size: var(--font-size-sm);
  line-height: var(--line-height-base);
  color: var(--color-text-muted);
}

/* --- Services: Tablet 768px+ — 2 columns --- */
@media (min-width: 768px) {
  .services__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-8);
  }
}

/* --- Services: Desktop 1024px+ — 4 columns --- */
@media (min-width: 1024px) {
  .services__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ============================================================
   GALLERY SECTION
   ============================================================ */
#gallery {
  background-color: var(--color-bg-alt);
}

/* Responsive grid — mobile-first: 1 column */
.gallery__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

/* Gallery button — strip default button styles */
.gallery__item {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.gallery__item:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

/* Focus ring for keyboard navigation */
.gallery__item:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

/* Gallery image — fixed height, cover crop */
.gallery__img {
  display: block;
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: var(--radius-md);
  transition: transform var(--transition-slow);
}

.gallery__item:hover .gallery__img {
  transform: scale(1.04);
}

/* --- Gallery: Tablet 768px+ — 2 columns --- */
@media (min-width: 768px) {
  .gallery__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
  }

  .gallery__img {
    height: 260px;
  }
}

/* --- Gallery: Desktop 1024px+ — 3 columns --- */
@media (min-width: 1024px) {
  .gallery__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-8);
  }

  .gallery__img {
    height: 280px;
  }
}

/* ============================================================
   LIGHTBOX (native <dialog>)
   ============================================================ */

/* Dialog element — centered, transparent background, no border */
dialog#lightbox {
  position: fixed;
  inset: 0;
  margin: auto;
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  overflow: visible;
}

/* Semi-transparent dark backdrop */
dialog#lightbox::backdrop {
  background-color: rgba(0, 0, 0, 0.85);
}

/* Lightbox image */
.lightbox__img {
  display: block;
  max-width: 90vw;
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

/* Close button — top-right corner, white × */
.lightbox__close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  background: transparent;
  border: none;
  color: var(--color-white);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.lightbox__close:hover {
  color: var(--color-accent);
  transform: scale(1.15);
}

.lightbox__close:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ============================================================
   CONTACT SECTION
   ============================================================ */
#contact {
  background-color: var(--color-bg);
}

/* Two-column layout: info left, form right — stacked on mobile */
.contact__container {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
  align-items: start;
}

/* Simplified contact layout (no form) */
.contact__container--simple {
  max-width: 640px;
  margin-inline: auto;
  text-align: center;
}

.contact__container--simple .contact__details {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: var(--space-6);
  margin-top: var(--space-8);
}

/* WhatsApp link */
.whatsapp-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-2);
  color: #25d366;
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.whatsapp-link:hover,
.whatsapp-link:focus-visible {
  color: #1da851;
  text-decoration: underline;
}

/* --- Contact info column --- */
.contact__heading {
  font-size: var(--font-size-2xl);
  color: var(--color-primary);
  margin-bottom: var(--space-4);
  position: relative;
  text-align: center;
}

.contact__heading::after {
  content: '';
  display: block;
  width: 56px;
  height: 4px;
  background-color: var(--color-accent);
  border-radius: var(--radius-sm);
  margin-top: var(--space-3);
  margin-inline: auto;
}
  margin-top: var(--space-3);
}

.contact__intro {
  font-size: var(--font-size-lg);
  color: var(--color-text-muted);
  line-height: var(--line-height-base);
  margin-bottom: var(--space-8);
}

.contact__details {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

/* Each contact detail row: icon + text */
.contact__detail-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
}

.contact__detail-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.contact__detail-item div {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.contact__detail-item strong {
  font-family: var(--font-family-ui);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.contact__detail-item a,
.contact__detail-item span {
  font-size: var(--font-size-base);
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.contact__detail-item a:hover,
.contact__detail-item a:focus-visible {
  color: var(--color-accent);
  text-decoration: underline;
  outline: none;
}

.contact__detail-item a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* --- Contact form column --- */
.contact__form-wrapper {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-sm);
}

/* Form groups: label above input, error span below */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.form-group label {
  font-family: var(--font-family-ui);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
}

/* Required asterisk — muted, not red (screen readers skip it via aria-hidden) */
.form-group label span {
  color: var(--color-accent);
  margin-left: var(--space-1);
}

/* Input, select, textarea — full width, consistent styling */
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-family-ui);
  font-size: var(--font-size-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  appearance: none;
  -webkit-appearance: none;
}

/* Custom dropdown arrow for select */
.form-group 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='%234a4a4a' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  padding-right: var(--space-10);
}

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

/* Focus ring — accent color */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(192, 98, 42, 0.18);
}

/* Invalid state — shown after validation attempt */
.form-group input[aria-invalid="true"],
.form-group select[aria-invalid="true"],
.form-group textarea[aria-invalid="true"] {
  border-color: #c0392b;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.15);
}

/* Error spans — hidden by default, shown when non-empty */
.form-error {
  font-size: var(--font-size-sm);
  color: #c0392b;
  min-height: 1.2em;
  line-height: 1.4;
  /* Hidden when empty — content makes it visible */
}

.form-error:empty {
  display: none;
}

/* Submit button — full width on mobile */
.contact__submit {
  width: 100%;
  padding: var(--space-4) var(--space-8);
  font-size: var(--font-size-lg);
  margin-top: var(--space-2);
}

/* Success message */
#form-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  border-radius: var(--radius-md);
  padding: var(--space-6) var(--space-8);
  font-size: var(--font-size-lg);
  line-height: var(--line-height-base);
  text-align: center;
}

/* --- Contact: Desktop 1024px+ — two-column layout --- */
@media (min-width: 1024px) {
  .contact__container {
    grid-template-columns: 1fr 1.4fr;
    gap: var(--space-16);
    align-items: start;
  }

  .contact__submit {
    width: auto;
  }
}

/* ============================================================
   FOOTER SECTION
   ============================================================
   Background: #1a2744 (deep navy) — white text contrast ≈ 12:1 (≥ 4.5:1 ✓)
   Muted text:  #b0bcd4 on #1a2744 — contrast ≈ 5.2:1 (≥ 4.5:1 ✓)
   ============================================================ */
#site-footer {
  background-color: var(--color-primary);   /* #1a2744 */
  color: var(--color-white);                /* #ffffff — contrast ≈ 12:1 */
}

/* Main footer row: brand | nav | contact */
.footer__container {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
  padding-block: var(--space-12);
}

/* --- Brand column --- */
.footer__logo {
  height: 80px;
  width: auto;
  display: block;
  margin-bottom: var(--space-3);
}

.footer__name {
  font-family: var(--font-family-base);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-white);
  margin-bottom: var(--space-2);
}

.footer__tagline {
  font-size: var(--font-size-sm);
  color: #b0bcd4;   /* Muted light blue — contrast ≈ 5.2:1 on #1a2744 */
  line-height: var(--line-height-base);
}

/* --- Nav column --- */
.footer__nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer__nav a {
  font-family: var(--font-family-ui);
  font-size: var(--font-size-sm);
  color: #b0bcd4;   /* Muted light blue — contrast ≈ 5.2:1 */
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer__nav a:hover,
.footer__nav a:focus-visible {
  color: var(--color-white);
  text-decoration: underline;
  outline: none;
}

.footer__nav a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* --- Contact column --- */
.footer__contact {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.footer__contact li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--font-size-sm);
  color: #b0bcd4;   /* Muted light blue — contrast ≈ 5.2:1 */
}

.footer__contact a {
  color: #b0bcd4;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer__contact a:hover,
.footer__contact a:focus-visible {
  color: var(--color-white);
  text-decoration: underline;
  outline: none;
}

.footer__contact a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* --- Bottom bar: copyright --- */
.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-block: var(--space-6);
}

.footer__copyright {
  font-size: var(--font-size-sm);
  color: #b0bcd4;   /* Muted light blue — contrast ≈ 5.2:1 */
  text-align: center;
}

/* --- Footer: Tablet 768px+ — 3-column layout --- */
@media (min-width: 768px) {
  .footer__container {
    grid-template-columns: 1.5fr 1fr 1.5fr;
    gap: var(--space-12);
    align-items: start;
  }

  .footer__nav {
    align-items: center;
  }
}

/* --- Footer: Desktop 1024px+ --- */
@media (min-width: 1024px) {
  .footer__container {
    grid-template-columns: 2fr 1fr 2fr;
    gap: var(--space-16);
  }
}
