/* Members-only sign-in page (inc/cp-member-gate.php). Standalone: the page
   loads no other theme CSS, so the tokens below repeat cp-shop.css :root. */

@font-face { font-family: "Sequel Sans"; src: url("fonts/sequel-sans-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Sequel Sans"; src: url("fonts/sequel-sans-medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Sequel Sans"; src: url("fonts/sequel-sans-semibold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Sequel Sans"; src: url("fonts/sequel-sans-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --cardinal-red: #E50023;
  --cardinal-red-deep: #A40016;
  --cardinal-red-lifted: #FF6168;
  --cardinal-red-sky: #FFA5A7;
  --blush: #FFDCDE;
  --night: #2E0002;
  --night-soft: #660009;
  --ink: #191216;
  --ink-2: #3B3236;
  --muted: #675E62;
  --line: #ECE7E8;
  --line-strong: #D9D4D6;
  --tint: #FBF9F9;
  --soft: #F5F1F2;
  --focus: 0 0 0 3px rgba(229, 0, 35, .16);
  --font: "Sequel Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; }

.cpg-skip {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  padding: 10px 14px;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  transform: translateY(-200%);
}
.cpg-skip:focus { transform: none; outline: 2px solid var(--cardinal-red); }

/* ---------- layout ---------- */
.cpg {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
}

/* ---------- brand panel ---------- */
.cpg-brand {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 20px 20px 30px;
  color: #fff;
  background:
    radial-gradient(110% 80% at 0% 0%, rgba(229, 0, 35, .28) 0%, transparent 60%),
    linear-gradient(165deg, var(--night-soft) 0%, var(--night) 72%);
}

.cpg-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  color: #fff;
  text-decoration: none;
}
.cpg-logo:focus-visible { outline: 2px solid #fff; outline-offset: 4px; border-radius: 4px; }
.cpg-mark { width: 34px; height: 34px; flex: none; }
.cpg-mark .cpg-mark__a { fill: #fff; }
.cpg-mark .cpg-mark__b { fill: var(--blush); }
.cpg-logo__word {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .16em;
  font-size: 1.15rem;
  line-height: 1;
  font-weight: 600;
  text-transform: uppercase;
}
.cpg-logo__word span:first-child { letter-spacing: .2em; margin-right: -.2em; }
.cpg-logo__word span:last-child {
  font-size: .56em;
  letter-spacing: .44em;
  margin-right: -.44em;
  color: var(--cardinal-red-sky);
}

.cpg-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--cardinal-red-sky);
}
.cpg-eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--cardinal-red-lifted);
}
.cpg-title {
  max-width: 15ch;
  margin: 0;
  font-size: clamp(1.75rem, 1.1rem + 2.6vw, 2.9rem);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -.022em;
  text-wrap: balance;
}
.cpg-lede {
  max-width: 38ch;
  margin: 14px 0 0;
  font-size: 15px;
  line-height: 1.55;
  color: rgba(255, 255, 255, .8);
}
.cpg-ruo {
  display: none;
  max-width: 46ch;
  margin: 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .16);
  font-size: 13px;
  line-height: 1.55;
  color: rgba(255, 255, 255, .66);
}
.cpg-ruo strong { color: #fff; font-weight: 600; }

/* The compass, huge and faint, cropped off the panel's corner. */
.cpg-watermark {
  position: absolute;
  z-index: -1;
  right: -110px;
  bottom: -150px;
  width: 340px;
  height: 340px;
  color: rgba(255, 255, 255, .07);
  pointer-events: none;
}
.cpg-watermark .cpg-mark__a { fill: rgba(255, 255, 255, .06); }
.cpg-watermark .cpg-mark__b { fill: rgba(255, 255, 255, .025); }

/* ---------- form column ---------- */
.cpg-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 20px 24px;
}
.cpg-card {
  width: min(440px, 100%);
  margin-block: auto;
  outline: none;
}

.cpg-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 28px;
  padding: 4px;
  border-radius: 12px;
  background: var(--soft);
}
.cpg-tab {
  padding: 10px 12px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.cpg-tab:hover { color: var(--ink); }
.cpg-tab[aria-selected="true"] {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(25, 18, 22, .08), 0 3px 10px rgba(25, 18, 22, .06);
}
.cpg-tab:focus-visible { outline: 2px solid var(--cardinal-red); outline-offset: 2px; }

.cpg-panel__title {
  margin: 0;
  font-size: 1.625rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.015em;
}
.cpg-panel__hint {
  margin: 6px 0 22px;
  font-size: 15px;
  color: var(--muted);
}

.cpg-form { display: grid; gap: 18px; }
.cpg-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
@media (min-width: 420px) {
  .cpg-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
}

.cpg-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
}
.cpg-optional {
  font-weight: 400;
  color: var(--muted, #666);
  font-size: 0.85em;
}
.cpg-field__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.cpg-field__row label { margin-bottom: 6px; }
.cpg-field__row .cpg-link { font-size: 14px; }
.cpg-field input {
  display: block;
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px; /* 16px keeps iOS from zooming the page on focus */
  transition: border-color .15s ease, box-shadow .15s ease;
}
.cpg-field input:hover { border-color: #B9B1B4; }
.cpg-field input:focus { outline: none; border-color: var(--cardinal-red); box-shadow: var(--focus); }
.cpg-field__hint { margin: 6px 0 0; font-size: 13px; color: var(--muted); }

.cpg-pw { position: relative; }
.cpg-pw input { padding-right: 76px; }
.cpg-pw__toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  padding: 7px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transform: translateY(-50%);
}
.cpg-pw__toggle:hover { background: var(--soft); color: var(--ink); }
.cpg-pw__toggle:focus-visible { outline: 2px solid var(--cardinal-red); outline-offset: 1px; }

.cpg-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.55;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.cpg-check:has(input:checked) { border-color: var(--cardinal-red); background: rgba(229, 0, 35, .035); }
.cpg-check input {
  width: 18px;
  height: 18px;
  flex: none;
  margin: 2px 0 0;
  accent-color: var(--cardinal-red);
  cursor: pointer;
}
.cpg-check a { color: var(--cardinal-red-deep); text-underline-offset: 2px; }
.cpg-check--plain { align-items: center; padding: 0; border: 0; font-size: 15px; }
.cpg-check--plain:has(input:checked) { background: none; }
.cpg-check--plain input { margin: 0; }

.cpg-link {
  color: var(--cardinal-red-deep);
  font-weight: 600;
  text-decoration: none;
}
.cpg-link:hover { text-decoration: underline; text-underline-offset: 2px; }
.cpg-link:focus-visible { outline: 2px solid var(--cardinal-red); outline-offset: 2px; border-radius: 3px; }

/* ---------- human check ---------- */
.cpg-cap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0 12px;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--tint);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.cpg-cap__box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 28px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}
.cpg-cap__input {
  position: absolute;
  width: 26px;
  height: 26px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.cpg-cap__tick {
  position: relative;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: none;
  border: 2px solid #8C8387;
  border-radius: 6px;
  background: #fff;
  transition: background .15s ease, border-color .15s ease;
}
.cpg-cap__box:hover .cpg-cap__tick { border-color: var(--ink-2); }
.cpg-cap__input:focus-visible + .cpg-cap__tick { outline: 2px solid var(--cardinal-red); outline-offset: 2px; }
.cpg-cap__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.cpg-cap__status {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.cpg-cap__status:empty { display: none; }
.cpg-cap__status:not(:empty) { margin-top: 8px; }

.cpg-cap[data-state="verifying"] .cpg-cap__tick {
  border-color: rgba(229, 0, 35, .2);
  border-top-color: var(--cardinal-red);
  border-radius: 50%;
  animation: cpg-spin .8s linear infinite;
}
.cpg-cap[data-state="verifying"] .cpg-cap__box { cursor: progress; }
.cpg-cap[data-state="verified"] { border-color: rgba(229, 0, 35, .4); background: #fff; }
.cpg-cap[data-state="verified"] .cpg-cap__tick { border-color: var(--cardinal-red); background: var(--cardinal-red); }
.cpg-cap[data-state="verified"] .cpg-cap__tick::after {
  content: "";
  width: 6px;
  height: 12px;
  margin-top: -2px;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}
.cpg-cap[data-state="verified"] .cpg-cap__box { cursor: default; }
.cpg-cap[data-state="verified"] .cpg-cap__status { color: var(--ink-2); }
.cpg-cap[data-state="error"] .cpg-cap__tick { border-color: var(--cardinal-red); }
.cpg-cap[data-state="error"] .cpg-cap__status { color: var(--cardinal-red-deep); }
.cpg-cap.is-attention { border-color: var(--cardinal-red); box-shadow: var(--focus); animation: cpg-nudge .32s ease; }

@keyframes cpg-spin { to { transform: rotate(360deg); } }
@keyframes cpg-nudge {
  0%, 100% { transform: none; }
  30% { transform: translateX(-4px); }
  70% { transform: translateX(4px); }
}

.cpg-submit {
  height: 52px;
  border: 0;
  border-radius: 12px;
  background: var(--cardinal-red);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(229, 0, 35, .22);
  transition: background .15s ease, transform .1s ease;
}
.cpg-submit:hover { background: var(--cardinal-red-deep); }
.cpg-submit:active { transform: translateY(1px); }
.cpg-submit:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.cpg-submit[aria-busy="true"] { opacity: .75; cursor: progress; }

.cpg-switch {
  margin: 22px 0 0;
  font-size: 15px;
  text-align: center;
  color: var(--muted);
}

.cpg-alert {
  margin: 0 0 4px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
}
.cpg-alert ul { margin: 0; padding: 0; list-style: none; }
.cpg-alert li + li { margin-top: 4px; }
.cpg-alert--error { border: 1px solid #F6C4CA; background: #FFF2F3; color: #7A0012; }
.cpg-alert--ok { margin-bottom: 20px; border: 1px solid var(--line); background: var(--soft); color: var(--ink); }

.cpg-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- footer ---------- */
.cpg-foot {
  width: min(440px, 100%);
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  text-align: center;
}
.cpg-foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; margin-bottom: 10px; }
.cpg-foot a { color: var(--ink-2); text-underline-offset: 2px; }
.cpg-foot nav a { text-decoration: none; font-weight: 500; }
.cpg-foot nav a:hover { text-decoration: underline; }
.cpg-foot p { margin: 4px 0 0; }
.cpg-foot__ruo { margin-bottom: 12px !important; text-align: left; }
.cpg-foot__ruo strong { color: var(--ink); font-weight: 600; }

/* ---------- entrance ---------- */
@media (prefers-reduced-motion: no-preference) {
  .cpg-brand__body, .cpg-card {
    animation: cpg-rise .5s cubic-bezier(.2, .7, .2, 1) both;
  }
  .cpg-card { animation-delay: .06s; }
}
@keyframes cpg-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cpg-cap.is-attention { animation: none; }
  .cpg-cap[data-state="verifying"] .cpg-cap__tick { animation-duration: 2s; }
}

/* ---------- desktop: split screen ---------- */
@media (min-width: 960px) {
  .cpg { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .cpg-brand {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    justify-content: space-between;
    gap: 40px;
    padding: 44px 56px 48px;
  }
  .cpg-mark { width: 38px; height: 38px; }
  .cpg-logo__word { font-size: 1.28rem; }
  .cpg-lede { font-size: 17px; margin-top: 20px; }
  .cpg-ruo { display: block; }
  .cpg-foot__ruo { display: none; }
  .cpg-watermark { right: -200px; bottom: -220px; width: 640px; height: 640px; }
  .cpg-main { justify-content: center; min-height: 100vh; min-height: 100dvh; padding: 56px 48px 28px; }
}
@media (min-width: 1440px) {
  .cpg-brand { padding: 56px 80px 64px; }
}
