/*
 * UniMAI Zeta sign-in page, standalone and display only.
 * 1 rem is 18 px: every measure below is the product's own.
 */

:root {
  --background: oklch(0.975 0.006 262);
  --foreground: oklch(0.22 0.022 272);
  --card: oklch(0.996 0.003 262);
  --primary: oklch(0.52 0.17 286);
  --primary-foreground: oklch(0.985 0.006 286);
  --muted-foreground: oklch(0.46 0.028 268);
  --border: oklch(0.91 0.011 266);
  --input: oklch(0.885 0.014 266);
  --panel: oklch(0.955 0.03 288);
  --panel-foreground: oklch(0.24 0.04 280);
  --lavender: oklch(0.9 0.05 290);
  --ice: oklch(0.92 0.045 232);
  --mint: oklch(0.91 0.06 166);
  --pink: oklch(0.92 0.045 355);
  /* the green and the orange of the UnimAI mark */
  --mark-green: #1c6137;
  --mark-orange: #f65d17;
  --radius: 1.47rem;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Inter, "Helvetica Neue", "PingFang SC", "Hiragino Sans", "Noto Sans CJK SC", "Microsoft YaHei", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  font-size: 18px;
  line-height: 1.5;
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--panel);
  color: var(--panel-foreground);
  /* interface text is not a document: a click leaves no caret and starts no selection */
  caret-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  cursor: default;
}
h1,
p,
ul {
  margin: 0;
  padding: 0;
}
ul {
  list-style: none;
}
img,
svg {
  display: block;
}
.defs {
  position: absolute;
}

/* ------------------------------------------------------------------------------------------------ page */

.page {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  align-items: center;
  /* vertical measures follow the viewport height, so the whole page fits a laptop screen without scrolling */
  gap: clamp(0.5rem, 1.6svh, 1.25rem) 3.5rem;
  padding: clamp(1.1rem, 3.2svh, 4rem) clamp(1.5rem, 3.6vw, 4rem);
  background:
    radial-gradient(ellipse at 0% 0%, var(--ice) 0%, transparent 38%),
    radial-gradient(ellipse at 100% 100%, var(--mint) 0%, transparent 40%),
    radial-gradient(ellipse at 100% 12%, var(--pink) 0%, transparent 42%),
    var(--panel);
}
.page::before,
.page::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
}
.page::before {
  width: 55vw;
  height: 19vw;
  left: -19vw;
  bottom: -12vw;
  background: var(--lavender);
  transform: rotate(14deg);
}
.page::after {
  width: 67vw;
  height: 26vw;
  right: -18vw;
  bottom: -20vw;
  background: var(--mint);
  transform: rotate(-15deg);
}

/* ----------------------------------------------------------------------------------------------- brand */

.brand {
  grid-column: 1 / -1;
  align-self: start;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.625rem;
  user-select: none;
  -webkit-user-select: none;
}
.brand img {
  height: clamp(1.75rem, 3vw, 2.75rem);
  width: auto;
}
.brand-rule {
  width: 1px;
  height: 1.75rem;
  background: color-mix(in oklab, var(--foreground) 25%, transparent);
}
.brand-name {
  font-size: clamp(1.4rem, 2.1vw, 1.9rem);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.025em;
}
.brand-tag {
  border-radius: 999px;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  line-height: 1.3333;
  font-weight: 600;
  white-space: nowrap;
  color: var(--primary);
  background: color-mix(in oklab, var(--primary) 12%, transparent);
}
@media (min-width: 640px) {
  .brand {
    column-gap: 1rem;
  }
  .brand-tag {
    padding: 0.375rem 0.875rem;
    font-size: 0.875rem;
    line-height: 1.4286;
  }
}

/* ------------------------------------------------------------------------------------------------ hero */

