/* =====================================================================
   HeySwaey — the small pages: /welcome/, /pay/ and the legal pages
   (/terms/, /privacy-policy/, /refunds/). A Mac window on paper.
   ===================================================================== */

.page-body { min-height: 100vh; display: flex; flex-direction: column; background: var(--paper); }
.page-top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 860px; width: 100%; margin: 0 auto; padding: 22px var(--gutter) 0;
}
.page-top .brand { display: inline-flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 700; letter-spacing: -.03em; }
.page-top .brand img { width: 30px; height: 30px; border-radius: 8px; }
.page-top .back { font-size: 14.5px; color: var(--mute); transition: color .15s; }
.page-top .back:hover { color: var(--electric); }

.page { flex: 1; width: 100%; max-width: 860px; margin: 0 auto; padding: 34px var(--gutter) 60px; }
.page .win { border-radius: 16px; }
.page-in { padding: clamp(26px, 5vw, 52px) clamp(22px, 6vw, 64px) clamp(30px, 5vw, 56px); }

.page-foot {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px;
  padding: 0 var(--gutter) 36px; font-size: 13.5px; color: var(--mute-2);
}
.page-foot a:hover { color: var(--electric); }

/* ---------- legal documents ---------- */
.doc { max-width: 640px; margin: 0 auto; color: var(--ink-2); font-size: 16px; line-height: 1.65; }
.doc h1 { margin: 0; font-size: clamp(30px, 4.4vw, 42px); font-weight: 600; letter-spacing: -.05em; line-height: 1.05; color: var(--ink); }
.doc .updated { margin: 10px 0 28px; font-size: 14px; color: var(--mute); }
.doc .tldr { margin: 0 0 30px; padding: 16px 18px; border-radius: 14px; background: #eef5ff; box-shadow: inset 0 0 0 1px rgba(var(--electric-rgb), .2); color: #08243d; }
.doc .tldr p { margin: 0; }
.doc .tldr p + p { margin-top: 6px; }
.doc h2 { margin: 34px 0 8px; font-size: 20px; font-weight: 600; letter-spacing: -.03em; color: var(--ink); }
.doc p { margin: 0 0 12px; }
.doc ul { margin: 0 0 14px; padding-left: 20px; }
.doc li { margin: 4px 0; }
.doc a { color: var(--electric); text-decoration: underline; text-underline-offset: 2px; }
.doc b { color: var(--ink); font-weight: 600; }

/* ---------- welcome & pay ---------- */
.hello { max-width: 560px; margin: 0 auto; text-align: center; }
.hello-mark { width: 84px; height: 84px; margin: 0 auto 20px; filter: drop-shadow(0 12px 22px rgba(10, 40, 90, .25)); }
.hello h1 { margin: 0; font-size: clamp(32px, 5vw, 48px); font-weight: 600; letter-spacing: -.055em; line-height: 1.02; }
.hello .lead { margin: 12px auto 0; max-width: 440px; font-size: 17px; line-height: 1.5; color: var(--mute); }
.steps { list-style: none; counter-reset: s; margin: 32px 0 0; padding: 0; display: grid; gap: 12px; text-align: left; }
.steps li {
  counter-increment: s; position: relative; padding: 16px 18px 16px 62px; border-radius: 14px;
  background: #f5f5f7; box-shadow: inset 0 0 0 1px rgba(0,0,0,.04); font-size: 15.5px; line-height: 1.5; color: var(--ink-2);
}
.steps li::before {
  content: counter(s); position: absolute; left: 18px; top: 15px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  font-size: 14px; font-weight: 600; color: #000;
  background: linear-gradient(#edf4ff 0%, #d6e7ff 18%, #a2c7ff 50%, #99cbf8 80%, #a2d2f7 100%);
  box-shadow: inset 0 0 0 1px var(--indigo);
}
.steps b { color: var(--ink); font-weight: 600; }
.steps .btn { margin-top: 12px; }
.hello .fine { margin: 22px 0 0; font-size: 13.5px; color: var(--mute-2); }
.hello .actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 26px; }

.spinner { width: 26px; height: 26px; margin: 26px auto 0; border-radius: 50%; border: 2.5px solid rgba(var(--electric-rgb), .18); border-top-color: var(--electric); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }

/* ---------- checkout (/pay/): the order on the left, Paddle's card form on the right ---------- */
.pay-body { background: radial-gradient(80% 55% at 50% -12%, #d9e9ff 0%, #f5f5f500 62%), var(--paper); }
.page-top.pay-top { max-width: 1040px; }
.pay { flex: 1; width: 100%; max-width: 1040px; margin: 0 auto; padding: 28px var(--gutter) 56px; }
.pay-win { border-radius: 16px; }
.pay-grid {
  display: grid; grid-template-columns: minmax(300px, 390px) minmax(0, 1fr); grid-template-rows: auto 1fr;
  grid-template-areas: "sum form" "extra form";
}
.pay-summary, .pay-extra { background: #f4f7fc; border-right: 1px solid var(--line); }
.pay-summary { grid-area: sum; padding: 32px 30px 0; }
.pay-extra { grid-area: extra; padding: 0 30px 28px; }
.pay-tag { margin: 0 0 16px; font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; color: var(--mute-2); }
.pay-plan { display: flex; align-items: center; gap: 14px; }
.pay-plan img { width: 56px; height: 56px; flex: none; filter: drop-shadow(0 8px 16px rgba(10, 40, 90, .22)); }
.pay-plan b { display: block; font-size: 22px; font-weight: 600; letter-spacing: -.045em; line-height: 1.15; color: var(--ink); }
.pay-plan b + span { display: block; margin-top: 3px; font-size: 14.5px; color: var(--mute); }
.pay-student {
  display: inline-block; margin: 14px 0 0; padding: 4px 11px; border-radius: 999px; font-size: 13px; font-weight: 600;
  color: var(--deep); background: rgba(var(--electric-rgb), .1); box-shadow: inset 0 0 0 1px rgba(var(--electric-rgb), .25);
}

.pay-lines { margin: 24px 0 0; padding: 18px 0 0; border-top: 1.5px dashed rgba(0,0,0,.1); display: grid; gap: 10px; }
.pay-lines > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.pay-lines dt { font-size: 15px; color: var(--mute); }
.pay-lines dd { margin: 0; font-size: 15px; color: var(--ink-2); font-variant-numeric: tabular-nums; text-align: right; }
.pay-lines > .pay-total { margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--line); align-items: center; }
.pay-total dt { font-size: 16px; font-weight: 600; color: var(--ink); }
.pay-total [data-total] { font-size: 30px; font-weight: 600; letter-spacing: -.045em; color: var(--ink); }
.pay-total small { font-size: 12.5px; font-weight: 500; color: var(--mute-2); }
.pay-renew { margin: 10px 0 0; min-height: 1.45em; font-size: 13.5px; line-height: 1.45; color: var(--mute); }

.pay-more { margin-top: 20px; padding-top: 16px; border-top: 1.5px dashed rgba(0,0,0,.1); }
.pay-more summary { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; font-size: 13.5px; color: var(--mute); }
.pay-more summary::-webkit-details-marker { display: none; }
.pay-more summary::after { content: ""; width: 6px; height: 6px; margin-top: -3px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .25s var(--ease-out), margin .25s var(--ease-out); }
.pay-more[open] summary::after { margin-top: 3px; transform: rotate(-135deg); }
.pay-more summary:hover { color: var(--ink-2); }
.pay-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.pay-list li { display: flex; gap: 10px; font-size: 14.5px; line-height: 1.35; color: var(--ink-2); }
.pay-list li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; background: var(--electric) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4L18 8' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/10px no-repeat; }

.pay-trust { list-style: none; margin: 22px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.pay-trust li { display: flex; gap: 9px; font-size: 13px; line-height: 1.45; color: var(--mute); }
.pay-trust svg { flex: none; width: 16px; height: 16px; margin-top: 1px; color: var(--electric); }
.pay-trust a { color: var(--electric); text-decoration: underline; text-underline-offset: 2px; }

.pay-form { grid-area: form; min-width: 0; padding: 32px clamp(18px, 4vw, 44px) 24px; }
.pay-h { margin: 0 0 12px; font-size: 22px; font-weight: 600; letter-spacing: -.045em; color: var(--ink); }
.pay-wait { display: grid; justify-items: center; padding: 80px 0; text-align: center; font-size: 14.5px; color: var(--mute); }
.pay-wait .spinner { margin: 0 0 14px; }
.pay-wait p { margin: 0; }

/* Placeholders until Paddle sends the order. */
.sk { display: inline-block; width: 64px; height: .9em; border-radius: 6px; vertical-align: middle; background: linear-gradient(90deg, rgba(0,0,0,.06) 0%, rgba(0,0,0,.11) 50%, rgba(0,0,0,.06) 100%); background-size: 200% 100%; animation: sk 1.3s linear infinite; }
.sk-w1 { width: 140px; height: 20px; }
.sk-w2 { width: 92px; }
.sk-big { width: 110px; height: 28px; }
@keyframes sk { to { background-position: -200% 0; } }

@media (max-width: 820px) {
  .pay { padding-top: 18px; }
  .pay-grid { grid-template-columns: 1fr; grid-template-rows: auto; grid-template-areas: "sum" "form" "extra"; }
  .pay-summary, .pay-extra { border-right: 0; }
  .pay-summary { padding: 24px 22px 20px; border-bottom: 1px solid var(--line); }
  .pay-extra { padding: 2px 22px 24px; border-top: 1px solid var(--line); }
  .pay-form { padding: 24px 14px 18px; }
  .pay-total [data-total] { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }
