:root {
  --payhere: #2948d8;
  --payhere-dark: #1833b7;
  --payhere-soft: #edf1ff;
  --wine: #6f1d1b;
  --cream: #f7f8fc;
  --ink: #18213f;
  --muted: #66708c;
  --sage: #3f5a3d;
  --line: rgba(41, 72, 216, .16);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100svh;
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
  background: #16245f url("./italian-feast-background.png") center / cover fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background: rgba(18, 31, 88, .14);
  pointer-events: none;
}

button, input, select { font: inherit; }

.page-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(290px, .85fr) minmax(540px, 1.15fr);
  width: min(1180px, calc(100% - 48px));
  min-height: min(760px, calc(100svh - 48px));
  margin: 24px auto;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 28px;
  box-shadow: 0 28px 80px rgba(20, 8, 3, .42);
}

.story-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(32px, 5vw, 64px);
  color: #fffaf0;
  background: linear-gradient(155deg, rgba(48, 76, 221, .72), rgba(29, 54, 177, .62));
  backdrop-filter: blur(4px);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255,255,255,.6);
  border-radius: 50%;
  font: italic 600 20px "Playfair Display", serif;
}

.eyebrow, .step-label {
  margin: 0 0 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 700;
}

.story-copy h1 {
  max-width: 430px;
  margin: 0;
  font: 600 clamp(48px, 6vw, 80px)/.88 "Playfair Display", serif;
  letter-spacing: -.045em;
}