.hero {
  width: 100%;
  max-width: 40rem;
  justify-self: center;
  display: flex;
  flex-direction: column;
  gap: clamp(0.75rem, 2.4svh, 1.5rem);
}
.garden {
  width: min(100%, 52svh);
  margin-inline: auto;
}
.garden-row {
  display: flex;
  align-items: flex-end;
}
.garden-back {
  justify-content: space-between;
  padding-inline: 3%;
}
.garden-front {
  position: relative;
  justify-content: center;
  gap: 2%;
  margin-top: -14%;
}
.flower svg {
  width: 100%;
  height: auto;
  overflow: visible;
}
.breathe {
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: breathe 4.2s ease-in-out infinite;
}
@keyframes breathe {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-1.5px) scale(1.01);
  }
}

.pitch {
  display: flex;
  flex-direction: column;
  gap: clamp(0.75rem, 2svh, 1.25rem);
}
.tagline {
  font-size: clamp(1.75rem, 3.3vw, 3.1rem);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.025em;
}
.tagline span {
  display: block;
  white-space: nowrap;
}
.tagline-green {
  color: var(--mark-green);
}
.tagline-orange {
  color: var(--mark-orange);
}
.points {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  gap: clamp(0.45rem, 1.5svh, 0.85rem);
}
.points li {
  /* the two text sizes; neither line may wrap, so both are capped by the room the column leaves beside the tick */
  --point-name: min(clamp(1.05rem, min(1.7vw, 2.8svh), 1.4rem), (100cqw - 4rem) / 12);
  --point-line: min(clamp(0.8rem, min(1.25vw, 2.1svh), 1.05rem), (100cqw - 0.75rem - var(--point-name) * 1.22) / 24.35);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
/* a point: its name in the mark's green, one line about it in the mark's orange */
.point {
  display: grid;
  min-width: 0;
}
.point strong,
.point span {
  white-space: nowrap;
}
.point strong {
  font-size: var(--point-name);
  line-height: 1.22;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--mark-green);
}
.point span {
  font-size: var(--point-line);
  line-height: 1.35;
  font-weight: 500;
  color: var(--mark-orange);
}
/* the tick is as tall as the two lines beside it */
.tick {
  --tick: calc(var(--point-name) * 1.22 + var(--point-line) * 1.35);
  display: grid;
  place-items: center;
  flex: none;
  width: var(--tick);
  height: var(--tick);
  border-radius: 50%;
  color: var(--primary);
  background: color-mix(in oklab, var(--primary) 15%, transparent);
}
.tick svg {
  width: 56%;
  height: 56%;
  stroke-width: 2.6;
}

/* ------------------------------------------------------------------------------------- mascot and card */

