@font-face {
  font-family: "right grotesk";
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/RightGrotesk-WideBol.woff") format("woff");
}

@font-face {
  font-family: "right grotesk";
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/RightGrotesk-WideMed.woff") format("woff");
}

@font-face {
  font-family: suisse;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/SuisseIntl-Regular.woff") format("woff");
}

:root {
  --red: #fa222d;
  --green: #3f7b4e;
  --pine: #1f4632;
  --gray: #e4e4e4;
  --ink: #1d1d21;
  --gold: #fecf3b;
  --paper: #fbf8f1;
  --field-bg: #fff;
  --border: #c5bba8;
  --quiet: #5b554d;
  --error: #aa1928;
  --display: "right grotesk", Arial, sans-serif;
  --body: suisse, Arial, sans-serif;
}

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

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--red);
  background-image:
    radial-gradient(circle, #ffffff91 0 2px, transparent 2.6px),
    radial-gradient(circle, #ffffff54 0 1.4px, transparent 2px),
    radial-gradient(circle, #ffffff68 0 3px, transparent 3.6px);
  background-position:
    11px 23px,
    47px 61px,
    120px 90px;
  background-size:
    137px 151px,
    83px 97px,
    263px 229px;
  color: var(--ink);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
p {
  margin: 0;
}

a {
  text-underline-offset: 0.2em;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.wrap {
  width: min(100% - 72px, 1152px);
  margin-inline: auto;
}

.page-header {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand svg {
  display: block;
  width: auto;
  height: 36px;
}

.back-link,
.self-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 42px;
  color: #fff;
}

.back-link {
  padding: 0 18px;
  border: 1.5px solid var(--gray);
  border-radius: 999px;
  font: 500 14px var(--display);
  text-decoration: none;
}

.back-link:hover {
  background: var(--gray);
  color: var(--error);
}

.gift-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.25fr);
  align-items: start;
  gap: clamp(32px, 5vw, 78px);
  padding-block: 36px 82px;
}

.intro {
  padding-top: 40px;
  color: #fff;
}

.intro h1 {
  max-width: 7em;
  color: var(--gray);
  font: 700 clamp(46px, 5.2vw, 72px) / 0.9 var(--display);
  letter-spacing: -0.025em;
}

.intro p {
  max-width: 330px;
  margin-top: 23px;
  font-size: 19px;
  line-height: 1.35;
}

.self-link {
  margin-top: 8px;
}

.artwork {
  position: relative;
  width: min(80%, 300px);
  height: 300px;
  margin: 46px 0 0 28px;
  border-radius: 150px 150px 28px 28px;
  background-color: var(--green);
  background-image:
    radial-gradient(circle, #ffffff7d 0 2px, transparent 3px),
    radial-gradient(circle, #ffffff46 0 3px, transparent 4px);
  background-size:
    73px 87px,
    127px 149px;
  background-position:
    17px 30px,
    42px 57px;
}

.card {
  position: absolute;
  top: 91px;
  left: -22px;
  width: calc(100% + 24px);
  min-height: 145px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 11px;
  padding: 22px 75px 22px 24px;
  transform: rotate(-8deg);
  border-radius: 21px;
  background:
    linear-gradient(
      to left,
      transparent 42px,
      var(--red) 42px 63px,
      transparent 63px
    ),
    var(--gray);
  color: var(--pine);
  box-shadow: 0 24px 44px #1d1d2145;
}

.card strong {
  font: 700 clamp(21px, 2.3vw, 31px) / 0.95 var(--display);
}

.card span {
  font-size: 14px;
}

.card-star {
  position: absolute;
  top: 63px;
  right: -14px;
  width: 66px;
  aspect-ratio: 1;
  clip-path: polygon(
    50% 0,
    61% 36%,
    100% 50%,
    61% 61%,
    50% 100%,
    38% 61%,
    0 50%,
    38% 36%
  );
  background: var(--gold);
}

.paper {
  min-width: 0;
  padding: clamp(22px, 3.1vw, 42px);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: 0 22px 70px #78000b3b;
}

.notice {
  margin-bottom: 22px;
  padding: 11px 15px;
  border-radius: 12px;
  background: #fae7ad;
  color: #332b18;
  font-size: 15px;
  line-height: 1.35;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.form-fields {
  display: grid;
  gap: 23px;
}

.choices legend {
  margin-bottom: 10px;
  padding: 0;
  color: var(--pine);
  font: 700 16px/1.3 var(--display);
}

.terms,
.delivery-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.delivery-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.choice {
  position: relative;
  cursor: pointer;
}

.choice input {
  position: absolute;
  inset: auto;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
}

.choice > span {
  display: grid;
  place-content: center;
  gap: 3px;
  min-height: 60px;
  height: 100%;
  padding: 8px 4px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--field-bg);
  color: var(--pine);
  text-align: center;
  font-size: 15px;
  line-height: 1.15;
  transition:
    background-color 160ms,
    color 160ms,
    border-color 160ms;
}

.choice strong {
  font: 700 clamp(13px, 1.4vw, 17px) / 1.2 var(--display);
  white-space: nowrap;
}

.choice input:checked + span {
  border-color: var(--pine);
  background: var(--pine);
  color: #fff;
}

.choice input:focus-visible + span {
  outline: 2px solid var(--pine);
  outline-offset: 3px;
}

.delivery-options .choice > span {
  min-height: 56px;
  padding: 8px 6px;
  font-size: 15px;
}

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

.floating {
  position: relative;
}

.floating input {
  width: 100%;
  min-width: 0;
  height: 58px;
  margin: 0;
  padding: 22px 14px 6px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--field-bg);
  color: var(--ink);
  font: 400 16px/1.25 var(--body);
}

.floating label {
  position: absolute;
  top: 19px;
  left: 15px;
  right: 12px;
  color: var(--quiet);
  font-size: 16px;
  line-height: 1.2;
  cursor: text;
  transition:
    top 160ms,
    font-size 160ms;
}

.floating:focus-within label,
.floating input:not(:placeholder-shown) + label,
.floating input:autofill + label,
.date-field label {
  top: 7px;
  font-size: 12px;
}

.floating input:focus {
  outline: 2px solid var(--pine);
  outline-offset: 1px;
}

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

.hint,
.error {
  margin: 6px 0 0 4px;
  font-size: 14px;
  line-height: 1.3;
}

.hint {
  color: var(--quiet);
}

.error {
  color: var(--error);
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 34px;
  color: var(--quiet);
  font-size: 15px;
  line-height: 1.35;
  cursor: pointer;
}

.consent input {
  flex: none;
  width: 19px;
  height: 19px;
  margin: 1px 0 0;
  accent-color: var(--pine);
}

.consent input:focus-visible {
  outline: 2px solid var(--pine);
  outline-offset: 3px;
}

.consent a {
  color: var(--pine);
}

.button {
  display: inline-grid;
  place-items: center;
  min-height: 56px;
  width: 100%;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 700 16px/1.2 var(--display);
  cursor: pointer;
}

.button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.primary {
  background: var(--pine);
  color: #fff;
}

.primary:hover:enabled {
  background: #285d43;
}

.primary:focus-visible {
  outline-color: var(--pine);
}

.secondary {
  border-color: var(--pine);
  background: transparent;
  color: var(--pine);
}

.secondary:hover:enabled {
  background: #eee8d8;
}

#review h2 {
  color: var(--pine);
  font: 700 clamp(23px, 3vw, 36px) / 1.05 var(--display);
  letter-spacing: -0.02em;
}

.review-data {
  display: grid;
  gap: 13px;
  margin: 22px 0 26px;
}

.review-data div {
  padding-bottom: 13px;
  border-bottom: 1px solid var(--border);
}

.review-data dt {
  color: var(--quiet);
  font-size: 14px;
}

.review-data dd {
  margin: 4px 0 0;
  font-size: 17px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.payment-error {
  margin-bottom: 16px;
}

.review-actions {
  display: grid;
  gap: 9px;
}

@media (max-width: 800px) {
  .wrap {
    width: min(100% - 36px, 580px);
  }

  .page-header {
    min-height: 64px;
  }

  .brand svg {
    height: 28px;
  }

  .gift-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    padding-block: 15px 40px;
  }

  .intro {
    padding-top: 0;
  }

  .intro h1 {
    max-width: none;
    font-size: clamp(34px, 8.5vw, 54px);
  }

  .intro p {
    margin-top: 12px;
    font-size: 16px;
  }

  .self-link {
    margin-top: 0;
  }

  .artwork {
    display: none;
  }
}

@media (max-width: 380px) {
  .paper {
    padding: 19px 14px;
    border-radius: 22px;
  }

  .terms,
  .delivery-options {
    gap: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .choice > span,
  .floating label {
    transition: none;
  }
}
