/*
 * Wright Law Website Stylesheet
 *
 * This stylesheet defines the visual appearance for the Wright Law
 * website. The palette is inspired by the supplied branding – a mix
 * of black, charcoal and soft greys with plenty of white space to
 * convey professionalism and clarity. Typography comes from the
 * Montserrat Google Font family and is sized consistently across
 * headings, body text and navigation. Responsive rules ensure the
 * layout adapts gracefully on tablets and mobile devices.
 */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');

/* Colour palette */
:root {
  --primary-color: #1a1a1a;      /* Deep charcoal for headings and buttons */
  --secondary-color: #3a3a3a;    /* Dark grey for subtle backgrounds */
  --accent-color: #505050;       /* Mid grey accent used on hover states */
  --light-color: #f9f9f9;        /* Off–white for page backgrounds */
  --text-color: #333333;         /* Standard text colour */
  --white: #ffffff;              /* Pure white for high contrast */
  --link-color: #000000;         /* Hyperlink colour */
}

/* Global resets */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: 'Montserrat', sans-serif;
  color: var(--text-color);
  background-color: var(--light-color);
  line-height: 1.6;
}

a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--primary-color);
}

/* Navigation bar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 2rem;
  z-index: 1000;
}

/* When scrolled the navbar becomes opaque and gains a stronger shadow */
.navbar.scrolled {
  background-color: var(--white);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

/*
 * Increase the logo height in the navigation bar by 300% compared to the
 * original 48px icon.  On wider screens the logo appears larger and
 * more prominent while still scaling down gracefully on smaller devices
 * via the media query at the bottom of this file.
 */
.logo img {
  /*
   * Increase the navigation logo to 200% of its original height (48px -> 96px).
   * This size is prominent on desktop while still scaling down on smaller devices.
   */
  height: 96px;
  width: auto;
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 2rem;
}

/* Navigation links are rendered as modern pills */
.nav-menu li a {
  /*
   * Present each navigation link as a fully rounded pill.  A subtle
   * translucent background differentiates the tabs from the page
   * without resorting to heavy boxes.  When hovered or active the
   * background colour flips to the primary brand colour – see the
   * hover/active rules below for details.
   */
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  background-color: rgba(0, 0, 0, 0.04);
  border: 1px solid transparent;
  transition: background-color 0.3s ease, color 0.3s ease;
  display: inline-block;
}

.nav-menu li a:hover {
  /* On hover invert the tab to the primary brand colour for a clear cue */
  background-color: var(--primary-color);
  color: var(--white);
  border-color: transparent;
}

.nav-menu li a.active {
  /* Active state matches the hover styling to maintain consistency */
  background-color: var(--primary-color);
  color: var(--white);
  border-color: transparent;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  width: 24px;
  height: 20px;
  justify-content: space-between;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background-color: var(--primary-color);
  border-radius: 2px;
  transition: transform 0.3s ease;
}

/* Hero section */
/* Hero section uses a soft gradient instead of photography */
.hero {
  height: 80vh;
  min-height: 480px;
  width: 100%;
  /* Darken the hero with a rich charcoal to black gradient to provide
   * contrast for the white logo and copy. */
  background: linear-gradient(140deg, #0e0e0f 0%, #242426 55%, #2f2f31 100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  text-align: center;
}

/* Remove dark overlay for a lighter feel */
.hero::before {
  display: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  padding: 1rem;
}

.hero-logo {
  /*
   * Reduce the central logo to around 150% of its original size on
   * desktop screens.  The maximum width constraint keeps the logo
   * responsive on smaller devices.  A drop shadow preserves a touch
   * of depth against the dark gradient background.
   */
  width: 300px;
  max-width: 80%;
  margin: 0 auto 1.5rem;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

.hero-content h1 {
  font-size: 2.7rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: var(--white);
}

.hero-content p {
  font-size: 1.15rem;
  margin-bottom: 1.75rem;
  font-weight: 400;
  line-height: 1.5;
  color: #e6e6e6;
}

.btn,
.btn-outline {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 500;
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

.btn:hover {
  background-color: var(--secondary-color);
}

.btn-outline {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  background-color: transparent;
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: var(--white);
}

/* Container utility */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 0;
}

/* Section headings */
section {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

section h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
  color: var(--primary-color);
  text-align: center;
}

/* About snippet on home page */
.about-snippet {
  /* Subtle off‑white gradient on the about snippet to add depth */
  background: linear-gradient(180deg, #ffffff 0%, #f4f4f5 100%);
  padding: 4rem 0;
  text-align: center;
}

.about-snippet .container p {
  max-width: 800px;
  margin: 0 auto 2rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
}

/* Services grid on home page */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.service-card {
  background-color: var(--white);
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.service-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.service-card-body {
  padding: 1rem 1.25rem 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.service-card-body h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--primary-color);
}

.service-card-body p {
  flex-grow: 1;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.service-card-body a {
  align-self: flex-start;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

/* Contact snippet on home page */
.contact-snippet {
  /* Dark gradient for the call‑to‑action section to anchor the page */
  background: linear-gradient(180deg, #0a0a0a 0%, #161616 100%);
  color: var(--white);
  padding: 4rem 0;
  text-align: center;
}

.contact-snippet h2 {
  color: var(--white);
}

.contact-snippet p {
  margin-bottom: 2rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  font-weight: 300;
}

/* Footer */
footer {
  background-color: var(--secondary-color);
  color: var(--white);
  padding: 3rem 0;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-column h4 {
  margin-bottom: 1rem;
  font-size: 1.2rem;
  font-weight: 600;
}

.footer-column ul {
  list-style: none;
}

.footer-column li {
  margin-bottom: 0.5rem;
}

.footer-column a {
  color: var(--white);
  font-weight: 300;
}

.footer-column a:hover {
  text-decoration: underline;
}

.footer-bottom {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.85rem;
  color: #cccccc;
}

/* Services page navigation */
.service-index {
  text-align: center;
  margin-bottom: 2rem;
}

.services-nav {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.services-nav li a {
  background-color: var(--secondary-color);
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.services-nav li a:hover {
  background-color: var(--primary-color);
}

/* About page */
.about-hero {
  height: 50vh;
  min-height: 360px;
  background: linear-gradient(135deg, #f6f6f6 0%, #eaeaea 100%);
  position: relative;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.about-hero::before {
  display: none;
}

.about-hero-content {
  position: relative;
  z-index: 2;
}

.about-section {
  background-color: var(--white);
  padding: 4rem 0;
}

.about-section h2 {
  margin-bottom: 2rem;
}

.about-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  align-items: start;
}

.about-columns img {
  width: 100%;
  border-radius: 6px;
}

.about-text {
  font-size: 1rem;
  line-height: 1.6;
}

.values-list {
  margin-top: 1.5rem;
  list-style: none;
}

.values-list li {
  margin-bottom: 0.75rem;
  position: relative;
  padding-left: 1.5rem;
}

.values-list li::before {
  content: "\2022";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--primary-color);
  font-size: 1.2rem;
  line-height: 1;
}

/* Services page */
.services-hero {
  height: 50vh;
  min-height: 360px;
  background: linear-gradient(135deg, #f6f6f6 0%, #eaeaea 100%);
  position: relative;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.services-hero::before {
  display: none;
}

.services-hero-content {
  position: relative;
  z-index: 2;
}

.service-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
  padding: 3rem 0;
  border-bottom: 1px solid #e6e6e6;
  /* Centre the content within each service section */
  text-align: center;
}

/* Alternate background colours for each service section */
.service-section:nth-of-type(odd) {
  background-color: #f9f9f9;
}
.service-section:nth-of-type(even) {
  background-color: #f1f1f1;
}


/*
 * Previously services used hidden images, but the site has been updated to show
 * bespoke abstract illustrations.  Remove the rule that hides images.
 */
/* .service-section img { display: none; } */

/*
 * By default, images in service sections fill their container and are centred
 * by `.service-image` class defined below.  The specific positioning rule for
 * the former general litigation image is no longer needed.
 */
/* #general-litigation img { object-position: left center; } */

.service-text h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--primary-color);
}

/* Centre the service text container and limit its width for readability */
.service-text {
  max-width: 900px;
  margin: 0 auto;
}

.service-text ul {
  list-style: disc;
  margin-left: 1.5rem;
  margin-top: 0.5rem;
  /* Align bullet lists left while the surrounding container is centred */
  display: inline-block;
}

.service-text ul li {
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

/* Contact page */
.contact-page {
  background-color: var(--white);
  padding: 4rem 0;
}

/* Gradient artwork panels for each service on the services page.  These
 * elements act like abstract images and fade to white to avoid
 * distracting from the accompanying text.  Each class corresponds to
 * a particular service with its own colour palette.
 */
.service-art {
  height: 180px;
  max-width: 920px;
  margin: 0 auto 1.5rem;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}
.service-art::after {
  content: "";
  position: absolute;
  inset: 0;
  /* Fade the artwork to white; start fully transparent and build to a
   * moderate opacity before blending into the page background.  A
   * lower opacity mid‑point preserves more of the underlying
   * gradient without overwhelming the eye. */
  /* Fade overlay: leave more of the underlying gradient visible by only
   * partially covering it with a low-opacity white fade. */
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 60%, #ffffff 100%);
}
.art-advice {
  background: radial-gradient(1200px 160px at 10% 30%, #2f2f31 0%, #5b5b5f 50%, #a6a6ab 100%);
}
.art-corporate {
  background: linear-gradient(135deg, #1a1a1a, #3a3a3d 40%, #8a8a90);
}
.art-debt {
  background: linear-gradient(120deg, #1e1e20, #4a4a50 50%, #9a9aa0);
}
.art-labour {
  background: linear-gradient(135deg, #202022, #3e3e42 45%, #8e8e95);
}
.art-estates {
  background: linear-gradient(140deg, #1b1b1d, #3b3b40 50%, #86868d);
}
.art-contracts {
  background: linear-gradient(135deg, #171718, #303034 50%, #7f7f86);
}
.art-admin {
  background: linear-gradient(135deg, #161617, #35353a 55%, #7a7a82);
}

/*
 * Each service section can feature an abstract image specific to that service.  The
 * `.service-image` class ensures that images fill the available width while
 * maintaining their aspect ratio.  Rounded corners and a margin below the
 * image create a cohesive look throughout the services page.
 */
.service-image {
  width: 100%;
  max-width: 920px;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
  margin: 0 auto 1.5rem;
  display: block;
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  max-width: 1000px;
  margin: 0 auto;
}

.contact-details {
  font-size: 1rem;
}

.contact-details h3 {
  margin-bottom: 1rem;
  color: var(--primary-color);
  font-size: 1.5rem;
}

.contact-details p {
  margin-bottom: 0.5rem;
}

.contact-form {
  background-color: var(--light-color);
  padding: 2rem;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.contact-form h3 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
  color: var(--primary-color);
}

.contact-form form {
  display: flex;
  flex-direction: column;
}

.contact-form label {
  margin-bottom: 0.25rem;
  font-weight: 500;
  color: var(--primary-color);
}

.contact-form input,
.contact-form textarea {
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid #cccccc;
  border-radius: 4px;
  font-family: inherit;
  resize: vertical;
}

.contact-form button {
  width: fit-content;
  align-self: flex-start;
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.contact-form button:hover {
  background-color: var(--secondary-color);
}

/* Alert messages on contact form submission */
.form-alert {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  font-size: 0.9rem;
  line-height: 1.4;
}
.form-alert.success {
  background-color: #eaf9e7;
  color: #2e7d32;
  border: 1px solid #c8e6c9;
}
.form-alert.error {
  background-color: #fdecea;
  color: #b71c1c;
  border: 1px solid #f5c6cb;
}

/* Responsive styles */
@media (max-width: 991px) {
  .service-section {
    grid-template-columns: 1fr;
  }
  .service-section:nth-child(even) {
    direction: ltr;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--white);
    width: 200px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
    display: none;
  }
  .nav-menu.open {
    display: flex;
  }
  .nav-menu li {
    margin-bottom: 1rem;
  }
  .nav-toggle {
    display: flex;
  }
  .hero {
    height: 60vh;
  }
  .hero-content h1 {
    font-size: 2rem;
  }
  .hero-content p {
    font-size: 1rem;
  }
  .contact-wrapper {
    grid-template-columns: 1fr;
  }
  /* Reduce the nav logo size on smaller screens to maintain proportion */
  .logo img {
    height: 64px;
  }
}