.story-copy h1 span { display: block; font-style: italic; }
.book-subtitle { margin: 22px 0 0; font-size: 15px; letter-spacing: .12em; text-transform: uppercase; }
blockquote { max-width: 390px; margin: 38px 0 0; padding-left: 18px; border-left: 2px solid rgba(255,255,255,.55); font: italic 18px/1.55 "Playfair Display", serif; }
.trust-row { display: flex; gap: 22px; font-size: 13px; color: rgba(255,255,255,.88); }
.story-copy, .brand-mark, .trust-row { text-shadow: 0 2px 12px rgba(10, 19, 62, .56); }
.trust-row i { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 6px; border-radius: 50%; color: var(--payhere-dark); background: #fff; font-style: normal; font-weight: 700; }

.checkout-card {
  padding: clamp(28px, 4vw, 54px);
  background: rgba(247, 248, 252, .95);
  backdrop-filter: blur(18px) saturate(1.15);
}

.checkout-header, .title-row { display: flex; align-items: center; }
.checkout-header { justify-content: space-between; margin-bottom: 24px; }
.back-link { display: inline-flex; align-items: center; gap: 7px; color: #596481; font-size: 11px; font-weight: 700; text-decoration: none; }
.back-link:hover { color: var(--payhere); }
.secure-label { display: flex; flex: 0 0 auto; gap: 7px; align-items: center; color: var(--payhere-dark); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.secure-label svg, .privacy-note svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.title-row { justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.order-summary { display: flex; align-items: center; gap: 16px; }
.payhere-logo { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding-right: 16px; border-right: 1px solid rgba(41,72,216,.16); color: #687295; text-decoration: none; }
.payhere-logo span { font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.payhere-logo strong { display: block; font: italic 800 25px/1 "DM Sans", sans-serif; letter-spacing: -.07em; }
.payhere-logo b { color: #2948d8; }
.payhere-logo i { color: #f2a000; font-style: inherit; }
.step-label { color: var(--payhere); }
h2 { margin: 0; font: 600 clamp(30px, 4vw, 42px)/1.05 "Playfair Display", serif; letter-spacing: -.025em; }
.price { flex: 0 0 auto; text-align: right; }
.price small { display: block; margin-bottom: 3px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.price strong { color: var(--payhere); font: 700 21px "Playfair Display", serif; }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; }
.field-wide { grid-column: 1 / -1; }
label { display: block; margin-bottom: 7px; color: #303a5c; font-size: 12px; font-weight: 700; }
input, select {
  width: 100%;
  height: 50px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  color: var(--ink);
  background: rgba(255,255,255,.88);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
input::placeholder { color: #a19890; }
input:focus::placeholder { color: transparent; }
input:focus, select:focus { border-color: var(--payhere); box-shadow: 0 0 0 3px rgba(41,72,216,.1); background: rgba(255,255,255,.9); }

.order-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 11px;
  color: white;
  background: var(--payhere);
  box-shadow: 0 12px 28px rgba(41,72,216,.24);
  font-weight: 700;
  cursor: pointer;
  transition: transform .2s, background .2s;
  margin-top: 26px;
}
.order-button:hover { transform: translateY(-1px); background: var(--payhere-dark); }
.order-button:disabled { opacity: .65; cursor: wait; transform: none; }
.button-label { display: inline-flex; align-items: baseline; gap: 6px; }
.payhere-button-mark { font: italic 800 20px/1 "DM Sans", sans-serif; letter-spacing: -.07em; }
.payhere-button-mark b { color: #fff; }
.payhere-button-mark i { color: #ffb21a; font-style: inherit; }
.privacy-note { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 13px 0 0; color: var(--muted); font-size: 11px; }
.payment-explainer { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 14px 0 0; color: #5c668b; font-size: 11px; text-align: center; }
.payment-explainer span { display: inline-grid; place-items: center; flex: 0 0 auto; width: 19px; height: 19px; border-radius: 50%; color: #fff; background: var(--payhere); font-size: 10px; font-weight: 700; }
.payment-explainer i { color: #98a2c7; font-style: normal; }
.form-error { margin: 0 0 14px; padding: 10px 12px; border-radius: 8px; color: #7e1e1e; background: #f9e3df; font-size: 12px; }
.success-link { max-width: 280px; margin-top: 28px; text-decoration: none; }
.status-card { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.status-card > p:not(.step-label):not(.order-reference) { max-width: 520px; color: var(--muted); line-height: 1.65; }
.status-icon { position: relative; width: 58px; height: 58px; margin-bottom: 26px; border: 3px solid rgba(41,72,216,.18); border-radius: 50%; }
.status-icon.is-checking { border-top-color: var(--payhere); animation: status-spin .9s linear infinite; }
.status-icon.is-success { border-color: #2f7d50; background: #e7f6ed; }
.status-icon.is-success::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; color: #2f7d50; font-size: 29px; font-weight: 700; }
.status-icon.is-error { border-color: #a64646; background: #fbecec; }
.status-icon.is-error::after { content: "×"; position: absolute; inset: 0; display: grid; place-items: center; color: #a64646; font-size: 34px; line-height: 1; }
.order-reference { margin-top: 18px; color: #77809a; font-size: 11px; overflow-wrap: anywhere; }
@keyframes status-spin { to { transform: rotate(360deg); } }

@media (max-width: 820px) {
  body { background-attachment: scroll; }
  .page-shell { grid-template-columns: 1fr; width: min(100% - 24px, 620px); margin: 12px auto; border-radius: 22px; }
  .story-panel { min-height: 310px; padding: 30px; }
  .story-copy { margin: 36px 0; }
  .story-copy h1 { font-size: clamp(46px, 13vw, 68px); }
  blockquote { display: none; }
  .checkout-card { padding: 30px; }
  .checkout-header { margin-bottom: 30px; }
}

@media (max-width: 520px) {
  .page-shell { width: 100%; margin: 0; border: 0; border-radius: 0; }
  .story-panel { min-height: 260px; padding: 24px; }
  .brand-mark { width: 44px; height: 44px; }
  .story-copy { margin: 28px 0; }
  .story-copy h1 { font-size: 48px; }
  .book-subtitle { font-size: 11px; }
  .trust-row { gap: 10px; justify-content: space-between; font-size: 11px; }
  .checkout-card { padding: 28px 20px 34px; }
  .checkout-header { margin-bottom: 26px; }
  .secure-label { font-size: 9px; }
  .title-row { align-items: flex-start; }
  .order-summary { align-items: flex-end; flex-direction: column; gap: 8px; }
  .payhere-logo { align-items: flex-end; padding: 0 0 8px; border-top: 0; border-right: 0; border-bottom: 1px solid rgba(41,72,216,.16); }
  .payhere-logo strong { font-size: 23px; }
  .title-row { align-items: flex-end; margin-bottom: 26px; }
  h2 { font-size: 30px; }
  .field-grid { grid-template-columns: 1fr; gap: 15px; }
  .field-wide { grid-column: auto; }
  input, select { height: 52px; }
  .payment-explainer { flex-wrap: wrap; padding: 0 8px; }
}

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