/* Beach House gift voucher checkout. Light, in the brand palette; designed to sit inside the website. */
@font-face { font-family: "Self Modern"; src: url(/shared/self-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Self Modern"; src: url(/shared/self-bold.woff2) format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Mona Sans BH"; src: url(/shared/mona-medium.woff2) format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --ground: #EDE5D3;   /* Sand */
  --field: #F7F2E8;
  --ink: #3D2A24;      /* Cocoa */
  --muted: #6B7254;    /* Sage */
  --line: rgba(61, 42, 36, .2);
  --olive: #3C472B;
  --sand: #EDE5D3;
  --error: #8E3B2C;
  --serif: "Self Modern", Georgia, serif;
  --sans: "Mona Sans BH", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color-scheme: light;
}
html.bg-white { --ground: #FFFFFF; --field: #FBF8F2; }
html.bg-transparent { --ground: transparent; }
/* Dark version for a Cocoa section of the website: Sand text, Butter buttons (the brand's calls to action on dark grounds). */
html.bg-cocoa { --ground: #3A2B25; --field: #47362F; --ink: #EDE5D3; --muted: #C6C0B5; --line: rgba(237,229,211,.24); --olive: #E8E3AF; --error: #EBAE9C; color-scheme: dark; }
html.bg-cocoa .btn { color: #3A2B25; }
html.bg-cocoa .btn:hover { background: #F1EDC6; }
html.bg-cocoa .steps li[data-state="now"] .dot { color: #3A2B25; }
html.bg-cocoa input::placeholder, html.bg-cocoa textarea::placeholder { color: #A99D90; }
html.bg-cocoa .card { box-shadow: 0 10px 30px -12px rgba(0,0,0,.6); }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--ground); color: var(--ink); font-family: var(--serif); font-style: italic; font-size: 17px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2 { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; line-height: 1.15; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(30px, 4vw, 38px); }
h2 { font-size: 26px; }
p { margin: 0; }
.num { font-variant-numeric: lining-nums; }
.label { font-family: var(--sans); font-style: normal; font-weight: 500; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 15px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.shop { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 48px; align-items: start; max-width: 980px; margin: 0 auto;
  padding: 32px max(16px, env(safe-area-inset-right, 0px)) 48px max(16px, env(safe-area-inset-left, 0px)); }

/* left column */
.side { display: grid; gap: 16px; }
.card { margin: 0; position: relative; aspect-ratio: 787.5 / 375; container-type: inline-size; box-shadow: 0 1px 2px rgba(61,42,36,.12), 0 8px 24px -12px rgba(61,42,36,.35); }
.card img { display: block; width: 100%; height: 100%; }
.card-front, .card-back { position: absolute; inset: 0; transition: opacity .35s ease; }
.card-back { opacity: 0; }
.card.is-back .card-back { opacity: 1; }
.card.is-back .card-front { opacity: 0; }
.card .f { position: absolute; font-family: var(--serif); font-style: italic; font-size: 2.05cqw; line-height: 1; color: #3C2C1F; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f-to     { left: 13.46%; bottom: 53.9%; max-width: 33%; }
.f-from   { left: 13.46%; bottom: 43.07%; max-width: 33%; }
.f-amount { left: 63.5%;  bottom: 53.9%; max-width: 28%; }
.f-valid  { left: 63.5%;  bottom: 43.07%; max-width: 28%; }
.card .f-message { left: 14.98%; bottom: 31.47%; width: 31.5%; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.2; font-size: 1.9cqw; }
.card .f-message.long { font-size: 1.3cqw; }
.flip { justify-self: center; background: none; border: 0; padding: 2px 0; color: var(--muted); font: inherit; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; background: var(--field); border: 1px solid var(--line); font-family: var(--sans); font-style: normal; font-size: 15px; }
.summary strong { font-weight: 500; }
.intro { color: var(--muted); font-size: 16px; }
details.more { border-top: 1px solid var(--line); padding-top: 12px; }
details.more summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; font-family: var(--sans); font-style: normal; font-size: 14px; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::after { content: "+"; }
details.more[open] summary::after { content: "\2212"; }
details.more > div { display: grid; gap: 8px; padding-top: 10px; font-size: 15px; color: var(--muted); }
details.more ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }

/* steps */
.main { display: grid; gap: 26px; min-width: 0; max-width: 520px; width: 100%; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); position: relative; }
.steps::before { content: ""; position: absolute; top: 15px; left: 16.7%; right: 16.7%; height: 1px; background: var(--line); }
.steps li { position: relative; display: grid; justify-items: center; gap: 6px; color: var(--muted); }
.steps .dot { width: 31px; height: 31px; border-radius: 50%; display: grid; place-items: center; background: var(--ground); border: 1px solid var(--line); font-family: var(--sans); font-style: normal; font-size: 13px; }
html.bg-transparent .steps .dot { background: var(--sand); }
.steps li[data-state="now"] { color: var(--ink); }
.steps li[data-state="now"] .dot { background: var(--olive); border-color: var(--olive); color: var(--sand); }
.steps li[data-state="done"] .dot { border-color: var(--olive); color: var(--olive); }

.step { display: grid; gap: 20px; }
.field { display: grid; gap: 8px; min-width: 0; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.group { display: grid; gap: 12px; }
input, select, textarea { width: 100%; min-width: 0; font-family: var(--sans); font-style: normal; font-size: 16px; color: var(--ink); background: var(--field); border: 1px solid var(--line); border-radius: 2px; padding: 13px 14px; }
textarea { resize: vertical; font-family: var(--serif); font-style: italic; font-size: 17px; }
input::placeholder, textarea::placeholder { color: #8b7f72; opacity: 1; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--olive); outline-offset: 1px; }
input[aria-invalid="true"] { border-color: var(--error); }
.select { position: relative; display: block; }
.select select { appearance: none; padding-right: 40px; cursor: pointer; }
.select::after { content: ""; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.money { display: flex; align-items: center; background: var(--field); border: 1px solid var(--line); border-radius: 2px; padding-left: 14px; font-family: var(--sans); font-style: normal; }
.money input { border: 0; background: transparent; }
.qty { display: inline-grid; grid-template-columns: 48px 64px 48px; border: 1px solid var(--line); background: var(--field); justify-self: start; }
.qty button { height: 48px; border: 0; background: none; font-size: 20px; color: var(--ink); cursor: pointer; }
.qty button:disabled { color: var(--line); cursor: default; }
.qty output { display: grid; place-items: center; border-inline: 1px solid var(--line); font-family: var(--sans); font-style: normal; font-size: 16px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border: 1px solid var(--line); background: var(--field); }
.seg button { padding: 11px 8px; border: 1px solid transparent; background: none; font-family: var(--sans); font-style: normal; font-size: 15px; color: var(--muted); cursor: pointer; }
.seg button[aria-checked="true"] { background: var(--ground); border-color: var(--ink); color: var(--ink); }
html.bg-transparent .seg button[aria-checked="true"] { background: var(--sand); }

.btn { display: block; width: 100%; padding: 15px 20px; border: 1px solid var(--olive); border-radius: 2px; background: var(--olive); color: var(--sand); font-family: var(--sans); font-style: normal; font-weight: 500; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; text-align: center; text-decoration: none; cursor: pointer; }
.btn:hover { background: #2f3922; }
.btn:disabled { opacity: .6; cursor: progress; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.nav { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; }
.error { color: var(--error); font-family: var(--sans); font-style: normal; font-size: 14px; }
.notice { padding: 12px 14px; border: 1px solid var(--line); background: var(--field); font-family: var(--sans); font-style: normal; font-size: 14px; }

.accept { display: grid; gap: 10px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-family: var(--sans); font-style: normal; font-size: 15px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--olive); padding: 0; }
.check .link { font-style: normal; }
.check input[aria-invalid="true"] { outline: 2px solid var(--error); outline-offset: 2px; }
.terms-inline { max-height: 260px; overflow-y: auto; padding: 14px 16px; background: var(--field); border: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.terms-inline ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.total { margin: 0; display: grid; gap: 8px; padding-block: 14px; border-block: 1px solid var(--line); font-family: var(--sans); font-style: normal; font-size: 15px; }
.total div { display: flex; justify-content: space-between; gap: 12px; }
.total dd { margin: 0; }
.total .grand { font-size: 17px; }
.total .grand dd { font-family: var(--serif); font-style: italic; font-size: 24px; line-height: 1; }

/* thank-you and message pages */
.page-message { display: grid; min-height: 100vh; place-items: center; }
.message { max-width: 520px; padding: 40px max(16px, env(safe-area-inset-right, 0px)) 40px max(16px, env(safe-area-inset-left, 0px)); display: grid; gap: 18px; justify-items: center; text-align: center; }
.message-card { width: 100%; height: auto; max-width: 420px; box-shadow: 0 8px 24px -12px rgba(61,42,36,.35); }
.message-actions { width: 100%; max-width: 320px; display: grid; gap: 10px; }

@media (max-width: 760px) {
  .shop { grid-template-columns: 1fr; gap: 28px; padding-top: 20px; }
  .main { max-width: none; }
  .shop { gap: 16px; }
  .side { display: contents; }
  .card { max-width: 420px; width: 100%; justify-self: center; order: 1; }
  .flip { order: 2; }
  .summary { order: 3; }
  .main { order: 4; margin-top: 12px; }
  details.more { order: 5; }
  details.more:first-of-type { margin-top: 20px; }
  .intro { display: none; }
}
@media (max-width: 420px) { .row { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .card-front, .card-back { transition: none; } }
