/* ============================================================
   HUT16-AUTH.CSS — Editorial · Numbered Ladder
   Matches the HUT16 profile skin exactly.
   Loads AFTER main.css — overrides any conflicting rules.
   ============================================================ */

:root {
  --h16-bg:        #FAF7F2;
  --h16-paper:     #FFFFFF;
  --h16-ink:       #1A1815;
  --h16-ink-2:     #4A4540;
  --h16-mute:      #8B8178;
  --h16-dim:       #B5ADA3;
  --h16-rule:      #E8E0D3;

  --h16-accent:    #B54A1E;   /* burnt terracotta */
  --h16-accent-2:  #2F5A3A;   /* deep forest */
  --h16-out:       #8E1F1F;

  --h16-font:      'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --h16-display:   'Fraunces', 'Inter', Georgia, serif;
}

/* ------------------------------------------------------------
   Base — override main.css aggressively
   ------------------------------------------------------------ */
html, body {
  background: var(--h16-bg) !important;
  color: var(--h16-ink) !important;
  font-family: var(--h16-font) !important;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 1.5 !important;
  min-height: 100vh;
  overflow-x: hidden;
  display: block !important;   /* main.css uses flex centering — undo it */
  align-items: initial !important;
  justify-content: initial !important;
  background-image: none !important;   /* kill the old radial gradients */
}

.h16a-app {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 20px 48px;
}

/* ------------------------------------------------------------
   Top strip — logo slot + wordmark
   ------------------------------------------------------------ */
.h16a-top {
  padding: 22px 0 26px;
  border-bottom: 1px solid var(--h16-rule);
  margin-bottom: 26px;
}

.h16a-brand { display: flex; align-items: center; gap: 14px; }

/* ICON / LOGO SLOT — square, editorial, ready for <img> swap */
.h16a-logo {
  width: 52px;
  height: 52px;
  border-radius: 4px;
  background: var(--h16-ink);
  color: var(--h16-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  overflow: hidden;
}
/* If an <img> is dropped inside, make it fill cleanly */
.h16a-logo > img,
.h16a-logo > svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.h16a-brand-text { display: flex; flex-direction: column; gap: 3px; }
.h16a-brand-name {
  font-family: var(--h16-display);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.6px;
  color: var(--h16-ink);
  line-height: 1;
}
.h16a-brand-name span { color: var(--h16-accent); }
.h16a-brand-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--h16-mute);
}

/* ------------------------------------------------------------
   Numbered sections
   ------------------------------------------------------------ */
.h16a-sec {
  position: relative;
  padding: 22px 0 26px;
  border-bottom: 1px solid var(--h16-rule);
}
.h16a-sec:last-of-type { border-bottom: none; }

/* Paper variant used for the auth block */
.h16a-sec--paper {
  background: var(--h16-paper);
  border: 1px solid var(--h16-rule);
  border-radius: 4px;
  padding: 26px 18px 22px;
  margin: 0 -20px 0 -20px;
  padding-left: 38px;
  padding-right: 20px;
}

.h16a-num {
  position: absolute;
  top: 22px;
  left: 0;
  font-family: var(--h16-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.8px;
  color: var(--h16-dim);
  font-variant-numeric: tabular-nums;
}
.h16a-sec--paper .h16a-num { left: 18px; }

.h16a-eyebrow {
  display: block;
  padding-left: 34px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--h16-accent);
  margin-bottom: 12px;
}
.h16a-sec--paper .h16a-eyebrow { color: var(--h16-ink-2); padding-left: 16px; }

.h16a-title {
  font-family: var(--h16-display);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.6px;
  color: var(--h16-ink);
  margin: 6px 0 12px;
  padding-left: 34px;
}

.h16a-prose {
  font-size: 14px;
  line-height: 1.55;
  color: var(--h16-ink-2);
  padding-left: 34px;
  max-width: 40ch;
}
.h16a-prose--tight { margin-bottom: 16px; }

