:root {
  --ink: #0e0c09;
  --ink-2: #14100c;
  --ink-3: #1c1610;
  --cream: #f2e9d8;
  --cream-dim: #cfc2aa;
  --muted: #9c8f77;
  --amber: #e0a458;
  --amber-hi: #f0be7a;
  --ember: #c96f2e;
  --red: #a32c26;
  --red-hi: #c53a32;
  --hairline: rgba(224, 164, 88, 0.22);
  --hairline-soft: rgba(242, 233, 216, 0.1);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Barlow", "Helvetica Neue", sans-serif;
  --cond: "Barlow Condensed", "Arial Narrow", sans-serif;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 20% -5%, rgba(201, 111, 46, 0.15), transparent 31rem),
    radial-gradient(circle at 100% 35%, rgba(163, 44, 38, 0.09), transparent 25rem),
    var(--ink);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

body::before {
  opacity: 0.16;
  background: url("../assets/img/tex-leather.jpg") center / 720px auto repeat;
  mix-blend-mode: soft-light;
}

body::after {
  opacity: 0.11;
  background: url("../assets/img/tex-smoke.jpg") center top / cover no-repeat;
  mix-blend-mode: screen;
}

[hidden] { display: none !important; }

img { display: block; max-width: 100%; }

a {
  color: var(--amber);
  text-decoration-color: rgba(224, 164, 88, 0.42);
  text-underline-offset: 0.18em;
}

a:hover { color: var(--amber-hi); }

button, input, select { font: inherit; }

button, select { cursor: pointer; }

button:disabled,
select:disabled { cursor: not-allowed; }

::selection { background: var(--red); color: var(--cream); }

:focus-visible {
  outline: 3px solid var(--amber-hi);
  outline-offset: 3px;
}

.wrap {
  width: min(100% - 36px, 1080px);
  margin-inline: auto;
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

p { margin: 0; }

.eyebrow,
.kicker,
.raffle-number,
.member-card-label {
  margin: 0 0 14px;
  color: var(--amber);
  font-family: var(--cond);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.24em;
  line-height: 1.2;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 11px;
}

.eyebrow::before {
  width: 28px;
  height: 1px;
  background: var(--amber);
  content: "";
  opacity: 0.7;
}

.btn {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 24px 14px;
  border: 1px solid transparent;
  border-radius: 3px;
  font-family: var(--cond);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.16em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 0.25s var(--ease), background 0.25s, border-color 0.25s, color 0.25s, box-shadow 0.25s, opacity 0.25s;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--red);
  color: var(--cream);
  box-shadow: 0 10px 28px rgba(163, 44, 38, 0.35);
}

.btn-primary:hover:not(:disabled) {
  background: var(--red-hi);
  color: #fff;
  transform: translateY(-2px);
}

.btn-primary:disabled {
  opacity: 0.38;
  box-shadow: none;
}

.btn-amber {
  background: var(--amber);
  color: #241708;
}

.btn-amber:hover:not(:disabled) {
  background: var(--amber-hi);
  color: #241708;
  transform: translateY(-2px);
}

.btn-ghost {
  border-color: var(--hairline);
  background: rgba(14, 12, 9, 0.35);
  color: var(--cream);
}

.btn-ghost:hover:not(:disabled) {
  border-color: var(--amber);
  color: var(--amber-hi);
  transform: translateY(-2px);
}

.btn-block { width: 100%; }

.btn-small {
  min-height: 44px;
  padding: 10px 13px 9px;
  font-size: 14px;
  letter-spacing: 0.1em;
}

.text-button {
  min-height: 44px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--amber);
  font-family: var(--cond);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-decoration: underline;
  text-decoration-color: rgba(224, 164, 88, 0.4);
  text-underline-offset: 0.25em;
  text-transform: uppercase;
}

.text-button:hover { color: var(--amber-hi); }

.brand-header { padding-block: 22px 12px; }

.brand {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--cream);
  text-decoration: none;
}

.brand:hover { color: var(--cream); }

.brand img {
  width: 72px;
  height: 39px;
  object-fit: contain;
}

.brand-copy { display: grid; line-height: 1; }

.brand-copy strong {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
}

