/*
 * Stylesheet for the Deistermind one‑page site.
 * The design follows a minimalist, professional aesthetic with plenty of whitespace
 * and clear typography. Colour variables define the brand palette.
 */

/* Root variables for easy colour management */
:root {
  --primary-color: #1F2A44;
  --secondary-color: #E6E9EC;
  --text-color: #2A2A2A;
  --accent-grey: #B1B6BD;
  --white: #FFFFFF;
  --section-pad: 72px;
  --section-pad-sm: 56px;
}

/* Global styles */
html, body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', sans-serif;
  color: var(--text-color);
  background-color: var(--white);
  scroll-behavior: smooth;
}

h1, h2, h3 {
  font-family: 'Montserrat', sans-serif;
  margin-top: 0;
  color: var(--primary-color);
}

/* Paragraph rhythm */
p {
  margin-top: 0;
  margin-bottom: 1rem;
  line-height: 1.6;
}

/* Consistent alignment */
section h2 {
  text-align: center;
  margin-bottom: 1.25rem;
}

/* Utility classes */
.container {
  width: 90%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.btn-primary {
  display: inline-block;
  background-color: var(--primary-color);
  color: var(--white);
  padding: 12px 24px;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
  transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #152138;
}

/* Override button styling in hero to ensure contrast */
.hero .btn-primary {
  background-color: var(--secondary-color);
  color: var(--primary-color);
}

.hero .btn-primary:hover,
.hero .btn-primary:focus {
  background-color: var(--accent-grey);
  color: var(--primary-color);
}

/* Header */
.site-header {
  background-color: var(--white);
  padding: 16px 0;
  border-bottom: 1px solid var(--secondary-color);
}

.header-inner {
  display: flex;
  align-items: center;
}

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

/* Hero */
.hero {
  position: relative;
  background-color: var(--primary-color);
  color: var(--white);
  text-align: center;
  padding: 100px 0 120px;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('logo_inverted_dark_on_white.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: 60%;
  opacity: 0.07;
  /* invert colours so dark logo appears light on dark blue */
  filter: invert(1) grayscale(1);
  pointer-events: none;
}

.hero-content h1 {
  font-size: 2.4rem;
  line-height: 1.3;
  margin-bottom: 0.5rem;
  color: var(--white);
}

.hero-content h2 {
  font-size: 1.4rem;
  font-weight: 400;
  margin-top: 0;
  margin-bottom: 1.2rem;
  color: var(--secondary-color);
}

.hero-content .subheadline {
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2rem;
  font-size: 1rem;
  color: var(--secondary-color);
}

/* Section base styling */
section {
  padding: var(--section-pad-sm) 0;
}

@media (min-width: 768px) {
  section {
    padding: var(--section-pad) 0;
  }
}

section:nth-of-type(odd):not(.hero):not(.compliance) {
  background-color: var(--secondary-color);
}

/* Why section */
.why h2 {
  text-align: center;
}

.why p {
  max-width: 800px;
  margin: 0 auto;
}


/* Vision & Mission */
.vision-mission .vm-grid {
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
}

.vision-mission .service-item {
  padding: 28px 24px;
}

/* Services */
.services h2 {
  text-align: center;
  margin-bottom: 1.5rem;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 24px;
}

.service-item {
  text-align: center;
  background-color: var(--white);
  border: 1px solid var(--secondary-color);
  border-radius: 6px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.service-item h3 {
  margin-top: 0;
  font-size: 1.1rem;
  color: var(--primary-color);
}

/* Trust & About */
.trust-about h2 {
  text-align: center;
  margin-bottom: 0.5rem;
}

.trust-about p {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 1rem;
}

.trust-about p:last-of-type {
  margin-bottom: 2rem;
}

.trust-logos {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.logo-box {
  background-color: var(--white);
  color: var(--primary-color);
  border: 1px solid var(--secondary-color);
  padding: 10px 16px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.9rem;
  min-width: 100px;
  text-align: center;
}

/* Process */
.process h2 {
  text-align: center;
  margin-bottom: 1.5rem;
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
}

.step {
  text-align: center;
  background-color: var(--white);
  border: 1px solid var(--secondary-color);
  border-radius: 6px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.step h3 {
  margin-top: 0;
  font-size: 1.1rem;
  color: var(--primary-color);
}

/* FAQ */
.faq h2 {
  text-align: center;
  margin-bottom: 1.5rem;
}

.faq-item {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 1.5rem;
}

.faq-item h3 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
  color: var(--primary-color);
}

.faq-item p {
  margin-top: 0;
  line-height: 1.6;
}

/* Contact */
.contact h2 {
  text-align: center;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.contact p {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 2rem;
}

.contact-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}

.contact-item {
  display: flex;
  align-items: center;
  flex-direction: column;
  text-decoration: none;
  color: var(--primary-color);
  width: 100px;
  transition: color 0.2s ease-in-out;
}

.contact-item:hover,
.contact-item:focus {
  color: #152138;
}

.contact-item .icon {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  width: 48px;
}

.contact-item .label {
  font-size: 0.85rem;
  text-align: center;
}

/* Compliance sections */
.compliance {
  display: none;
  background-color: var(--secondary-color);
  padding-top: 80px;
  padding-bottom: 80px;
}

.compliance h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--primary-color);
  text-align: center;
}

.compliance p {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1rem;
  line-height: 1.6;
  color: var(--text-color);
}

.compliance .close-link {
  display: inline-block;
  margin-top: 1rem;
  text-decoration: none;
  color: var(--primary-color);
  font-weight: 600;
}

.compliance .close-link:hover,
.compliance .close-link:focus {
  text-decoration: underline;
}

/* Footer */
.site-footer {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 40px 0;
  text-align: center;
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--secondary-color);
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus {
  text-decoration: underline;
}

.site-footer .footer-content p {
  margin: 0.5rem 0;
}

/* Responsive typography adjustments */
@media (min-width: 768px) {
  .hero-content h1 {
    font-size: 3rem;
  }
  .hero-content h2 {
    font-size: 1.6rem;
  }
}

.service-item p {
  margin: 0;
  line-height: 1.6;
}

.step p {
  line-height: 1.6;
  margin: 0;
}


/* Services grid: center last (Angel Investment) card */
@media (min-width: 600px) and (max-width: 899px) {
  .services .service-grid {
    grid-template-columns: repeat(2, minmax(250px, 1fr));
  }
  .services .service-item.angel {
    grid-column: 1 / -1;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (min-width: 900px) {
  .services .service-grid {
    grid-template-columns: repeat(3, minmax(250px, 1fr));
  }
  .services .service-item.angel {
    grid-column: 2;
  }
}


/* Mobile fine-tuning */
@media (max-width: 480px) {
  :root {
    --section-pad-sm: 44px;
  }

  .hero {
    padding: 84px 0 96px;
  }

  .hero-content h1 {
    font-size: 1.9rem;
  }

  .hero-content h2 {
    font-size: 1.1rem;
  }

  .hero-content .subheadline {
    margin-bottom: 1.5rem;
    font-size: 0.98rem;
  }

  .btn-primary {
    display: block;
    width: 100%;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
  }

  .service-item,
  .step,
  .faq-item {
    padding: 18px;
  }

  .contact-item {
    width: 92px;
  }
}

/* Adjust Vision & Mission section: stack the two items vertically inside a standard container */
.vision-mission {
  display: block; /* ensure it behaves as a block section */
}
/* Override the default grid to stack the items vertically */
.vision-mission .service-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
/* Ensure each Vision/Mission item spans the container width and is left-aligned */
.vision-mission .service-grid .service-item {
  width: 100%;
  max-width: none;
  text-align: left;
}
