/* The payment page, built to upcoglobal.com.
 *
 * Every number here was read off the live site with getComputedStyle rather
 * than eyeballed, because a checkout that is only nearly the brand reads as a
 * phishing page. The ones that matter:
 *
 *   body             Open Sans 14px / 24px on #333
 *   section heading  Open Sans 600, centred, on #3c4043   (NOT Roboto)
 *   hero heading     Roboto 800 60px / 68px white
 *   button           Open Sans 16px 400 white on #00863A, 4px, no uppercase
 *   nav              Open Sans 12px 300 uppercase, 1px tracking, 90px tall
 *   footer           solid #00863A
 *   container        1140px
 *   section rhythm   ~100px top and bottom
 *
 * The shape of the page is the site's too: a photo hero under a green wash
 * with the content lifted up over it on a negative margin. That lift is the
 * site's signature move, and its absence is what made the first attempt look
 * like somebody else's checkout bolted onto a UPC Global header.
 *
 * What is deliberately NOT styled here: the inside of the Payment Element.
 * It lives in an iframe on Stripe's origin -- which is what keeps card numbers
 * off this server -- so CSS cannot reach it. It is themed through the
 * appearance API in index.php instead.
 */
:root {
  --green: #00863A;
  --green-dark: #006c2e;
  --green-tint: #e8f6ee;
  --ink: #333333;
  --ink-head: #3c4043;
  --ink-soft: #6b7074;
  --line: #e3e5e6;
  --field: #cfd3d6;
  --paper: #ffffff;
  --wash: #f7f8f8;
  --lift: 0 1px 2px rgba(16, 24, 20, .05), 0 12px 32px rgba(16, 24, 20, .07);
  --lift-sm: 0 1px 3px rgba(16, 24, 20, .07);
  --r: 4px;
  --container: 1140px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Open Sans', Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 24px;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
a { color: var(--green); }
img { max-width: 100%; }
.wrap { max-width: var(--container); margin: 0 auto; padding: 0 20px; width: 100%; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }

/* ---- the site's 90px white header, without the menu --------------------
   No navigation on purpose: somebody part-way through paying should not be
   offered twelve ways to wander off. The logo back to the site is enough. */
header.top { background: var(--paper); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 90px; }
.brand { line-height: 0; flex-shrink: 0; }
.brand img { height: 52px; width: auto; }
.secure {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 300; text-transform: uppercase; letter-spacing: 1px;
  color: #000; white-space: nowrap;
}
.secure svg { flex-shrink: 0; color: var(--green); }

/* ---- the hero: the site's own photo ------------------------------------
 * Three layers, and the order is the point.
 *
 *   1. a scrim, far lighter than it looks -- the live site uses NO overlay at
 *      all (its ::before is `none`), so anything heavy here stops reading as
 *      upcoglobal.com. This is only enough to keep the small lead legible
 *      over a bright sky, and is the one deliberate departure from the site.
 *   2. the photo, positioned 50% 50% / cover exactly as the site positions it.
 *   3. a green gradient UNDERNEATH, which is what shows if the photo does not
 *      load.
 *
 * That third layer is not decoration. upcoglobal.com is intermittently
 * unreachable -- the same firewall problem that is holding up the Stripe
 * review -- so a checkout that hotlinked its hero would lose it precisely
 * when the main site was in trouble. The image is served from this host, and
 * the gradient means even a missing file degrades to something branded rather
 * than to a grey slab.
 */
.hero {
  position: relative;
  color: #fff;
  background:
    linear-gradient(100deg, rgba(4, 38, 20, .62) 0%, rgba(4, 38, 20, .34) 52%, rgba(0, 134, 58, .12) 100%),
    url('hero.jpg') 50% 50% / cover no-repeat,
    linear-gradient(118deg, #0b2a17 0%, #14532c 52%, #00863A 100%);
}
.hero .wrap { position: relative; padding-top: 72px; padding-bottom: 128px; }
.eyebrow {
  margin: 0 0 10px; font-size: 12px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: #8fe3b2;
}
.hero h1 {
  font-family: 'Roboto', Arial, sans-serif; font-weight: 800;
  font-size: clamp(2rem, 4.6vw, 3.75rem); line-height: 1.13;
  margin: 0 0 14px; color: #fff;
}
.hero .lead {
  color: rgba(255, 255, 255, .88); font-size: 16px; line-height: 26px;
  max-width: 58ch; margin: 0;
}

/* ---- the content, lifted over the hero the way the site lifts its own --- */
main.pay { flex: 1 0 auto; padding-bottom: 100px; }
.lift { margin-top: -72px; position: relative; z-index: 2; }

.grid { display: grid; gap: 22px; align-items: start; }
@media (min-width: 900px) {
  .grid { grid-template-columns: 5fr 7fr; gap: 26px; }
  /* Sticky so the amount stays on screen while the card fields grow -- the
     Payment Element changes height as payment methods are chosen. */
  .summary { position: sticky; top: 24px; }
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--green);
  border-radius: var(--r);
  box-shadow: var(--lift);
  padding: 30px 32px;
}
/* The site's heading voice at the size a card can carry: Open Sans 600, not
   the uppercase micro-label a dashboard would reach for. */
.card > h2 {
  font-family: 'Open Sans', Arial, sans-serif; font-weight: 600;
  font-size: 20px; line-height: 1.3; color: var(--ink-head);
  margin: 0 0 6px;
}
.card > h2 + .sub { margin: 0 0 20px; color: var(--ink-soft); font-size: 13px; }

/* ---- what you are paying for ------------------------------------------ */
.summary dl { margin: 0; }
.summary dt {
  font-size: 12px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--ink-soft); font-weight: 400;
}
.summary dd { margin: 2px 0 16px; font-size: 15px; }
.total {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  border-top: 1px solid var(--line); margin-top: 6px; padding-top: 20px;
}
.total span { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--ink-soft); }
.total strong {
  font-family: 'Roboto', Arial, sans-serif; font-weight: 800; font-size: 34px;
  line-height: 1.05; color: var(--ink-head);
  /* Tabular figures so the amount does not shimmy if the page re-renders. */
  font-variant-numeric: tabular-nums;
}
.fine { font-size: 12.5px; line-height: 21px; color: var(--ink-soft); margin: 18px 0 0; }

