@font-face {
  font-family: 'Inter';
  src: url('../assets/inter-regular.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  --background: #f5f2eb;
  --ink: 95 89 79;
  --motion-duration: 300ms;
  font-family: 'Inter', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-weight: 400;
  background: var(--background);
}

* { box-sizing: border-box; }

html { background: var(--background); }

body {
  margin: 0;
  background: var(--background);
}

button { font: inherit; }

.back-action {
  position: absolute;
  top: 24px;
  left: 16px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  appearance: none;
  background: transparent;
  color: rgb(var(--ink) / 0.58);
  cursor: pointer;
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  touch-action: manipulation;
}

.back-action:hover { color: rgb(var(--ink) / 0.7); }

.back-action:focus-visible {
  outline: none;
  color: rgb(var(--ink) / 0.78);
}

.experience {
  position: relative;
  width: min(100%, 393px);
  margin-inline: auto;
}

.language-switch {
  position: absolute;
  top: 24px;
  right: 16px;
  z-index: 3;
  display: flex;
  align-items: center;
  color: rgb(var(--ink) / 0.46);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1;
}

.language-switch__option {
  display: grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  appearance: none;
  background: transparent;
  color: rgb(var(--ink) / 0.46);
  cursor: pointer;
  touch-action: manipulation;
}

.language-switch__option[aria-pressed='true'] {
  color: rgb(var(--ink) / 0.78);
  text-decoration: underline;
  text-decoration-color: rgb(var(--ink) / 0.48);
  text-underline-offset: 4px;
}

.language-switch__option:hover { opacity: 0.82; }

.language-switch__option:focus-visible {
  outline: 1px solid rgb(var(--ink) / 0.45);
  outline-offset: -5px;
}

.language-switch__separator { pointer-events: none; }

.screen {
  position: relative;
  isolation: isolate;
  min-height: max(852px, 100dvh);
  overflow: hidden;
  background: var(--background);
  opacity: 1;
  outline: none;
  transition: opacity var(--motion-duration) ease-out;
}

.screen[hidden] { display: none !important; }
.screen.is-entering, .screen.is-leaving { opacity: 0; }

.screen.is-leaving {
  position: absolute;
  inset: 0;
  width: 100%;
  pointer-events: none;
  z-index: 2;
}

.ambience {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}

.ellipse { position: absolute; border-radius: 50%; }

.ellipse--lower {
  left: calc(50% - 296.5px);
  top: 530px;
  width: 500px;
  height: 650px;
  background: radial-gradient(ellipse at center, rgb(201 207 196 / 0.35) 0%, rgb(201 207 196 / 0) 72%);
  filter: blur(70px);
}

.ellipse--upper {
  left: calc(50% - 56.5px);
  top: -65px;
  width: 337px;
  height: 360px;
  background: radial-gradient(ellipse at center, rgb(216 205 190 / 0.45) 0%, rgb(216 205 190 / 0) 72%);
  /* Figma stores a 40px blur here with effect.visible = false. */
}

.positioned {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  text-align: center;
}

.screen--closed {
  --brand-top: 198px;
  --subtitle-top: 229px;
  --brand-mark-top: 280px;
  --date-top: 365px;
}

.screen--revealed {
  --brand-top: 136px;
  --subtitle-top: 166px;
  --brand-mark-top: 218px;
  --date-top: 270px;
}

.screen--about, .screen--research {
  --brand-top: 136px;
  --subtitle-top: 166px;
  --brand-mark-top: 191px;
  --date-top: 216px;
}

.brand-name {
  top: var(--brand-top);
  width: max-content;
  color: rgb(var(--ink) / 0.8);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.16em;
  white-space: nowrap;
}

.brand-subtitle {
  top: var(--subtitle-top);
  width: 91px;
  color: rgb(var(--ink) / 0.75);
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.brand-mark {
  top: var(--brand-mark-top);
  color: rgb(var(--ink) / 0.65);
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: 0.18em;
  white-space: nowrap;
}

.date-mark {
  top: var(--date-top);
  color: rgb(var(--ink) / 0.8);
  font-size: 19px;
  line-height: 1.2;
  letter-spacing: 0.14em;
  white-space: nowrap;
}

.divider {
  top: 241px;
  color: rgb(var(--ink) / 0.65);
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.06em;
}

.closed-message {
  top: 435px;
  max-width: calc(100% - 24px);
  color: rgb(var(--ink) / 0.9);
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.revealed-eyebrow {
  top: 300px;
  color: rgb(var(--ink) / 0.9);
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.scent-name {
  top: 365px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(350px, calc(100% - 32px));
  color: rgb(var(--ink) / 0.9);
  font-weight: 400;
  white-space: pre;
}

.scent-name__latin {
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: 0.12em;
}

.scent-name__chinese {
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: 0.08em;
}

.scent-botanical {
  top: 434px;
  width: min(300px, calc(100% - 32px));
  color: rgb(var(--ink) / 0.55);
  font-size: 12px;
  font-style: italic;
  line-height: 1.2;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.scent-qualities {
  top: 462px;
  color: rgb(var(--ink) / 0.9);
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: 0.18em;
  white-space: nowrap;
}

.scent-impression {
  top: 502px;
  width: min(220px, calc(100% - 32px));
  color: rgb(var(--ink) / 0.9);
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: 0.08em;
  white-space: pre-line;
}

.text-action {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: max-content;
  min-width: 68px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 2px;
  appearance: none;
  background: transparent;
  color: rgb(var(--ink) / 0.7);
  cursor: pointer;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-align: center;
  white-space: nowrap;
  touch-action: manipulation;
}

.text-action::before {
  content: '';
  position: absolute;
  inset: -5px -12px;
}

.text-action:focus-visible {
  outline: 1px solid rgb(var(--ink) / 0.8);
  outline-offset: 7px;
}

.text-action--fixed {
  position: absolute;
  top: 610px;
  left: 50%;
  transform: translateX(-50%);
}

.text-action--inline { align-self: center; }

.screen-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(188px, calc(100% - 32px));
  color: rgb(var(--ink) / 0.8);
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-align: center;
  white-space: nowrap;
}

.screen-footer--closed, .screen-footer--revealed {
  position: absolute;
  top: 700px;
  left: 50%;
  transform: translateX(-50%);
}

.footer-chinese { font-size: 14px; }
.footer-english { font-size: 13px; }

.detail-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding-top: 275px;
}

.detail-content--about { gap: 17px; }
.detail-content--research { gap: 20px; }

.detail-block {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  text-align: center;
}

.detail-heading, .detail-copy {
  margin: 0;
  font-weight: 400;
  line-height: 1.2;
}

.detail-heading {
  color: rgb(var(--ink) / 1);
  font-size: 16px;
  letter-spacing: 0.1em;
}

.detail-copy {
  color: rgb(var(--ink) / 0.9);
  font-size: 14px;
  letter-spacing: 0.08em;
  white-space: pre-line;
}

.about-impression {
  width: min(211px, calc(100% - 32px));
  gap: 20px;
}

.about-research {
  width: min(272px, calc(100% - 32px));
  gap: 20px;
}

.about-research__note { gap: 10px; }

.about-culture {
  width: min(256px, calc(100% - 32px));
  gap: 20px;
  margin-top: 5px;
}

.research-found {
  width: min(272px, calc(100% - 32px));
  gap: 10px;
}

.research-boundary {
  width: min(332px, calc(100% - 32px));
  gap: 10px;
}

.research-sources {
  width: min(329px, calc(100% - 32px));
  gap: 10px;
}

.source-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  white-space: normal;
}

.source-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
}

.source-reference, .source-title { display: block; }
.source-title { color: rgb(var(--ink) / 0.75); }

.screen-footer--about, .screen-footer--research {
  position: relative;
  margin-inline: auto;
}

.screen-footer--about { margin-top: 85px; }
.screen-footer--research { margin-top: 60px; }

.experience[data-language='en'] .closed-message {
  width: min(340px, calc(100% - 36px));
  white-space: normal;
}

.experience[data-language='en'] .scent-impression {
  width: min(320px, calc(100% - 32px));
}

.experience[data-language='en'] .about-impression,
.experience[data-language='en'] .about-research,
.experience[data-language='en'] .about-culture,
.experience[data-language='en'] .research-found,
.experience[data-language='en'] .research-boundary {
  width: min(332px, calc(100% - 32px));
}

.experience:not([data-scent='basil']) .scent-impression {
  width: min(332px, calc(100% - 32px));
}

.experience[data-scent='true_lavender'] .scent-name__latin,
.experience[data-scent='spike_lavender'] .scent-name__latin {
  font-size: 28px;
  letter-spacing: 0.09em;
}

.experience[data-scent='water_lily'] .scent-name__latin {
  font-size: 31px;
  letter-spacing: 0.1em;
}

.experience[data-language='en'][data-scent='true_lavender'] .scent-impression,
.experience[data-language='en'][data-scent='spike_lavender'] .scent-impression {
  width: min(355px, calc(100% - 24px));
  font-size: 13px;
  letter-spacing: 0.06em;
}

.experience[data-language='en'][data-scent='spike_lavender'] .scent-impression {
  letter-spacing: 0;
}

@media (max-width: 340px) {
  .closed-message { font-size: 19px; }
  .scent-impression { width: calc(100% - 24px); }
}

@media (prefers-reduced-motion: reduce) {
  :root { --motion-duration: 0ms; }
  .screen { transition: none; }
}
