@font-face {
  font-family: Gloock;
  src: url("assets/gloock-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ground: #191d20;
  --paper: #f3f2ec;
  --muted: #c3cccb;
  --blue: #c4e2f7;
  --stem: #a0afa4;
  --edge: clamp(18px, 4.1vw, 64px);
  background: var(--ground);
  color: var(--paper);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

* { box-sizing: border-box; }
body { min-width: 280px; margin: 0; }
::selection { background: var(--blue); color: var(--ground); }

.site-header {
  position: fixed;
  z-index: 1;
  inset: 0 0 auto;
  pointer-events: none;
}

.site-header__bar {
  --bar-ease: cubic-bezier(.22, 1, .36, 1);
  --bar-duration: 340ms;
  --brand-width: 124px;
  --account-width: 72px;
  --compact-width: 510px;
  --menu-gap: 18px;
  position: absolute;
  inset: 22px auto auto 50%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  isolation: isolate;
  width: calc(100% - var(--edge) * 2);
  transform: translateX(-50%);
  transition:
    width var(--bar-duration) var(--bar-ease),
    top var(--bar-duration) var(--bar-ease);
}

.site-header__bar::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -6px -12px;
  border: 1px solid #d4e5f22e;
  border-radius: 999px;
  background: #222a31e6;
  backdrop-filter: blur(12px);
  box-shadow: 0 6px 20px #080c103d;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms var(--bar-ease);
}

.site-header[data-compact] .site-header__bar {
  --brand-width: 104px;
  --account-width: 59px;
  --menu-gap: 14px;
  top: 16px;
  width: min(var(--compact-width), 100% - 46px);
}

.site-header[data-compact] .site-account { --account-max: 144px; }

.site-header[data-compact] .site-header__bar::before {
  opacity: 1;
  transition-delay: 70ms;
}

.site-header__menu, .site-header__links {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: var(--menu-gap);
}

.brand, .home-action, .account-action {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--paper);
  text-decoration: none;
  pointer-events: auto;
}

.brand img {
  display: block;
  width: var(--brand-width);
  height: auto;
  transition: width var(--bar-duration) var(--bar-ease);
}

.home-action {
  min-width: 44px;
  white-space: nowrap;
  border-radius: 999px;
  color: var(--muted);
  font-size: .875rem;
  transition: color 160ms ease, transform 160ms var(--bar-ease);
}

.account-nav {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, auto);
  border: 1px solid #e0eff44a;
  border-radius: 999px;
  background: #c4dcea0c;
  transition: border-color 200ms ease, background-color 200ms ease;
}

.site-header[data-compact] .account-nav {
  border-color: transparent;
  background-color: transparent;
}

.account-nav::before {
  content: "";
  position: absolute;
  inset: 3px auto 3px 3px;
  width: calc(50% - 3px);
  border-radius: 999px;
  background: #b2d2eb24;
  pointer-events: none;
  transform: translateX(100%);
  transition: transform 200ms var(--bar-ease);
}

.account-nav:has(.account-action--register:is(:hover, :focus-visible))::before {
  transform: translateX(0);
}

.account-nav:has(:focus-visible)::before { transition: none; }

.account-action {
  position: relative;
  min-width: var(--account-width);
  padding-inline: 10px;
  border-radius: 999px;
  font-size: .875rem;
  transition:
    min-width var(--bar-duration) var(--bar-ease),
    color 160ms ease,
    transform 160ms var(--bar-ease);
}

.home-action:is(:hover, :focus-visible),
.account-action:is(:hover, :focus-visible) { color: var(--blue); }
.home-action:active, .account-action:active { transform: scale(.96); }

a:focus-visible, button:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
.account-action:focus-visible { outline-offset: -3px; }
main:focus { outline: none; }

.skip-link {
  position: absolute;
  top: 8px;
  left: var(--edge);
  z-index: 2;
  transform: translateY(-155%);
  padding: 12px 16px;
  background: var(--paper);
  color: var(--ground);
  pointer-events: auto;
}

.skip-link:focus { transform: none; }

.hero {
  position: relative;
  display: grid;
  min-height: 100svh;
  align-items: center;
  padding: 90px max(4vw, 14px) 94px;
  isolation: isolate;
  overflow: clip;
}

