/*
  Blackstone Pricing Studio — the sign-in screen (Blackstone Atelier, Obsidian).
  Served before sign-in under a strict Content Security Policy: this file, signin.mjs, the fonts,
  the logo and the favicon are the only resources the page may load. No inline styles anywhere.
  Every animation lives inside prefers-reduced-motion: no-preference, so the resting state is the
  finished, fully drawn page; only transform, opacity and stroke are animated.
*/

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(assets/fonts/inter-latin-wght-normal.woff2) format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(assets/fonts/inter-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(assets/fonts/cormorant-garamond-latin-500-normal.woff2) format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-display: swap;
  font-weight: 500;
  src: url(assets/fonts/cormorant-garamond-latin-500-italic.woff2) format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(assets/fonts/cormorant-garamond-latin-ext-500-normal.woff2) format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-display: swap;
  font-weight: 500;
  src: url(assets/fonts/cormorant-garamond-latin-ext-500-italic.woff2) format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ─────────────────────────────  Tokens (Obsidian)  ───────────────────────────── */

:root {
  color-scheme: dark;
  --font-display:
    "Cormorant Garamond", "Cormorant", Garamond, Georgia, "Times New Roman", serif;
  --font-ui:
    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  --canvas: #0c110f;
  --card-top: #19231d;
  --card-bottom: #111915;
  --well: #0b110e;
  --well-hover: #0e1512;
  --hairline: rgba(232, 219, 191, 0.1);
  --hairline-2: rgba(232, 219, 191, 0.2);
  --hairline-3: rgba(232, 219, 191, 0.34);
  --ink: #f5f0e5;
  --ink-2: #cdd3c7;
  --ink-3: #a3ad9f;
  --champagne: #e0c99e;
  --champagne-2: #f1dcb2;
  --champagne-3: #b89560;
  --line: #d6bb86;
  --line-bright: #f4e2bc;
  --coral: #ffab98;
  --coral-wash: rgba(255, 171, 152, 0.09);
  --amber: #efc983;
  --amber-wash: rgba(239, 201, 131, 0.09);
  --sage: #a9c6a8;
  --sage-wash: rgba(169, 198, 168, 0.12);
  --focus: #f3dcaa;
  --focus-glow: rgba(243, 220, 170, 0.26);
  --on-metal: #1a1509;
  --metal: linear-gradient(135deg, #f6e7c6 0%, #e2c797 30%, #c19b62 62%, #ecd6aa 100%);
  --metal-hover: linear-gradient(135deg, #fff0d4 0%, #ebd3a6 30%, #cda76d 62%, #f4e0b8 100%);
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-soft: cubic-bezier(0.4, 0.14, 0.3, 1);
  /* Film grain, painted once into the page background (no blended layer over moving light). */
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .62  0 0 0 0 .6  0 0 0 0 .55  0 0 0 .075 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  --check: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M6 12.5l4 4 8-9' fill='none' stroke='%231a1509' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/></svg>");
}

/* ─────────────────────────────  Base  ───────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  background: var(--canvas);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background:
    var(--grain),
    radial-gradient(1100px 760px at 28% 46%, #111a15, transparent 70%),
    radial-gradient(900px 700px at 82% 50%, #0f1713, transparent 72%),
    var(--canvas);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.55;
  font-feature-settings: "cv11", "ss01", "ss03";
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
::selection {
  background: rgba(224, 201, 158, 0.32);
}
h1,
h2,
p,
ul {
  margin: 0;
}
img,
svg {
  display: block;
}
button,
input {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}
button {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
[hidden] {
  display: none !important;
}
:focus {
  outline: none;
}
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--focus-glow);
}
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ─────────────────────────────  Stage: living light and grain  ───────────────────────────── */

.stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.aura {
  position: absolute;
  border-radius: 50%;
  will-change: transform, opacity;
}
.aura-1 {
  left: -18vmax;
  top: -22vmax;
  width: 78vmax;
  height: 78vmax;
  background: radial-gradient(closest-side, rgba(224, 201, 158, 0.13), rgba(224, 201, 158, 0.04) 55%, transparent);
}
.aura-2 {
  right: -24vmax;
  bottom: -30vmax;
  width: 80vmax;
  height: 80vmax;
  background: radial-gradient(closest-side, rgba(120, 165, 132, 0.09), transparent 70%);
}
.aura-3 {
  left: 30%;
  top: 18%;
  width: 56vmax;
  height: 56vmax;
  background: radial-gradient(closest-side, rgba(241, 220, 178, 0.07), transparent 72%);
}
.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 120% 90% at 50% 42%, transparent 52%, rgba(3, 5, 4, 0.55));
}

/* ─────────────────────────────  Composition  ───────────────────────────── */

.scene {
  position: relative;
  z-index: 1;
  flex: 1 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 444px);
  align-items: center;
  gap: clamp(28px, 4.5vw, 88px);
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: clamp(24px, 4vh, 56px) clamp(24px, 5vw, 80px) 12px;
}

/* The kitchen: a to-scale Blackstone kitchen, photographed at night — sketched first in hairline gold.
   The plates are path-traced renders of one 3D model; the gold lines are that model's visible edges, projected
   through the same camera, so the drawing lands exactly on the photograph. */
