/* ============================================================
   GRIPR — Checkout (refined)
   Same system as the landing: bone/ink, orange-roche, grain,
   Anton display, Hanken body, JetBrains mono.
   Elegant floating-label form · product-hero order panel.
   ============================================================ */

:root {
  --paper:   #E9E2D4;
  --paper-2: #E1D9C8;
  --chalk:   #F4F0E6;
  --white:   #FCFBF7;
  --ink:     #141109;
  --ink-2:   #1B1710;
  --ink-3:   #262019;
  --stone:   #9A917E;
  --stone-d: #6E6555;
  --accent:  #E2552B;
  --accent-d:#C8431F;
  --amber:   #E8A33D;
  --green:   #5A7D4F;

  --line:        rgba(20,17,9,0.14);
  --line-soft:   rgba(20,17,9,0.08);
  --line-dark:   rgba(244,240,230,0.13);
  --line-dark-s: rgba(244,240,230,0.07);

  --display: 'Anton', 'Arial Narrow', sans-serif;
  --body: 'Hanken Grotesk', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --ease: cubic-bezier(.2,.7,.2,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--body);
  background: var(--paper);
  color: var(--ink);
  font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select { font-family: inherit; font-size: 16px; color: var(--ink); }
::selection { background: var(--accent); color: var(--chalk); }

.grain {
  position: fixed; inset: 0; z-index: 200; pointer-events: none;
  opacity: 0.035; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.mono { font-family: var(--mono); }
.tnum { font-variant-numeric: tabular-nums; }

/* ============================================================
   HEADER
   ============================================================ */
.co-head { position: sticky; top: 0; z-index: 50; background: rgba(233,226,212,0.9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-soft); }
.co-head-in { max-width: 1220px; margin: 0 auto; padding: 0 40px; height: 74px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; }
.co-logo { font-family: var(--display); font-size: 25px; letter-spacing: 0.04em; display: inline-flex; align-items: center; gap: 11px; justify-self: start; }
.co-logo .glyph { width: 12px; height: 21px; background: var(--ink); clip-path: polygon(0 0, 100% 22%, 78% 100%, 22% 78%); }

/* steps — minimal connected dots */
.co-steps { display: flex; align-items: center; gap: 14px; justify-self: center; }
.co-steps .st { display: flex; align-items: center; gap: 9px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--stone); }
.co-steps .st .n { width: 21px; height: 21px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font-size: 10px; transition: all .3s; }
.co-steps .st.on { color: var(--ink); }
.co-steps .st.on .n { background: var(--accent); border-color: var(--accent); color: #fff; }
.co-steps .st.done .n { background: var(--ink); border-color: var(--ink); color: var(--chalk); }
.co-steps .sep { width: 30px; height: 1px; background: var(--line); }

.co-secure { justify-self: end; display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--stone-d); }
.co-secure svg { width: 15px; height: 15px; color: var(--green); }

/* ============================================================
   LAYOUT
   ============================================================ */
.co { max-width: 1220px; margin: 0 auto; padding: 0 40px; display: grid; grid-template-columns: 1.3fr 0.92fr; align-items: start; gap: 72px; }
.co-main { padding: 56px 0 90px; min-width: 0; }
.co-aside { padding: 56px 0 90px; position: sticky; top: 74px; }
.co-back { font-size: 13px; font-weight: 600; color: var(--stone-d); display: inline-flex; align-items: center; gap: 7px; transition: color .2s; margin-bottom: 30px; }
.co-back:hover { color: var(--accent); }
.co-back svg { width: 14px; height: 14px; }
.co-msum { display: none; }

/* page intro */
.co-intro { margin-bottom: 34px; }
.co-intro h1 { font-family: var(--display); font-size: clamp(30px, 4vw, 44px); text-transform: uppercase; line-height: 0.95; letter-spacing: 0.01em; }
.co-intro p { color: var(--stone-d); font-size: 15px; margin-top: 8px; }

/* ============================================================
   EXPRESS PAY
   ============================================================ */
.express-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.xbtn { height: 54px; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 16px; transition: transform .15s var(--ease), box-shadow .2s; }
.xbtn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -10px rgba(20,17,9,0.4); }
.xbtn.apple { background: var(--ink); color: #fff; }
.xbtn.apple svg { height: 21px; fill: #fff; }
.xbtn.apple span { font-weight: 500; font-size: 18px; }
.xbtn.paypal { background: #FFC439; color: #253B80; font-style: italic; font-weight: 800; gap: 0; letter-spacing: -0.01em; }
.xbtn.paypal .pp2 { color: #179BD7; }
.divider { display: flex; align-items: center; gap: 18px; margin: 30px 0 6px; color: var(--stone); font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }

/* ============================================================
   FORM SECTIONS
   ============================================================ */
.fsec { padding-top: 40px; }
.fsec-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.fsec-head .fnum { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.06em; color: var(--accent); }
.fsec-head h2 { font-family: var(--body); font-size: 16px; font-weight: 700; letter-spacing: 0.01em; color: var(--ink); white-space: nowrap; }
.fsec-head .rule { flex: 1; height: 1px; background: var(--line-soft); }
.fsec-head .secsecure { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--green); }
.fsec-head .secsecure svg { width: 13px; height: 13px; }

/* ============================================================
   FLOATING-LABEL FIELDS
   ============================================================ */
.field { position: relative; margin-bottom: 12px; }
.field input, .field select {
  width: 100%; height: 60px; padding: 22px 16px 8px; background: var(--white);
  border: 1px solid var(--line); border-radius: 4px; outline: none;
  transition: border-color .2s, box-shadow .2s; line-height: 1.2;
}
.field input::placeholder { color: transparent; }
.field label {
  position: absolute; left: 16px; top: 19px; right: 16px; font-size: 15px; color: var(--stone);
  pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: top .16s var(--ease), font-size .16s var(--ease), color .16s var(--ease), letter-spacing .16s var(--ease);
}
.field input:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(226,85,43,0.1); }
.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field select:focus + label,
.field select.filled + label {
  top: 9px; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--stone-d);
}
.field input:focus + label { color: var(--accent); }
.field.err input { border-color: var(--accent-d); }
.field .msg { font-size: 12px; color: var(--accent-d); margin-top: 6px; display: none; }
.field.err .msg { display: block; }
.field .ghost { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; color: var(--stone-d); pointer-events: none; }
.field .ghost b { color: var(--ink); }

.frow { display: grid; gap: 12px; }
.frow.two { grid-template-columns: 1fr 1fr; }
.frow.cityzip { grid-template-columns: 0.8fr 1.2fr; }
.frow.expcvc { grid-template-columns: 1fr 1fr; }

/* ============================================================
   DELIVERY OPTIONS (minimal)
   ============================================================ */
.delivery { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: var(--white); }
.dopt { display: grid; grid-template-columns: 22px 1fr auto; gap: 15px; align-items: center; padding: 18px 18px; cursor: pointer; transition: background .2s; position: relative; }
.dopt + .dopt { border-top: 1px solid var(--line-soft); }
.dopt:hover { background: rgba(20,17,9,0.02); }
.dopt.sel { background: rgba(226,85,43,0.05); }
.dopt.sel::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }
.dopt .radio { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line); position: relative; transition: border-color .2s; }
.dopt.sel .radio { border-color: var(--accent); }
.dopt.sel .radio::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--accent); }
.dopt .dname { display: block; font-weight: 700; font-size: 15px; }
.dopt .dsub { display: block; font-size: 13px; color: var(--stone-d); margin-top: 2px; }
.dopt .dprice { font-family: var(--mono); font-size: 13px; font-weight: 700; }
.dopt .dprice.free { color: var(--green); }

