@font-face {
  font-family: "Hanken Grotesk";
  src: url("assets/fonts/hankengrotesk-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "DM Serif Display";
  src: url("assets/fonts/dmserifdisplay-400-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

:root {
  --black: #090909;
  --surface: #121212;
  --surface-2: #191919;
  --red: #d21f2b;
  --red-dark: #ac101c;
  --red-light: #f04450;
  --white: #fff;
  --paper: #fbfaf7;
  --muted: #8e8985;
  --line: rgba(255, 255, 255, 0.12);
  --line-light: rgba(9, 9, 9, 0.12);
  --font: "Hanken Grotesk", Arial, sans-serif;
  --serif: "DM Serif Display", Georgia, serif;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--white);
  background:
    radial-gradient(circle at 85% 8%, rgba(210, 31, 43, 0.16), transparent 27rem),
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px),
    var(--black);
  background-size: auto, 64px 64px, 64px 64px, auto;
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  background: linear-gradient(120deg, transparent 0 64%, rgba(255,255,255,.025) 64% 64.1%, transparent 64.1%);
}

button, input, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #ff747d; outline-offset: 3px; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 9px 13px;
  color: var(--white);
  background: var(--red);
  border-radius: 8px;
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

.checkout-header {
  position: relative;
  z-index: 3;
  width: min(calc(100% - 48px), 1180px);
  height: 86px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.checkout-brand {
  display: inline-flex;
  gap: 11px;
  align-items: center;
  color: inherit;
  font-size: 14px;
  line-height: 1.05;
  text-decoration: none;
}
.checkout-brand strong { display: block; font-size: 17px; letter-spacing: -.04em; }
.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--red);
  border-radius: 50%;
}
.brand-mark svg { width: 21px; fill: currentColor; }

.secure-label {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #c8c3bf;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.secure-label svg { width: 18px; fill: none; stroke: var(--red-light); stroke-width: 1.8; }

.checkout-shell {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 48px), 1180px);
  margin: 0 auto;
  padding: 28px 0 80px;
}
.back-link { color: #aaa5a0; font-size: 13px; font-weight: 700; text-underline-offset: 4px; }

.checkout-intro { max-width: 760px; margin: 54px 0 45px; }
.eyebrow, .order-eyebrow, .panel-heading p {
  margin: 0;
  color: var(--red-light);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.checkout-intro h1 {
  margin: 13px 0 16px;
  font-size: clamp(2.75rem, 6.2vw, 5.4rem);
  font-weight: 830;
  letter-spacing: -.075em;
  line-height: .94;
}
.checkout-intro h1 span { color: var(--red-light); font-family: var(--serif); font-weight: 400; }
.checkout-intro > p:last-child { max-width: 630px; margin: 0; color: #aaa5a0; font-size: 17px; line-height: 1.65; }

.checkout-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, .85fr); gap: 22px; align-items: start; }
.payment-panel, .order-panel {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: 0 28px 80px rgba(0,0,0,.24);
}
.payment-panel { padding: 38px; background: rgba(18,18,18,.94); }
.order-panel { position: sticky; top: 22px; padding: 32px; overflow: hidden; color: var(--black); background: var(--paper); }
.order-accent { position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--red), var(--red-light), transparent 82%); }

.panel-heading { display: flex; gap: 16px; align-items: flex-start; }
.panel-heading > span {
  width: 36px;
  height: 36px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  color: var(--white);
  background: var(--red);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 850;
}
.panel-heading h2 { margin: 2px 0 0; font-size: 24px; letter-spacing: -.04em; line-height: 1.15; }
.panel-heading-method { margin-bottom: 22px; }
.section-divider { height: 1px; margin: 34px 0; background: var(--line); }