.art {
  position: relative;
  align-self: stretch;
  display: grid;
  place-items: center;
  min-width: 0;
}
.art-frame {
  position: relative;
  translate: -1% -2%;
  width: min(108%, calc((100vh - 128px) * 1.143), 840px);
  width: min(108%, calc((100svh - 128px) * 1.143), 840px);
  aspect-ratio: 1680 / 1470;
}
/* A warm pool of light on the drafting table, under the model */
.art-frame::before {
  content: "";
  position: absolute;
  left: 2%;
  top: 18%;
  width: 96%;
  height: 84%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(224, 201, 158, 0.11), rgba(224, 201, 158, 0.035) 58%, transparent);
}
.art-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  -webkit-user-select: none;
  user-select: none;
}
/* The resting state is the lit kitchen; the blue-hour plate only plays in the intro. */
.art-dusk {
  opacity: 0;
}
.art-grid,
.art-drawing {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
/* The drafting grid the model stands on runs out under the page and fades away. */
.art-grid {
  -webkit-mask-image: radial-gradient(ellipse 64% 62% at 50% 58%, #000 42%, transparent 100%);
  mask-image: radial-gradient(ellipse 64% 62% at 50% 58%, #000 42%, transparent 100%);
}
.art-grid path,
.art-drawing path {
  fill: none;
  stroke: var(--line);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.art-grid .g {
  stroke-opacity: 0.22;
  stroke-width: 2;
}
.art-drawing .e {
  stroke-opacity: 0.82;
}
.art-drawing .a {
  stroke: var(--line-bright);
  stroke-width: 2.6;
}
.art-drawing .ce {
  stroke-opacity: 0.6;
}
.art-drawing .d {
  stroke-opacity: 0.42;
  stroke-width: 2;
}
.art-drawing .h {
  stroke-opacity: 0.85;
  stroke-width: 2.8;
}
.art-drawing .r {
  stroke-opacity: 0.26;
  stroke-width: 1.8;
}
.art-drawing .o {
  stroke-opacity: 0.72;
}
.art-drawing .w {
  stroke-opacity: 0.5;
}
/* With the photograph in, the sketch steps back to the model's gilded outline. */
.art-drawing g {
  opacity: 0;
}
.art-drawing .k-room {
  opacity: 0.6;
}

/* Pendant light: bulbs, pools on the island and glints on the brass (positions follow the render) */
.light {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  translate: -50% -50%;
}
.bulb {
  width: 9%;
  aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(255, 238, 206, 0.5), rgba(241, 220, 178, 0.15) 42%, transparent);
  mix-blend-mode: screen;
}
.pool {
  width: 16%;
  aspect-ratio: 2.1;
  background: radial-gradient(closest-side, rgba(255, 234, 198, 0.13), rgba(241, 220, 178, 0.04) 55%, transparent);
  mix-blend-mode: screen;
}
.glint {
  width: 26px;
  height: 26px;
  border-radius: 0;
  opacity: 0;
  background:
    radial-gradient(circle, rgba(255, 248, 230, 0.95) 0 1.2px, rgba(241, 220, 178, 0.45) 2.4px, transparent 8px),
    linear-gradient(90deg, transparent 8%, rgba(255, 240, 210, 0.8) 50%, transparent 92%) center / 100% 1px no-repeat,
    linear-gradient(180deg, transparent 8%, rgba(255, 240, 210, 0.8) 50%, transparent 92%) center / 1px 100% no-repeat;
}
/* signin-kitchen:marks · generated by tools/build-signin-kitchen.py (where the bulbs, pools and glints land) */
.bulb-1 {
  left: 40.3%;
  top: 34.1%;
}
.bulb-2 {
  left: 48.9%;
  top: 37.7%;
}
.bulb-3 {
  left: 58.4%;
  top: 41.7%;
}
.pool-1 {
  left: 40.7%;
  top: 45.8%;
}
.pool-2 {
  left: 49.0%;
  top: 49.9%;
}
.pool-3 {
  left: 58.0%;
  top: 54.3%;
}
.glint-1 {
  left: 57.7%;
  top: 60.9%;
}
.glint-2 {
  left: 52.8%;
  top: 68.5%;
}
.glint-3 {
  left: 57.2%;
  top: 28.6%;
}
.glint-4 {
  left: 82.8%;
  top: 39.9%;
}
.glint-5 {
  left: 24.4%;
  top: 32.0%;
}
/* /signin-kitchen:marks */
.sweep {
  position: absolute;
  inset: -8% -24%;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(
    104deg,
    transparent 38%,
    rgba(241, 220, 178, 0.025) 44%,
    rgba(255, 236, 200, 0.1) 50%,
    rgba(241, 220, 178, 0.025) 56%,
    transparent 62%
  );
  mix-blend-mode: screen;
  -webkit-mask-image: radial-gradient(ellipse 52% 50% at 50% 50%, #000 50%, transparent 100%);
  mask-image: radial-gradient(ellipse 52% 50% at 50% 50%, #000 50%, transparent 100%);
}

.tagline {
  position: absolute;
  left: clamp(24px, 5vw, 80px);
  bottom: clamp(8px, 4vh, 40px);
  display: grid;
  gap: 10px;
  max-width: 22ch;
  font-family: var(--font-display);
  font-size: clamp(34px, 3.3vw, 52px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.012em;
  color: var(--ink);
}
.tagline em {
  font-style: italic;
  color: var(--champagne);
}
.tagline-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.24em;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--champagne);
}
.tagline-eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
}

/* ─────────────────────────────  The card  ───────────────────────────── */

.card {
  --lx: 80px;
  --ly: 0px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  max-width: 444px;
  justify-self: end;
  padding: 38px 40px 30px;
  border-radius: 26px;
  background:
    radial-gradient(420px 200px at 50% -40px, rgba(241, 220, 178, 0.08), transparent 70%),
    linear-gradient(180deg, var(--card-top), var(--card-bottom));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.045) inset,
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 60px 120px -40px rgba(0, 0, 0, 0.9),
    0 24px 60px -30px rgba(0, 0, 0, 0.7);
}
/* A gold hairline edge; a brighter light travels along it and follows the pointer. */
.card-edge {
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 1px;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(
    160deg,
    rgba(241, 220, 178, 0.46),
    rgba(224, 201, 158, 0.13) 26%,
    rgba(224, 201, 158, 0.06) 58%,
    rgba(241, 220, 178, 0.24)
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box exclude,
    linear-gradient(#000 0 0);
}
.card-light,
.card-sheen {
  position: absolute;
  left: 0;
  top: 0;
  width: 320px;
  height: 320px;
  margin: -160px 0 0 -160px;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(var(--lx), var(--ly));
  transition: transform 260ms var(--ease-out), opacity 420ms var(--ease-out);
}
.card-light {
  background: radial-gradient(closest-side, rgba(255, 246, 222, 1), rgba(241, 220, 178, 0.55) 38%, transparent);
}
.card-sheen {
  z-index: -1;
  width: 520px;
  height: 520px;
  margin: -260px 0 0 -260px;
  background: radial-gradient(closest-side, rgba(241, 220, 178, 0.06), transparent);
  opacity: 0;
}
.card.is-lit .card-sheen {
  opacity: 1;
}
.card-head {
  display: grid;
  justify-items: center;
  text-align: center;
}
.brand {
  position: relative;
  width: 176px;
  margin: 0 auto 4px;
}
.brand::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 34%;
  width: 150%;
  height: 120%;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(241, 220, 178, 0.2), rgba(224, 201, 158, 0.06) 55%, transparent);
  pointer-events: none;
}
.brand img {
  position: relative;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.45));
}
.ornament {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 132px;
  margin: 14px auto 16px;
}
.ornament::before,
.ornament::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(224, 201, 158, 0.6));
}
.ornament::after {
  background: linear-gradient(270deg, transparent, rgba(224, 201, 158, 0.6));
}
.ornament span {
  width: 5px;
  height: 5px;
  background: var(--champagne);
  transform: rotate(45deg);
  box-shadow: 0 0 10px rgba(241, 220, 178, 0.7);
}
h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 3vw, 40px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: balance;
}
h1 em {
  display: block;
  font-style: italic;
  color: var(--champagne);
}
.subline {
  margin-top: 10px;
  color: var(--ink-2);
  font-size: 14.5px;
  letter-spacing: 0.01em;
}