.main {
  display: flex;
  justify-content: center;
  width: 100%;
}
.auth {
  --cat-width: clamp(13rem, 31svh, 20rem);
  position: relative;
  width: 100%;
  max-width: 34rem;
  /* the cup stands on the card: its lower part overlaps the card's top edge */
  padding-top: calc(var(--cat-width) * 0.5);
}
.mascot {
  position: absolute;
  z-index: 2;
  top: calc(var(--cat-width) * -0.115);
  left: 50%;
  width: var(--cat-width);
  max-width: 78%;
  transform: translateX(-50%);
  pointer-events: none;
}
.card {
  --card-radius: 2rem;
  --card-px: clamp(1.4rem, 3.2vw, 3rem);
  --card-pb: clamp(1.2rem, 3.4svh, 2.4rem);
  position: relative;
  z-index: 1;
  border: 1px solid color-mix(in oklch, var(--primary) 18%, var(--border));
  border-radius: var(--card-radius);
  padding: clamp(1.9rem, 5.2svh, 3.4rem) var(--card-px) var(--card-pb);
  color: var(--panel-foreground);
  background: color-mix(in oklch, var(--card) 86%, transparent);
  box-shadow: 0 20px 55px -25px color-mix(in oklch, var(--primary) 55%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  user-select: none;
  -webkit-user-select: none;
}
.card h1 {
  text-align: center;
  font-size: clamp(1.5rem, 2.2vw, 1.9rem);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.025em;
}
.wordmark {
  color: #137b4a;
  white-space: nowrap;
}
.wordmark span {
  color: #ef731f;
}
.card-sub {
  margin-top: 0.375rem;
  text-align: center;
  color: var(--muted-foreground);
}

/* the sign-in form, as a picture of itself */

.mock {
  display: grid;
  gap: clamp(0.7rem, 2svh, 1.2rem);
}
.group {
  display: grid;
  gap: 0.5rem;
}
.label {
  font-size: 0.875rem;
  line-height: 1.4286;
  font-weight: 600;
}
.field {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  height: 2.75rem;
  border: 1px solid var(--input);
  border-radius: var(--radius);
  padding-inline: 0.875rem;
  color: var(--muted-foreground);
  background: var(--card);
}
.icon {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
}
.placeholder {
  color: color-mix(in oklab, var(--muted-foreground) 75%, transparent);
}
.grow {
  flex: 1;
}
.eye {
  display: grid;
  place-items: center;
  flex: none;
  padding: 0.375rem;
}
.submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  height: 3rem;
  border-radius: var(--radius);
  font-size: 1.125rem;
  line-height: 1.5556;
  font-weight: 600;
  color: var(--primary-foreground);
  background-image: linear-gradient(110deg, color-mix(in oklch, var(--primary) 78%, oklch(0.58 0.22 322)), var(--primary));
}
.forgot {
  display: flex;
  justify-content: flex-end;
  font-size: 0.875rem;
  line-height: 1.4286;
  font-weight: 600;
  color: var(--primary);
}
.more {
  display: grid;
  gap: 0.75rem;
  margin-top: calc(clamp(0.8rem, 2.2svh, 1.4rem) - clamp(0.7rem, 2svh, 1.2rem));
}
.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.4286;
  white-space: nowrap;
  color: var(--muted-foreground);
}
.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.create {
  display: grid;
  place-items: center;
  height: 2.75rem;
  border: 1px solid color-mix(in oklab, var(--primary) 35%, transparent);
  border-radius: var(--radius);
  font-weight: 600;
  color: var(--primary);
}

/* ------------------------------------------------------------------------------------------ wet glass
 * The stage reaches the card's side and bottom edges. In it, bottom to top:
 *   .mock   the form, out of focus
 *   .fog    condensation: a milky, moving sheet that thins out towards the title
 *   .clear  the same form in focus, visible only through the drops and where the glass has been wiped (login.js)
 *   .drops  the gloss of each drop
 *   .pill   the label
 */

.stage {
  --stage-pt: clamp(0.9rem, 2.6svh, 1.6rem);
  position: relative;
  overflow: hidden;
  margin: 0 calc(var(--card-px) * -1) calc(var(--card-pb) * -1);
  padding: var(--stage-pt) var(--card-px) var(--card-pb);
  border-radius: 0 0 calc(var(--card-radius) - 1px) calc(var(--card-radius) - 1px);
  touch-action: pan-y;
}
.stage > .mock {
  filter: blur(4.5px) saturate(1.3);
}
/* out of focus, thin outlines vanish: the picture under the glass draws them heavier */
.stage > .mock .field {
  border: 2px solid color-mix(in oklch, var(--primary) 34%, var(--input));
}
.stage > .mock .create {
  border-width: 2px;
}