/* ---- the pay button, which is the site's button ------------------------ */
.btn {
  display: block; width: 100%; margin-top: 24px;
  background: var(--green); color: #fff;
  border: 1px solid var(--green); border-radius: var(--r);
  padding: 13px 30px; cursor: pointer;
  font-family: 'Open Sans', Arial, sans-serif; font-size: 16px; font-weight: 400;
  transition: background .15s, border-color .15s;
}
.btn:hover:not(:disabled) { background: var(--green-dark); border-color: var(--green-dark); }
.btn:focus-visible { outline: 3px solid var(--green-tint); outline-offset: 2px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.loading { color: var(--ink-soft); font-size: 14px; padding: 18px 0; }
.msg {
  margin: 18px 0 0; padding: 14px 16px;
  border: 1px solid #f0c3be; border-left: 4px solid #c0392b; border-radius: var(--r);
  background: #fdf3f2; color: #7a2e27; font-size: 13.5px;
}

/* ---- a link that did not check out, and a payment that did ------------- */
.narrow { max-width: 680px; margin-left: auto; margin-right: auto; }
.done { text-align: center; padding: 48px 40px; }
.done .tick, .problem .tick {
  display: inline-flex; width: 60px; height: 60px; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--green-tint); color: var(--green); margin-bottom: 18px;
}
.done h2, .problem h2 { font-size: 26px; }
.done p, .problem p { margin: 0 0 10px; }
.problem { text-align: center; padding: 48px 40px; }
.problem .tick { background: #fdf3f2; color: #c0392b; }
.receipt { border-top: 1px solid var(--line); margin-top: 26px; padding-top: 22px; text-align: left; }
.receipt dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 22px; margin: 0; }
.receipt dt { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--ink-soft); }
.receipt dd { margin: 0; font-size: 15px; }

/* ---- the site's green foot --------------------------------------------- */
.foot {
  flex-shrink: 0; margin-top: auto;
  background: var(--green); color: #fff;
  font-size: 13px; text-align: center; padding: 26px 0;
}
.foot p { margin: 0; }
.foot a { color: #fff; text-decoration: underline; }
.foot .addr { opacity: .85; font-size: 12px; margin-top: 4px; }

@media (max-width: 560px) {
  .top-row { min-height: 72px; }
  .brand img { height: 42px; }
  .secure { font-size: 0; gap: 0; }   /* the padlock alone below 560px */
  .secure svg { width: 16px; height: 16px; }
  .hero .wrap { padding-top: 48px; padding-bottom: 104px; }
  .card { padding: 24px 20px; }
  .done, .problem { padding: 40px 22px; }
  .total strong { font-size: 28px; }
}

/* the email the receipt goes to, styled to sit with Stripe's own fields */
.pay-label {
  display: block; margin: 0 0 6px; font-size: 12px; text-transform: uppercase;
  letter-spacing: 1px; color: var(--ink-soft);
}
.pay-input {
  width: 100%; box-sizing: border-box; margin: 0 0 18px; padding: 12px;
  font: 15px/1.4 'Open Sans', Arial, Helvetica, sans-serif; color: var(--ink);
  background: #fff; border: 1px solid #e6e6e6; border-radius: var(--r);
}
.pay-input:focus {
  outline: none; border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0, 134, 58, .15);
}