/* ─────────────────────────────  Form  ───────────────────────────── */

.form {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}
.field label,
.label {
  display: block;
  margin-bottom: 8px;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 550;
  letter-spacing: 0.01em;
}
.field input {
  display: block;
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  border-radius: 13px;
  border: 1px solid var(--hairline-2);
  background: var(--well);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.4;
  caret-color: var(--champagne-2);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.3) inset,
    0 1px 0 rgba(255, 255, 255, 0.02);
  transition:
    border-color 180ms var(--ease-out),
    box-shadow 180ms var(--ease-out),
    background-color 180ms var(--ease-out);
}
.field input:hover:not(:read-only) {
  border-color: var(--hairline-3);
  background-color: var(--well-hover);
}
.field input:focus-visible {
  outline: 1px solid transparent;
  outline-offset: 0;
  border-color: var(--champagne);
  box-shadow:
    0 0 0 4px var(--focus-glow),
    0 1px 2px rgba(0, 0, 0, 0.3) inset;
}
.field input[aria-invalid="true"] {
  border-color: var(--coral);
  box-shadow: 0 0 0 4px var(--coral-wash);
}
/* Keep the obsidian field when the browser fills a saved sign-in. */
.field input:-webkit-autofill,
.field input:-webkit-autofill:hover,
.field input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  caret-color: var(--champagne-2);
  -webkit-box-shadow: 0 0 0 40px #101a15 inset;
  box-shadow: 0 0 0 40px #101a15 inset;
  transition: background-color 600000s 0s;
}
.secret {
  position: relative;
}
.secret input {
  padding-right: 58px;
}
.secret input::-ms-reveal {
  display: none;
}
.reveal {
  position: absolute;
  right: 3px;
  top: 3px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 11px;
  background: none;
  color: var(--ink-2);
  cursor: pointer;
  transition: color 180ms var(--ease-out), background-color 180ms var(--ease-out);
}
.reveal:hover {
  color: var(--champagne-2);
  background: rgba(224, 201, 158, 0.08);
}
.reveal:focus-visible {
  outline-offset: -2px;
  box-shadow: none;
}
.reveal svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.reveal .eye-slash {
  opacity: 0;
  transition: opacity 180ms var(--ease-out);
}
.reveal[aria-pressed="true"] {
  color: var(--champagne-2);
}
.reveal[aria-pressed="true"] .eye-slash {
  opacity: 1;
}
.message {
  margin-top: 8px;
  font-size: 13.5px;
  line-height: 1.5;
}
.message:empty {
  display: none;
}
.message.error {
  color: var(--coral);
}
.message.caps {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--amber);
}
.message.caps:not(:empty)::before {
  content: "↑";
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1px solid currentColor;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

/* Keep me signed in */
.remember {
  display: grid;
  grid-template-columns: 24px 1fr;
  column-gap: 12px;
  align-items: start;
}
.remember input {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin: 10px 0 0;
  border-radius: 7px;
  border: 1px solid var(--hairline-3);
  background: var(--well);
  cursor: pointer;
  transition:
    background-color 180ms var(--ease-out),
    border-color 180ms var(--ease-out),
    box-shadow 180ms var(--ease-out);
}
.remember input:hover {
  border-color: var(--champagne);
}
.remember input:checked {
  border-color: rgba(255, 240, 205, 0.6);
  background: var(--check) center / 18px 18px no-repeat, var(--metal);
  box-shadow: 0 4px 12px -6px rgba(200, 160, 100, 0.8);
}
.remember input:focus-visible {
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--focus-glow);
}
.remember label {
  padding: 11px 0 3px;
  color: var(--ink);
  font-size: 14.5px;
  line-height: 22px;
  cursor: pointer;
}
.remember p {
  grid-column: 2;
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.5;
}

/* Server and connection messages (the live region stays in place; empty, it takes no room) */
.alert:empty {
  margin-top: -18px;
}
.alert:not(:empty) {
  position: relative;
  padding: 12px 14px 12px 44px;
  border-radius: 13px;
  border: 1px solid rgba(255, 171, 152, 0.34);
  background: var(--coral-wash);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
}
.alert:not(:empty)::before {
  content: "!";
  position: absolute;
  left: 14px;
  top: 13px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--coral);
  color: var(--coral);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}
