/*
  Specialty Exteriors website stylesheet

  The colour palette is based on neutral, muted tones with high
  contrast – a hallmark of sophisticated, luxury branding【867747108657072†L40-L47】.
  Gold (#d9b061) paired with dark navy (#0f1b27) and soft neutrals (#f2efea)
  conveys exclusivity and professionalism. Typography uses the Montserrat,
  Playfair Display and Open Sans families, which are recommended for
  legibility and elegance in modern websites【500587778167273†L122-L163】.
*/

/* CSS Reset and Variables */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --dark-bg: #0f1b27;
  --navy: #142f40;
  --gold: #d9b061;
  --gold-light: #d8d0c5;
  --neutral-light: #f2efea;
  --neutral: #d9c4a9;
  --text-dark: #0d0d0d;
  --text-light: #f7f7f7;
  --transition: 0.3s ease-in-out;
  --max-width: 1200px;
}

body {
  font-family: 'Open Sans', sans-serif;
  line-height: 1.6;
  background-color: var(--dark-bg);
  color: var(--text-light);
  scroll-behavior: smooth;
}

h1, h2, h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  color: var(--text-light);
}

h1 {
  font-size: 2.8rem;
  line-height: 1.2;
}

h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  text-transform: capitalize;
}

h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
  font-size: 1rem;
  color: var(--neutral-light);
}

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

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

.container {
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 0;
}

/* Header and Navigation */
.header {
  position: sticky;
  top: 0;
  width: 100%;
  background-color: rgba(15, 27, 39, 0.9);
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
}

.logo {
  height: 60px;
  width: auto;
}

.navbar .nav-list {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.navbar .nav-list li a {
  font-weight: 600;
  color: var(--neutral-light);
  padding: 0.5rem;
  transition: var(--transition);
}

.navbar .nav-list li a:hover,
.navbar .nav-list li a:focus {
  color: var(--gold);
}

/* Mobile Navigation Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 18px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--neutral-light);
  border-radius: 2px;
  transition: var(--transition);
}

/* Animate burger icon when open */
.nav-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 5px);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -5px);
}

/* Hero Section */
.hero {
  position: relative;
  height: 100vh;
  background-image: url('../assets/images/hero.jpg');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 27, 39, 0.7);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 700px;
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  letter-spacing: 0.5px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: var(--transition);
  cursor: pointer;
}

.btn-primary {
  background-color: var(--gold);
  color: var(--dark-bg);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--gold-light);
  color: var(--dark-bg);
}

/* Section Styles */
.section-light {
  background-color: var(--neutral-light);
  color: var(--text-dark);
  /* Provide top padding so headings aren't obscured by sticky nav */
  padding-top: 3rem;
}

.section-dark {
  background-color: var(--navy);
  color: var(--neutral-light);
  padding-top: 3rem;
}

/* Ensure headings in light sections are dark for contrast */
.section-light h2,
.section-light h3 {
  color: var(--dark-bg);
}

/* Override icon colours in values for better visibility on light background */
/* removed unused Font Awesome icon colour override since custom
   icons are now used in the about section */

.section-heading {
  text-align: center;
  margin-bottom: 1rem;
  font-size: 2rem;
}

.section-subheading {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 2rem;
  color: var(--neutral);
}

/* About Section */
/* About section layout */
/* The about container now uses two columns.  On wider screens the text
   occupies roughly half the width and the values occupy the remainder. */
.about-container {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  position: relative;
  z-index: 1;
}

.about-text {
  flex: 1 1 50%;
}

.about-values {
  flex: 1 1 45%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

/* About values: cards for core principles */
.about-values .value {
  text-align: center;
  background-color: var(--navy);
  color: var(--neutral-light);
  border-radius: 8px;
  padding: 2rem 1.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: var(--transition);
}

/* Ensure paragraphs in the about text are dark for optimum contrast against
   the light blueprint background */
.about-text p {
  color: var(--dark-bg);
}

/* Scale up slightly on hover to provide subtle interactivity */
.about-values .value:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Icon images inside value cards */
.about-values .value img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  margin-bottom: 1rem;
}

.about-values .value h3 {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  color: var(--gold);
}

.about-values .value p {
  color: var(--neutral);
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Services Section */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.service-card {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2rem 1.5rem;
  border-radius: 8px;
  text-align: center;
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-5px);
  background-color: rgba(255, 255, 255, 0.1);
}


/* Service card icons */
.service-card img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  margin: 0 auto 1rem;
  display: block;
}

.service-card h3 {
  margin-bottom: 0.5rem;
}

.service-card p {
  font-size: 0.9rem;
  color: var(--neutral);
}

/* Portfolio Section */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.portfolio-item {
  overflow: hidden;
  border-radius: 8px;
  position: relative;
}

.portfolio-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
}

