:root {
  --ink: #202225;
  --muted: #60646d;
  --paper: #fbf8f1;
  --surface: #fffdf8;
  --line: #e6dfd1;
  --sage: #597064;
  --sage-dark: #31463d;
  --clay: #bd5b46;
  --blue: #253f5b;
  --focus: #b94f3e;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.hero {
  min-height: 92vh;
  position: relative;
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(28px, 5vw, 64px);
}

.hero__image,
.hero__shade {
  position: absolute;
  inset: 0;
}

.hero__image {
  background-image: url("hero.png?v=green-courtyard-3");
  background-position: center;
  background-size: cover;
  transform: scale(1.01);
  z-index: -2;
}

.hero__shade {
  background:
    linear-gradient(90deg, rgba(18, 20, 20, 0.78) 0%, rgba(18, 20, 20, 0.52) 38%, rgba(18, 20, 20, 0.08) 78%),
    linear-gradient(0deg, rgba(18, 20, 20, 0.48) 0%, rgba(18, 20, 20, 0.02) 42%);
  z-index: -1;
}

.hero__content {
  max-width: 900px;
  color: white;
  padding-bottom: clamp(12px, 4vh, 56px);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--clay);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #ffd7c9;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 900px;
  margin-bottom: 22px;
  font-size: clamp(2.4rem, 5.4vw, 4.9rem);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 4.3vw, 3.7rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.lead {
  max-width: 660px;
  margin-bottom: 34px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1.05rem, 2.1vw, 1.36rem);
  line-height: 1.55;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 14px 22px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:focus-visible,
input:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--focus), white 35%);
  outline-offset: 3px;
}

.button--primary {
  background: var(--clay);
  color: white;
  box-shadow: 0 14px 28px rgba(86, 37, 28, 0.24);
}

.button--primary:hover {
  background: #a94d3b;
}

.button--secondary {
  border-color: #d8d0c0;
  background: #fffaf1;
  color: var(--sage-dark);
}

.button--secondary:hover {
  border-color: var(--sage);
  background: #f2f7f1;
}

.button--ghost {
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.14);
  color: white;
}

.details {
  width: min(1120px, calc(100% - 32px));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: -36px auto 0;
  position: relative;
  z-index: 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
  box-shadow: 0 18px 60px rgba(52, 40, 26, 0.12);
}

.detail {
  min-height: 120px;
  display: grid;
  align-content: center;
  gap: 10px;
  background: var(--surface);
  padding: 24px;
}

.detail span,
.payment-note span,
label span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.detail strong {
  color: var(--blue);
  font-size: clamp(1.04rem, 2vw, 1.35rem);
  line-height: 1.28;
}

.venue-link {
  width: fit-content;
  text-decoration-color: color-mix(in srgb, var(--blue), transparent 58%);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: text-decoration-color 180ms ease;
}

.venue-link:hover {
  text-decoration-color: var(--clay);
}

.venue-link:focus-visible {
  border-radius: 4px;
  outline: 3px solid color-mix(in srgb, var(--focus), white 35%);
  outline-offset: 4px;
}

.program,
.registration {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.program {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(28px, 5vw, 72px);
  padding: clamp(72px, 10vw, 126px) 0;
}

.program__intro p,
.registration__copy p {
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.7;
}

.topics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.topic {
  --topic-bg: #e7f2ec;
  --topic-hover: #d5e9df;
  min-height: 164px;
  display: grid;
  align-content: end;
  gap: 10px;
  border: 0;
  border-radius: 26px;
  background: var(--topic-bg);
  padding: 24px;
  color: var(--sage-dark);
  line-height: 1.35;
  box-shadow: 0 10px 30px rgba(49, 70, 61, 0.07);
  transform: scale(1);
  transition:
    background-color 220ms ease,
    box-shadow 220ms ease,
    transform 220ms ease;
}

.topic:nth-child(2) {
  --topic-bg: #f9e6df;
  --topic-hover: #f3d1c5;
}

.topic:nth-child(3) {
  --topic-bg: #e5edf6;
  --topic-hover: #d2e1f0;
}

.topic:nth-child(4) {
  --topic-bg: #f5edcf;
  --topic-hover: #ebdda9;
}

.topic:nth-child(5) {
  --topic-bg: #ece7f4;
  --topic-hover: #ddd4ec;
}

.topic:nth-child(6) {
  --topic-bg: #e7f0d8;
  --topic-hover: #d5e5bb;
}

.topic:hover {
  background: var(--topic-hover);
  box-shadow: 0 18px 38px rgba(49, 70, 61, 0.14);
  transform: scale(1.025);
}

.topic strong {
  font-size: 1.12rem;
  line-height: 1.25;
}

.topic span {
  color: #55635d;
  font-size: 0.93rem;
  line-height: 1.48;
}

.registration {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(320px, 0.72fr);
  gap: clamp(28px, 6vw, 86px);
  align-items: start;
  padding: 0 0 clamp(72px, 10vw, 120px);
}

.payment-note {
  margin-top: 30px;
  border: 1px solid #d6dfd8;
  border-radius: 8px;
  background: #f2f7f1;
  padding: 20px;
}

.payment-note strong {
  display: block;
  margin: 8px 0;
  color: var(--sage-dark);
  line-height: 1.35;
}

.payment-note p {
  margin-bottom: 0;
  font-size: 0.98rem;
}

.form {
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: clamp(20px, 4vw, 34px);
  box-shadow: 0 20px 70px rgba(52, 40, 26, 0.12);
}

label {
  display: grid;
  gap: 8px;
}

input {
  width: 100%;
  min-height: 52px;
  border: 1px solid #d8d0c0;
  border-radius: 8px;
  background: #fffaf1;
  color: var(--ink);
  padding: 0 14px;
}

input::placeholder {
  color: #9a9388;
}

.form__actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 4px;
}

