:root {
  --dark: #161616;
  --ink: #1b1b1b;
  --light-text: #f7f7f7;
  --line: #737373;
  --link: #010d4f;
  --error: #b3261e;
  --success: #2e7d32;
  --font-heading: "Adamina", Georgia, serif;
  --font-body: "Poppins", Arial, sans-serif;
  --column: 683px;

  /* Type scale, stepped at the same breakpoints as the original site. */
  --fs-body: 16px;
  --fs-small: 14px;
  --fs-hero: min(35px, 7.2vw);
  --fs-title-lg: 28px;
  --fs-title-sm: 19px;
  --fs-info: 22px;

  --nav-inset: 24px;
  --hero-width: 100%;
}

@media (min-width: 768px) {
  :root {
    --fs-hero: 42px;
    --fs-title-lg: 33px;
    --nav-inset: 48px;
    --hero-width: 688px;
  }
}

@media (min-width: 1024px) {
  :root {
    --nav-inset: 144px;
  }
}

@media (min-width: 1280px) {
  :root {
    --fs-hero: 54px;
    --fs-title-lg: 39px;
    --hero-width: 873px;
  }
}

@media (min-width: 1536px) {
  :root {
    --hero-width: 1047px;
    --fs-body: 18px;
    --fs-small: 16px;
    --fs-hero: 56px;
    --fs-title-lg: 42px;
    --fs-title-sm: 21px;
    --fs-info: 24px;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.8;
  color: var(--ink);
  background: var(--dark);
}

body.menu-open {
  overflow: hidden;
}

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

a {
  color: inherit;
}

p {
  margin: 0;
}

h1,
h2,
h3 {
  font-weight: 400;
  margin: 0;
}

.column {
  width: min(100% - 48px, var(--column));
  margin-inline: auto;
}

/* Headings */
.title-lg,
.hero h1,
.title-sm,
.nav-links a,
.menu a,
.button,
.footer a {
  font-family: var(--font-heading);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.title-lg {
  font-size: var(--fs-title-lg);
  line-height: 1.25;
  margin-bottom: 40px;
}

.title-sm {
  font-size: var(--fs-title-sm);
  line-height: 1.4;
  text-align: center;
  margin: 0 24px 100px;
}

/* Navigation */
.nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  padding: 16px var(--nav-inset);
}

/* The logo fits inside a third of the header, at most 409×70. */
.logo {
  justify-self: center;
  display: block;
  width: min(409px, 100%);
  height: 70px;
}

.logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-right {
  justify-content: flex-end;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-small);
  line-height: 24px;
  text-decoration: none;
  color: var(--light-text);
}

.nav-links a[aria-current="page"]::before,
.menu a[aria-current="page"]::before {
  content: "";
  width: 6px;
  border-top: 1px solid currentColor;
}

.nav-links a:hover {
  opacity: 0.75;
}

.menu-toggle {
  display: none;
  width: 24px;
  height: 18px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
}

.menu-toggle span {
  display: block;
  height: 2px;
  background: var(--light-text);
}

.menu {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: var(--dark);
  padding: 72px 24px 24px;
}

.menu[hidden] {
  display: none;
}

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

.menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 0;
  border-bottom: 1px solid #2a2a2a;
  color: var(--light-text);
  text-decoration: none;
  font-size: var(--fs-body);
}

.menu-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  color: var(--light-text);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 767px) {
  .nav {
    grid-template-columns: 24px 1fr 24px;
    padding-block: 24px;
  }

  .nav-links {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .logo {
    width: min(224px, 100%);
    height: auto;
  }

  .logo img {
    height: auto;
  }
}

/* Hero */
.hero {
  min-height: 600px;
  display: flex;
  flex-direction: column;
  color: #fff;
  background:
    linear-gradient(rgba(22, 22, 22, 0.25), rgba(22, 22, 22, 0.25)),
    url("/images/hero.jpg") center / cover no-repeat var(--dark);
}

@media (min-width: 768px) {
  .hero {
    min-height: 85vh;
  }
}

.hero-content {
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 48px 24px 72px;
  text-align: center;
}

.hero h1 {
  max-width: var(--hero-width);
  font-size: var(--fs-hero);
  line-height: 1.2;
}

.page-header {
  background: var(--dark);
}

/* Sections */
.section {
  padding-block: 100px;
}

.section-dark {
  background: var(--dark);
  color: var(--light-text);
  text-align: center;
  padding-bottom: 130px;
}

#contact .title-sm {
  margin-bottom: 123px;
}

.section-light {
  background: #fff;
  color: var(--ink);
}

/* Contact form */
.contact-form {
  display: grid;
  gap: 24px;
}

.field {
  position: relative;
}

.field input,
.field textarea {
  display: block;
  width: 100%;
  font: inherit;
  line-height: 1.5;
  color: #151515;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 23px 8px 8px;
}

.field textarea {
  line-height: 1.75;
  padding: 8px;
  resize: vertical;
}

.field textarea::placeholder {
  color: var(--ink);
  opacity: 1;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-bottom: 2px solid var(--ink);
}

.field input[aria-invalid="true"] {
  border-bottom-color: var(--error);
}

.field label {
  position: absolute;
  left: 8px;
  top: 17px;
  line-height: 1.5;
  pointer-events: none;
  transform-origin: left top;
  transition: transform 0.15s ease;
}

.field input:focus + label,
.field input:not(:placeholder-shown) + label {
  transform: translateY(-13px) scale(0.75);
}

.field-check {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.field-check input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  flex-shrink: 0;
  accent-color: var(--ink);
}

.field-check label {
  line-height: 1.55;
}

.field-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.button {
  justify-self: center;
  min-height: 56px;
  padding: 8px 40px;
  font-size: var(--fs-small);
  color: #fff;
  background: #000;
  border: 0;
  border-radius: 48px;
  cursor: pointer;
}

.button:hover {
  background: #333;
}

.button:disabled {
  opacity: 0.6;
  cursor: progress;
}

.form-status {
  text-align: center;
  min-height: 1.8em;
  margin-top: -8px;
}

.form-status.is-error {
  color: var(--error);
}

.form-status.is-success {
  color: var(--success);
}

.fine-print,
.contact-info {
  text-align: center;
}

.fine-print {
  margin-top: 40px;
}

.fine-print a,
.contact-info a,
.legal a {
  color: var(--link);
}

.contact-info {
  font-style: normal;
  margin-top: 72px;
  line-height: 1.5;
}

.contact-info h3 {
  font-size: var(--fs-info);
  letter-spacing: 2px;
  margin-bottom: 24px;
}

.contact-info a {
  text-decoration: none;
}

.contact-info a:hover {
  text-decoration: underline;
}

/* Legal page */
.legal {
  line-height: 1.5;
}

.legal h3 {
  font-size: var(--fs-body);
  font-weight: 600;
  text-decoration: underline;
  margin: 24px 0;
}

.legal h3:first-child {
  margin-top: 0;
}

.legal p + p,
.legal ul + p {
  margin-top: 24px;
}

.legal ul {
  margin: 24px 0 0;
}

/* Footer */
.footer {
  background: var(--dark);
  color: var(--light-text);
  text-align: center;
  font-size: var(--fs-small);
  line-height: 1.5;
  padding: 56px 24px;
}

.footer p + p {
  margin-top: 24px;
}

.footer a {
  text-decoration: none;
}

.footer a:hover {
  opacity: 0.75;
}