.portfolio-item:hover img {
  transform: scale(1.05);
}

/* Decorative blueprint pattern for the about section
   A subtle architectural blueprint fills the left side of the about section
   to avoid large blank areas.  The image is positioned behind the content
   using a pseudo‑element with reduced opacity so it doesn't distract from
   the text. */
.about {
  position: relative;
}

.about::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 60%;
  height: 100%;
  background-image: url('../assets/images/about-bg.png');
  background-size: cover;
  background-position: center;
  /* Increase opacity so the architectural blueprint is visible against
     the neutral background.  A value around 0.4 provides subtle
     contrast without overwhelming the content. */
  /* Make the background graphic fully opaque so it stands out against the
     neutral section background.  The image itself uses muted tones, so a
     higher opacity does not overwhelm the layout. */
  opacity: 1;
  z-index: 0;
}

/* Ensure the about container sits above the background graphic */
.about-container {
  position: relative;
  z-index: 1;
}

/* Service cards share equal heights and allow their content to flex
   vertically.  Long descriptions no longer cause cards to spill into
   neighbouring rows. */
.service-grid {
  grid-auto-rows: 1fr;
}

.service-card {
  min-height: 320px;
  display: flex;
  flex-direction: column;
}

.service-card p {
  flex-grow: 1;
}

/* Standardise portfolio image sizes.  Each portfolio item will now have
   a consistent height and crop overflow with object-fit. */
.portfolio-item img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
}

/* Consultation forms styling.  Because the consultation page sits in a
   light section, override colours to ensure readability.  Form elements
   adopt a subtle contrast against the neutral background and the submit
   button stays aligned at the bottom of each card. */
.section-light .service-card {
  color: var(--dark-bg);
  background-color: rgba(15, 27, 39, 0.02);
  border: 1px solid rgba(15, 27, 39, 0.05);
}

.section-light .service-card h3,
.section-light .service-card p,
.section-light .service-card label {
  color: var(--dark-bg);
}

.section-light .service-card input,
.section-light .service-card textarea {
  background-color: rgba(15, 27, 39, 0.05);
  color: var(--dark-bg);
}

.section-light .service-card input::placeholder,
.section-light .service-card textarea::placeholder {
  color: rgba(15, 27, 39, 0.5);
}

.section-light .service-card form {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.section-light .service-card form button {
  margin-top: auto;
}

/* Contact Section */
.contact-container {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  align-items: flex-start;
}

.contact-info {
  flex: 1 1 350px;
  /* Ensure text is legible on the dark contact section */
  color: var(--neutral-light);
}

.contact-info ul {
  list-style: none;
  margin-top: 1rem;
}

.contact-info li {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}

.contact-info li span {
  color: var(--neutral-light);
}
.contact-info i {
  margin-right: 0.5rem;
  color: var(--gold);
}

.contact-form {
  flex: 1 1 400px;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2rem;
  border-radius: 8px;
}

.form-group {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
}

.form-group.full {
  width: 100%;
}

.contact-form label {
  margin-bottom: 0.3rem;
  font-size: 0.9rem;
  color: var(--neutral-light);
}

.contact-form input,
.contact-form textarea {
  background-color: rgba(255, 255, 255, 0.1);
  border: none;
  padding: 0.75rem;
  border-radius: 4px;
  font-family: 'Open Sans', sans-serif;
  color: var(--neutral-light);
  resize: none;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  background-color: rgba(255, 255, 255, 0.15);
}

.contact-form button {
  margin-top: 1rem;
  width: 100%;
}

/* Footer */
.footer {
  background-color: var(--dark-bg);
  color: var(--neutral);
  padding: 2rem 0 1rem;
}

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

.footer-logo-img {
  height: 50px;
}

.footer-links a {
  margin-right: 1rem;
  color: var(--neutral);
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-links a:hover,
.footer-links a:focus {
  color: var(--gold);
}

.footer-social a {
  margin-right: 0.75rem;
  color: var(--neutral);
  font-size: 1.2rem;
  transition: var(--transition);
}

.footer-social a:hover {
  color: var(--gold);
}

.footer-bottom {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--neutral);
}

/* Scroll Animation Styles */
/* Elements with the animate-on-scroll class start slightly translated and opaque */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* When the animate class is added via IntersectionObserver, reveal the element */
.animate-on-scroll.animate {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Styles */
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }
  .hero-title {
    font-size: 2.5rem;
  }
  .navbar {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: rgba(15, 27, 39, 0.95);
    width: 200px;
    transform: translateX(100%);
    transition: var(--transition);
    padding: 1rem;
    border-radius: 0 0 0 8px;
  }
  .navbar.active {
    transform: translateX(0);
  }
  .navbar .nav-list {
    flex-direction: column;
    gap: 1rem;
  }
  .nav-toggle {
    display: flex;
  }
}