/* ============================================================
   CGV + PAY
   ============================================================ */
.cgv { display: flex; gap: 12px; align-items: flex-start; margin: 30px 0 18px; font-size: 13.5px; color: var(--stone-d); }
.cgv input { margin-top: 2px; width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.cgv a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }

.pay-btn { width: 100%; height: 62px; background: var(--accent); color: var(--chalk); border-radius: 4px; font-weight: 800; font-size: 17px; letter-spacing: 0.01em; display: flex; align-items: center; justify-content: center; gap: 12px; position: relative; overflow: hidden; transition: transform .2s var(--ease); }
.pay-btn::after { content: ""; position: absolute; inset: 0; background: var(--ink); transform: translateY(101%); transition: transform .4s var(--ease); }
.pay-btn:hover:not(:disabled) { transform: translateY(-2px); }
.pay-btn:hover:not(:disabled)::after { transform: translateY(0); }
.pay-btn > span { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 11px; }
.pay-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.pay-btn .lock { width: 17px; height: 17px; }
.pay-note { text-align: center; margin-top: 15px; font-size: 12.5px; color: var(--stone-d); display: flex; align-items: center; justify-content: center; gap: 7px; }
.pay-note svg { width: 14px; height: 14px; color: var(--green); }

/* ============================================================
   ORDER SUMMARY — product-hero panel
   ============================================================ */
