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

html {
  box-sizing: border-box; /* Ensures consistent box-sizing */
  scroll-behavior: smooth; /* Smooth scrolling for anchor links */
}

body {
  height: 100%;
  line-height: 1.5;
  color: var(--color-text);
  -webkit-font-smoothing: antialiased; /* Smooth text rendering */
  -moz-osx-font-smoothing: grayscale; /* Smooth text rendering */
  font-family: "Roboto", system-ui, -apple-system, sans-serif;
}

/* THEME & TYPOGRAPHY */
:root {
  --color-white: #ffffff; /* pure white */
  --color-light-grey: #fafafa; /* soft light grey */
  --color-darker-grey: #f1f1f1; /* slightly darker grey */
  --color-primary: #edff66; /* neon yellow */
  --color-navy-blue: #2f4858; /* deep navy blue */
  --space-page-x: clamp(16px, 6vw, 24px); /* modern side paddings */
  --space-section-y: clamp(80px, 8vw, 96px); /* vertical padding */
  --space-grid-gap: 32px; /* gap between cards */
}

h1,
h2,
h3 {
  font-family: "Merriweather Sans", sans-serif;
  font-weight: 500;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  letter-spacing: -0.5px;
  text-transform: none;
  margin-bottom: var(--space-page-x);
  color: var(--color-navy-blue);
}

p {
  font-size: clamp(1rem, 1.1vw + 0.5rem, 1.25rem);
  line-height: 1.5;
  color: var(--color-navy-blue);
  margin-bottom: var(--space-page-x);
  font-weight: 300;
}

i {
  color: var(--color-primary);
}

ul,
ol {
  list-style: none;
}

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

/* General Element & Utility Styles */
button {
  border-radius: 6px;
  padding: 12px 24px;
  font-weight: 600;
  cursor: pointer;
}

.container {
  max-width: 1300px;
  margin: 0 auto;
  padding-top: var(--space-section-y);
}

.flex {
  display: flex;
}
.fluid {
  width: 100%;
}
.center {
  align-items: center;
}
.space-between {
  justify-content: space-between;
}

/* Header */
header {
  background-color: var(--color-light-grey);
  position: fixed;
  z-index: 1000;
}

nav ul {
  justify-content: center;
  width: 100vw;
  align-items: center;
  display: flex;
  padding: 6px 6px;
}

nav img {
  height: 44px;
}

nav li {
  height: 44px;
}

nav a {
  height: 100%;
  padding: 0 30px;
  display: flex;
  align-items: center;
}

nav a:hover {
  background-color: var(--color-darker-grey);
  border-radius: 6px;
}

nav li:first-child {
  margin-right: auto;
}

nav li:nth-child(6) {
  margin-left: auto;
}

nav li:last-child {
  display: none;
}

.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 250px;
  z-index: 999;
  background-color: var(--color-light-grey);
  display: none;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
}

.sidebar li:last-child {
  margin-left: 0;
}

.sidebar li {
  width: 100%;
}

.sidebar a {
  width: 100%;
}

/* Main Content */

/* Hero Section */
.hero-section {
  padding-top: 56px;
  width: 100vw;
}

.hero-image {
  object-fit: cover;
  width: 100vw;
  height: 75vh;
  overflow: hidden;
  z-index: 0;
}

.hero-info {
  position: absolute;
  top: 30%;
  z-index: 2;
  left: var(--space-page-x);
  right: var(--space-page-x);
  color: white;
  padding: var(--space-page-x);
}

.hero-info h1 {
  color: var(--color-light-grey);
  margin: 0;
}

.hero-info > p {
  color: var(--color-white);
  font-size: 25px;
  max-width: 500px;
  margin-bottom: 20px;
}

.hero-info button {
  background-color: var(--color-white);
  border: 2px solid var(--color-white);
  color: var(--color-navy-blue);
}

.hero-info button.secondary {
  background-color: transparent;
  color: var(--color-white);
  border: 2px solid var(--color-white);
  margin-left: 10px;
}