.alert[data-tone="locked"]:not(:empty),
.alert[data-tone="notice"]:not(:empty) {
  border-color: rgba(239, 201, 131, 0.34);
  background: var(--amber-wash);
}
.alert[data-tone="locked"]:not(:empty)::before,
.alert[data-tone="notice"]:not(:empty)::before {
  border-color: var(--amber);
  color: var(--amber);
}
.alert[data-tone="locked"]:not(:empty)::before {
  content: "";
  background:
    linear-gradient(var(--amber), var(--amber)) 50% 34% / 1.5px 6px no-repeat,
    linear-gradient(var(--amber), var(--amber)) 62% 58% / 5px 1.5px no-repeat;
}

/* Sign in */
.submit {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  margin-top: 4px;
  padding: 12px 22px;
  border: 1px solid rgba(255, 240, 205, 0.55);
  border-radius: 999px;
  background: var(--metal);
  color: var(--on-metal);
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.5) inset,
    0 -1px 0 rgba(120, 88, 40, 0.28) inset,
    0 16px 34px -16px rgba(200, 160, 100, 0.8);
  transition:
    box-shadow 200ms var(--ease-out),
    transform 120ms var(--ease-out),
    background 200ms var(--ease-out);
}
.submit::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.55) 48%, transparent 64%);
  transform: translateX(-120%);
  pointer-events: none;
}
.submit:hover:not(:disabled) {
  background: var(--metal-hover);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.55) inset,
    0 -1px 0 rgba(120, 88, 40, 0.3) inset,
    0 20px 40px -16px rgba(214, 176, 112, 0.9);
}
.submit:active:not(:disabled) {
  transform: translateY(1px) scale(0.995);
}
.submit:focus-visible {
  outline-offset: 4px;
}
.submit-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  font-size: 17px;
  line-height: 1;
  transition: transform 200ms var(--ease-out);
}
.submit:hover:not(:disabled) .submit-icon {
  transform: translateX(3px);
}
.submit.is-busy {
  cursor: progress;
}
.submit.is-busy .submit-icon {
  font-size: 0;
  border-radius: 50%;
  border: 1.6px solid rgba(26, 21, 9, 0.25);
  border-top-color: var(--on-metal);
  width: 18px;
  height: 18px;
}
.submit.is-done .submit-icon {
  font-size: 0;
}
.submit.is-done .submit-icon::before {
  content: "";
  width: 20px;
  height: 20px;
  background: var(--check) center / 20px 20px no-repeat;
}
/* Locked after too many attempts: a quiet outline that still reads clearly. */
.submit:disabled {
  cursor: not-allowed;
  border-color: var(--hairline-3);
  background: rgba(224, 201, 158, 0.06);
  color: var(--ink-2);
  box-shadow: none;
  font-variant-numeric: tabular-nums;
}
.submit:disabled .submit-icon {
  display: none;
}

.assist {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
  color: var(--ink-3);
  font-size: 13.5px;
  line-height: 1.6;
  text-align: center;
}
.assist strong {
  display: block;
  color: var(--ink-2);
  font-weight: 550;
}
.noscript {
  margin-top: 16px;
  color: var(--amber);
}

/* ─────────────────────────────  The new-password step (temporary passwords)  ───────────────────────────── */

/* While the Studio is asked whether a temporary-password sign-in is still open, the form waits unseen. */
.card.is-checking .form:not(.step),
.card.is-checking .assist {
  visibility: hidden;
}
/* The step keeps the logo and ornament; the page heading stays for assistive technology. */
.card.is-step h1,
.card.is-step .subline {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.card.is-step {
  padding-top: 28px;
  padding-bottom: 24px;
}
.card.is-step .brand {
  width: 124px;
}
/* The eyebrow's side rules take the ornament's place. */
.card.is-step .ornament {
  display: none;
}
/* The sign-in help gives way to the step's own footer. */
.card.is-step .assist {
  display: none;
}
.step {
  gap: 16px;
  margin-top: 18px;
}
.step-head {
  display: grid;
  justify-items: center;
  gap: 9px;
  margin-bottom: 4px;
  text-align: center;
}
.step-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--champagne);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.24em;
  line-height: 1.5;
  text-transform: uppercase;
}
.step-eyebrow::before,
.step-eyebrow::after {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}
.step-head h2 {
  font-family: var(--font-display);
  font-size: clamp(30px, 2.4vw, 34px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: balance;
}
.step-head h2 em {
  font-style: italic;
  color: var(--champagne);
}
.step-intro {
  max-width: 44ch;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.6;
  text-wrap: pretty;
}
.step-account {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: 100%;
  min-height: 30px;
  padding: 4px 14px 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--hairline-2);
  background: rgba(224, 201, 158, 0.06);
  color: var(--ink);
  font-size: 13px;
  font-weight: 550;
  letter-spacing: 0.01em;
  overflow-wrap: anywhere;
}
.step-account::before {
  content: "";
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--champagne);
  box-shadow: 0 0 8px rgba(241, 220, 178, 0.7);
}

