:root {
  color-scheme: light;
  --paper: #f7f6fa;
  --ink: #282536;
  --muted: #716d80;
  --line: #e2dfeb;
  --accent: #7056b3;
  --content-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.65;
}

body > header {
  border-bottom: 1px solid var(--line);
}

.navbar,
main,
footer {
  width: min(var(--content-width), calc(100% - 48px));
  margin-inline: auto;
}

.navbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-size: 1rem;
  font-weight: 750;
  letter-spacing: -0.035em;
}

.brand span {
  color: var(--accent);
}

nav {
  display: flex;
  gap: 28px;
}

nav a {
  padding: 8px 0;
  border-bottom: 1px solid transparent;
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
}

nav a:hover,
nav a:focus,
nav a.active {
  border-bottom-color: var(--accent);
  color: var(--ink);
}

main {
  padding: 80px 0 96px;
}

.hero {
  max-width: 760px;
  padding: 0 0 44px;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
.hero h2 {
  max-width: 720px;
  margin: 0 0 18px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(2.8rem, 7vw, 5.4rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.hero p:not(.eyebrow) {
  max-width: 570px;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

h2 {
  margin: 0 0 24px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.2;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.card {
  min-width: 0;
}

.card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #e6e5df;
}

.card-content {
  padding: 16px 0 0;
}

.card h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.form-panel {
  max-width: 760px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.form-panel h2 {
  margin-bottom: 24px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 24px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field.full,
.choices,
.actions {
  grid-column: 1 / -1;
}

label,
legend {
  font-size: 0.87rem;
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #c9cbc3;
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.94rem;
}

input::placeholder,
textarea::placeholder {
  color: #92958c;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--accent);
}

textarea {
  min-height: 112px;
  resize: vertical;
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
}

.choices legend {
  margin-bottom: 12px;
}

.choices label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 400;
}

.choices input {
  width: 16px;
  min-height: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

button {
  min-height: 46px;
  padding: 11px 20px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--ink);
  color: white;
  cursor: pointer;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
}

button:hover,
button:focus {
  border-color: var(--accent);
  background: var(--accent);
}

footer {
  padding: 22px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.84rem;
}

footer p {
  margin: 0;
}

@media (max-width: 760px) {
  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 18px;
  }

  main {
    padding: 64px 0 76px;
  }
}

@media (max-width: 540px) {
  .navbar,
  main,
  footer {
    width: calc(100% - 36px);
  }

  .navbar {
    min-height: 66px;
    gap: 12px;
  }

  nav {
    gap: 16px;
  }

  nav a {
    font-size: 0.84rem;
  }

  main {
    padding: 48px 0 60px;
  }

  .hero {
    padding-bottom: 34px;
  }

  .gallery,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .field.full,
  .choices,
  .actions {
    grid-column: auto;
  }

  .form-panel {
    padding-top: 22px;
  }

  .choices {
    gap: 12px 18px;
  }
}
