:root {
  --bg: #161616;
  --text: #f7f7f7;
  --muted: #a4a4a4;
  --blue: #4d7496;
  --blue-light: #5f8eb7;
  --divider: rgba(247, 247, 247, 0.15);
  --border: rgba(247, 247, 247, 0.3);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Cabin', Arial, sans-serif;
  font-weight: 700;
  margin: 0;
}

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

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

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 40px;
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: transparent;
  transition: background-color 0.2s ease;
}

.nav.scrolled {
  background: rgba(22, 22, 22, 0.3);
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  min-height: 76px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand {
  font-family: 'Cabin', Arial, sans-serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.nav-links a {
  font-size: 14px;
  color: rgba(247, 247, 247, 0.75);
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  border-bottom-color: var(--text);
}

/* Hero with photo background */
.hero-photo {
  position: relative;
  margin-top: -76px;
  padding-top: 76px;
  min-height: 85vh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
}

.hero-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
}

.hero-photo .container {
  position: relative;
  z-index: 1;
  width: 100%;
}

.hero-text {
  max-width: 520px;
  padding-left: 24px;
  border-left: 1px solid rgba(247, 247, 247, 0.5);
}

.hero-text h1 {
  font-size: 56px;
  line-height: 1.15;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.hero-text p {
  font-size: 18px;
  color: var(--text);
  margin: 0;
}

.hero-photo.hero-center {
  min-height: 55vh;
  justify-content: center;
  text-align: center;
}

.hero-photo.hero-center h1 {
  text-transform: uppercase;
  font-size: 48px;
  margin-bottom: 24px;
}

.hero-photo.hero-center .sub {
  display: inline-block;
  background: rgba(0, 0, 0, 0.45);
  padding: 16px 28px;
  font-size: 16px;
  color: var(--text);
}

/* Plain (photo-less) page header */
.page-header {
  padding: 56px 0 20px;
}

.eyebrow {
  font-family: 'Cabin', Arial, sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 18px;
  margin-bottom: 22px;
}

.rule {
  border: 0;
  border-top: 1px solid var(--divider);
  margin: 0 0 40px;
}

/* Sections */
.section {
  padding: 20px 0 60px;
}

.section h2 {
  font-size: 22px;
  margin-bottom: 14px;
}

.section p {
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
  font-size: 15px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 32px;
}

/* Technology cards */
.tech-card img {
  border-radius: 4px;
  margin-bottom: 18px;
  width: 100%;
  height: auto;
}

.tech-card h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.tech-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

/* Contact form */
.form-title {
  text-align: center;
  font-size: 22px;
  margin-bottom: 28px;
}

.contact-form {
  max-width: 560px;
  margin: 0 auto;
}

.field {
  display: block;
  width: 100%;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  font-family: 'Lato', sans-serif;
  font-size: 15px;
  padding: 14px 16px;
  margin-bottom: 16px;
  border-radius: 2px;
}

textarea.field {
  min-height: 140px;
  resize: vertical;
}

.field::placeholder {
  color: rgba(247, 247, 247, 0.45);
}

.btn-primary {
  display: block;
  margin: 8px auto 0;
  background: var(--blue);
  color: #fff;
  border: 0;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 15px;
  padding: 14px 40px;
  cursor: pointer;
  border-radius: 2px;
}

.btn-primary:hover {
  background: var(--blue-light);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: default;
}

.form-status {
  text-align: center;
  margin-top: 18px;
  color: var(--muted);
  font-size: 14px;
  min-height: 1.4em;
}

.contact-info {
  text-align: center;
  margin-top: 60px;
}

.contact-info h2 {
  margin-bottom: 14px;
}

.contact-info p {
  max-width: 520px;
  margin: 0 auto;
  color: var(--muted);
}

.contact-info .brand-name {
  display: block;
  margin-top: 28px;
  font-size: 22px;
}

/* Footer */
.footer {
  padding: 40px 0 50px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.footer .rule-short {
  width: 40px;
  border: 0;
  border-top: 1px solid var(--divider);
  margin: 16px auto 0;
}

.footer-credit {
  color: inherit;
  opacity: 0.8;
  margin-left: 6px;
}

.footer-credit:hover {
  opacity: 1;
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: 340px;
  background: #446786;
  color: #fff;
  padding: 24px;
  border-radius: 7px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  z-index: 30;
}

.cookie-banner h2 {
  font-size: 17px;
  margin-bottom: 10px;
}

.cookie-banner p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 16px;
}

.cookie-banner button {
  width: 100%;
  background: #fff;
  color: #303030;
  border: none;
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  padding: 12px;
  cursor: pointer;
}

.cookie-banner button:hover {
  background: #eee;
}

.cookie-banner.hidden {
  display: none;
}

@media (max-width: 760px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .hero-text h1 {
    font-size: 30px;
  }

  .nav .container {
    display: block;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .brand {
    display: block;
    margin-bottom: 8px;
  }

  .nav-links {
    display: block;
    font-size: 13px;
  }

  .nav-links a {
    display: inline-block;
    margin: 4px 14px 4px 0;
  }

  .container {
    padding: 0 24px;
  }

  .hero-photo {
    margin-top: 0;
    padding-top: 32px;
    min-height: 480px;
  }

  .cookie-banner {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: none;
  }
}
