:root {
  --accent: #3b97d3;
  --text: #161616;
  --header-height: 90px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  width: 100%;
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  font-family: "Montserrat", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--accent);
  overflow-wrap: anywhere;
}

a:hover,
a:focus-visible {
  color: #247caf;
}

p {
  margin: 0 0 20px;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Libre Baskerville", serif;
  line-height: 1.2;
}

h1 {
  margin-bottom: 25px;
  font-size: 60px;
}

h2 {
  margin-bottom: 20px;
  font-size: 36px;
}

h3 {
  font-size: 24px;
  font-weight: 300;
}

.container {
  width: min(100%, 1600px);
  margin: 0 auto;
  padding-inline: 60px;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 10;
  min-height: var(--header-height);
  background: #fff;
  box-shadow: 0 0 20px -10px rgb(0 0 0 / 30%);
}

.header-inner,
.identity,
.site-nav > ul {
  display: flex;
  align-items: center;
}

.header-inner {
  min-height: var(--header-height);
  justify-content: space-between;
  gap: 30px;
}

.header-inner > *,
.feature > * {
  min-width: 0;
}

.identity {
  flex-shrink: 0;
  gap: 20px;
}

.identity p {
  margin: 0;
  font-family: "Libre Baskerville", serif;
  line-height: 1.2;
}

.logo {
  display: block;
  flex: 0 0 200px;
}

.logo img {
  width: 200px;
  height: auto;
}

.site-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav li {
  position: relative;
}

.site-nav a {
  display: block;
  max-width: 100%;
  padding: 0 20px;
  color: var(--text);
  line-height: var(--header-height);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--accent);
}

.site-nav li ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 300px;
  padding: 10px 0;
  background: #eee;
}

.site-nav li:hover > ul,
.site-nav li:focus-within > ul {
  display: block;
}

.site-nav li ul a {
  padding: 15px 30px;
  line-height: 1.25;
}

/* Burger menu button */
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 9px;
  border: 0;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--text);
  border-radius: 2px;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.menu-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Burger -> X */
.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(11.5px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-11.5px) rotate(-45deg);
}

/* Hero */
main {
  width: 100%;
  max-width: 100%;
  padding-top: var(--header-height);
}

.hero {
  width: 100%;
  padding: 200px 0;
  background-image:
    linear-gradient(90deg, rgba(0, 0, 0, 0.7) 25%, rgba(0, 0, 0, 0) 70%),
    url("images/hero.jpg");
  background-position: center;
  background-size: cover;
}

.hero-content {
  color: #fff;
}

.hero-content > * {
  width: 50%;
  max-width: 760px;
  color: #fff;
}

.hero .email {
  margin-bottom: 20px;
  font-family: "Libre Baskerville", serif;
  font-size: 1.5rem;
}

/* Content sections */
.section-heading {
  padding: 50px 30px;
  scroll-margin-top: calc(var(--header-height) + 10px);
}

.content-section {
  width: 100%;
  max-width: 100%;
  scroll-margin-top: var(--header-height);
}

.feature {
  display: grid;
  width: 100%;
  max-width: 100%;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
}

.feature-image {
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: cover;
}

.feature-content {
  width: 100%;
  max-width: 100%;
  padding: 120px max(60px, calc((100% - 480px) / 2));
}

.feature-content p:last-child {
  margin-bottom: 0;
}

.site-footer {
  padding: 20px 0;
  text-align: center;
  background-color: #e1e1e1;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 1200px) {
  h1 {
    margin-bottom: 20px;
    font-size: 38px;
  }

  h2 {
    margin-bottom: 20px;
    font-size: 28px;
  }

  h3 {
    font-size: 20px;
  }

  .container {
    padding-inline: 30px;
  }

  .hero {
    padding: 150px 0;
  }

  .feature-content {
    padding: 65px max(30px, calc((100% - 540px) / 2));
  }
}

@media (max-width: 980px) {
  :root {
    --header-height: 70px;
  }

  .identity p {
    display: none;
  }

  .logo {
    flex-basis: 130px;
  }

  .logo img {
    width: 130px;
  }

  .menu-toggle {
    display: flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
    background: #eee;
    box-shadow: 0 12px 20px rgb(0 0 0 / 12%);
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav > ul {
    display: block;
    padding: 12px 0;
  }

  .site-nav a,
  .site-nav li ul a {
    padding: 12px 30px;
    line-height: 1.4;
  }

  .site-nav li ul {
    display: block;
    position: static;
    width: auto;
    padding: 0 0 8px 20px;
    background: transparent;
  }

  .hero {
    padding: 100px 0;
    background-image:
      linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)),
      url("images/hero.jpg");
  }

  .hero-content > * {
    width: 100%;
  }
}

@media (max-width: 1000px) {
  .feature {
    grid-template-columns: 1fr;
  }

  .feature-image {
    height: 650px;
    min-height: 0;
  }
}

@media (max-width: 900px) {
  h1 {
    font-size: 32px;
  }

  h2 {
    font-size: 26px;
  }

  .feature-image {
    height: 500px;
  }
}

@media (max-width: 720px) {
  .container {
    padding-inline: 20px;
  }

  .hero {
    padding: 75px 0;
  }

  .hero .email {
    font-size: 1.15rem;
  }

  .section-heading {
    padding: 40px 20px;
  }

  .feature-image {
    height: 350px;
  }

  .feature-content {
    padding: 40px max(20px, calc((100% - 560px) / 2));
  }
}

@media (max-width: 450px) {
  :root {
    --header-height: 64px;
  }

  .container {
    padding-inline: 16px;
  }

  .header-inner {
    gap: 12px;
  }

  .logo {
    flex-basis: 120px;
  }

  .logo img {
    width: 120px;
  }

  .site-nav a,
  .site-nav li ul a {
    padding: 12px 20px;
    white-space: normal;
  }

  h1 {
    font-size: 26px;
  }

  h2 {
    font-size: 22px;
  }

  h3 {
    font-size: 18px;
  }

  .hero {
    padding: 60px 0;
  }

  .section-heading {
    padding: 32px 16px;
  }

  .feature-image {
    height: 250px;
  }

  .feature-content {
    padding: 32px 16px;
  }

  .site-footer {
    padding-block: 16px;
  }
}

@media (max-width: 350px) {
  .logo {
    flex-basis: 110px;
  }

  .logo img {
    width: 110px;
  }

  h1 {
    font-size: 24px;
  }
}