:root {
  --navy: #0f1b2d;
  --white: #ffffff;
  --soft-gray: #f4f5f7;
  --mid-gray: #667085;
  --line: #d9dde5;
  --coral: #ff6b6b;
  --coral-dark: #d94f55;
  --coral-soft: #fff0ef;
  --teal: #2ec4b6;
  --teal-soft: #e9f9f6;
  --sunshine: #ffc857;
  --shadow: 0 24px 70px rgba(15, 27, 45, 0.12);
  --radius-large: 28px;
  --radius-medium: 16px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--soft-gray);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--navy);
  background:
    radial-gradient(circle at 8% 18%, rgba(255, 200, 87, 0.26) 0 6px, transparent 7px),
    radial-gradient(circle at 91% 76%, rgba(46, 196, 182, 0.24) 0 9px, transparent 10px),
    linear-gradient(135deg, #ffffff 0%, #fbfbfc 52%, #f1f5f5 100%);
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before,
body::after {
  position: fixed;
  z-index: 0;
  border-radius: 999px;
  content: "";
  pointer-events: none;
}

body::before {
  top: -160px;
  right: -130px;
  width: 390px;
  height: 390px;
  background: rgba(255, 107, 107, 0.09);
}

body::after {
  bottom: -170px;
  left: -130px;
  width: 360px;
  height: 360px;
  background: rgba(46, 196, 182, 0.09);
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.site-header,
.access-page,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-header {
  display: flex;
  width: min(1180px, calc(100% - 80px));
  min-height: 96px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.wordmark img {
  display: block;
  width: 210px;
  height: auto;
}

.home-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #526071;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 160ms ease, transform 160ms ease;
}

.home-link:hover {
  color: var(--navy);
  transform: translateX(-2px);
}

.access-page {
  display: grid;
  width: min(1080px, calc(100% - 80px));
  min-height: calc(100vh - 192px);
  margin: 0 auto;
  padding: 52px 0 72px;
  align-items: center;
  grid-template-columns: minmax(0, 1.02fr) minmax(390px, 0.8fr);
  gap: clamp(64px, 8vw, 112px);
}

.welcome-copy {
  max-width: 590px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  color: #344156;
  font-size: 0.77rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 5px rgba(46, 196, 182, 0.14);
}

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

h1 {
  max-width: 600px;
  margin-bottom: 24px;
  font-size: clamp(2.65rem, 5vw, 4.75rem);
  line-height: 1.03;
  letter-spacing: -0.055em;
}

.intro {
  max-width: 570px;
  margin-bottom: 34px;
  color: #526071;
  font-size: clamp(1rem, 1.5vw, 1.13rem);
  line-height: 1.75;
}

.room-note {
  display: flex;
  max-width: 550px;
  padding: 20px 22px 19px;
  border: 1px solid rgba(15, 27, 45, 0.08);
  border-left: 4px solid var(--sunshine);
  border-radius: 4px var(--radius-medium) var(--radius-medium) 4px;
  background: rgba(255, 255, 255, 0.74);
  gap: 14px;
}

.room-note-mark {
  color: var(--coral);
  font-family: Georgia, serif;
  font-size: 2.8rem;
  line-height: 0.8;
}

.room-note p {
  margin: 0;
  color: #344156;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.65;
}

.access-card {
  position: relative;
  width: 100%;
  max-width: 450px;
  min-height: 560px;
  justify-self: end;
  overflow: hidden;
  border: 1px solid rgba(15, 27, 45, 0.08);
  border-radius: var(--radius-large);
  background: var(--white);
  box-shadow: var(--shadow);
}

.card-accent {
  position: absolute;
  inset: 0 0 auto;
  height: 8px;
  background: linear-gradient(90deg, var(--coral) 0 48%, var(--sunshine) 48% 72%, var(--teal) 72% 100%);
}

.state-panel {
  padding: 48px 44px 38px;
}

.mini-badge {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 7px 11px;
  border-radius: 999px;
  color: #b5444a;
  background: var(--coral-soft);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(1.75rem, 3vw, 2.15rem);
  line-height: 1.18;
  letter-spacing: -0.04em;
}

.card-intro {
  margin-bottom: 28px;
  color: var(--mid-gray);
  font-size: 0.91rem;
  line-height: 1.65;
}

label {
  display: block;
  margin-bottom: 9px;
  color: #344156;
  font-size: 0.77rem;
  font-weight: 700;
}

.input-shell {
  position: relative;
}

.key-icon {
  position: absolute;
  top: 50%;
  left: 16px;
  color: var(--teal);
  font-size: 1rem;
  transform: translateY(-50%);
  pointer-events: none;
}

input {
  width: 100%;
  height: 54px;
  padding: 0 16px 0 45px;
  border: 1.5px solid var(--line);
  border-radius: 13px;
  outline: none;
  color: var(--navy);
  background: #fcfcfd;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input::placeholder {
  color: #98a1ae;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

input:focus {
  border-color: var(--teal);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(46, 196, 182, 0.12);
}

.has-error input {
  border-color: var(--coral-dark);
  background: #fffafa;
  box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.1);
}

.code-message {
  min-height: 20px;
  margin: 8px 2px 8px;
  color: var(--coral-dark);
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1.45;
}

.primary-button {
  display: flex;
  width: 100%;
  min-height: 54px;
  padding: 14px 18px;
  border: 0;
  border-radius: 13px;
  align-items: center;
  justify-content: space-between;
  color: var(--white);
  background: var(--navy);
  box-shadow: 0 9px 20px rgba(15, 27, 45, 0.18);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.primary-button:hover {
  background: #1c2e47;
  box-shadow: 0 11px 24px rgba(15, 27, 45, 0.22);
  transform: translateY(-1px);
}

.primary-button:focus-visible,
.text-button:focus-visible,
.home-link:focus-visible,
.wordmark:focus-visible,
.not-invited-note a:focus-visible {
  outline: 3px solid rgba(46, 196, 182, 0.36);
  outline-offset: 3px;
}

.primary-button[disabled] {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.reassurance {
  display: flex;
  margin-top: 24px;
  padding: 17px 0;
  border-top: 1px solid #edf0f3;
  border-bottom: 1px solid #edf0f3;
  align-items: center;
  gap: 12px;
}

.shield {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 10px 10px 13px 13px;
  place-items: center;
  color: #167e74;
  background: var(--teal-soft);
  font-size: 0.78rem;
  font-weight: 800;
}

.reassurance p {
  margin: 0;
  color: #687486;
  font-size: 0.73rem;
  line-height: 1.55;
}

.reassurance strong {
  display: block;
  color: #344156;
}

.not-invited {
  margin-top: 16px;
  text-align: center;
}

.text-button {
  padding: 4px;
  border: 0;
  color: #5e6979;
  background: transparent;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: #c6cbd3;
  text-underline-offset: 3px;
}

.text-button:hover {
  color: var(--navy);
  text-decoration-color: var(--coral);
}

.not-invited-note {
  margin-top: 12px;
  padding: 14px;
  border-radius: 12px;
  background: var(--soft-gray);
}

.not-invited-note p {
  margin-bottom: 8px;
  color: #667085;
  font-size: 0.7rem;
  line-height: 1.55;
}

.not-invited-note a {
  color: #a43e45;
  font-size: 0.7rem;
  font-weight: 700;
  text-underline-offset: 3px;
}

.success-panel {
  display: flex;
  min-height: 560px;
  flex-direction: column;
  justify-content: center;
}

.success-panel[hidden] {
  display: none;
}

.success-mark {
  display: grid;
  width: 72px;
  height: 72px;
  margin-bottom: 24px;
  border-radius: 50%;
  place-items: center;
  color: #157c72;
  background: var(--teal-soft);
  box-shadow: 0 0 0 10px rgba(46, 196, 182, 0.08);
}

.success-mark span {
  display: grid;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  place-items: center;
  color: var(--white);
  background: var(--teal);
  font-size: 1rem;
  font-weight: 800;
}

.success-badge {
  width: fit-content;
  color: #157c72;
  background: var(--teal-soft);
}

.room-promise {
  display: flex;
  margin: 2px 0 26px;
  padding: 16px;
  border-radius: 14px;
  align-items: flex-start;
  gap: 12px;
  background: #fff8e9;
}

.room-promise > span {
  color: #be7b00;
  font-size: 1.15rem;
}

.room-promise strong {
  display: block;
  margin-bottom: 3px;
  font-size: 0.76rem;
}

.room-promise p {
  margin: 0;
  color: #6f6250;
  font-size: 0.7rem;
  line-height: 1.5;
}

.site-footer {
  display: flex;
  width: min(1180px, calc(100% - 80px));
  min-height: 96px;
  margin: 0 auto;
  border-top: 1px solid rgba(15, 27, 45, 0.08);
  align-items: center;
  justify-content: space-between;
  color: #7b8491;
  font-size: 0.73rem;
  font-weight: 500;
}

.site-footer p {
  margin: 0;
}

.footer-dots {
  display: flex;
  gap: 7px;
}

.footer-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.footer-dots span:nth-child(1) { background: var(--coral); }
.footer-dots span:nth-child(2) { background: var(--sunshine); }
.footer-dots span:nth-child(3) { background: var(--teal); }

.state-panel.is-entering {
  animation: fade-out 260ms ease both;
}

.success-panel.is-visible {
  animation: rise-in 420ms cubic-bezier(0.2, 0.75, 0.2, 1) both;
}

@keyframes fade-out {
  to { opacity: 0; transform: translateY(-8px); }
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 860px) {
  .site-header,
  .site-footer,
  .access-page {
    width: min(100% - 40px, 640px);
  }

  .access-page {
    min-height: auto;
    padding: 36px 0 58px;
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .welcome-copy {
    max-width: none;
  }

  h1 {
    max-width: 650px;
    font-size: clamp(2.7rem, 9vw, 4.3rem);
  }

  .access-card {
    max-width: 520px;
    min-height: 0;
    justify-self: start;
  }

  .success-panel {
    min-height: 510px;
  }
}

@media (max-width: 520px) {
  .site-header,
  .site-footer,
  .access-page {
    width: calc(100% - 32px);
  }

  .site-header {
    min-height: 78px;
  }

  .wordmark {
    flex: 0 0 auto;
  }

  .wordmark img {
    width: 178px;
  }

  .home-link {
    font-size: 0.76rem;
  }

  .access-page {
    padding: 30px 0 46px;
    gap: 30px;
  }

  .eyebrow {
    margin-bottom: 18px;
  }

  h1 {
    margin-bottom: 18px;
    font-size: clamp(2.45rem, 12vw, 3.35rem);
  }

  .intro {
    margin-bottom: 24px;
    font-size: 0.95rem;
    line-height: 1.65;
  }

  .room-note {
    padding: 17px 17px 16px;
  }

  .room-note p {
    font-size: 0.8rem;
  }

  .access-card {
    border-radius: 22px;
  }

  .state-panel {
    padding: 40px 24px 28px;
  }

  .success-panel {
    min-height: 500px;
  }

  .site-footer {
    min-height: 76px;
  }
}

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