.field-grid { margin-top: 26px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.field { min-width: 0; display: grid; gap: 7px; color: #d7d2ce; font-size: 12px; font-weight: 700; }
.field span { display: flex; justify-content: space-between; }
.field em { color: #77726e; font-size: 10px; font-style: normal; font-weight: 600; }
.field-wide { grid-column: 1 / -1; }
.field input, .field select {
  width: 100%;
  min-height: 51px;
  padding: 0 14px;
  color: var(--white);
  background: #0c0c0c;
  border: 1px solid rgba(255,255,255,.17);
  border-radius: 12px;
  outline: 0;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.field input:focus, .field select:focus { border-color: var(--red-light); box-shadow: 0 0 0 3px rgba(240,68,80,.13); }
.field input::placeholder { color: #5f5b58; }
.field input.is-invalid { border-color: #ff6670; }

.payment-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.payment-tab {
  min-height: 76px;
  padding: 14px 16px;
  display: flex;
  gap: 13px;
  align-items: center;
  color: #a8a39f;
  background: #0c0c0c;
  border: 1px solid var(--line);
  border-radius: 15px;
  cursor: pointer;
  text-align: left;
}
.payment-tab.is-active { color: var(--white); border-color: var(--red); background: rgba(210,31,43,.1); box-shadow: inset 0 0 0 1px rgba(210,31,43,.16); }
.payment-tab svg { width: 25px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.6; }
.payment-tab strong, .payment-tab small { display: block; }
.payment-tab strong { font-size: 14px; }
.payment-tab small { margin-top: 2px; color: #77726e; font-size: 10px; }
.payment-tab.is-active small { color: #d09ca0; }

.method-panel { margin-top: 20px; padding: 22px; background: rgba(255,255,255,.025); border: 1px solid var(--line); border-radius: 18px; }
.method-message { display: grid; gap: 4px; }
.method-message strong { font-size: 14px; }
.method-message span { color: #8f8a86; font-size: 12px; line-height: 1.5; }
.address-fields { grid-template-columns: .72fr 1.6fr .55fr; }
.address-fields .field-grow { grid-column: auto; }
.card-limit-note { margin: 16px 0 0; color: #d09ca0; font-size: 11px; }

.submit-button {
  width: 100%;
  min-height: 59px;
  margin-top: 24px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  color: var(--white);
  background: var(--red);
  border: 0;
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(210,31,43,.28);
  cursor: pointer;
  font-weight: 850;
  transition: background 160ms ease, transform 160ms ease, opacity 160ms ease;
}
.submit-button:hover:not(:disabled) { background: var(--red-light); transform: translateY(-1px); }
.submit-button:disabled { cursor: wait; opacity: .64; }
.submit-button svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; }
.legal-note { max-width: 560px; margin: 14px auto 0; color: #6f6a67; font-size: 10px; line-height: 1.5; text-align: center; }

.alert { margin: 24px 0 0; padding: 13px 15px; color: #ffd8da; background: rgba(210,31,43,.13); border: 1px solid rgba(240,68,80,.36); border-radius: 12px; font-size: 13px; }
.alert.is-info { color: #e5e0db; background: rgba(255,255,255,.05); border-color: var(--line); }
.alert.is-success { color: #c8f7da; background: rgba(31,151,80,.12); border-color: rgba(68,196,120,.35); }

.payment-result { margin-top: 28px; padding: 28px; text-align: center; background: #0b0b0b; border: 1px solid rgba(240,68,80,.3); border-radius: 20px; }
.payment-result h2 { margin: 0 0 8px; font-size: 27px; letter-spacing: -.04em; }
.payment-result > p { margin: 0 auto 18px; color: #9d9894; font-size: 14px; line-height: 1.55; }
.pix-qr { width: min(230px, 75%); height: auto; margin: 20px auto; padding: 12px; background: var(--white); border-radius: 16px; }
.copy-box { display: grid; grid-template-columns: 1fr auto; gap: 9px; }
.copy-box input { min-width: 0; height: 48px; padding: 0 12px; color: #d9d4d0; background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; }
.copy-box button, .result-link { min-height: 48px; padding: 0 16px; color: var(--white); background: var(--red); border: 0; border-radius: 11px; cursor: pointer; font-weight: 800; }
.result-link { display: inline-flex; align-items: center; text-decoration: none; }
.payment-status { margin-top: 18px; display: inline-flex; gap: 8px; align-items: center; color: #e6e1dd; font-size: 12px; font-weight: 700; }
.payment-status i { width: 8px; height: 8px; background: #f4b83d; border-radius: 50%; box-shadow: 0 0 0 5px rgba(244,184,61,.1); animation: pulse 1.6s ease-in-out infinite; }
.payment-status.is-paid i { background: #46c878; box-shadow: 0 0 0 5px rgba(70,200,120,.12); animation: none; }
.success-mark { width: 66px; height: 66px; margin: 0 auto 18px; display: grid; place-items: center; color: var(--white); background: #238f4d; border-radius: 50%; font-size: 30px; }
@keyframes pulse { 50% { opacity: .35; transform: scale(.78); } }

.order-package { margin-top: 28px; padding-bottom: 25px; display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 1px solid var(--line-light); }
.order-package span { color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.order-package h2 { margin: 5px 0 0; font-size: 29px; letter-spacing: -.055em; }
.order-package > strong { color: var(--red); font-size: 43px; letter-spacing: -.08em; line-height: .9; }
.order-panel ul { margin: 26px 0; padding: 0; display: grid; gap: 13px; list-style: none; }
.order-panel li { display: flex; gap: 10px; align-items: flex-start; color: #5d5854; font-size: 13px; line-height: 1.4; }
.order-panel li span { width: 7px; height: 7px; margin-top: .45em; flex: 0 0 auto; background: var(--red); border-radius: 50%; }
.order-total { padding: 20px 0; display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line-light); border-bottom: 1px solid var(--line-light); }
.order-total span { color: var(--muted); font-size: 12px; font-weight: 750; text-transform: uppercase; }
.order-total strong { font-size: 31px; letter-spacing: -.06em; }
.personal-close { margin: 24px 0; padding: 18px; color: #5d5854; background: #f1ece5; border-left: 3px solid var(--red); border-radius: 0 10px 10px 0; font-family: var(--serif); font-size: 17px; font-style: italic; line-height: 1.45; }
.personal-close span { color: var(--red-dark); }
.trust-row { display: flex; gap: 11px; align-items: center; }
.trust-row svg { width: 27px; fill: none; stroke: var(--red); stroke-width: 1.7; }
.trust-row span, .trust-row strong { display: block; }
.trust-row span { color: var(--muted); font-size: 10px; line-height: 1.3; }
.trust-row strong { color: var(--black); font-size: 12px; }

@media (max-width: 900px) {
  .checkout-grid { grid-template-columns: 1fr; }
  .order-panel { position: relative; top: auto; grid-row: 1; }
  .checkout-intro { margin-top: 42px; }
}

@media (max-width: 620px) {
  .checkout-header, .checkout-shell { width: min(calc(100% - 28px), 1180px); }
  .checkout-header { height: 74px; }
  .secure-label { font-size: 0; }
  .checkout-intro { margin: 36px 0 30px; }
  .checkout-intro h1 { font-size: clamp(2.5rem, 13vw, 4rem); }
  .checkout-intro > p:last-child { font-size: 15px; }
  .payment-panel, .order-panel { padding: 23px 18px; border-radius: 20px; }
  .field-grid, .address-fields { grid-template-columns: 1fr; }
  .field, .field-grow, .field-small, .field-wide { grid-column: 1; }
  .payment-tabs { grid-template-columns: 1fr 1fr; }
  .payment-tab { padding: 12px; }
  .method-panel { padding: 18px 14px; }
  .copy-box { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