/* Live password guidance: a quiet dot until typed, a sage check when met, a coral cross once checked. */
.password-rules {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  padding: 0;
  list-style: none;
}
.password-rule {
  position: relative;
  min-height: 20px;
  padding-left: 29px;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 20px;
}
.password-match {
  margin-top: 10px;
}
.password-rule::before,
.password-rule::after {
  content: "";
  position: absolute;
  box-sizing: border-box;
}
.password-rule::before {
  left: 0;
  top: 1px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid var(--hairline-3);
  transition:
    border-color 180ms var(--ease-out),
    background-color 180ms var(--ease-out);
}
.password-rule::after {
  left: 7px;
  top: 8px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ink-3);
}
.password-rule[data-state="met"] {
  color: var(--ink);
}
.password-rule[data-state="met"]::before {
  border-color: var(--sage);
  background-color: var(--sage-wash);
}
.password-rule[data-state="met"]::after {
  left: 6.5px;
  top: 4.5px;
  width: 5px;
  height: 9px;
  border-radius: 0;
  border: solid var(--sage);
  border-width: 0 1.7px 1.7px 0;
  background: none;
  transform: rotate(45deg);
}
.password-rules.is-checked > [data-state="unmet"],
.password-match.is-checked[data-state="unmet"] {
  color: var(--ink);
}
.password-rules.is-checked > [data-state="unmet"]::before,
.password-match.is-checked[data-state="unmet"]::before {
  border-color: var(--coral);
  background-color: var(--coral-wash);
}
.password-rules.is-checked > [data-state="unmet"]::after,
.password-match.is-checked[data-state="unmet"]::after {
  left: 4.5px;
  top: 5.5px;
  width: 9px;
  height: 9px;
  border-radius: 0;
  background:
    linear-gradient(45deg, transparent calc(50% - 0.85px), var(--coral) calc(50% - 0.85px) calc(50% + 0.85px), transparent calc(50% + 0.85px)),
    linear-gradient(-45deg, transparent calc(50% - 0.85px), var(--coral) calc(50% - 0.85px) calc(50% + 0.85px), transparent calc(50% + 0.85px));
}

.message.help {
  color: var(--ink-3);
  text-wrap: pretty;
}
/* Caps Lock, the alert and the button share one block, so an empty alert adds no gap. */
.step-submit {
  display: grid;
  margin-top: 6px;
}
.step-submit .message.caps {
  margin: 0 0 12px;
}
.step-submit .message.caps:empty {
  display: none;
}
.step-submit .alert:not(:empty) {
  margin-bottom: 14px;
}
.step-submit .submit {
  margin-top: 4px;
}
.step-leave {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  column-gap: 4px;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--hairline);
  color: var(--ink-3);
  font-size: 13.5px;
  line-height: 1.5;
  text-align: center;
}
.step-link {
  min-height: 44px;
  padding: 0 6px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--champagne);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(224, 201, 158, 0.45);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  cursor: pointer;
  transition:
    color 180ms var(--ease-out),
    text-decoration-color 180ms var(--ease-out);
}
.step-link:hover:not(:disabled) {
  color: var(--champagne-2);
  text-decoration-color: currentColor;
}
.step-link:disabled {
  color: var(--ink-3);
  cursor: not-allowed;
}

/* ─────────────────────────────  Two-step verification: the code step  ───────────────────────────── */

/* Six cells drawn over one real input. The input (on top, its text transparent) takes typing, paste, autofill and
   focus; the cells mirror its digits, and the cell that takes the next digit carries the focus ring and a caret. */
