:root {
  --bg: #f6f3ef;
  --panel: #fffdf9;
  --text: #171717;
  --muted: #5f5a55;
  --line: rgba(23, 23, 23, 0.22);
  --line-strong: rgba(23, 23, 23, 0.42);
  --accent: #a66d58;
  --accent-dark: #8b5847;
  --accent-soft: rgba(166, 109, 88, 0.13);
  --danger: #9d3f3a;
  --success: #426a47;
  --radius: 18px;
  --shadow: 0 24px 80px rgba(36, 30, 26, 0.08);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 10%, rgba(166, 109, 88, 0.10), transparent 28rem),
    linear-gradient(135deg, #f8f6f2 0%, var(--bg) 100%);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

button, input, select, textarea { font: inherit; }
a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.page-shell {
  width: min(1420px, calc(100% - 56px));
  min-height: min(820px, calc(100vh - 56px));
  margin: 28px auto;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
  gap: 0;
  background: rgba(255, 253, 249, 0.88);
  border: 1px solid rgba(23, 23, 23, 0.05);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(18px);
}

.event-side,
.form-side { padding: clamp(34px, 5vw, 76px); }
.event-side { display: flex; flex-direction: column; justify-content: center; }
.form-side {
  border-left: 1px solid rgba(23, 23, 23, 0.12);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-logo {
  width: min(230px, 52vw);
  height: auto;
  display: block;
  margin-bottom: clamp(46px, 7vw, 72px);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-dark);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(2.55rem, 5.2vw, 5.35rem);
  line-height: 1.04;
  letter-spacing: -0.07em;
  font-weight: 560;
}

.lead {
  max-width: 690px;
  margin: clamp(24px, 3vw, 34px) 0 0;
  color: #24211f;
  font-size: clamp(1.03rem, 1.45vw, 1.42rem);
  line-height: 1.65;
  letter-spacing: 0.01em;
}

.event-facts {
  width: 100%;
  max-width: 760px;
  margin: clamp(34px, 4vw, 54px) 0 0;
}

.fact-row {
  display: grid;
  grid-template-columns: 178px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.fact-row:last-child { border-bottom: 1px solid var(--line); }
.fact-row dt {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0;
  color: #2a2725;
  font-size: 1rem;
}
.fact-row dd {
  margin: 0;
  color: #24211f;
  font-size: 1.02rem;
}
.icon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  color: var(--accent);
  flex: 0 0 auto;
}
.icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.accent-note {
  display: flex;
  gap: 16px;
  align-items: center;
  margin: 44px 0 0;
  color: var(--accent-dark);
  font-size: 1rem;
}
.accent-note span {
  width: 3px;
  height: 26px;
  background: var(--accent);
}

.availability-box {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 0 28px;
  color: var(--muted);
  font-size: 0.95rem;
}
.availability-box.full { color: var(--accent-dark); }
.availability-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px var(--accent-soft);
}

.registration-form { display: grid; gap: 26px; }
.field { display: grid; gap: 12px; }
.field label {
  color: #272321;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
}
.field label span { color: var(--muted); }
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  outline: none;
  padding: 0 0 11px;
  min-height: 38px;
  appearance: none;
}
.field textarea { resize: vertical; min-height: 84px; }
.field select { cursor: pointer; padding-right: 36px; }
.field-select { position: relative; }
.field-select::after {
  content: "";
  width: 10px;
  height: 10px;
  border-right: 1.5px solid var(--text);
  border-bottom: 1.5px solid var(--text);
  position: absolute;
  right: 4px;
  bottom: 20px;
  transform: rotate(45deg);
  pointer-events: none;
}
.field input:focus,
.field select:focus,
.field textarea:focus { border-bottom-color: var(--accent); }
.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-bottom-color: var(--danger); }
.field-error {
  color: var(--danger);
  font-size: 0.88rem;
  margin-top: -4px;
}

.consent-line {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  color: #332f2c;
  font-size: 0.96rem;
  line-height: 1.55;
}
.consent-line input {
  width: 21px;
  height: 21px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}

.primary-button {
  border: 0;
  border-radius: 4px;
  padding: 17px 22px;
  color: #fffdf9;
  background: var(--accent);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, opacity 180ms ease;
}
.primary-button:hover { background: var(--accent-dark); transform: translateY(-1px); }
.primary-button:disabled { cursor: wait; opacity: 0.68; transform: none; }
.form-hint {
  margin: -10px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 0.95rem;
}

