:root {
  --ink: #111;
  --muted: #555;
  --line: #d9d9d9;
  --bg: #fff;
}

* {
  box-sizing: border-box;
  border-radius: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.5;
}

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

h1,
h2,
h3,
legend {
  font-family: "Source Serif 4", Palatino, Georgia, serif;
  font-weight: 500;
  letter-spacing: 0;
}

a {
  color: inherit;
}

.wrap {
  width: min(760px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  background: #fff;
}

.bar,
.footer-inner,
.about-layout {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

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

.brand img {
  height: 56px;
  width: auto;
}

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

nav a {
  text-decoration: none;
  font-size: 16px;
}

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 100vh;
  background: #111 url("/hero-cemetery.jpg") center / cover no-repeat;
  color: #fff;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.18));
}

.hero-inner {
  position: relative;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 72px 0 64px;
}

h1 {
  margin: 0 0 14px;
  max-width: 14ch;
  font-size: clamp(46px, 7vw, 76px);
  line-height: 1.08;
}

.hero .lead {
  max-width: 34em;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.86);
}

.hero .button {
  background: #fff;
  color: #000;
  border-color: #fff;
}

.button,
button {
  display: inline-block;
  border: 1px solid #000;
  background: #000;
  color: #fff;
  padding: 14px 28px;
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

button:disabled {
  background: #bdbdbd;
  border-color: #bdbdbd;
  cursor: not-allowed;
}

button:focus-visible,
a.button:focus-visible,
input:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
}

.about {
  background: #000;
  color: #fff;
  padding: 72px 0;
}

.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.about h2,
.order h2 {
  margin: 0 0 16px;
  font-size: 48px;
  line-height: 1.1;
}

.about-lead {
  margin: 0 0 28px;
}

.about-grid {
  display: grid;
  gap: 22px;
}

.about h3 {
  margin: 0 0 6px;
  font-size: 28px;
}

.about p {
  margin: 0;
}

.about-photo {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
}

.order {
  flex: 1;
  padding: 64px 0 24px;
}

.intro {
  margin: 0 0 36px;
  color: var(--muted);
}

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

legend {
  margin-bottom: 14px;
  padding: 0;
  font-size: 32px;
}

.option {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: 12px;
  align-items: start;
  margin: 0 0 8px;
  border: 1px solid var(--line);
  padding: 14px 16px;
  cursor: pointer;
}

.option:has(input:checked) {
  border-color: #000;
}

.option input {
  appearance: none;
  width: 16px;
  height: 16px;
  margin: 4px 0 0;
  border: 1px solid #000;
  background: #fff;
}

.option input:checked {
  background: #000;
}

.option-title {
  display: block;
  font-weight: 600;
}

.option-detail {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 400;
}

.option-price {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.extra {
  margin: 0 0 8px;
}

.extra-option {
  margin-bottom: 0;
}

.qty {
  display: none;
  align-items: center;
  gap: 12px;
  margin: 10px 0 0;
  padding-left: 16px;
  font-size: 15px;
}

.extra:has(input[name="extra"]:checked) .qty {
  display: flex;
}

.qty input {
  width: 84px;
  height: 42px;
  margin: 0;
  border: 1px solid #000;
  padding: 0 12px;
  font: inherit;
  line-height: 1;
  background: #fff;
}

.fields {
  display: grid;
  gap: 14px;
}

.field span {
  display: block;
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  border: 1px solid #000;
  padding: 12px 14px;
  font: inherit;
  background: #fff;
  color: inherit;
}

.field input::placeholder {
  color: #b5b5b5;
  opacity: 1;
}

.group-title {
  margin: 28px 0 12px;
  font-size: 28px;
}

.paybar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 24px;
  align-items: center;
  margin-top: 12px;
  border-top: 1px solid #000;
  background: #fff;
  padding: 16px 0 20px;
}

.lines {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lines li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 0;
  color: var(--muted);
  font-size: 15px;
}

.total-label {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.total {
  margin: 0;
  font-family: "Source Serif 4", Palatino, Georgia, serif;
  font-size: 42px;
  line-height: 1;
}

.hint,
.error {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 15px;
}

.error {
  font-weight: 600;
}

.site-footer {
  background: #000;
  color: #fff;
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-footer p {
  margin: 0;
  font-size: 15px;
}

.paysera {
  box-sizing: content-box;
  height: 26px;
  width: auto;
  background: #fff;
  padding: 6px 8px;
}

.subpage {
  flex: 1;
  padding: 48px 0 80px;
}

.subpage h1 {
  margin-top: 36px;
  text-align: left;
  font-size: 56px;
}

.subpage p {
  max-width: 36em;
}

@media (max-width: 800px) {
  .about-layout {
    grid-template-columns: 1fr;
  }

  .about-photo {
    min-height: 260px;
  }

  nav {
    gap: 16px;
  }
}

@media (max-width: 640px) {
  .option {
    grid-template-columns: 18px 1fr;
  }

  .option-price {
    grid-column: 2;
  }

  .paybar {
    grid-template-columns: 1fr;
  }

  .paybar .button,
  .paybar button {
    width: 100%;
    text-align: center;
  }

  .bar {
    min-height: 64px;
  }

  .brand img {
    height: 44px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}