/* Bullet points */
.h16a-points {
  list-style: none;
  padding: 0;
  margin: 16px 0 0 34px;
}
.h16a-points li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  padding: 8px 0;
  font-size: 13px;
  color: var(--h16-ink-2);
  font-weight: 500;
}
.h16a-points li i {
  color: var(--h16-accent-2);
  font-size: 13px;
  padding-top: 3px;
}

/* ------------------------------------------------------------
   Switch — text-only, numbered, editorial
   ------------------------------------------------------------ */
.h16a-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding-left: 16px;
  margin: 8px 0 22px;
  border-bottom: 1px solid var(--h16-rule);
}

.h16a-switch-btn {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 12px 0 14px;
  background: transparent;
  border: none;
  font-family: var(--h16-font);
  cursor: pointer;
  position: relative;
  text-align: left;
  transition: color 0.2s;
}
.h16a-switch-btn::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--h16-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.h16a-switch-btn.active::after { transform: scaleX(1); }

.h16a-switch-num {
  font-family: var(--h16-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  color: var(--h16-dim);
  font-variant-numeric: tabular-nums;
}
.h16a-switch-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--h16-mute);
}
.h16a-switch-btn.active .h16a-switch-num { color: var(--h16-accent); }
.h16a-switch-btn.active .h16a-switch-label { color: var(--h16-ink); }

/* ------------------------------------------------------------
   Forms
   ------------------------------------------------------------ */
.h16a-form { display: none; padding-left: 16px; }
.h16a-form.active { display: block; animation: h16a-in 0.28s ease; }

@keyframes h16a-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.h16a-field { margin-bottom: 18px; }

.h16a-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--h16-mute);
  margin-bottom: 8px;
}

.h16a-optional {
  font-size: 10px;
  font-weight: 600;
  color: var(--h16-dim);
  text-transform: none;
  letter-spacing: 0.2px;
  margin-left: 6px;
}

/* Underlined input — matches profile editorial inputs */
.h16a-input {
  position: relative;
  display: flex;
  align-items: center;
}
.h16a-input input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--h16-rule);
  padding: 8px 0 8px;
  font-family: var(--h16-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--h16-ink);
  outline: none;
  transition: border-color 0.2s;
  font-variant-numeric: tabular-nums;
}
.h16a-input input::placeholder {
  color: var(--h16-dim);
  font-weight: 500;
  font-family: var(--h16-font);
  font-size: 14px;
  letter-spacing: 0.2px;
}
.h16a-input input:focus { border-bottom-color: var(--h16-accent); }

/* PIN uses a mono-ish font for visibility */
#loginPin,
#regPin {
  font-family: 'Courier New', monospace !important;
  letter-spacing: 4px;
  font-size: 18px;
}

.h16a-input--with-eye input { padding-right: 40px; }

.h16a-eye {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  background: transparent;
  border: none;
  color: var(--h16-mute);
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: color 0.2s, background 0.2s;
}
.h16a-eye:hover {
  color: var(--h16-ink);
  background: rgba(0, 0, 0, 0.03);
}

.h16a-help {
  display: block;
  font-size: 11px;
  color: var(--h16-mute);
  margin-top: 8px;
  font-weight: 500;
  letter-spacing: 0.2px;
  line-height: 1.4;
}

/* ------------------------------------------------------------
   CTA — solid editorial block, left-aligned
   ------------------------------------------------------------ */
.h16a-cta {
  display: block;
  width: 100%;
  margin-top: 22px;
  padding: 18px 22px;
  background: var(--h16-ink);
  color: var(--h16-bg);
  border: none;
  border-radius: 0;
  font-family: var(--h16-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.2px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  text-align: left;
}
.h16a-cta:hover:not(:disabled) { background: var(--h16-accent); }
.h16a-cta:active:not(:disabled) { transform: scale(0.99); }
.h16a-cta:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: var(--h16-dim);
}

/* ------------------------------------------------------------
   Foot line
   ------------------------------------------------------------ */