.fog {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(120% 55% at 8% 0%, rgb(255 255 255 / 0.34), transparent 62%),
    radial-gradient(85% 55% at 100% 100%, color-mix(in oklch, var(--mint) 58%, transparent), transparent 66%),
    radial-gradient(80% 55% at 0% 100%, color-mix(in oklch, var(--ice) 72%, transparent), transparent 62%),
    radial-gradient(60% 40% at 78% 18%, color-mix(in oklch, var(--pink) 40%, transparent), transparent 70%),
    linear-gradient(180deg, rgb(222 229 252 / 0.4), rgb(208 222 250 / 0.58));
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 2.4rem);
  mask-image: linear-gradient(180deg, transparent 0, #000 2.4rem);
}
/* light moving under the surface, then a slow gleam across it */
.fog::before,
.fog::after {
  content: "";
  position: absolute;
  pointer-events: none;
}
.fog::before {
  inset: -30%;
  background:
    radial-gradient(38% 30% at 30% 34%, rgb(255 255 255 / 0.4), transparent 70%),
    radial-gradient(30% 26% at 72% 62%, rgb(255 255 255 / 0.32), transparent 70%),
    radial-gradient(26% 22% at 58% 20%, color-mix(in oklch, var(--ice) 80%, transparent), transparent 72%);
  animation: caustics 16s ease-in-out infinite alternate;
}
.fog::after {
  top: -20%;
  bottom: -20%;
  left: 0;
  width: 42%;
  background: linear-gradient(100deg, transparent 0, rgb(255 255 255 / 0.5) 46%, rgb(255 255 255 / 0.12) 60%, transparent 100%);
  transform: translateX(-130%) skewX(-14deg);
  animation: gleam 9s cubic-bezier(0.45, 0, 0.25, 1) infinite;
}
@keyframes caustics {
  0% {
    transform: translate(-5%, -3%) rotate(-3deg) scale(1);
  }
  50% {
    transform: translate(4%, 3%) rotate(2deg) scale(1.08);
  }
  100% {
    transform: translate(-2%, 6%) rotate(5deg) scale(1.02);
  }
}
@keyframes gleam {
  0%,
  58% {
    transform: translateX(-130%) skewX(-14deg);
  }
  100% {
    transform: translateX(330%) skewX(-14deg);
  }
}

.clear {
  position: absolute;
  inset: 0;
  padding: var(--stage-pt) var(--card-px) var(--card-pb);
  pointer-events: none;
  background: linear-gradient(180deg, rgb(255 255 255 / 0.96), rgb(252 253 255 / 0.92));
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}
.clear > .mock {
  filter: url(#water);
  will-change: transform;
}

.drops {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.drop {
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 48% 52% 50% 50% / 46% 46% 54% 54%;
  background:
    radial-gradient(circle at 31% 26%, rgb(255 255 255 / 0.98) 0 7%, rgb(255 255 255 / 0) 21%),
    radial-gradient(circle at 68% 80%, rgb(255 255 255 / 0.5), rgb(255 255 255 / 0) 42%),
    radial-gradient(circle at 50% 46%, rgb(255 255 255 / 0) 50%, rgb(104 124 200 / 0.22) 100%);
  box-shadow:
    inset 0 -0.15em 0.3em rgb(58 76 150 / 0.36),
    inset 0 0.1em 0.16em rgb(255 255 255 / 0.9),
    0 0.18em 0.28em -0.04em rgb(50 58 128 / 0.38),
    0 0 0 0.5px rgb(255 255 255 / 0.6);
  will-change: transform;
}
/* beads too small to see through: gloss only */
.bead {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, rgb(255 255 255 / 0.95) 0 22%, rgb(255 255 255 / 0.28) 60%, rgb(150 165 215 / 0.3) 100%);
  box-shadow: 0 1px 1.5px rgb(58 66 130 / 0.28);
}
/* where the pointer wipes the glass: a wet rim around the clear spot */
.wipe {
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle, transparent 54%, rgb(96 110 180 / 0.14) 62%, rgb(255 255 255 / 0.7) 68%, rgb(255 255 255 / 0.12) 80%, transparent 86%);
  transition: opacity 0.35s ease;
  will-change: transform, opacity;
}

