/*
  Bolton Appraisal Website Styles

  This stylesheet defines the typography, layout, colours, and responsive
  behaviour for the Bolton Appraisal static website. The design draws
  inspiration from Google's Labs aesthetic – clean lines, generous white
  space and subtle transitions – while remaining accessible and easy to
  customise. Colours are defined as CSS variables for quick tweaking.
*/

/* Root variables allow easy theming throughout the site.  Adjust the
   primary and secondary colours to change the overall look. */
:root {
  /* Primary and secondary colours inspired by Google’s material palette.  */
  --primary: #1a73e8;        /* Brand colour: medium blue */
  --secondary: #34a853;      /* Accent colour: green */
  /* Neutral surfaces and backgrounds. A very light tint for cards helps
     separate content from the page background without creating harsh
     contrast. */
  --background: #ffffff;     /* Page background */
  --surface: #ffffff;        /* Card and panel backgrounds */
  --text-primary: #202124;   /* Body text colour */
  --text-secondary: #5f6368; /* Secondary text colour */
  --border: #e2e8f0;         /* Light border colour */
}

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

body {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  background-color: var(--background);
  color: var(--text-primary);
  scroll-behavior: smooth;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Sticky header */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--background);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
}

/* Logo and site title */
.logo-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  font-size: 1.5rem;
}

.logo-title img {
  height: 40px;
}

/* Navigation */
nav a {
  margin-left: 1.5rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: color 0.2s ease;
}

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

 /* Highlight the current page in the navigation bar */
 nav a.active {
   color: var(--primary);
   font-weight: 700;
}

/* Hero section */
.hero {
  text-align: center;
  padding: 5rem 2rem 4rem;
  /* Soft gradient that subtly hints at the primary colour while remaining
     easy on the eyes. */
  background: linear-gradient(145deg, #f2f7fd, #ffffff);
}

.hero h2 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--primary);
}

.hero p {
  font-size: 1.25rem;
  max-width: 720px;
  margin: 0 auto;
  color: var(--text-secondary);
}

.hero .cta {
  margin-top: 2rem;
  display: inline-block;
  background-color: var(--primary);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.hero .cta:hover,
.hero .cta:focus {
  background-color: #0c5bd7;
}

/* Section headings */
section h2.section-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 2.5rem;
  color: var(--primary);
}

/* Card grid layout */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.card {
  background-color: var(--surface);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  padding: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

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

.card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.card p {
  font-size: 1rem;
  color: var(--text-secondary);
  flex-grow: 1;
}

.card a.more {
  margin-top: 1rem;
  font-weight: 600;
  color: var(--secondary);
  display: inline-block;
}

.card a.more:hover,
.card a.more:focus {
  text-decoration: underline;
}

/* Values (benefits) section differs slightly in layout */
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  padding: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.value-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background-color: var(--surface);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease;
}

.value-card:hover {
  transform: translateY(-3px);
}

.value-card img {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.value-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.value-card p {
  font-size: 1rem;
  color: var(--text-secondary);
}

/* Contact section */
#contact-section {
  background-color: #f1f6fd;
  padding: 3rem 2rem;
  text-align: center;
}

#contact-section h2 {
  color: var(--primary);
  margin-bottom: 1rem;
  font-size: 1.75rem;
}

#contact-section p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 1rem;
}

form.contact-form {
  max-width: 500px;
  margin: 0 auto;
  display: grid;
  gap: 1rem;
}

form.contact-form input,
form.contact-form textarea {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
}

form.contact-form button {
  background-color: var(--secondary);
  color: #fff;
  padding: 0.75rem;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

form.contact-form button:hover,
form.contact-form button:focus {
  background-color: #2a7d40;
}

/* Footer */
footer {
  background-color: var(--surface);
  padding: 2rem;
  text-align: center;
  border-top: 1px solid var(--border);
}

footer p {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

/*
  Simple fade-in animation for cards and value cards. Elements with the
  `.fade-in` class will start slightly translated and transparent until
  JavaScript detects that they are in the viewport and adds the
  `.visible` class. See script.js for the IntersectionObserver logic.
*/
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}