@font-face {
  font-family: Manrope;
  src: url("../fonts/manrope-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}

@font-face {
  font-family: Manrope;
  src: url("../fonts/manrope-latin-ext.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Noto Sans JP";
  src: url("../fonts/noto-sans-jp-quote.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: light;
  --color-paper: #f9edf4;
  --color-ink: #321f37;
  --color-quiet: #58435d;
  --color-primary: #523163;
  --color-primary-hover: #422550;
  --color-light: #fff9fc;
  --color-line: #b393ad;
  --color-focus: #772f72;
  --radius-pill: 100vw;
  --page-gutter: clamp(2rem, 5.5vw, 6.25rem);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  font-family: Manrope, "Segoe UI", sans-serif;
  color: var(--color-ink);
  background: var(--color-paper);
  scrollbar-color: var(--color-line) var(--color-paper);
  -webkit-text-size-adjust: 100%;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body, h1, p, figure, blockquote {
  margin: 0;
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  color: inherit;
  font: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 4px;
}

::selection {
  color: var(--color-ink);
  background: #eecadf;
}

.scene {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
  min-height: 100svh;
}

.scene-art,
.scene-art::after {
  position: absolute;
  inset: 0;
}

.scene-art {
  z-index: -1;
  overflow: clip;
  pointer-events: none;
}

.scene-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.scene-art::after {
  content: "";
  background:
    linear-gradient(180deg, #fff5fa80, transparent 8.5rem),
    linear-gradient(270deg, #fff8fbbd, #fff9fb66 30%, #fff8fb00 58%);
}

.sakura-drift {
  position: absolute;
  z-index: -1;
  inset: 0;
  overflow: clip;
  pointer-events: none;
}

.sakura-drift span {
  position: absolute;
  inset-block-start: 4%;
  inset-inline-start: 14%;
  width: .625rem;
  height: .875rem;
  border-radius: 65% 35% 64% 36% / 63% 45% 55% 37%;
  background: linear-gradient(150deg, var(--color-light), oklch(84% 0.1193 350.7));
  opacity: 0;
  animation: petal-drift 4.6s ease-out both;
}

.sakura-drift span:nth-child(2) {
  inset-block-start: 9%;
  inset-inline-start: 43%;
  animation-duration: 4s;
  animation-delay: .6s;
}

.sakura-drift span:nth-child(3) {
  inset-block-start: 3%;
  inset-inline-start: 82%;
  animation-duration: 4.3s;
  animation-delay: .4s;
}

@keyframes petal-drift {
  from { transform: translate(-.5rem, -1.5rem) rotate(-35deg); opacity: 0; }
  22% { opacity: .8; }
  70% { opacity: .65; }
  to { transform: translate(3.5rem, 8rem) rotate(110deg); opacity: 0; }
}

@media (width > 52rem) and (aspect-ratio > 6/5) and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .scene-art img {
    transform: translate3d(var(--art-x, 0px), var(--art-y, 0px), 0) scale(1.025);
    transition: transform 620ms var(--ease-out);
  }
}

.frame {
  padding-inline: max(var(--page-gutter), calc((100% - 100rem) / 2));
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: 6rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-size: .875rem;
  font-weight: 750;
  letter-spacing: -.025em;
}

.sound {
  position: relative;
  margin-inline-start: auto;
}

.sound-controls {
  display: flex;
  align-items: center;
  padding-inline-end: .625rem;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-pill);
  background: var(--color-light);
}

.sound-toggle {
  display: grid;
  place-items: center;
  inline-size: 2.75rem;
  block-size: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--color-primary);
}

.sound-volume {
  inline-size: clamp(4rem, 14vw, 5.25rem);
  block-size: 2.75rem;
  margin: 0;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.sound-toggle:hover,
.sound-toggle[aria-pressed="true"] {
  background: #f3e2ef;
}

.sound-toggle .sound-on,
.sound-toggle[aria-pressed="true"] .sound-off {
  display: none;
}

.sound-toggle[aria-pressed="true"] .sound-on {
  display: inline;
}

.sound-error {
  position: absolute;
  z-index: 1;
  inset-block-start: calc(100% + .5rem);
  inset-inline-end: 0;
  width: max-content;
  max-width: 16rem;
  padding: .625rem .875rem;
  border-radius: .75rem;
  background: var(--color-light);
  font-size: .8125rem;
  line-height: 1.45;
}

.hero {
  display: grid;
  align-items: center;
  padding-block: 2rem;
}

.story {
  width: min(35vw, 34rem);
  margin-inline-start: auto;
  margin-inline-end: clamp(0rem, 2.5vw, 3rem);
}

h1 {
  font-size: clamp(2.35rem, 4.35vw, 4.375rem);
  font-weight: 800;
  line-height: .99;
  letter-spacing: -.039em;
}

.profile-role {
  margin-block-start: .625rem;
  color: var(--color-primary);
  font-weight: 750;
}

.profile-bio {
  max-width: 29rem;
  margin-block-start: 1.125rem;
  color: var(--color-quiet);
  font-weight: 600;
  line-height: 1.7;
  text-wrap: pretty;
}

.profile-bio a {
  color: var(--color-primary);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: var(--color-line);
  text-underline-offset: .2em;
}

.profile-bio a:hover {
  text-decoration-color: currentColor;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: .625rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.profile-link {
  display: grid;
  place-items: center;
  width: 2.875rem;
  height: 2.875rem;
  border: 1px solid var(--color-line);
  border-radius: 50%;
  background: #fff9fcbf;
  color: var(--color-primary);
  transition: transform 180ms var(--ease-out), background-color 180ms ease;
}

.profile-link:focus-visible,
.profile-link:active {
  background: #f3e2ef;
  color: var(--color-primary-hover);
}

@media (hover: hover) {
  .profile-link:hover {
    transform: translateY(-2px);
    background: #f3e2ef;
    color: var(--color-primary-hover);
  }
}

.newdimension-mark {
  width: 1.65rem;
  height: 1.65rem;
  background: currentColor;
  mask: url("../img/newdimension-mark.webp") center / contain no-repeat;
  mask-mode: luminance;
}

.quote {
  display: grid;
  justify-items: start;
  gap: .25rem;
  margin-block-start: 1.5rem;
}

.quote-copy {
  width: min(100%, 25rem);
  color: var(--color-quiet);
  font-size: 1.03125rem;
  font-weight: 600;
  line-height: 1.75em;
  text-wrap: pretty;
}

.quote-copy p[lang="ja"] {
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-size: .96em;
  font-weight: 500;
  letter-spacing: .015em;
}

.quote-copy p:not([hidden]) + p:not([hidden]) {
  margin-block-start: .625rem;
}

.quote-copy:has(> p[hidden]) {
  display: grid;
}

.quote-copy:has(> p[hidden]) > p {
  grid-area: 1 / 1;
  align-self: start;
}

/* Reserve space for the longer translation when the language changes. */
.quote-copy:has(> p[hidden]) > p[hidden] {
  display: block !important;
  visibility: hidden;
}

.quote-copy p.quote-enter {
  animation: quote-in 240ms var(--ease-out) both;
}

@keyframes quote-in {
  from { opacity: .3; }
  to { opacity: 1; }
}

.quote-toggle {
  display: inline-flex;
  align-items: center;
  gap: .125rem;
  min-height: 2.75rem;
  padding: .375rem .25rem;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
}

.quote-choice {
  display: grid;
  min-width: 2.25rem;
  min-height: 1.875rem;
  place-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  color: var(--color-quiet);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .035em;
}

.quote-toggle[aria-pressed="false"] .quote-jp,
.quote-toggle[aria-pressed="true"] .quote-en {
  border-color: var(--color-line);
  background: var(--color-light);
  color: var(--color-primary);
}

.quote-toggle:hover .quote-choice {
  color: var(--color-primary);
}

@media (max-width: 52rem), (max-aspect-ratio: 6/5) {
  :root {
    --page-gutter: clamp(1.25rem, 6.15vw, 4rem);
  }

  .scene {
    --ideal-portrait-height: clamp(20rem, 110vw, 37rem);
    --portrait-height: var(--ideal-portrait-height);
  }

  @supports (height: 100svh) {
    .scene {
      /* Give the profile and controls room when browser bars are visible. */
      --portrait-height: min(var(--ideal-portrait-height), max(15rem, calc(100svh - 25.25rem)));
    }
  }

  .scene::before {
    position: absolute;
    z-index: -2;
    inset: calc(var(--portrait-height) - 8rem) 0 0;
    background:
      linear-gradient(180deg, var(--color-paper), #f9edf4a3 27%, #f9edf470 64%, #f9edf44d),
      url("../img/kaoruko-sakura-mobile-field.webp") center bottom / cover no-repeat;
    content: "";
    pointer-events: none;
  }

  .scene-art {
    height: var(--portrait-height);
    mask-image: linear-gradient(180deg, #000 65%, transparent);
  }

  .scene-art img {
    object-position: center 12%;
  }

  .scene-art::after {
    background: linear-gradient(180deg, #fff6fbde, #fff6fb22 7rem, transparent 12rem);
  }

  .site-header {
    min-height: 4.75rem;
  }

  .hero {
    align-items: start;
    padding-block: calc(var(--portrait-height) - 7.5rem) 1.5rem;
  }

  .story {
    width: min(100%, 34rem);
    margin-inline: 0;
  }

  h1 {
    font-size: clamp(2.125rem, 9.4vw, 4.375rem);
  }

  .quote {
    margin-block-start: 1.25rem;
    gap: .375rem;
  }

  .quote-copy {
    font-size: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sakura-drift {
    display: none;
  }

  .profile-link:hover {
    transform: none;
  }

  *, *::before, *::after {
    animation-duration: 0s !important;
    transition-duration: 0s !important;
  }
}