.pill {
  position: absolute;
  left: 50%;
  top: 47%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.62rem 1.5rem 0.62rem 1.1rem;
  border: 1px solid rgb(255 255 255 / 0.92);
  border-radius: 999px;
  font-size: 1.3rem;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.015em;
  white-space: nowrap;
  color: color-mix(in oklch, var(--primary) 88%, black);
  background: linear-gradient(180deg, rgb(255 255 255 / 0.97), rgb(246 244 255 / 0.86));
  box-shadow:
    inset 0 1px 0 rgb(255 255 255),
    inset 0 -0.6rem 0.9rem -0.6rem color-mix(in oklch, var(--primary) 34%, transparent),
    0 0.9rem 1.8rem -0.8rem color-mix(in oklch, var(--primary) 62%, transparent),
    0 2px 6px rgb(40 40 90 / 0.12);
  pointer-events: none;
}
.pill::before {
  content: "";
  position: absolute;
  inset: 2px 9% auto;
  height: 46%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgb(255 255 255 / 0.95), rgb(255 255 255 / 0));
  pointer-events: none;
}
.pill-drop {
  position: relative;
  width: 1.2em;
  height: 1.2em;
  color: color-mix(in oklch, var(--primary) 70%, var(--ice));
}

/* ---------------------------------------------------------------------------------------------- mascot */

.cat {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.cat-paw {
  transform-box: fill-box;
  transform-origin: center bottom;
  transition: transform 0.34s cubic-bezier(0.22, 0.85, 0.35, 1);
}
/* resting: small, low, peeking over the cup's collar */
.cat-paw-left {
  transform: translate(-10px, 43px) rotate(-10deg) scale(0.67);
}
.cat-paw-right {
  transform: translate(10px, 43px) rotate(10deg) scale(0.67);
}
.cat-eyes,
.cat-closed,
.cat-bubble {
  transition: opacity 0.18s ease;
}
.cat-closed,
.cat-bubble {
  opacity: 0;
}
.cat-sprout {
  transform-box: view-box;
  transform-origin: 50% 42%;
  transition: transform 0.35s ease;
}
.cat-glint,
.cat-glint-small {
  transform-box: fill-box;
  transform-origin: center;
  animation: cat-twinkle 2.8s ease-in-out infinite;
}
.cat-glint-small {
  animation-delay: 1.1s;
}
.cat-sparkles path {
  transform-box: fill-box;
  transform-origin: center;
  animation: cat-sparkle 2.4s ease-in-out infinite;
}
.cat-sparkles path:nth-child(2) {
  animation-delay: 0.8s;
}
.cat-sparkles path:nth-child(3) {
  animation-delay: 1.5s;
}
/* covering: paws up over both eyes, eyes shut behind them, the lock bubble shows */
.cat[data-covering="true"] .cat-paw {
  transform: translate(0, 0) rotate(0deg) scale(1);
}
.cat[data-covering="true"] .cat-eyes {
  opacity: 0;
}
.cat[data-covering="true"] .cat-closed,
.cat[data-covering="true"] .cat-bubble {
  opacity: 1;
}
.cat[data-covering="true"] .cat-sprout {
  transform: rotate(-4deg);
}
@keyframes cat-twinkle {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(0.72);
    opacity: 0.75;
  }
}
@keyframes cat-sparkle {
  0%,
  100% {
    transform: scale(0.8);
    opacity: 0.55;
  }
  50% {
    transform: scale(1.12);
    opacity: 1;
  }
}

/* ---------------------------------------------------------- narrow screens: brand, card, then the pitch */

@media (max-width: 1023px) {
  .page {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    gap: 2rem;
    padding: 1.5rem 1.1rem 2.5rem;
  }
  .brand {
    justify-self: center;
  }
  .main {
    grid-row-start: 2;
  }
  .hero {
    grid-row-start: 3;
    max-width: 30rem;
  }
  .garden {
    width: min(100%, 22rem);
  }
  .auth {
    --cat-width: 15rem;
    max-width: 30rem;
  }
  .card {
    --card-radius: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page *,
  .page *::before,
  .page *::after {
    transition: none !important;
    animation: none !important;
  }
}