.hero-info button:hover {
  background-color: var(--color-darker-grey);
  border: 2px solid var(--color-darker-grey);
}

.hero-info button.secondary:hover {
  background-color: rgba(255, 255, 255, 0.3);
  border: 2px solid var(--color-white);
}

/* Reusable Cards */
.cards {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(12, minmax(auto, 1fr));
  gap: var(--space-grid-gap);
}

.card {
  grid-column-end: span 6;
  display: flex;
  flex-direction: column;
  background-color: var(--color-light-grey);
  transition: all 0.3s ease 0s;
}

.card__image-container {
  width: 100%;
  padding-top: 56.25%; /* 16:9 aspect ratio */
  overflow: hidden;
  position: relative;
}

.card__image-container img {
  width: 100%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.card__content {
  padding: 24px;
}

.card__title {
  margin-bottom: 20px;
  font-size: 1.5rem;
}

.card__info {
  display: flex;
  align-self: end;
  align-items: center;
}

.card__buttons a {
  display: inline-flex;
  gap: 8px;
  padding-bottom: var(--space-page-x);
}

.card__buttons a:hover {
  text-decoration: underline;
}

.span-four {
  grid-column-end: span 4;
}

.span-eight {
  grid-column-end: span 8;
}

.span-four h3 {
  font-size: large;
}

.span-four p {
  font-size: medium;
}

/* Intro Section */
.intro {
  flex-direction: column;
}

.intro h2 {
  text-align: center;
  margin-bottom: var(--space-section-y);
}

/* Services Section */
.services-section h2 {
  text-align: center;
  margin-bottom: var(--space-section-y);
}

.services-cards {
  display: flex;
  justify-content: center;
}

/* Articles Section */
.articles-section h2 {
  text-align: center;
  margin-bottom: var(--space-section-y);
}

/* Journey Section */
.journey {
  flex-direction: column;
  width: 100%;
  height: 100%;
  margin-bottom: var(--space-section-y);
}

.journey-card {
  margin-bottom: var(--space-page-x);
}

.journey h2 {
  text-align: center;
  margin-bottom: var(--space-section-y);
}

.journey i {
  font-size: 50px;
  color: var(--color-navy-blue);
}

.journey button {
  background-color: var(--color-primary);
  color: var(--color-navy-blue);
  border: 2px solid var(--color-primary);
}

.journey button:hover {
  background-color: transparent;
  color: var(--color-navy-blue);
  border: 2px solid var(--color-navy-blue);
}

/* Footer */
footer {
  background: var(--color-light-grey);
  padding: var(--space-page-x) 0;
}

.footer-columns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 80px;
  padding: var(--space-page-x);
}

.footer-columns i {
  color: var(--color-navy-blue);
}

.footer-columns div h4 {
  color: #777;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0;
}

.footer-columns li {
  margin: var(--space-page-x) 0;
}

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

.footer-extra {
  margin-top: var(--space-page-x);
  text-align: center;
}

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

/* Media Queries */
@media screen and (max-width: 768px) {
  .hideOnMobile {
    display: none;
  }
  nav li:last-child {
    display: flex;
  }
  nav a {
    padding: 0 0.5rem;
  }
  .card {
    grid-column-end: span 12;
  }
  .hero-info button {
    width: 100%;
    margin-bottom: 10px;
  }
  footer .container {
    flex-direction: column;
  }
}
/* make sidebar links full width */
@media screen and (max-width: 640px) {
  .sidebar {
    width: 100%;
    font-size: 2rem;
  }
  .services-cards {
    grid-template-columns: 10px repeat(6, 1fr) 10px;
    grid-gap: 10px;
  }
  .cards {
    grid-column: 2 / span 6;
    grid-template-columns: repeat(6, 1fr);
    grid-gap: 20px;
  }
  .card {
    grid-column-end: span 6;
  }
}

@media screen and (max-width: 1332px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media screen and (max-width: 1600px) {
  .hero-info {
    top: 30%;
  }
}