:root {
  color-scheme: light;
  --ink: #282725;
  --muted: #77716a;
  --paper: #f6f3ee;
  --panel: #fffdfa;
  --line: #ddd7cf;
  --accent: #762c46;
  --accent-dark: #5c2035;
  --wine: #622f3d;
  --danger: #a33a2d;
  font-family: Inter, Montserrat, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}

button, input { font: inherit; }

.access-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 32px;
  overflow: hidden;
  position: relative;
}

.access-shell::before,
.access-shell::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(98, 47, 61, .13);
  border-radius: 50%;
  pointer-events: none;
}

.access-shell::before { width: 520px; height: 520px; left: -280px; top: -250px; }
.access-shell::after { width: 360px; height: 360px; right: -190px; bottom: -190px; }

.access-card {
  width: min(960px, 100%);
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(420px, 1.08fr);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 24px 70px rgba(40, 39, 37, .09);
  position: relative;
  z-index: 1;
}

.brand-panel {
  padding: 48px;
  display: flex;
  flex-direction: column;
  color: #fff;
  background: var(--wine);
  position: relative;
  overflow: hidden;
}

.brand-panel::after {
  content: "";
  width: 280px;
  height: 280px;
  position: absolute;
  right: -140px;
  bottom: -110px;
  border: 54px solid rgba(255, 255, 255, .06);
  border-radius: 50%;
}

.brand-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 50%;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  letter-spacing: -.08em;
}

.brand-name {
  margin: auto 0 0;
  font-size: clamp(35px, 4.4vw, 58px);
  line-height: .9;
  letter-spacing: -.055em;
}

.brand-name strong,
.brand-name span { display: block; }
.brand-name strong { font-weight: 700; }
.brand-name span { margin-top: 12px; font-size: .42em; letter-spacing: .3em; }

.brand-note {
  margin: 48px 0 0;
  color: rgba(255, 255, 255, .65);
  font-size: 13px;
  line-height: 1.65;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.form-panel {
  padding: clamp(44px, 6vw, 76px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.form-copy h1 {
  margin: 0;
  max-width: 390px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 5vw, 56px);
  font-weight: 400;
  line-height: .98;
  letter-spacing: -.045em;
}

.form-copy > p:last-child {
  margin: 24px 0 0;
  max-width: 390px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

#access-form { margin-top: 42px; }

#access-form > label {
  display: block;
  margin-bottom: 9px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .04em;
}

.code-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 54px;
  border: 1px solid #cfc8bf;
  background: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.code-control:has(input:focus-visible) {
  border-color: var(--wine);
}

.code-control input {
  min-width: 0;
  height: 52px;
  padding: 0 16px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 16px;
  letter-spacing: .08em;
}

.code-control button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 19px;
  border: 0;
  color: #fff;
  background: var(--accent);
  cursor: pointer;
  transition: background 160ms ease;
}

.code-control button:hover { background: var(--accent-dark); }
.code-control button:disabled { cursor: wait; opacity: .7; }
.code-control button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.code-control button:focus { outline: none; }
.code-control button:focus-visible {
  outline: 3px solid rgba(98, 47, 61, .32);
  outline-offset: 3px;
}

.status {
  min-height: 21px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.status.is-error { color: var(--danger); }
.status.is-loading::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--accent); animation: pulse 900ms ease-in-out infinite alternate; }

.privacy-note {
  margin: 28px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: #989189;
  font-size: 11px;
  line-height: 1.55;
}

@keyframes pulse { to { opacity: .25; transform: scale(.72); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (max-width: 760px) {
  .access-shell { place-items: stretch; padding: 0; overflow: visible; }
  .access-shell::before, .access-shell::after { display: none; }
  .access-card { min-height: 100vh; min-height: 100dvh; grid-template-columns: 1fr; border: 0; box-shadow: none; }
  .brand-panel { min-height: 178px; padding: 24px; flex-direction: row; align-items: flex-start; }
  .brand-mark { width: 44px; height: 44px; flex: 0 0 auto; font-size: 15px; }
  .brand-name { margin: 3px 0 0 18px; font-size: 29px; }
  .brand-name span { margin-top: 8px; font-size: 10px; }
  .brand-note { display: none; }
  .brand-panel::after { width: 210px; height: 210px; right: -98px; bottom: -142px; border-width: 40px; }
  .form-panel { padding: 42px 24px 30px; justify-content: flex-start; }
  .form-copy h1 { max-width: 310px; font-size: 43px; }
  #access-form { margin-top: 34px; }
}

@media (max-width: 420px) {
  .code-control { grid-template-columns: 1fr; border: 0; gap: 10px; background: transparent; }
  .code-control input { border: 1px solid #cfc8bf; background: #fff; }
  .code-control:has(input:focus-visible) { border-color: transparent; box-shadow: none; }
  .code-control input:focus-visible { border-color: var(--wine); }
  .code-control button { width: 100%; }
}

/* Keep the longer two-line wordmark inside its existing panel. */
.brand-name { font-size: clamp(24px, 2.7vw, 34px); letter-spacing: .03em; }
.brand-name span { font-size: 12px; letter-spacing: .3em; }
@media (max-width: 700px) { .brand-name { font-size: 22px; } }
