/* ==========================================================================
   Authentication / welcome experience
   ========================================================================== */

body.auth-active {
  background: var(--bg);
}

.auth-page {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.13fr) minmax(430px, 0.87fr);
  min-height: 100vh;
  overflow: hidden;
  background: var(--bg);
}

.auth-noise {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image: radial-gradient(rgba(24, 44, 39, 0.15) 0.7px, transparent 0.7px);
  background-size: 22px 22px;
  mask-image: linear-gradient(90deg, transparent 26%, #000 64%);
}

.auth-story {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  padding: 37px clamp(34px, 5vw, 68px) 29px;
  overflow: hidden;
  color: var(--cream);
  background:
    radial-gradient(circle at 84% 12%, rgba(255, 201, 74, 0.22), transparent 27%),
    radial-gradient(circle at 8% 78%, rgba(28, 155, 131, 0.27), transparent 32%),
    radial-gradient(circle at 70% 100%, rgba(255, 111, 78, 0.21), transparent 35%),
    linear-gradient(132deg, #12322c 0%, #173d36 47%, #1b3245 100%);
  isolation: isolate;
}

.auth-story::before {
  content: "";
  position: absolute;
  top: -110px;
  right: -150px;
  z-index: -1;
  width: 500px;
  height: 500px;
  border: 1px solid rgba(255, 248, 232, 0.11);
  border-radius: 50%;
}

.auth-story::after {
  content: "";
  position: absolute;
  top: -30px;
  right: -70px;
  z-index: -1;
  width: 330px;
  height: 330px;
  border: 1px dashed rgba(255, 201, 74, 0.12);
  border-radius: 50%;
}

.auth-story .brand-mark {
  background:
    radial-gradient(circle at 74% 18%, rgba(255, 201, 74, 0.95) 0 4px, transparent 5px),
    rgba(255, 255, 255, 0.09);
  box-shadow: 0 8px 19px rgba(4, 16, 13, 0.2);
  border: 1px solid rgba(255, 248, 232, 0.14);
}

.auth-story .brand-text strong {
  color: var(--cream);
}

.auth-story .brand-text small {
  color: rgba(255, 248, 232, 0.38);
}

.auth-story-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.auth-beta {
  padding: 5px 9px;
  border: 1px solid rgba(255, 248, 232, 0.14);
  border-radius: var(--radius-pill);
  color: rgba(255, 248, 232, 0.41);
  font-size: 7.5px;
  font-weight: 750;
  letter-spacing: 0.1em;
}

.auth-copy {
  position: relative;
  z-index: 2;
  max-width: 640px;
  margin-top: clamp(50px, 8vh, 100px);
}

.auth-copy h1 {
  margin: 17px 0 15px;
  color: var(--cream);
  font-size: clamp(43px, 5.2vw, 69px);
  font-weight: 900;
  letter-spacing: -0.07em;
  line-height: 1.06;
}

.auth-copy h1 em {
  color: #ffd46b;
  font-style: normal;
  background: linear-gradient(95deg, #ffe797, #ffc453 60%, #ff8f62);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-copy > p {
  max-width: 480px;
  color: rgba(255, 248, 232, 0.55);
  font-size: 13px;
  line-height: 1.9;
}

.auth-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 22px;
}

.auth-tags span {
  padding: 5px 10px;
  border: 1px solid rgba(255, 248, 232, 0.14);
  border-radius: var(--radius-pill);
  color: rgba(255, 248, 232, 0.54);
  background: rgba(255, 255, 255, 0.04);
  font-size: 8.5px;
  font-weight: 550;
}

.auth-collage {
  position: relative;
  z-index: 1;
  width: min(570px, 100%);
  height: 282px;
  margin-top: auto;
  padding-top: 34px;
}

.auth-photo-card {
  position: absolute;
  top: 11px;
  left: 1%;
  width: 295px;
  padding: 7px 7px 0;
  border-radius: 19px;
  background: #fff8e8;
  box-shadow: 0 25px 45px rgba(3, 17, 13, 0.27);
  transform: rotate(-5deg);
  transition: transform 450ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.auth-story:hover .auth-photo-card {
  transform: rotate(-2.5deg) translateY(-4px);
}

.auth-photo-card img {
  width: 100%;
  height: 152px;
  object-fit: cover;
  border-radius: 13px;
}

.auth-photo-card > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 6px 10px;
  color: var(--forest);
}

.auth-photo-card span {
  color: #8f8c77;
  font-size: 8px;
}

.auth-photo-card strong {
  font-size: 10px;
  font-weight: 850;
}

.auth-note-card {
  position: absolute;
  top: 26px;
  right: 4%;
  width: 195px;
  padding: 20px 18px 17px;
  border-radius: 17px;
  color: #3a301e;
  background: linear-gradient(148deg, #fff7db, #ffedb9);
  box-shadow: 0 24px 45px rgba(3, 17, 13, 0.24);
  transform: rotate(6deg);
  transition: transform 450ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.auth-story:hover .auth-note-card {
  transform: rotate(3deg) translateY(-3px);
}

.auth-note-kicker {
  color: #a0874c;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.auth-note-card p {
  margin: 10px 0 11px;
  font-size: 17px;
  font-weight: 850;
  letter-spacing: -0.04em;
  line-height: 1.48;
}

.auth-note-sign {
  color: #9a895e;
  font-family: var(--font-display);
  font-size: 9px;
}

.auth-sticker {
  position: absolute;
  right: 26%;
  bottom: 34px;
  display: flex;
  width: 67px;
  height: 67px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border-radius: 50%;
  color: var(--forest);
  background: var(--sun);
  box-shadow: 0 18px 30px rgba(3, 17, 13, 0.24);
  transform: rotate(10deg);
}

.auth-sticker > span {
  font-family: var(--font-display);
  font-size: 29px;
  font-weight: 700;
  line-height: 0.8;
}

.auth-sticker > small {
  margin-top: 3px;
  font-size: 6.5px;
  font-weight: 800;
}

.auth-people-card {
  position: absolute;
  bottom: 4px;
  left: 3%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 8px 8px;
  border: 1px solid rgba(255, 248, 232, 0.16);
  border-radius: 14px;
  color: var(--cream);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.auth-avatar-stack {
  display: flex;
  padding-left: 6px;
}

.auth-avatar-stack .avatar {
  margin-left: -6px;
  border: 2px solid rgba(255, 248, 232, 0.45);
}

.auth-people-card > span:last-child {
  color: rgba(255, 248, 232, 0.45);
  font-size: 7.5px;
  line-height: 1.45;
}

.auth-people-card strong {
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 13px;
}

.auth-story-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 23px;
  border-top: 1px solid rgba(255, 248, 232, 0.09);
  color: rgba(255, 248, 232, 0.32);
  font-size: 8px;
  letter-spacing: 0.03em;
}

/* form side */

.auth-panel {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 38px clamp(30px, 5vw, 74px);
  overflow-y: auto;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 201, 74, 0.11), transparent 30%),
    radial-gradient(circle at 0% 100%, rgba(118, 224, 185, 0.09), transparent 28%),
    #f8f3e9;
}

.auth-panel::before {
  content: "";
  position: absolute;
  top: 38px;
  right: 40px;
  width: 55px;
  height: 55px;
  border: 1px solid rgba(24, 44, 39, 0.07);
  border-radius: 50%;
}

.auth-panel-inner {
  width: 100%;
  max-width: 406px;
  margin: auto;
  animation: auth-rise 500ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

.auth-mobile-brand {
  display: none;
  margin-bottom: 22px;
}

.auth-tabs {
  display: flex;
  width: 100%;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: rgba(255, 253, 248, 0.6);
}

.auth-tab {
  flex: 1;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  transition: color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.auth-tab.is-active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 4px 12px rgba(24, 44, 39, 0.08);
}

.auth-tab:hover {
  color: var(--ink);
}

.auth-heading {
  margin: 29px 0 21px;
}

.auth-heading .eyebrow {
  margin-bottom: 7px;
  color: var(--muted-light);
}

.auth-heading h2 {
  color: var(--ink);
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 1.25;
}

.auth-heading p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.7;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-form .form-field {
  gap: 5px;
}

.auth-form .form-field > label {
  color: var(--ink-soft);
  font-size: 9.5px;
  font-weight: 650;
}

.auth-submit {
  min-height: 49px;
  margin-top: 4px;
  border-radius: 14px;
  font-size: 12px;
}

.auth-submit .icon {
  width: 16px;
  height: 16px;
}

.auth-demo-hint {
  padding-top: 1px;
  color: var(--muted-light);
  font-size: 8.5px;
  line-height: 1.7;
  text-align: center;
}

.auth-demo-hint code {
  color: var(--muted);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 8px;
  background: rgba(24, 44, 39, 0.04);
  border-radius: 3px;
  padding: 1px 3px;
}

.auth-admin-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 8px;
  border: 1px solid rgba(255, 201, 74, 0.16);
  border-radius: 8px;
  color: #92702b;
  background: rgba(255, 201, 74, 0.07);
  font-size: 8px;
  line-height: 1.6;
  text-align: center;
}

.auth-admin-hint .icon {
  width: 11px;
  height: 11px;
  flex: none;
  color: #b98a29;
}

.auth-admin-hint code {
  color: #7f621f;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 7.5px;
}

.auth-ai-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 8px;
  border: 1px solid rgba(28, 155, 131, 0.15);
  border-radius: 8px;
  color: #237d6d;
  background: rgba(118, 224, 185, 0.06);
  font-size: 8px;
  line-height: 1.6;
  text-align: center;
}

.auth-ai-hint .icon {
  width: 11px;
  height: 11px;
  flex: none;
  color: var(--teal);
}

.auth-ai-hint code {
  color: #1b6f61;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 7.5px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 21px 0 14px;
  color: var(--muted-light);
  font-size: 8px;
  white-space: nowrap;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  width: 100%;
  height: 1px;
  background: var(--line);
}

.demo-entry {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 11px;
  padding: 13px;
  border: 1px solid rgba(24, 44, 39, 0.11);
  border-radius: 15px;
  color: var(--ink);
  background:
    radial-gradient(circle at 90% 0%, rgba(255, 201, 74, 0.19), transparent 37%),
    rgba(255, 253, 248, 0.75);
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.demo-entry:hover {
  border-color: rgba(28, 155, 131, 0.25);
  box-shadow: 0 10px 24px rgba(24, 44, 39, 0.06);
  transform: translateY(-1px);
}

.demo-entry-icon {
  display: flex;
  width: 38px;
  height: 38px;
  flex: none;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  color: var(--forest);
  background: var(--sun);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
}

.demo-entry-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 1px;
}

.demo-entry-copy strong {
  font-size: 11px;
  font-weight: 750;
}

.demo-entry-copy small {
  color: var(--muted-light);
  font-size: 8.5px;
}

.demo-entry-arrow {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--muted);
  transition: transform 160ms ease;
}

.demo-entry:hover .demo-entry-arrow {
  transform: translateX(2px);
  color: var(--teal);
}

.auth-terms {
  margin-top: 17px;
  color: var(--muted-light);
  font-size: 7.5px;
  line-height: 1.8;
  text-align: center;
}

.auth-device-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 9px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.auth-device-mode {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--ink-soft);
  background: var(--surface-soft);
  font-size: 8.5px;
  font-weight: 650;
}

.auth-device-mode .icon {
  width: 12px;
  height: 12px;
  color: var(--teal);
}

.auth-device-detected {
  color: var(--muted-light);
  font-size: 8px;
}

.auth-device-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  padding: 4px 0;
  color: var(--teal);
  font-size: 8.5px;
  font-weight: 650;
  white-space: nowrap;
}

.auth-device-switch .icon {
  width: 10px;
  height: 10px;
}

.auth-device-switch:hover {
  color: var(--coral-deep);
}
