:root {
  --night-950: #0A0D13;
  --night-800: #171B22;
  --night-700: #262B35;
  --steel-200: #D7DEE8;
  --olive-500: #A8BB6E;
  --olive-600: #8CA155;
  --white: #FFFFFF;
  --muted: #9CA4B3;
  --error: #E08A73;

  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-body);
  color: var(--steel-200);
  background: var(--night-800);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Hero photo */
.hero {
  position: relative;
  height: 42vh;
  min-height: 260px;
  max-height: 380px;
  overflow: hidden;
  flex-shrink: 0;
}

.hero__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  display: block;
}

.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 13, 19, 0.15) 0%,
    rgba(10, 13, 19, 0.35) 55%,
    rgba(10, 13, 19, 0.92) 100%
  );
}

.hero__content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0 24px;
}

.hero__logo {
  width: min(300px, 78%);
  height: auto;
}

.hero__subtitle {
  font-size: 21px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--olive-500);
  margin: 0;
}

.hero__divider {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  width: 100%;
  height: 22px;
  display: block;
}

/* Content panel */
.panel {
  flex: 1;
  background: var(--night-800);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 8px 28px 28px;
}

.panel__inner {
  width: 100%;
  max-width: 380px;
  margin: 22px auto 0;
  text-align: center;
}

.lede {
  font-size: 16px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0 0 22px;
}

.agree {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--steel-200);
  margin-bottom: 22px;
  cursor: pointer;
}

.agree input {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: var(--olive-500);
  flex-shrink: 0;
}

.terms-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--olive-500);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.connect {
  width: 100%;
  max-width: 380px;
  border: none;
  border-radius: 6px;
  padding: 14px;
  font-family: var(--font-body);
  font-size: 16.5px;
  font-weight: 600;
  color: var(--night-950);
  background: var(--olive-500);
  cursor: pointer;
  transition: background 150ms ease, transform 100ms ease;
}

.connect:hover:not(:disabled) {
  background: var(--olive-600);
}

.connect:active:not(:disabled) {
  transform: scale(0.99);
}

.connect:disabled {
  background: var(--night-700);
  color: var(--muted);
  cursor: not-allowed;
}

.connect:focus-visible {
  outline: 2px solid var(--olive-500);
  outline-offset: 2px;
}

.status {
  min-height: 18px;
  text-align: center;
  font-size: 15px;
  line-height: 1.5;
  margin: 14px 0 0;
  color: var(--muted);
}

.status.is-error {
  color: var(--error);
}

.status.is-success {
  color: var(--olive-500);
  font-weight: 600;
  text-align: left;
}

.status.is-success .status__tip {
  display: block;
  margin-top: 8px;
  font-size: 13.5px;
  font-weight: 400;
  color: var(--muted);
}

.footnote {
  font-size: 14px;
  color: var(--muted);
  text-align: center;
  margin: 24px 0 0;
}

/* Terms dialog */
.terms-dialog {
  width: min(480px, calc(100vw - 48px));
  max-height: min(600px, calc(100vh - 96px));
  padding: 0;
  border: none;
  border-radius: 10px;
  background: var(--night-800);
  color: var(--steel-200);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
}

.terms-dialog::backdrop {
  background: rgba(10, 13, 19, 0.72);
  backdrop-filter: blur(2px);
}

.terms-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--night-700);
}

.terms-dialog__header h2 {
  font-size: 19px;
  font-weight: 600;
  color: var(--white);
  margin: 0;
}

.terms-dialog__close {
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
}

.terms-dialog__body {
  padding: 20px 24px;
  overflow-y: auto;
  max-height: 400px;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--muted);
  text-align: left;
}

.terms-dialog__body h3 {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--steel-200);
  margin: 18px 0 6px;
}

.terms-dialog__body h3:first-of-type {
  margin-top: 8px;
}

.terms-dialog__body p {
  margin: 0 0 10px;
}

.terms-dialog__footer {
  padding: 16px 24px 24px;
  border-top: 1px solid var(--night-700);
}

.terms-dialog__accept {
  width: 100%;
  border: none;
  border-radius: 6px;
  padding: 12px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  color: var(--night-950);
  background: var(--olive-500);
  cursor: pointer;
}

.terms-dialog__accept:hover {
  background: var(--olive-600);
}
