:root {
  --bg: #f3ebdd;
  --ink: #3b0b16;
  --muted: #85505c;
  --line: #dcc5be;
  color-scheme: light;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #f3ebdd;
    --ink: #3b0b16;
    --muted: #85505c;
    --line: #dcc5be;
    color-scheme: light;
  }
}

:root[data-theme="dark"] {
  --bg: #f3ebdd;
  --ink: #3b0b16;
  --muted: #85505c;
  --line: #dcc5be;
  color-scheme: light;
}

html {
  scroll-padding-top: env(safe-area-inset-top, 0px);
  background: var(--bg);
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Jost", "Helvetica Neue", Arial, sans-serif;
  font-weight: 300;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

main {
  max-width: 440px;
  margin: 0 auto;
  padding: 56px 26px 48px;
}

.serif {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
}

header {
  text-align: center;
  margin-bottom: 44px;
}

h1 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 300;
  font-size: 54px;
  line-height: 1;
  letter-spacing: 0.1em;
  text-indent: 0.1em;
}

.sub {
  margin: 10px 0 0;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-size: 13px;
}

.lead {
  margin: 22px 0 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-weight: 300;
  font-size: 18px;
  color: var(--ink);
}

.rule {
  width: 36px;
  height: 1px;
  background: var(--line);
  margin: 26px auto 0;
  border: 0;
}

h2 {
  margin: 0 0 6px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 400;
  font-size: 26px;
}

section {
  margin-bottom: 44px;
}

.item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.item:first-of-type {
  border-top: 1px solid var(--line);
}

.item h3 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 400;
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: 0.07em;
}

.item p {
  margin: 4px 0 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 0.08em;
}

.price {
  font-size: 14px;
}

.qty {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}

.qty button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: border-color 0.2s;
}

.qty button:hover {
  border-color: var(--ink);
}

.qty output {
  min-width: 16px;
  text-align: center;
  font-size: 16px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 3px;
}

.summary {
  margin: 14px 0 4px;
  font-size: 14px;
}

.summary .empty {
  color: var(--muted);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: 18px;
}

.summary .row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 3px 0;
}

.total {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 16px;
}

.field {
  margin-top: 22px;
}

label {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  margin-bottom: 2px;
}

input,
select,
textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 8px 0;
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.2s;
}

input:focus,
select:focus,
textarea:focus {
  border-bottom-color: var(--ink);
}

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

select {
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 10px) 55%, calc(100% - 5px) 55%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}

.send {
  display: block;
  margin-top: 34px;
  text-align: center;
  text-decoration: none;
  background: var(--ink);
  color: var(--bg);
  padding: 15px 20px;
  border-radius: 999px;
  font-weight: 400;
  letter-spacing: 0.04em;
  font-size: 15px;
  transition: opacity 0.2s;
}

.send[aria-disabled="true"] {
  opacity: 0.3;
  cursor: not-allowed;
}

.hint {
  margin: 10px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
}

.hint--error {
  color: #8e1e35;
}

.hint--inline {
  margin-top: 6px;
  text-align: left;
  font-size: 11.5px;
}

.fallback {
  margin-top: 18px;
}

.fallback__hint {
  margin: 0 0 10px;
}

.fallback__link {
  margin-top: 0;
}

.fallback__message {
  margin-top: 12px;
  text-transform: none;
  letter-spacing: 0;
  border: 1px solid var(--line);
  padding: 10px;
  font-size: 14px;
}

footer {
  text-align: center;
  margin-top: 56px;
}

footer .serif {
  font-style: italic;
  font-size: 19px;
  margin: 0;
}

footer p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

footer a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