.hero__watermark {
  position: absolute;
  z-index: -1;
  inset: 50% auto auto 51%;
  width: min(65vw, 850px, 100svh);
  height: auto;
  transform: translate(-50%, -50%);
  opacity: .075;
  pointer-events: none;
}

.hero__poster {
  width: min(100%, 1312px);
  margin-inline: auto;
  text-align: center;
  /* Place the title's visible center on the watermark's horizontal diagonal. */
  transform: translateY(clamp(-56.5px, calc(13px - 5.5vw), -20px));
}

.hero__scene {
  position: relative;
  display: grid;
  align-items: center;
  container-type: inline-size;
  aspect-ratio: 1280 / 400;
  isolation: isolate;
}

.botanical {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.botanical--back { z-index: -1; }

.stalks {
  fill: none;
  stroke: var(--stem);
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wordmark {
  position: relative;
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
  transform: translateY(4cqw);
  font: 400 14.4cqw / .93 Gloock, Georgia, serif;
  letter-spacing: -.038em;
  white-space: nowrap;
}

.wordmark__letters { display: flex; align-items: baseline; }

.wordmark__letters > span {
  position: relative;
  animation: type-letter 1ms step-end calc(125ms + var(--letter) * 104ms) backwards;
}

.wordmark__letters > span:not(.wordmark__space)::after {
  content: "";
  position: absolute;
  top: .07em;
  right: -.045em;
  width: max(1px, .009em);
  height: .78em;
  background: var(--paper);
  opacity: 0;
  animation: typing-caret 104ms step-end calc(125ms + var(--letter) * 104ms);
}

.wordmark__letters > .wordmark__space { width: .36em; animation: none; }

.stalk {
  stroke-dasharray: 1;
  animation: draw-stalk 890ms cubic-bezier(.26, .63, .33, 1) var(--grow) backwards;
}

.sprig { animation: reveal-leaves 530ms ease-out var(--grow) backwards; }

.blossom {
  transform-origin: 0 0;
  animation: open-flax 740ms cubic-bezier(.18, .72, .26, 1.1) var(--grow) backwards;
}

.blossom--main { --petal-fill: url(#flax-main-ink); }

.hero__subtitle {
  margin: calc(-4 * min(1vw, 12px)) 0 0;
  color: var(--muted);
  font-size: clamp(.875rem, 1.45vw, 1.25rem);
  line-height: 1.65;
  letter-spacing: .065em;
  text-wrap: balance;
  animation: reveal-leaves 520ms ease-out 1100ms backwards;
}

.process {
  border-block: 1px solid #d7e7ee26;
  scroll-margin-top: 72px;
}

.process__grid {
  display: grid;
  width: min(100% - var(--edge) * 2, 1240px);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px 12px;
  margin: 0 auto;
  padding-block: clamp(26px, 4vw, 50px);
  text-align: center;
}

.process__grid > div { display: flex; flex-direction: column; gap: 8px; }
.process dt {
  font-size: clamp(1.5rem, 2.55vw, 2rem);
  font-weight: 650;
  line-height: 1.12;
}

.process dd {
  margin: 0;
  color: var(--muted);
  font-size: .875rem;
  line-height: 1.55;
  text-wrap: balance;
}

.workflow {
  display: grid;
  grid-template-columns: minmax(224px, .7fr) minmax(0, 1.75fr);
  align-items: center;
  gap: clamp(32px, 4.8vw, 65px);
  width: min(100% - var(--edge) * 2, 1240px);
  min-height: 92svh;
  margin: 0 auto;
  padding-block: clamp(54px, 7vw, 100px);
  scroll-margin-top: 70px;
}

.workflow h2 {
  margin: 0 0 clamp(21px, 2.35vw, 34px);
  font-size: clamp(1.9rem, 3.15vw, 2.875rem);
  font-weight: 650;
  line-height: 1.18;
  letter-spacing: -.035em;
}

.workflow__modes {
  display: inline-flex;
  gap: 3px;
  margin-bottom: 25px;
  padding: 3px;
  border: 1px solid #d7e7ee32;
  border-radius: 999px;
}

.workflow button { cursor: pointer; font: inherit; }

.workflow__modes button {
  min-height: 44px;
  padding-inline: 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: .9rem;
  transition: background-color 170ms ease, color 170ms ease;
}

.workflow__modes button:hover { color: var(--paper); }
.workflow__modes button[aria-pressed="true"] { background: var(--blue); color: #15232e; }

.workflow__descriptions { display: grid; }
.workflow__description { grid-area: 1 / 1; }
.workflow__description[hidden] { display: block; visibility: hidden; }
.workflow__description h3 { margin: 0 0 9px; font-size: 1.13rem; font-weight: 650; }
.workflow__description p { max-width: 27em; margin: 0; color: var(--muted); line-height: 1.8; }

.workflow__replay {
  min-height: 44px;
  margin-top: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 5px;
}

.workflow__replay:hover { color: var(--paper); }
.workflow:not([data-enhanced]) :is(.workflow__modes, .workflow__replay) { display: none; }

.studio {
  overflow: hidden;
  border: 1px solid #d7e7ee33;
  border-radius: 14px;
  background: #15191d;
}

.studio__caption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 17px;
  border-bottom: 1px solid #d7e7ee20;
  background: #22292f;
  color: var(--muted);
  font-size: .875rem;
}

.studio__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(212px, 32%);
  align-items: center;
  gap: clamp(15px, 2vw, 28px);
  padding: clamp(12px, 2vw, 25px);
}

.studio__canvas { display: grid; place-items: center; }

.studio__artboard {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: min(100%, 470px);
  aspect-ratio: 1;
  background: repeating-conic-gradient(#333a40 0% 25%, #2c3238 0% 50%) 0 0 / 16px 16px;
}

.studio__image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.studio__image--source { visibility: hidden; }
[data-mode="i2i"] .studio__image--source { visibility: visible; }

.studio__selection {
  position: absolute;
  inset: 2px;
  border: 1px dashed #e9f5ffcf;
  opacity: .55;
  pointer-events: none;
}

.studio__panels { display: grid; }
.studio__panel {
  position: relative;
  grid-area: 1 / 1;
  align-self: center;
  container-type: inline-size;
  visibility: hidden;
}

.studio__panel img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 7px;
}

[data-mode="t2i"] .studio__panel--t2i,
[data-mode="i2i"] .studio__panel--i2i { visibility: visible; }

.studio__result-state {
  position: absolute;
  inset: 16.5% 3% auto 66%;
  display: grid;
  min-height: 5.5cqw;
  place-items: center end;
  background: #262729;
  color: #c3cad2;
  font-size: 3.75cqw;
  line-height: 1.2;
}

.studio__panel--i2i .studio__result-state { top: 13.25%; }
.studio__result-state > span { grid-area: 1 / 1; }
.studio__result-working { opacity: 0; }

.studio__highlight {
  position: absolute;
  border: 1px solid #c4e2f7;
  border-radius: 5px;
  opacity: 0;
  pointer-events: none;
}

.studio__highlight--prompt { left: 6.6%; width: 86.9%; }
.studio__highlight--submit { left: 64%; width: 33%; }
.studio__panel--t2i .studio__highlight--prompt { top: 68%; height: 12.4%; }
.studio__panel--t2i .studio__highlight--submit { top: 92.4%; height: 6.2%; }
.studio__panel--i2i .studio__highlight--prompt { top: 74.3%; height: 9.9%; }
.studio__panel--i2i .studio__highlight--submit { top: 93.9%; height: 5%; }

.studio.is-playing .studio__selection { animation: draw-demo-selection 480ms ease-out both; }
.studio.is-playing .studio__highlight--prompt { animation: highlight-demo-field 760ms ease 400ms both; }
.studio.is-playing .studio__highlight--submit { animation: highlight-demo-field 550ms ease 1050ms both; }
.studio.is-playing .studio__image--result { animation: reveal-demo-result 920ms cubic-bezier(.22, 1, .36, 1) 1390ms both; }
.studio.is-playing .studio__result-ready { animation: demo-ready 1ms step-end 2300ms backwards; }
.studio.is-playing .studio__result-working { animation: demo-working 1220ms step-end 1080ms; }

@keyframes draw-demo-selection {
  from { clip-path: inset(0 68% 68% 0); opacity: 0; }
  55% { opacity: 1; }
  to { clip-path: inset(0); opacity: .55; }
}

@keyframes highlight-demo-field {
  0%, 100% { opacity: 0; }
  40%, 66% { opacity: 1; }
}

@keyframes reveal-demo-result {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0); }
}

@keyframes demo-ready { from { opacity: 0; } }
@keyframes demo-working { from { opacity: 1; } to { opacity: 0; } }

.onboarding {
  padding-block: clamp(58px, 7vw, 104px) clamp(62px, 8vw, 116px);
  border-top: 1px solid #d7e7ee26;
  text-align: center;
  scroll-margin-top: 72px;
}

.onboarding h2 {
  width: min(100% - var(--edge) * 2, 1240px);
  margin: 0 auto clamp(36px, 5vw, 73px);
  font-size: clamp(1.75rem, 2.95vw, 2.625rem);
  font-weight: 650;
  line-height: 1.2;
}

.onboarding__steps {
  display: grid;
  width: min(100% - var(--edge) * 2, 1240px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 5vw, 72px);
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.onboarding__steps li { display: grid; justify-items: center; align-content: start; gap: 22px; }

.onboarding__icon {
  position: relative;
  display: grid;
  width: 62px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid #d7e7ee26;
  border-radius: 50%;
  background: #c4dcea0a;
  color: var(--blue);
}

.onboarding__icon svg { width: 24px; height: 24px; }

.onboarding__number {
  position: absolute;
  inset: -5px -6px auto auto;
  display: grid;
  width: 23px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
  color: #15232e;
  font-size: .75rem;
  font-weight: 650;
}

.onboarding__steps h3 {
  margin: 0 0 7px;
  font-size: 1.06rem;
  font-weight: 650;
}

.onboarding__steps p {
  max-width: 19em;
  margin: 0 auto;
  color: var(--muted);
  font-size: .9375rem;
  line-height: 1.7;
  text-wrap: balance;
}

.focus {
  padding-block: clamp(60px, 7.4vw, 108px);
  border-top: 1px solid #d7e7ee26;
  scroll-margin-top: 72px;
}

.focus__layout {
  width: min(100% - var(--edge) * 2, 1240px);
  margin-inline: auto;
}

.focus__head {
  margin-bottom: clamp(34px, 5vw, 64px);
}

.focus__head h2 {
  margin: 0 0 16px;
  font-size: clamp(1.85rem, 4.6vw, 4rem);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -.035em;
}

.focus__head p {
  max-width: 38em;
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.focus__abilities {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: clamp(26px, 4vw, 48px) clamp(22px, 3vw, 42px);
}

.focus__ability {
  border-top: 1px solid #c4e2f76b;
  padding-top: clamp(14px, 2.2vw, 24px);
}

.focus__ability h3 {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: clamp(1.18rem, 2.1vw, 1.65rem);
  font-weight: 650;
}

.focus__ability p, .focus__scenes dd {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.focus__ability p { font-size: .9rem; }

.focus__figure { margin: 19px 0 0; }

.focus__figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  background: #283039;
}

.focus__comparison { position: relative; }

.focus__image-labels {
  position: absolute;
  inset: auto 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-items: start;
  padding-block-end: clamp(8px, 1vw, 14px);
  pointer-events: none;
}

.focus__image-labels span {
  margin-inline-start: clamp(8px, 1vw, 14px);
  padding: 3px 8px;
  border-radius: 4px;
  background: #171b1ff0;
  color: var(--paper);
  font-size: .75rem;
  line-height: 1.4;
}

.focus__caption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 14px;
  margin-top: 12px;
  color: var(--blue);
  font-size: .8125rem;
  line-height: 1.6;
}

.focus__caption span { color: var(--muted); }

.focus__scenes { margin: 22px 0 0; }

.focus__scenes > div {
  display: grid;
  grid-template-columns: 4.125em minmax(0, 1fr);
  align-items: baseline;
  gap: 9px;
  padding-block: 11px;
  border-top: 1px solid #d7e7ee20;
  font-size: .875rem;
}

.focus__scenes dt { font-weight: 600; }

.focus__tool {
  display: flex;
  grid-column: 1 / -1;
  align-items: baseline;
  gap: 8px 16px;
  margin: 0;
  padding-block: 15px 0;
  border-top: 1px solid #d7e7ee26;
  color: var(--muted);
  font-size: .875rem;
  line-height: 1.65;
}

.focus__tool strong { flex: none; color: var(--paper); font-weight: 600; }

@media (max-width: 560px) {
  .focus__abilities { grid-template-columns: minmax(0, 1fr); }
  .focus__tool { flex-direction: column; }
}

.site-footer { border-top: 1px solid #d7e7ee26; }

.site-footer__inner {
  width: min(100% - var(--edge) * 2, 1240px);
  margin-inline: auto;
}

.site-footer__intro { padding-block: 43px 36px; }
.site-footer__intro img { display: block; }

.site-footer__intro p {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: .875rem;
}

.site-footer__bottom {
  margin: 0;
  padding-block: 21px 25px;
  border-top: 1px solid #d7e7ee22;
  color: var(--muted);
  font-size: .875rem;
  line-height: 1.5;
  text-align: left;
}

@keyframes type-letter { from { color: transparent; } }
@keyframes typing-caret {
  from { opacity: 1; }
  to { opacity: 0; }
}
@keyframes draw-stalk { from { stroke-dashoffset: 1; } }
@keyframes reveal-leaves { from { opacity: 0; } }
@keyframes open-flax {
  from { opacity: 0; transform: rotate(-12deg) scale(.12); }
  62% { opacity: 1; }
  to { transform: rotate(0) scale(1); }
}

@media (max-width: 850px) {
  .workflow {
    grid-template-columns: minmax(0, 1fr);
    min-height: auto;
  }
}

@media (max-width: 640px) {
  .site-header__bar {
    --brand-width: 100px;
    --account-width: 56px;
    --compact-width: 410px;
    --menu-gap: 8px;
    top: 13px;
  }

  .site-header[data-compact] .site-header__bar {
    --brand-width: 92px;
    --account-width: 52px;
    --menu-gap: 8px;
    top: 12px;
  }
  .hero { padding-inline: 12px; }
  .hero__poster { transform: translateY(calc(19px - 7.4vw)); }
  .hero__watermark { width: 115vw; }
  .hero__scene { aspect-ratio: 1280 / 490; }

  .botanical {
    inset: auto 0 0;
    height: auto;
  }

  .botanical__right {
    transform-box: view-box;
    transform-origin: 87% 56%;
    transform: translate(5%, -10%) scale(1.55);
  }

  .wordmark {
    transform: translateY(7.4cqw);
    font-size: 17.2cqw;
  }

  .hero__subtitle { margin-top: 7px; letter-spacing: .045em; }
  .process__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .onboarding { text-align: left; }
  .onboarding__steps { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .onboarding__steps li { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 21px; justify-items: start; }
  .onboarding__icon { width: 52px; }
  .onboarding__steps p { max-width: none; text-wrap: wrap; }
  .site-footer__intro { padding-block: 33px 28px; }
}

@media (max-width: 510px) {
  .studio__body { grid-template-columns: minmax(0, 1fr); }
  .studio__panels { width: min(100%, 244px); margin-inline: auto; }
}

@media (max-width: 500px) {
  .home-action--start { display: none; }
  .site-header__bar,
  .site-header[data-compact] .site-header__bar { --brand-width: 76px; --account-width: 44px; --menu-gap: 6px; }
  .home-action { min-width: 32px; font-size: .8125rem; }
  .site-header[data-compact] .site-header__bar { width: calc(100% - 34px); }
}

@media (max-width: 390px) {
  .process, .workflow, .focus { scroll-margin-top: 112px; }

  .site-header__bar,
  .site-header[data-compact] .site-header__bar {
    --brand-width: 84px;
    --account-width: 48px;
    display: grid;
    grid-template-columns: 1fr auto;
    row-gap: 3px;
  }

  .site-header__menu { display: contents; }
  .site-header__links {
    grid-column: 1 / -1;
    grid-row: 2;
    gap: 18px;
    border-top: 1px solid #c4e2f723;
  }

  .site-header__links .home-action { min-height: 36px; }
  .site-header__bar .brand { justify-self: start; }
  .site-header__bar :is(.account-nav, .site-account) { grid-column: 2; grid-row: 1; }
  .site-header__bar::before { border-radius: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .stalk, .sprig, .blossom, .wordmark__letters > span,
  .wordmark__letters > span::after, .hero__subtitle { animation: none; }
  .site-header__bar, .site-header__bar::before, .brand img,
  .account-nav, .account-nav::before, .home-action, .account-action,
  .workflow__modes button { transition: none; }
  .studio.is-playing :is(.studio__selection, .studio__highlight, .studio__image, .studio__result-state > span) { animation: none; }
  .workflow__replay { display: none; }
}