.result-panel {
  border-top: 1px solid var(--line);
  margin-top: 30px;
  padding-top: 28px;
}
.result-panel h2 {
  margin: 0 0 12px;
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  line-height: 1.1;
  letter-spacing: -0.045em;
  font-weight: 560;
}
.result-panel p { margin: 0; color: var(--muted); }
.result-panel.success h2 { color: var(--success); }
.result-panel.waitlist h2 { color: var(--accent-dark); }
.result-panel.error h2 { color: var(--danger); }

.legal-page {
  background: #fffdf9;
}
.legal-shell {
  width: min(980px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(32px, 6vw, 76px) 0;
}
.legal-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  padding-bottom: 42px;
  border-bottom: 1px solid var(--line);
}
.legal-logo { width: 170px; }
.back-link { color: var(--accent-dark); font-size: 0.95rem; }
.legal-content { padding-top: 46px; }
.legal-content h1 {
  font-size: clamp(2rem, 5vw, 4.4rem);
  margin-bottom: 18px;
}
.legal-content h2 {
  margin: 44px 0 16px;
  font-size: clamp(1.35rem, 2vw, 2rem);
  letter-spacing: -0.04em;
}
.legal-content h3 { margin: 26px 0 10px; }
.legal-content p, .legal-content li { color: #37322e; }
.legal-content ul { padding-left: 20px; }
.legal-meta { color: var(--muted); }
.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 22px 0 10px;
  font-size: 0.96rem;
}
.legal-table th,
.legal-table td {
  text-align: left;
  vertical-align: top;
  padding: 14px 12px;
  border-top: 1px solid var(--line);
}
.legal-table th { color: var(--text); font-weight: 650; }
.legal-table tr:last-child td { border-bottom: 1px solid var(--line); }

.action-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.action-card {
  width: min(680px, 100%);
  background: rgba(255, 253, 249, 0.92);
  border: 1px solid rgba(23, 23, 23, 0.07);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(30px, 6vw, 64px);
}
.action-card img { width: 164px; margin-bottom: 42px; }
.action-card h1 {
  font-size: clamp(2rem, 5vw, 4.1rem);
  line-height: 1.04;
}
.action-card p { color: var(--muted); font-size: 1.05rem; }
.action-buttons { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 13px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--text);
  background: transparent;
  cursor: pointer;
}
.secondary-button:hover { border-color: var(--accent); color: var(--accent-dark); text-decoration: none; }

@media (max-width: 1060px) {
  .page-shell {
    grid-template-columns: 1fr;
    width: min(760px, calc(100% - 28px));
    margin: 14px auto;
    min-height: auto;
  }
  .form-side { border-left: 0; border-top: 1px solid rgba(23, 23, 23, 0.12); }
  .event-side, .form-side { padding: clamp(26px, 7vw, 48px); }
  .brand-logo { width: min(176px, 48vw); margin-bottom: 38px; }
  h1 { letter-spacing: -0.055em; }
}

@media (max-width: 640px) {
  body { background: #fffdf9; }
  .page-shell {
    width: 100%;
    margin: 0;
    border-radius: 0;
    border: 0;
    box-shadow: none;
    background: #fffdf9;
  }
  .event-side, .form-side { padding: 28px 22px; }
  .brand-logo { width: 136px; margin-bottom: 32px; }
  .eyebrow { font-size: 0.72rem; }
  h1 { font-size: clamp(2.1rem, 12vw, 3.2rem); }
  .lead { font-size: 1rem; line-height: 1.62; }
  .event-facts { margin-top: 30px; }
  .fact-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 17px 0;
  }
  .fact-row dt { gap: 12px; font-size: 0.95rem; }
  .fact-row dd { padding-left: 40px; font-size: 0.95rem; }
  .icon { width: 24px; height: 24px; }
  .accent-note { margin-top: 30px; font-size: 0.94rem; }
  .availability-box { padding-bottom: 22px; }
  .registration-form { gap: 23px; }
  .field { gap: 9px; }
  .field label, .consent-line { font-size: 0.94rem; }
  .field input, .field select, .field textarea { min-height: 36px; padding-bottom: 10px; }
  .field textarea { min-height: 76px; }
  .primary-button { width: 100%; min-height: 54px; font-size: 0.95rem; }
  .form-hint { font-size: 0.88rem; }
  .legal-shell { width: min(100% - 32px, 980px); }
  .legal-header { flex-direction: column; }
  .legal-logo { width: 142px; }
  .legal-table, .legal-table tbody, .legal-table tr, .legal-table th, .legal-table td { display: block; }
  .legal-table th { padding-bottom: 4px; }
  .legal-table td { padding-top: 4px; border-top: 0; }
  .legal-table tr { border-top: 1px solid var(--line); padding: 10px 0; }
  .action-buttons { flex-direction: column; }
  .secondary-button, .action-buttons .primary-button { width: 100%; }
}