.brand-copy span {
  margin-top: 5px;
  color: var(--cream-dim);
  font-family: var(--cond);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.join-page { min-height: calc(100vh - 100px); }

.join-layout {
  display: grid;
  gap: 32px;
  padding-block: 35px 64px;
}

.join-intro h1,
.profile-welcome h1,
.auth-needed h1,
.legal-main > h1 {
  font-size: clamp(46px, 13.2vw, 76px);
}

.join-intro h1 { max-width: 10ch; }

.join-intro .lede {
  max-width: 31ch;
  margin-top: 18px;
  color: var(--cream-dim);
  font-size: 18px;
}

.perk-list {
  display: grid;
  gap: 0;
  margin: 30px 0 0;
  padding: 0;
  border-block: 1px solid var(--hairline);
  list-style: none;
}

.perk-list li {
  min-height: 57px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--hairline-soft);
  color: var(--cream-dim);
}

.perk-list li:last-child { border-bottom: 0; }

.perk-list span {
  color: var(--red-hi);
  font-family: var(--cond);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.perk-list strong { font-size: 15.5px; font-weight: 500; }

.auth-card {
  position: relative;
  padding: 26px 20px 22px;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background:
    linear-gradient(145deg, rgba(163, 44, 38, 0.08), transparent 40%),
    rgba(28, 22, 16, 0.94);
  box-shadow: var(--shadow);
}

.auth-card::before,
.member-card::before,
.raffle-card::before {
  position: absolute;
  inset: 0;
  background: url("../assets/img/tex-leather.jpg") center / 620px auto repeat;
  content: "";
  mix-blend-mode: soft-light;
  opacity: 0.13;
  pointer-events: none;
}

.auth-card > div { position: relative; }

.card-heading { margin-bottom: 26px; }

.card-heading h2 {
  margin-bottom: 10px;
  font-size: 34px;
}

.card-heading > p:last-child {
  color: var(--cream-dim);
  font-size: 15.5px;
}

form { margin: 0; }

.field { display: grid; gap: 7px; margin-bottom: 17px; }

.field-grid,
.select-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.field-grid .field,
.select-grid .field { min-width: 0; }

label,
legend {
  color: var(--cream-dim);
  font-family: var(--cond);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.13em;
  line-height: 1.3;
  text-transform: uppercase;
}

.optional { color: var(--muted); font-size: 12px; }

input,
select {
  width: 100%;
  min-height: 50px;
  border: 1px solid rgba(224, 164, 88, 0.25);
  border-radius: 3px;
  background-color: rgba(7, 6, 4, 0.68);
  color: var(--cream);
  font-size: 17px;
}

input { padding: 11px 13px; }

select {
  padding: 10px 34px 10px 12px;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--amber) 50%),
    linear-gradient(135deg, var(--amber) 50%, transparent 50%);
  background-position: calc(100% - 17px) 21px, calc(100% - 12px) 21px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
}

input:hover,
select:hover { border-color: rgba(224, 164, 88, 0.5); }

input:focus,
select:focus {
  border-color: var(--amber-hi);
  outline: 2px solid rgba(240, 190, 122, 0.2);
  outline-offset: 0;
}

select:disabled { opacity: 0.45; }

.birthday-fieldset,
.code-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.birthday-fieldset legend { margin-bottom: 9px; }

.birthday-fieldset .field label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.field-note {
  margin: -7px 0 17px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}

.birthday-fieldset .field-note { margin-top: -7px; }

.field-note span:last-child { color: var(--cream-dim); }

.prefix-field {
  display: flex;
  align-items: center;
  border: 1px solid rgba(224, 164, 88, 0.25);
  border-radius: 3px;
  background: rgba(7, 6, 4, 0.68);
}

.prefix-field:focus-within {
  border-color: var(--amber-hi);
  outline: 2px solid rgba(240, 190, 122, 0.2);
}

.prefix-field > span {
  padding-left: 13px;
  color: var(--amber);
  font-family: var(--cond);
  font-size: 19px;
  font-weight: 600;
}

.prefix-field input {
  min-width: 0;
  padding-left: 4px;
  border: 0;
  background: transparent;
  outline: 0;
}

.honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.age-line {
  min-height: 70px;
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: start;
  gap: 12px;
  margin: 6px 0 19px;
  padding: 15px 14px;
  border-block: 1px solid var(--hairline);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.42;
  text-transform: none;
}

.age-line input {
  width: 22px;
  min-height: 22px;
  margin: 1px 0 0;
  padding: 0;
  accent-color: var(--red-hi);
}