.form__button {
  width: 100%;
  margin-top: 4px;
}

.form__button:disabled {
  cursor: progress;
  opacity: 0.72;
  transform: none;
}

.form__message {
  margin: 0;
  border-radius: 8px;
  padding: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.form__message--success {
  background: #eef7ee;
  color: #264e2f;
}

.form__message--error {
  background: #fff0ed;
  color: #8f2e22;
}

.admin {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(36px, 7vw, 88px) 0;
}

.admin__header {
  margin-bottom: 28px;
}

.admin__header h1 {
  color: var(--blue);
  font-size: clamp(2.1rem, 5vw, 4.6rem);
}

.admin__header p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.08rem;
}

.admin__summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin__counter {
  display: inline-flex;
  margin: 0;
  border: 1px solid #d9dfed;
  border-radius: 8px;
  background: #f4f7fb;
  padding: 10px 12px;
  color: var(--blue) !important;
  font-weight: 800;
}

.admin__counter--waitlist {
  border-color: #e8d9b3;
  background: #fff8e8;
  color: #765718 !important;
}

.admin__counter--visitors {
  border-color: #c9dfd1;
  background: #edf7f0;
  color: #2f6242 !important;
}

.admin__counter--views {
  border-color: #ead0c7;
  background: #fff2ed;
  color: #8a4637 !important;
}

.admin__reset {
  min-height: 42px;
  border: 1px solid #dfb9ae;
  border-radius: 8px;
  background: #fff;
  color: #8a3f32;
  padding: 9px 13px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.admin__reset:hover,
.admin__reset:focus-visible {
  border-color: #bd6b59;
  background: #fff0ec;
}

.admin__reset:disabled {
  cursor: wait;
  opacity: 0.65;
}

.admin__table {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 20px 70px rgba(52, 40, 26, 0.12);
}

.admin__section-head {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 14px 20px;
}

.admin__section-head h2 {
  margin: 0;
  color: var(--blue);
  font-size: 1.35rem;
  line-height: 1.2;
}

.admin__filter {
  min-height: 40px;
  border: 1px solid #d8d0c0;
  border-radius: 8px;
  background: #fffaf1;
  color: var(--sage-dark);
  padding: 8px 12px;
  font-weight: 800;
  cursor: pointer;
}

.admin__filter:hover,
.admin__filter[aria-pressed="true"] {
  border-color: var(--sage);
  background: #e7f2ec;
}

.admin__filter:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--focus), white 35%);
  outline-offset: 3px;
}

.admin__message {
  margin: 0;
  padding: 22px;
  color: var(--muted);
  font-weight: 700;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 16px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #f2efe6;
  color: var(--sage-dark);
  font-size: 0.78rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

td {
  color: var(--ink);
}

small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.status {
  display: inline-flex;
  border-radius: 8px;
  padding: 6px 9px;
  background: #f2efe6;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.status--succeeded {
  background: #e5f3e7;
  color: #255d33;
}

.status--pending {
  background: #fff4d8;
  color: #7c5714;
}

.status--not_started,
.status--registered {
  background: #edf2f7;
  color: #385269;
}

.status--canceled {
  background: #fff0ed;
  color: #8f2e22;
}

.status--refunded {
  background: #f0ecf8;
  color: #594077;
}

.result {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.result__panel {
  width: min(760px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: clamp(24px, 6vw, 58px);
  box-shadow: 0 20px 70px rgba(52, 40, 26, 0.12);
}

.result__panel h1 {
  color: var(--blue);
  font-size: clamp(2.2rem, 6vw, 4.8rem);
}

.result__panel p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.65;
}

@media (max-width: 840px) {
  .hero {
    min-height: 86vh;
    padding: 24px 18px;
  }

  .hero__shade {
    background:
      linear-gradient(0deg, rgba(18, 20, 20, 0.82) 0%, rgba(18, 20, 20, 0.36) 58%, rgba(18, 20, 20, 0.1) 100%),
      linear-gradient(90deg, rgba(18, 20, 20, 0.58) 0%, rgba(18, 20, 20, 0.16) 100%);
  }

  .hero__content {
    padding-bottom: 26px;
  }

  .details,
  .program,
  .registration {
    width: min(100% - 24px, 620px);
  }

  .details,
  .program,
  .registration,
  .topics {
    grid-template-columns: 1fr;
  }

  .details {
    margin-top: -22px;
  }

  .detail {
    min-height: 92px;
  }

  .program {
    padding: 66px 0;
  }
}

@media (max-width: 520px) {
  .hero {
    min-height: auto;
    align-items: start;
    padding-top: min(67vw, 330px);
    background: #18201c;
  }

  .hero__image {
    background-color: #18201c;
    background-position: center top;
    background-repeat: no-repeat;
    background-size: 100% auto;
    transform: none;
  }

  .hero__shade {
    background:
      linear-gradient(180deg, rgba(18, 20, 20, 0.04) 0, rgba(18, 20, 20, 0.22) 20vw, #18201c min(67vw, 330px)),
      linear-gradient(90deg, rgba(18, 20, 20, 0.42) 0%, rgba(18, 20, 20, 0.04) 100%);
  }

  .hero__content {
    padding-bottom: 18px;
  }

  .hero h1 {
    font-size: clamp(2rem, 10vw, 3.3rem);
  }

  .hero__actions,
  .button {
    width: 100%;
  }

  .topic {
    min-height: 142px;
    border-radius: 22px;
  }

  .admin__section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .admin__filter {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .topic {
    transition: none;
  }

  .topic:hover {
    transform: none;
  }
}