.code {
  position: relative;
  isolation: isolate;
}
.code-input {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: transparent;
  -webkit-text-fill-color: transparent;
  caret-color: transparent;
  /* Never below 16px, or phones zoom in on focus. */
  font-size: 16px;
  letter-spacing: 0;
  cursor: text;
}
.code-input:focus-visible {
  outline: none;
  box-shadow: none;
}
.code-input::selection {
  background: transparent;
  color: transparent;
}
.code-input:-webkit-autofill,
.code-input:-webkit-autofill:hover,
.code-input:-webkit-autofill:focus {
  -webkit-text-fill-color: transparent;
  transition: background-color 600000s 0s;
}
.code-step[aria-busy="true"] .code-input {
  cursor: progress;
}
.code-cells {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) 16px repeat(3, minmax(0, 1fr));
  gap: 8px;
  height: 64px;
}
.code-cells > span {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  border-radius: 13px;
  border: 1px solid var(--hairline-2);
  background: var(--well);
  color: var(--ink);
  font-size: 27px;
  font-weight: 450;
  font-variant-numeric: tabular-nums lining-nums;
  line-height: 1;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.3) inset,
    0 1px 0 rgba(255, 255, 255, 0.02);
  transition:
    border-color 180ms var(--ease-out),
    box-shadow 180ms var(--ease-out),
    background-color 180ms var(--ease-out),
    color 180ms var(--ease-out);
}
/* The ornament's diamond between the two groups of three. */
.code-cells > i {
  justify-self: center;
  align-self: center;
  width: 5px;
  height: 5px;
  background: var(--champagne-3);
  transform: rotate(45deg);
  box-shadow: 0 0 8px rgba(241, 220, 178, 0.35);
}
.code:hover .code-input:not(:read-only) + .code-cells > span {
  border-color: var(--hairline-3);
  background-color: var(--well-hover);
}
.code-cells > span[data-filled] {
  border-color: var(--hairline-3);
  background-color: var(--well-hover);
}
.code-cells > span[data-active],
.code:hover .code-input:not(:read-only) + .code-cells > span[data-active] {
  border-color: var(--champagne);
  box-shadow:
    0 0 0 4px var(--focus-glow),
    0 1px 2px rgba(0, 0, 0, 0.3) inset;
}
.code-cells > span[data-selected] {
  border-color: var(--champagne-3);
  background-color: rgba(224, 201, 158, 0.16);
}
/* The caret, in the empty cell that takes the next digit. */
.code-cells > span[data-active]:not([data-filled])::after {
  content: "";
  width: 1.5px;
  height: 28px;
  border-radius: 1px;
  background: var(--champagne-2);
}
.code-input[aria-invalid="true"] + .code-cells > span {
  border-color: rgba(255, 171, 152, 0.62);
}
.code-input[aria-invalid="true"] + .code-cells > span[data-active] {
  border-color: var(--coral);
  box-shadow: 0 0 0 4px var(--coral-wash);
}
.code-step[aria-busy="true"] .code-cells > span {
  color: var(--ink-2);
}
/* Verified: each cell is sealed with a point of gold. */
.code.is-done .code-cells > span {
  border-color: rgba(224, 201, 158, 0.55);
  background-color: rgba(224, 201, 158, 0.06);
}
.code.is-done .code-cells > span::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--champagne);
  box-shadow: 0 0 10px rgba(241, 220, 178, 0.7);
}
.field .recovery-input {
  text-align: center;
  font-size: 18px;
  font-weight: 500;
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.code-links {
  column-gap: 10px;
}
.code-links-dot {
  color: var(--champagne-3);
}
.recovery-done-help {
  margin-top: -4px;
  text-align: center;
}

/* ─────────────────────────────  Footer  ───────────────────────────── */

.foot {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 12px;
  padding: 18px 16px max(22px, env(safe-area-inset-bottom));
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  line-height: 1.5;
  text-transform: uppercase;
  text-align: center;
}
.foot svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: var(--champagne);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.foot .dot {
  color: var(--champagne-3);
}

/* ─────────────────────────────  Success: the card dissolves into light  ───────────────────────────── */

.bloom {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  pointer-events: none;
  visibility: hidden;
}
.bloom::before {
  content: "";
  position: absolute;
  left: var(--bloom-x, 50%);
  top: var(--bloom-y, 50%);
  width: 180vmax;
  height: 180vmax;
  margin: -90vmax 0 0 -90vmax;
  border-radius: 50%;
  background: radial-gradient(
    closest-side,
    rgba(255, 242, 214, 0.6),
    rgba(241, 220, 178, 0.3) 10%,
    rgba(224, 201, 158, 0.1) 24%,
    rgba(12, 17, 15, 0.92) 46%,
    var(--canvas) 62%
  );
  opacity: 0;
}
.welcome {
  position: absolute;
  left: var(--bloom-x, 50%);
  top: var(--bloom-y, 50%);
  translate: -50% -50%;
  font-family: var(--font-display);
  font-size: clamp(34px, 4vw, 52px);
  font-style: italic;
  font-weight: 500;
  color: var(--champagne-2);
  white-space: nowrap;
  opacity: 0;
}
.is-signed-in .bloom {
  visibility: visible;
}
.is-signed-in .bloom::before,
.is-signed-in .welcome {
  opacity: 1;
}
.is-signed-in .card {
  opacity: 0;
}

/* ─────────────────────────────  Motion (only when welcome)  ───────────────────────────── */

@media (prefers-reduced-motion: no-preference) {
  .aura-1 {
    animation: drift-a 26s ease-in-out infinite alternate;
  }
  .aura-2 {
    animation: drift-b 34s ease-in-out infinite alternate;
  }
  .aura-3 {
    animation: breathe 11s ease-in-out infinite alternate;
  }

  /* The kitchen sketches itself in gold, group by group … */
  .art-grid path,
  .art-drawing path {
    stroke-dasharray: 1 2;
    animation: draw var(--t, 1.9s) var(--ease-soft) calc(var(--d, 0s) + var(--j, 0s)) both;
  }
  .art-drawing path:nth-child(3n + 2) {
    --j: 0.12s;
  }
  .art-drawing path:nth-child(3n) {
    --j: 0.22s;
  }
  .art-grid {
    --d: 0.05s;
    --t: 2.6s;
  }
  .k-room {
    --d: 0.2s;
    --t: 2.2s;
  }
  .k-wall {
    --d: 0.5s;
  }
  .k-upper {
    --d: 0.7s;
  }
  .k-hood {
    --d: 0.85s;
  }
  .k-base {
    --d: 0.95s;
  }
  .k-tall {
    --d: 1.05s;
  }
  .k-range {
    --d: 1.15s;
  }
  .k-counter {
    --d: 1.25s;
  }
  .k-island {
    --d: 1.4s;
  }
  .k-stools {
    --d: 1.7s;
  }
  .k-pendants {
    --d: 1.9s;
    --t: 1.5s;
  }
  /* … the photograph develops beneath it at blue hour, the sketch steps back … */
  .art-dusk {
    animation: develop 4.2s var(--ease-soft) 2.1s both;
  }
  .art-drawing g {
    animation: sketch-out 1.9s var(--ease-soft) 3.3s both;
  }
  .art-drawing .k-room {
    --rest: 0.6;
  }
  /* … and the lights come on. */
  .art-lit {
    animation: lights-on 1.6s var(--ease-out) 3.9s both;
  }
  .bulb {
    animation:
      light-on 1.4s var(--ease-out) 3.95s both,
      glow 6.5s ease-in-out 5.6s infinite alternate;
  }
  .bulb-2 {
    animation-delay: 4.1s, 6.6s;
  }
  .bulb-3 {
    animation-delay: 4.25s, 7.6s;
  }
  .pool {
    animation:
      light-on 1.8s var(--ease-out) 4s both,
      glow 7.5s ease-in-out 6s infinite alternate;
  }
  .pool-2 {
    animation-delay: 4.15s, 7s;
  }
  .pool-3 {
    animation-delay: 4.3s, 8s;
  }
  .glint {
    animation: twinkle 11s ease-in-out infinite both;
  }
  .glint-1 {
    animation-delay: 5.8s;
  }
  .glint-2 {
    animation-delay: 8s;
  }
  .glint-3 {
    animation-delay: 9.9s;
  }
  .glint-4 {
    animation-delay: 11.7s;
  }
  .glint-5 {
    animation-delay: 14.1s;
  }
  .sweep {
    animation: sweep 15s var(--ease-soft) 6.2s infinite both;
  }

  /* Staggered entrance */
  .rise {
    animation: rise 1s var(--ease-out) both;
  }
  .card.rise {
    animation-duration: 1.2s;
    animation-delay: 0.2s;
  }
  .brand.rise {
    animation-delay: 0.42s;
  }
  .ornament.rise {
    animation-delay: 0.52s;
  }
  h1.rise {
    animation-delay: 0.6s;
  }
  .subline.rise {
    animation-delay: 0.68s;
  }
  .form > .rise:nth-child(1) {
    animation-delay: 0.76s;
  }
  .form > .rise:nth-child(2) {
    animation-delay: 0.84s;
  }
  .form > .rise:nth-child(3) {
    animation-delay: 0.92s;
  }
  .form > .rise:nth-child(5) {
    animation-delay: 1s;
  }
  .assist.rise {
    animation-delay: 1.1s;
  }
  .tagline.rise {
    animation-delay: 2.4s;
    animation-duration: 1.6s;
  }
  .foot.rise {
    animation-delay: 1.3s;
  }
  .card-light {
    animation: edge-orbit 16s ease-in-out 1.2s infinite;
  }
  .card.is-lit .card-light {
    animation: none;
  }
  .submit:hover:not(:disabled)::after {
    transform: translateX(120%);
    transition: transform 800ms var(--ease-soft);
  }
  .submit.is-busy .submit-icon {
    animation: spin 0.9s linear infinite;
  }
  .alert:not(:empty) {
    animation: alert-in 320ms var(--ease-out);
  }
  .step:not([hidden]) {
    animation: step-in 620ms var(--ease-out) both;
  }
  /* The code step: the recovery-code field and the cells trade places softly; a typed digit settles into its
     cell; the caret blinks; a wrong code shakes the row once; a verified code seals left to right. */
  .code-step .code-field:not([hidden]),
  .code-step .field:not([hidden]) {
    animation: step-in 420ms var(--ease-out) both;
  }
  .code-cells > span[data-filled] {
    animation: digit-in 200ms var(--ease-out);
  }
  .code-cells > span[data-active]:not([data-filled])::after {
    animation: caret 1.1s step-end infinite;
  }
  .code.is-wrong .code-cells {
    animation: shake 440ms var(--ease-out);
  }
  .code.is-done .code-cells > span::after {
    animation: seal 420ms var(--ease-out) both;
  }
  .code.is-done .code-cells > span:nth-of-type(2)::after {
    animation-delay: 40ms;
  }
  .code.is-done .code-cells > span:nth-of-type(3)::after {
    animation-delay: 80ms;
  }
  .code.is-done .code-cells > span:nth-of-type(4)::after {
    animation-delay: 120ms;
  }
  .code.is-done .code-cells > span:nth-of-type(5)::after {
    animation-delay: 160ms;
  }
  .code.is-done .code-cells > span:nth-of-type(6)::after {
    animation-delay: 200ms;
  }

  /* Success */
  .is-signed-in .card {
    animation: dissolve 900ms var(--ease-soft) both;
  }
  .is-signed-in .bloom::before {
    animation: bloom 1300ms var(--ease-out) both;
  }
  .is-signed-in .welcome {
    animation: welcome 1000ms var(--ease-out) 380ms both;
  }
  .is-signed-in .art-frame {
    animation: art-glow 1200ms var(--ease-out) both;
  }
}

@keyframes drift-a {
  from {
    transform: translate3d(-3%, -2%, 0) scale(1);
  }
  to {
    transform: translate3d(7%, 6%, 0) scale(1.14);
  }
}
@keyframes drift-b {
  from {
    transform: translate3d(0, 0, 0) scale(1.08);
  }
  to {
    transform: translate3d(-8%, -5%, 0) scale(0.96);
  }
}
@keyframes breathe {
  from {
    opacity: 0.55;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: scale(1.05);
  }
}
@keyframes draw {
  from {
    stroke-dashoffset: 1;
  }
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes develop {
  0% {
    opacity: 0;
    transform: scale(1.012);
  }
  38% {
    opacity: 1;
    transform: none;
  }
  81% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
@keyframes lights-on {
  from {
    opacity: 0;
  }
}
@keyframes sketch-out {
  from {
    opacity: 1;
  }
  to {
    opacity: var(--rest, 0);
  }
}
@keyframes light-on {
  from {
    opacity: 0;
    transform: scale(0.6);
  }
}
@keyframes glow {
  from {
    opacity: 1;
  }
  to {
    opacity: 0.62;
  }
}
@keyframes twinkle {
  0%,
  100% {
    opacity: 0;
    transform: scale(0.3) rotate(0deg);
  }
  5% {
    opacity: 1;
    transform: scale(1) rotate(45deg);
  }
  11% {
    opacity: 0;
    transform: scale(0.4) rotate(90deg);
  }
}
@keyframes sweep {
  0% {
    opacity: 0;
    transform: translate3d(-42%, 0, 0);
  }
  6% {
    opacity: 1;
  }
  38% {
    opacity: 1;
  }
  46%,
  100% {
    opacity: 0;
    transform: translate3d(42%, 0, 0);
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translate3d(0, 16px, 0);
  }
}
@keyframes edge-orbit {
  0%,
  100% {
    transform: translate(70px, 0);
  }
  25% {
    transform: translate(430px, 90px);
  }
  50% {
    transform: translate(330px, 660px);
  }
  75% {
    transform: translate(0, 360px);
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes step-in {
  from {
    opacity: 0;
    transform: translate3d(0, 10px, 0);
  }
}
@keyframes alert-in {
  from {
    opacity: 0;
    transform: translate3d(0, -4px, 0);
  }
}
@keyframes digit-in {
  from {
    transform: translate3d(0, 3px, 0) scale(0.96);
  }
}
@keyframes caret {
  50% {
    opacity: 0;
  }
}
@keyframes shake {
  0%,
  100% {
    transform: none;
  }
  18% {
    transform: translate3d(-7px, 0, 0);
  }
  38% {
    transform: translate3d(6px, 0, 0);
  }
  58% {
    transform: translate3d(-4px, 0, 0);
  }
  78% {
    transform: translate3d(2px, 0, 0);
  }
}
@keyframes seal {
  from {
    opacity: 0;
    transform: scale(0.2);
  }
}
@keyframes dissolve {
  0% {
    opacity: 1;
    transform: none;
  }
  100% {
    opacity: 0;
    transform: translate3d(0, -10px, 0) scale(1.03);
  }
}
@keyframes bloom {
  0% {
    opacity: 0;
    transform: scale(0.12);
  }
  45% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes welcome {
  from {
    opacity: 0;
    transform: translate3d(0, 10px, 0);
    letter-spacing: 0.04em;
  }
}
@keyframes art-glow {
  to {
    opacity: 0.35;
    transform: scale(1.015);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .sweep,
  .glint {
    display: none;
  }
}

/* ─────────────────────────────  Responsive  ───────────────────────────── */

@media (max-width: 1180px) {
  .scene {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
    gap: clamp(20px, 3vw, 40px);
  }
  .card {
    padding: 32px 32px 26px;
  }
  .brand {
    width: 150px;
  }
  .tagline {
    font-size: clamp(30px, 3.2vw, 40px);
  }
}
@media (max-width: 900px) {
  .scene {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 0;
    padding: 0 16px 8px;
  }
  .art {
    width: calc(100% + 32px);
    height: clamp(220px, 36vh, 380px);
    height: clamp(220px, 36svh, 380px);
    margin: 0 -16px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(180deg, #000 64%, transparent 98%);
    mask-image: linear-gradient(180deg, #000 64%, transparent 98%);
  }
  .art-frame {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(124vw, 660px);
    translate: -50% -47%;
  }
  .art-grid path,
  .art-drawing path {
    stroke-width: 3.6;
  }
  .art-drawing .d,
  .art-drawing .r,
  .art-grid .g {
    stroke-width: 3;
  }
  .tagline {
    display: none;
  }
  .card {
    justify-self: center;
    margin-top: -44px;
  }
}
@media (max-width: 480px) {
  .alert:empty {
    margin-top: -14px;
  }
  .card {
    padding: 24px 20px 20px;
    border-radius: 22px;
  }
  .brand {
    width: 124px;
  }
  .ornament {
    margin: 10px auto 12px;
  }
  h1 {
    font-size: 30px;
  }
  .subline {
    margin-top: 8px;
  }
  .form {
    margin-top: 20px;
    gap: 14px;
  }
  .assist {
    margin-top: 18px;
    padding-top: 14px;
  }
  .foot {
    letter-spacing: 0.14em;
  }
  .step {
    margin-top: 12px;
  }
  .step-head h2 {
    font-size: 30px;
  }
  .code-cells {
    grid-template-columns: repeat(3, minmax(0, 1fr)) 10px repeat(3, minmax(0, 1fr));
    gap: 6px;
    height: 56px;
  }
  .code-cells > span {
    border-radius: 11px;
    font-size: 23px;
  }
  .code-cells > span[data-active]:not([data-filled])::after {
    height: 24px;
  }
  /* The links may wrap here: each on its own line rather than a separator left at a line's end. */
  .code-links {
    column-gap: 22px;
  }
  .code-links-dot {
    display: none;
  }
}
/* The longer eyebrow stays on one line on the narrowest phones. */
@media (max-width: 360px) {
  .code-step .step-eyebrow,
  .code-done .step-eyebrow {
    gap: 10px;
    letter-spacing: 0.16em;
  }
  .code-step .step-eyebrow::before,
  .code-step .step-eyebrow::after,
  .code-done .step-eyebrow::before,
  .code-done .step-eyebrow::after {
    width: 16px;
  }
}
@media (max-height: 700px) and (min-width: 901px) {
  .card {
    padding-top: 26px;
    padding-bottom: 22px;
  }
  .brand {
    width: 128px;
  }
  .ornament {
    margin: 10px auto 12px;
  }
  .form {
    margin-top: 20px;
    gap: 14px;
  }
}

/* ─────────────────────────────  Forced colours  ───────────────────────────── */

@media (forced-colors: active) {
  body {
    background: Canvas;
  }
  .stage,
  .light,
  .sweep,
  .card-edge,
  .card-sheen,
  .brand::before,
  .bloom {
    display: none;
  }
  .art-grid path,
  .art-grid path[class],
  .art-drawing path,
  .art-drawing path[class] {
    stroke: CanvasText !important;
    fill: none !important;
  }
  .card {
    border: 1px solid CanvasText;
    background: Canvas;
  }
  .field input,
  .alert:not(:empty) {
    border: 1px solid CanvasText;
  }
  .remember input {
    appearance: auto;
    -webkit-appearance: checkbox;
    background: none;
  }
  .submit {
    border: 1px solid ButtonText;
    background: ButtonFace;
    color: ButtonText;
  }
  .submit:disabled {
    border-color: GrayText;
    color: GrayText;
  }
  .reveal {
    border: 1px solid ButtonText;
  }
  .step-account,
  .password-rule::before {
    border: 1px solid CanvasText;
  }
  .step-account::before,
  .step-eyebrow::before,
  .step-eyebrow::after {
    background: CanvasText;
  }
  .password-rule::after {
    forced-color-adjust: none;
    background: CanvasText;
  }
  .password-rule[data-state="met"]::after {
    border-color: CanvasText;
    background: none;
  }
  .password-rules.is-checked > [data-state="unmet"]::after,
  .password-match.is-checked[data-state="unmet"]::after {
    background:
      linear-gradient(45deg, transparent calc(50% - 0.85px), CanvasText calc(50% - 0.85px) calc(50% + 0.85px), transparent calc(50% + 0.85px)),
      linear-gradient(-45deg, transparent calc(50% - 0.85px), CanvasText calc(50% - 0.85px) calc(50% + 0.85px), transparent calc(50% + 0.85px));
  }
  :focus-visible {
    outline: 2px solid Highlight;
  }
  /* The input stays transparent (the cells show the digits); the cell taking the next digit shows the focus. */
  .code-input {
    forced-color-adjust: none;
    color: transparent;
    background: transparent;
  }
  .code-input:focus-visible {
    outline: none;
  }
  .code-cells > span {
    border: 1px solid CanvasText;
  }
  .code-cells > span[data-active],
  .code-cells > span[data-selected] {
    outline: 2px solid Highlight;
    outline-offset: 2px;
  }
  .code-cells > i,
  .code-cells > span[data-active]:not([data-filled])::after,
  .code.is-done .code-cells > span::after {
    forced-color-adjust: none;
    background: CanvasText;
    box-shadow: none;
  }
  .is-signed-in .card {
    opacity: 1;
  }
}