.fine-print {
  margin-top: 15px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.auth-switch { margin-top: 14px; }

.form-status,
.raffle-state {
  min-height: 1.5em;
  margin-top: 13px;
  color: var(--amber-hi);
  font-size: 14px;
  line-height: 1.45;
}

.form-status[data-kind="error"],
.raffle-state[data-kind="error"] { color: #ef9b91; }

.code-fieldset legend { margin-bottom: 12px; }

.code-inputs {
  display: flex;
  gap: 6px;
}

.code-input {
  min-width: 0;
  height: 58px;
  flex: 1 1 0;
  padding: 0;
  border-color: var(--hairline);
  font-family: var(--cond);
  font-size: 28px;
  font-weight: 600;
  text-align: center;
}

.code-fieldset + .field-note { margin: 10px 0 19px; }

.site-footer {
  min-height: 100px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-block: 25px;
  border-top: 1px solid var(--hairline-soft);
  color: var(--muted);
  font-family: var(--cond);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Member page */
.profile-header,
.legal-header {
  border-bottom: 1px solid var(--hairline);
  background: rgba(14, 12, 9, 0.82);
  backdrop-filter: blur(14px);
}

.profile-nav {
  min-height: 75px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.brand-compact img { width: 60px; height: 34px; }

.profile-page { min-height: calc(100vh - 170px); padding-block: 38px 70px; }

.loading-panel,
.auth-needed {
  padding: 55px 0;
  color: var(--cream-dim);
}

.auth-needed h1 { margin-bottom: 16px; color: var(--cream); }

.auth-needed > p:not(.eyebrow) { margin-bottom: 25px; }

.profile-welcome { margin-bottom: 26px; }

.profile-welcome h1 { font-size: clamp(42px, 11vw, 66px); }

.birthday-card {
  position: relative;
  margin-bottom: 18px;
  padding: 23px 20px 24px;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: 7px;
  background: linear-gradient(125deg, rgba(224, 164, 88, 0.1), rgba(28, 22, 16, 0.78));
}

.birthday-card::after {
  position: absolute;
  top: -55px;
  right: -35px;
  width: 145px;
  height: 145px;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  content: "";
  box-shadow: 0 0 45px rgba(224, 164, 88, 0.09);
}

.birthday-card h2 { margin-bottom: 7px; font-size: 27px; }

.birthday-card > p:last-child { position: relative; z-index: 1; color: var(--cream-dim); }

.birthday-card.is-now {
  border-color: rgba(240, 190, 122, 0.72);
  background: linear-gradient(125deg, rgba(224, 164, 88, 0.24), rgba(163, 44, 38, 0.16) 70%, var(--ink-3));
  box-shadow: 0 0 42px rgba(224, 164, 88, 0.18), inset 0 0 32px rgba(224, 164, 88, 0.07);
}

.birthday-card.is-now h2 { color: var(--amber-hi); }

.member-card {
  position: relative;
  min-height: 246px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 23px 20px;
  overflow: hidden;
  border: 1px solid rgba(224, 164, 88, 0.45);
  border-radius: 10px;
  background:
    linear-gradient(145deg, rgba(163, 44, 38, 0.24), transparent 43%),
    linear-gradient(325deg, rgba(224, 164, 88, 0.08), transparent 50%),
    var(--ink-3);
  box-shadow: var(--shadow);
}

.member-card::after {
  position: absolute;
  right: -95px;
  bottom: -125px;
  width: 260px;
  height: 260px;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  content: "";
}

.member-card-top,
.member-card-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.member-card h2 { margin-bottom: 5px; font-size: 31px; }

.member-card-top > div > p:last-child {
  color: var(--cream-dim);
  font-size: 14px;
}

.member-logo {
  width: 66px;
  height: 36px;
  object-fit: contain;
  opacity: 0.8;
}

.member-card-bottom { align-items: end; margin-top: 24px; }

.member-number {
  margin-bottom: 3px;
  color: var(--amber-hi);
  font-family: var(--cond);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.15em;
}

.card-code {
  color: var(--muted);
  font-family: var(--cond);
  font-size: 12px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.member-qr-wrap {
  flex: 0 0 auto;
  padding: 5px;
  border-radius: 3px;
  background: #fff;
}

.member-qr-wrap img { width: 74px; height: 74px; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 65px;
  border-block: 1px solid var(--hairline);
}

.stats-grid div {
  min-width: 0;
  padding: 17px 7px 16px;
  border-right: 1px solid var(--hairline-soft);
  text-align: center;
}

.stats-grid div:last-child { border-right: 0; }

.stats-grid strong {
  display: block;
  overflow: hidden;
  color: var(--cream);
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 500;
  line-height: 1;
  text-overflow: ellipsis;
}

.stats-grid span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-family: var(--cond);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.section-heading { margin-bottom: 26px; }

.section-heading h2 { margin-bottom: 10px; font-size: 39px; }

.section-heading > p:last-child { color: var(--cream-dim); }

.raffles { display: grid; gap: 16px; }

.raffle-card {
  position: relative;
  padding: 24px 20px 21px;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: 7px;
  background: rgba(28, 22, 16, 0.9);
}

.raffle-card > * { position: relative; z-index: 1; }

.raffle-card h3 { margin-bottom: 8px; font-size: 29px; }

.raffle-card > p:not(.raffle-number, .raffle-state) { color: var(--cream-dim); }

.rules-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  margin: 7px 0 15px;
  font-size: 14px;
}

.raffle-card.is-entered {
  border-color: rgba(224, 164, 88, 0.46);
  background: linear-gradient(135deg, rgba(224, 164, 88, 0.09), rgba(28, 22, 16, 0.92));
}

.raffle-card.is-entered .raffle-state {
  min-height: 52px;
  display: flex;
  align-items: center;
  margin: 5px 0 0;
  padding: 11px 13px;
  border-left: 2px solid var(--amber);
  background: rgba(224, 164, 88, 0.06);
  color: var(--amber-hi);
  font-family: var(--cond);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.raffle-confirm {
  padding: 14px;
  border: 1px solid var(--hairline);
  background: rgba(14, 12, 9, 0.5);
}

.raffle-confirm > p {
  margin-bottom: 12px;
  color: var(--cream);
  font-weight: 500;
}

.raffle-confirm > div { display: grid; gap: 9px; }

.profile-footer {
  padding-block: 27px;
  border-top: 1px solid var(--hairline);
  background: rgba(10, 8, 6, 0.4);
}

.profile-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: var(--muted);
  font-size: 13px;
}

/* Terms and rules */
.legal-main {
  max-width: 790px;
  padding-block: 39px 70px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 31px;
  color: var(--muted);
  font-family: var(--cond);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.breadcrumb span { color: var(--red-hi); }

.legal-main > h1 { margin-bottom: 21px; font-size: clamp(40px, 11vw, 58px); }

.legal-lede {
  padding-bottom: 31px;
  border-bottom: 1px solid var(--hairline);
  color: var(--cream-dim);
  font-size: 17px;
}

.legal-body { counter-reset: legal; }

.legal-body section { padding: 27px 0; border-bottom: 1px solid var(--hairline-soft); }

.legal-body h2 {
  margin-bottom: 10px;
  color: var(--amber-hi);
  font-family: var(--cond);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.2;
}

.legal-body p { color: var(--cream-dim); font-size: 15.5px; line-height: 1.7; }

.legal-body strong { color: var(--cream); }

.draft-note {
  margin-top: 30px;
  padding: 15px 16px;
  border: 1px solid var(--hairline);
  color: var(--amber);
  font-family: var(--cond);
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

@media (min-width: 700px) {
  .wrap { width: min(100% - 56px, 1080px); }
  .brand-header { padding-top: 30px; }
  .join-layout { grid-template-columns: minmax(0, 0.9fr) minmax(390px, 0.72fr); align-items: start; gap: clamp(45px, 7vw, 95px); padding-block: 70px 95px; }
  .join-intro { position: sticky; top: 45px; padding-top: 28px; }
  .join-intro h1 { font-size: clamp(55px, 6.2vw, 76px); }
  .auth-card { padding: 34px 32px 28px; }
  .site-footer { min-height: 80px; flex-direction: row; justify-content: space-between; }
  .profile-page { max-width: 820px; padding-top: 55px; }
  .member-card { min-height: 285px; padding: 31px; }
  .member-card h2 { font-size: 38px; }
  .member-qr-wrap img { width: 88px; height: 88px; }
  .raffles { grid-template-columns: 1fr 1fr; }
  .raffles .section-heading { grid-column: 1 / -1; }
  .raffle-card { display: flex; flex-direction: column; padding: 28px 25px 24px; }
  .raffle-card .rules-link { margin-top: auto; }
  .raffle-confirm > div { grid-template-columns: 1fr auto; }
  .legal-main { padding-top: 60px; }
}

@media (max-width: 370px) {
  .wrap { width: min(100% - 28px, 1080px); }
  .brand-copy { display: none; }
  .auth-card { padding-inline: 15px; }
  .code-inputs { gap: 4px; }
  .code-input { height: 54px; font-size: 25px; }
  .btn { padding-inline: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}

/* ===== no-Instagram checkbox ===== */
.no-insta-row { margin-top: 10px; opacity: 0.92; }
.no-insta-row span { color: var(--cream-dim); font-size: 15px; }
.prefix-field.is-disabled { opacity: 0.4; }
.prefix-field.is-disabled input { pointer-events: none; }