.h16a-foot {
  margin-top: 16px;
  font-size: 12px;
  color: var(--h16-mute);
  text-align: left;
  font-weight: 500;
}
.h16a-foot a {
  color: var(--h16-ink);
  font-weight: 800;
  text-decoration: none;
  border-bottom: 1.5px solid var(--h16-accent);
  padding-bottom: 1px;
  margin-left: 3px;
  transition: color 0.2s;
}
.h16a-foot a:hover { color: var(--h16-accent); }

/* ------------------------------------------------------------
   Community links (Section 03)
   ------------------------------------------------------------ */
.h16a-comm {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  padding-left: 34px;
  border-bottom: 1px solid var(--h16-rule);
  text-decoration: none;
  color: var(--h16-ink);
  font-size: 14px;
  font-weight: 600;
  transition: padding-left 0.2s ease;
}
.h16a-comm:hover { padding-left: 40px; }
.h16a-comm:last-of-type { border-bottom: none; }
.h16a-comm i:first-child {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--h16-ink);
  color: var(--h16-bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.h16a-comm.wa i:first-child { background: #25D366; }
.h16a-comm.tg i:first-child { background: #229ED9; }
.h16a-comm i:last-child {
  color: var(--h16-mute);
  font-size: 13px;
  transition: transform 0.2s ease;
}
.h16a-comm:hover i:last-child { transform: translateX(4px); }

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */
.h16a-footer {
  padding-top: 24px;
  text-align: left;
}
.h16a-footer p {
  font-size: 11px;
  color: var(--h16-mute);
  line-height: 1.5;
  font-weight: 500;
}
.h16a-sig {
  margin-top: 8px;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--h16-dim) !important;
}

/* ------------------------------------------------------------
   Toast — restyle the .zent-toast to match
   ------------------------------------------------------------ */
.zent-toast {
  background: var(--h16-ink) !important;
  color: var(--h16-bg) !important;
  border: none !important;
  border-radius: 0 !important;
  font-family: var(--h16-font) !important;
  font-weight: 700 !important;
  letter-spacing: 0.3px !important;
  padding: 14px 22px !important;
  box-shadow: 0 12px 34px rgba(26, 24, 21, 0.28) !important;
}
.zent-toast.success { background: var(--h16-accent-2) !important; }
.zent-toast.error   { background: var(--h16-out) !important; }
.zent-toast.warning { background: var(--h16-accent) !important; }

/* ------------------------------------------------------------
   Hide any old ZENT artifacts
   ------------------------------------------------------------ */
.zent-auth,
.zent-hero,
.zent-card,
.zent-brand,
.zent-brand-mark,
.zent-brand-name,
.zent-tagline,
.zent-hero-points,
.zent-or,
.zent-social,
.zent-legal {
  display: none !important;
}

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */
@media (min-width: 640px) {
  .h16a-app { max-width: 560px; padding: 0 28px 60px; }
  .h16a-title { font-size: 36px; }
  .h16a-brand-name { font-size: 30px; }
  .h16a-logo { width: 58px; height: 58px; font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .h16a-form, .h16a-switch-btn::after, .h16a-comm,
  .h16a-comm i:last-child, .zent-toast {
    animation: none !important;
    transition: none !important;
  }
}

/* ------------------------------------------------------------
   Mine — referral stats block (editorial 2×2 grid)
   ------------------------------------------------------------ */
.h16-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 24px;
  padding-left: 34px;
  margin: 14px 0 0;
}

.h16-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.h16-stat dt {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--h16-mute);
  font-variant-numeric: tabular-nums;
}

.h16-stat dd {
  font-family: var(--h16-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--h16-ink);
  letter-spacing: -0.6px;
  line-height: 1;
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.h16-stat--total {
  grid-column: 1 / -1;
  padding-top: 16px;
  border-top: 1px solid var(--h16-rule);
}
.h16-stat--total dt { color: var(--h16-accent); }
.h16-stat--total dd {
  font-size: 38px;
  color: var(--h16-accent);
  letter-spacing: -0.8px;
}