/* ==========================================================================
   Smith-House Solutions Ltd - Master Stylesheet (style.css)
   ========================================================================== */

/* --- Root Variables Derived from Brand Palette --- */
:root {
  --brand-blue: #6c9ab8;        /* Primary logo pale blue */
  --brand-dark-blue: #4f748d;   /* Contrast heading & active link colour */
  --brand-light-blue: #eaf1f5;  /* Light tint fill */
  --brand-deep-nav: #3d5b6e;    /* Deep slate tone for navbar */
  --text-main: #2b3a42;         /* Charcoal text for optimal readability */
  --text-muted: #5e6d75;
  --bg-white: #ffffff;
  --bg-subtle: #f8fafc;
  --border-colour: #dce5eb;
  --font-sans: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  --container-width: 1100px;
}

/* --- Base & Reset --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--text-main);
  background-color: var(--bg-subtle);
  line-height: 1.65;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* --- Global Container --- */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* --- Header Banner: Gradient & Centred Layout --- */
.site-header {
  width: 100%;
  background: #ffffff;
  background: linear-gradient(90deg, #ffffff 0%, #b8d0df 50%, #6c9ab8 100%);
  border-bottom: 2px solid var(--brand-dark-blue);
  padding: 1.25rem 0;
}

.header-layout {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center; /* Centres the logo and tagline block on screen */
  gap: 2rem;
  background: transparent;
}

.brand-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.site-logo {
  height: 70px;
  width: auto;
  display: block;
}

.header-divider {
  width: 2px;
  height: 44px;
  background-color: var(--brand-dark-blue);
  opacity: 0.4;
  flex-shrink: 0;
}

.header-tagline {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap; /* Keeps tagline on a single continuous line */
  letter-spacing: 0.3px;
  margin: 0;
}

/* --- Navigation Bar: Centred Links --- */
.site-navbar {
  background-color: var(--brand-deep-nav);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.site-navbar ul {
  list-style: none;
  display: flex;
  justify-content: center; /* Centres navigation bar links on screen */
  align-items: center;
  flex-wrap: wrap;
  padding: 0;
  margin: 0;
}

.site-navbar li a {
  display: block;
  padding: 0.85rem 1.6rem;
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.site-navbar li a:hover,
.site-navbar li a.active {
  background-color: var(--brand-blue);
  color: #ffffff;
}

/* --- Main Content Area --- */
.main-content {
  flex: 1 0 auto;
  padding: 3rem 0;
}

.page-header {
  margin-bottom: 2.5rem;
  text-align: center;
}

.page-header h1 {
  font-size: 2.25rem;
  color: var(--brand-dark-blue);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.page-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* --- Content Section Boxes --- */
.intro-box {
  background: var(--bg-white);
  border-left: 4px solid var(--brand-blue);
  padding: 2rem;
  border-radius: 4px;
  margin-bottom: 2.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.intro-box p {
  font-size: 1.1rem;
  color: var(--text-main);
  line-height: 1.8;
}

/* --- Grid & Cards --- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 1.5rem;
}

.card {
  background: var(--bg-white);
  border: 1px solid var(--border-colour);
  border-radius: 6px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.07);
}

.card h3 {
  color: var(--brand-dark-blue);
  margin-bottom: 0.75rem;
  font-size: 1.3rem;
}

/* --- Forms --- */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--brand-dark-blue);
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-colour);
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(108, 154, 184, 0.25);
}

.btn-primary {
  background-color: var(--brand-blue);
  color: #ffffff;
  padding: 0.8rem 1.8rem;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn-primary:hover {
  background-color: var(--brand-dark-blue);
}

/* --- Footer --- */
.site-footer {
  background-color: #212c33;
  color: #cbd5e1;
  padding: 2.5rem 0 1.5rem;
  border-top: 3px solid var(--brand-blue);
}

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

.footer-bottom {
  text-align: center;
  border-top: 1px solid #334155;
  padding-top: 1.5rem;
  font-size: 0.875rem;
  color: #94a3b8;
}

/* --- Responsive Layout Adjustments --- */
@media (max-width: 900px) {
  .header-tagline {
    font-size: 1.15rem;
  }
  .site-logo {
    height: 60px;
  }
}

@media (max-width: 768px) {
  .site-header {
    background: linear-gradient(180deg, #ffffff 0%, #dce9f1 55%, var(--brand-blue) 100%);
    padding: 1.25rem 0;
  }

  .header-layout {
    flex-direction: column;
    text-align: center;
    gap: 0.85rem;
  }

  .header-divider {
    display: none;
  }

  .header-tagline {
    white-space: normal;
    font-size: 1.05rem;
  }

  .site-logo {
    height: 55px;
  }

  .grid {
    grid-template-columns: 1fr !important;
  }
}