.summary { background: var(--ink); color: var(--chalk); border-radius: 6px; overflow: hidden; box-shadow: 0 30px 70px -30px rgba(20,17,9,0.5); }

/* hero image — full product, seamless dark panel */
.sum-hero { position: relative; aspect-ratio: 1 / 1; background: #0B0906; }
.sum-hero img { width: 100%; height: 100%; object-fit: cover; }
.sum-hero .tag { position: absolute; top: 16px; left: 16px; font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; background: var(--accent); color: var(--chalk); padding: 6px 10px; border-radius: 3px; }
.sum-hero .corner { position: absolute; width: 16px; height: 16px; border: 1.5px solid rgba(244,240,230,0.45); }
.sum-hero .corner.tr { top: 14px; right: 14px; border-left: 0; border-bottom: 0; }
.sum-hero .corner.bl { bottom: 14px; left: 14px; border-right: 0; border-top: 0; }
/* product identity bar (below image, never covers product) */
.sum-id { padding: 18px 24px; border-bottom: 1px solid var(--line-dark-s); }
.sum-id .ref { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(244,240,230,0.55); }
.sum-id h3 { font-family: var(--display); font-size: 30px; text-transform: uppercase; line-height: 0.9; margin-top: 5px; }
.sum-id .sub { font-size: 12.5px; color: rgba(244,240,230,0.6); margin-top: 6px; }

/* qty + price line */
.sum-line { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--line-dark-s); }
.sum-line .qlabel { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(244,240,230,0.55); margin-bottom: 8px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-dark-s); border-radius: 4px; overflow: hidden; }
.qty button { width: 32px; height: 34px; display: grid; place-items: center; color: var(--chalk); transition: background .2s; }
.qty button:hover { background: var(--ink-3); }
.qty .qv { width: 36px; text-align: center; font-weight: 700; font-size: 15px; }
.sum-line .price { text-align: right; }
.sum-line .price .now { font-weight: 800; font-size: 18px; }
.sum-line .price .was { font-size: 12.5px; color: rgba(244,240,230,0.42); text-decoration: line-through; margin-top: 2px; }

/* promo */
.promo { padding: 16px 24px; border-bottom: 1px solid var(--line-dark-s); }
.promo-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: rgba(244,240,230,0.75); transition: color .2s; white-space: nowrap; }
.promo-toggle:hover { color: var(--chalk); }
.promo-toggle svg { width: 14px; height: 14px; color: var(--accent); transition: transform .3s; }
.promo.open .promo-toggle svg { transform: rotate(45deg); }
.promo-body { max-height: 0; overflow: hidden; transition: max-height .35s var(--ease); }
.promo.open .promo-body { max-height: 140px; }
.promo-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding-top: 12px; }
.promo input { height: 46px; padding: 0 14px; background: var(--ink-2); border: 1px solid var(--line-dark-s); border-radius: 4px; color: var(--chalk); font-family: var(--mono); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; outline: none; transition: border-color .2s; }
.promo input::placeholder { color: rgba(244,240,230,0.4); }
.promo input:focus { border-color: var(--accent); }
.promo .applyb { height: 46px; padding: 0 18px; background: transparent; border: 1px solid var(--line-dark); border-radius: 4px; font-weight: 700; font-size: 13px; transition: background .2s, border-color .2s; }
.promo .applyb:hover { background: var(--ink-3); border-color: var(--stone-d); }
.promo .pmsg { font-size: 12px; margin-top: 10px; display: none; align-items: center; gap: 6px; }
.promo .pmsg.ok { color: var(--green); }
.promo .pmsg.no { color: var(--accent); }
.promo .pmsg svg { width: 14px; height: 14px; }

/* receipt */
.receipt { padding: 20px 24px; display: flex; flex-direction: column; gap: 12px; }
.trow { display: flex; justify-content: space-between; font-size: 14px; color: rgba(244,240,230,0.75); }
.trow .v { font-variant-numeric: tabular-nums; }
.trow.free .v { color: var(--green); font-weight: 600; }
.trow.discount .v { color: var(--accent); }
.trow.grand { padding-top: 16px; margin-top: 4px; border-top: 1px solid var(--line-dark-s); align-items: baseline; }
.trow.grand .l { font-family: var(--display); font-size: 22px; text-transform: uppercase; color: var(--chalk); }
.trow.grand .v { font-family: var(--display); font-size: 34px; color: var(--chalk); font-variant-numeric: tabular-nums; }
.trow.grand .v small { font-size: 12px; color: rgba(244,240,230,0.5); margin-left: 6px; font-family: var(--mono); }
.save-note { margin: 0 24px 20px; display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--amber); }
.save-note svg { width: 15px; height: 15px; color: var(--accent); flex: none; }
.save-note b { color: var(--chalk); }

/* foot of summary */
.sum-foot { padding: 18px 24px 22px; border-top: 1px solid var(--line-dark-s); background: var(--ink-2); }
.sum-trust { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.sum-trust .tt { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 7px; font-size: 11px; color: rgba(244,240,230,0.7); line-height: 1.3; }
.sum-trust .tt svg { width: 19px; height: 19px; color: var(--accent); }

/* under-panel reassurance line */
.aside-note { margin-top: 18px; display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--stone-d); justify-content: center; }
.aside-note svg { width: 14px; height: 14px; color: var(--green); }

/* ============================================================
   FOOTER
   ============================================================ */
.co-foot { border-top: 1px solid var(--line-soft); }
.co-foot-in { max-width: 1220px; margin: 0 auto; padding: 26px 40px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; font-size: 12.5px; color: var(--stone-d); }
.co-foot a { text-decoration: underline; text-underline-offset: 2px; }
.co-foot a:hover { color: var(--accent); }
.co-pays { display: flex; gap: 7px; }
.co-pays span { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.04em; padding: 4px 7px; border: 1px solid var(--line); border-radius: 3px; color: var(--stone-d); }

/* ============================================================
   TOAST
   ============================================================ */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(160%); background: var(--ink); color: var(--chalk); padding: 16px 22px; border-radius: 5px; display: flex; align-items: center; gap: 13px; z-index: 300; box-shadow: 0 24px 60px -18px rgba(0,0,0,0.65); transition: transform .55s var(--ease); max-width: 90vw; }
.toast.show { transform: translateX(-50%) translateY(0); }
.toast .tcheck { width: 30px; height: 30px; border-radius: 50%; background: var(--green); display: grid; place-items: center; flex: none; }
.toast .tcheck svg { width: 17px; height: 17px; color: #fff; }
.toast .tt1 { font-weight: 700; font-size: 14.5px; }
.toast .tt2 { font-size: 12.5px; color: rgba(244,240,230,0.65); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .co { grid-template-columns: 1fr; gap: 0; }
  .co-main { padding: 26px 0 80px; order: 2; }
  .co-aside { position: static; padding: 0; order: 1; margin-bottom: 8px; }
  .co-head-in { grid-template-columns: 1fr auto; }
  .co-steps { display: none; }
  /* refined summary bar */
  .co-msum {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    width: 100%; text-align: left; cursor: pointer;
    padding: 12px 14px; background: var(--white);
    border: 1px solid var(--line); border-radius: 7px;
    transition: border-color .2s;
  }
  .co-msum:hover { border-color: var(--stone); }
  .ms-left { display: flex; align-items: center; gap: 13px; min-width: 0; }
  .ms-thumb { width: 48px; height: 48px; border-radius: 6px; overflow: hidden; background: #0B0906; flex: none; }
  .ms-thumb img { width: 100%; height: 100%; object-fit: cover; }
  .ms-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .ms-title { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: 14.5px; color: var(--ink); }
  .ms-title .chev { width: 15px; height: 15px; color: var(--accent); transition: transform .3s var(--ease); }
  .ms-sub { font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; color: var(--stone-d); }
  .ms-tot { font-family: var(--display); font-size: 25px; color: var(--ink); flex: none; letter-spacing: 0.01em; }
  .co-msum.open .ms-title .chev { transform: rotate(180deg); }
  /* collapsible panel directly below the bar */
  .co-aside .summary { max-height: 0; overflow: hidden; transition: max-height .5s var(--ease), margin-top .3s var(--ease); border-radius: 7px; box-shadow: none; }
  .co-aside.open .summary { max-height: 1800px; margin-top: 10px; }
  .aside-note { display: none; }
}
@media (max-width: 560px) {
  .co-head-in, .co, .co-foot-in { padding-left: 22px; padding-right: 22px; }
  .express-row { grid-template-columns: 1fr; }
  .frow.two, .frow.cityzip { grid-template-columns: 1fr; }
  .co-secure span { display: none; }
  .co-intro h1 { font-size: 30px; }
}
