:root {
  --ink: #16223A;
  --muted: #45526B;
  --line: #C5CCD8;
  --sky-top: #7EC6EF;
  --sky-mid: #B4DEF6;
  --sky-low: #D6EEFA;
  --card-blue: #7CC6EE;
  --strap: #1556D6;
  --copy: #2F86D6;
  --white: #FFFFFF;
  --font-jp: 'Zen Kaku Gothic New', 'Hiragino Sans', 'Yu Gothic', sans-serif;
  --font-round: 'Zen Maru Gothic', 'Hiragino Maru Gothic ProN', sans-serif;
  --font-en: 'Jost', 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--sky-low);
  color: var(--ink);
  font-family: var(--font-jp);
  line-height: 1.75;
}

img, svg { display: block; }
a { color: var(--ink); }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid var(--strap);
  outline-offset: 3px;
}

.page { overflow-x: clip; }

/* Clouds */
.cloud {
  position: absolute;
  width: 10em;
  height: 4.1em;
  pointer-events: none;
}
.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  background: var(--white);
}
.cloud::before {
  left: 0; right: 0; bottom: 0;
  height: 2.2em;
  border-radius: 1.1em;
}
.cloud::after {
  left: 1.6em; bottom: 0.8em;
  width: 3.7em; height: 3.2em;
  border-radius: 50%;
  box-shadow: 3.1em 0.45em 0 -0.3em var(--white);
}
.cloud--drift { animation: drift 20s ease-in-out infinite; }

/* Sky header scales with the viewport. */
.sky {
  position: relative;
  overflow: hidden;
  min-height: min(100vh, 1060px);
  min-height: min(100svh, 1060px);
  display: flex;
  flex-direction: column;
  background: linear-gradient(to bottom, var(--sky-top) 0%, var(--sky-mid) 50%, var(--sky-low) 100%);
}
.sky__inner {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
  display: flex;
  flex-direction: column;
}

.nav {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(8px, 2.2vh, 20px) clamp(20px, 4vw, 40px) 0;
  font-family: var(--font-en);
}
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}
.nav__mark { font-weight: 600; font-size: 15px; letter-spacing: 0.2em; }
.nav__links { display: flex; gap: 24px; font-size: 14px; font-weight: 500; letter-spacing: 0.16em; }

/* Hanging staff card (all sizes in em, so the whole card scales together) */
.badge {
  font-size: clamp(12.5px, min(1.78vh, 4.1vw), 16px);
  font-size: clamp(12.5px, min(1.78svh, 4.1vw), 16px);
  flex: 0 0 auto;
  width: 22.5em;
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform-origin: top center;
  animation: sway 8s ease-in-out infinite;
}
/* Crop the straps on short windows to preserve their thickness. */
.badge__strap {
  flex: 0 0 auto;
  width: 13.75em;
  height: 10.625em;
  margin-top: calc(clamp(40px, 10vh, 170px) - 10.625em);
  margin-top: calc(clamp(40px, 10svh, 170px) - 10.625em);
  overflow: visible;
}
.badge__crimp {
  position: relative;
  z-index: 3;
  width: 2em;
  height: 1em;
  margin-top: -0.625em;
  background: var(--ink);
  border-radius: 0.25em;
}
.badge__tab {
  position: relative;
  z-index: 2;
  width: 1.25em;
  height: 2.625em;
  margin: -0.125em 0 -1.6875em;
  background: var(--strap);
  border-left: 2.5px solid var(--ink);
  border-right: 2.5px solid var(--ink);
}
.idcard {
  position: relative;
  z-index: 1;
  width: 100%;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 1.125em;
  box-shadow: 0 1em 0 -0.5em rgba(22, 34, 58, 0.12);
  overflow: hidden;
}
.idcard__band {
  background: var(--card-blue);
  padding: 0.75em 1.25em 0.625em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5em;
}
.idcard__slot { width: 3.25em; height: 0.875em; border-radius: 0.4375em; background: var(--ink); }
.idcard__meta {
  width: 100%;
  display: flex;
  justify-content: space-between;
  font-family: var(--font-en);
  font-weight: 500;
  font-size: 0.75em;
  letter-spacing: 0.18em;
}
.idcard__body { display: flex; align-items: center; gap: 1.125em; padding: 1em 1.25em 0.875em; }
.idcard__photo {
  flex: 0 0 auto;
  width: 6.5em;
  height: 6.5em;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--card-blue);
  overflow: hidden;
}
.idcard__photo img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.idcard__info { flex: 1 1 0; min-width: 0; }
.idcard__org {
  margin: 0;
  font-family: var(--font-en);
  font-weight: 500;
  font-size: 0.6875em;
  letter-spacing: 0.2em;
  color: var(--muted);
}
.idcard__name { margin: 0 0 0.3em; font-weight: 700; font-size: 1.625em; line-height: 1.3; letter-spacing: 0.06em; }
.idcard__rows { margin: 0; display: grid; grid-template-columns: 5em minmax(0, 1fr); font-size: 0.8125em; line-height: 1.6; }
.idcard__rows dt,
.idcard__rows dd { margin: 0; padding: 0.38em 0; border-top: 1px dashed #B9C2D0; }
.idcard__rows dt { color: var(--muted); }
.idcard__rows dd { font-weight: 500; }
.idcard__ruler {
  height: 1em;
  margin: 0 1.25em 0.875em;
  border-top: 2px solid var(--ink);
  background:
    repeating-linear-gradient(to right, var(--ink) 0 2px, transparent 2px 2.5em) left top / 100% 0.875em no-repeat,
    repeating-linear-gradient(to right, var(--ink) 0 1px, transparent 1px 0.5em) left top / 100% 0.4375em no-repeat;
}

/* Hero */
.hero {
  flex: 1 1 auto;
  padding: clamp(14px, 4vh, 56px) 0 clamp(36px, 7vh, 120px);
  padding: clamp(14px, 4svh, 56px) 0 clamp(36px, 7svh, 120px);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.hero__eyebrow {
  margin: 0 0 clamp(2px, 1.2vh, 12px);
  font-family: var(--font-en);
  font-weight: 500;
  font-size: clamp(11px, 1.6vh, 13px);
  letter-spacing: 0.26em;
}
.hero__title {
  margin: 0;
  font-family: var(--font-en);
  font-weight: 500;
  font-size: clamp(34px, min(8.4vw, 12vh), 112px);
  font-size: clamp(34px, min(8.4vw, 12svh), 112px);
  line-height: 1.05;
  letter-spacing: 0.06em;
}
.hero__lead {
  margin: clamp(8px, 2.4vh, 24px) 0 0;
  font-size: clamp(13.5px, min(3.7vw, 2vh), 16px);
  max-width: 30em;
  text-wrap: balance;
}

.cloud-btn {
  font-size: clamp(12.5px, 1.9vh, 16px);
  font-size: clamp(12.5px, 1.9svh, 16px);
  flex: 0 0 auto;
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  width: 17.5em;
  height: 7.75em;
  margin-top: clamp(6px, 2.6vh, 36px);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.2s ease;
}
.cloud-btn > svg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.cloud-btn__label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  height: 1.4em;
  margin-top: 4.1em;
  font-size: 1.0625em;
  line-height: 1.4;
}
.cloud-btn__label svg { width: 1.05em; height: 1.05em; }
.cloud-btn:hover { transform: translateY(-3px); }

/* Building */
.building {
  position: relative;
  z-index: 1;
  background: var(--white);
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
}
.floor { display: flex; border-bottom: 3px solid var(--ink); scroll-margin-top: 0; }
.floor:last-child { border-bottom: 0; }
.floor__ruler {
  flex: 0 0 clamp(28px, 5vw, 64px);
  border-right: 2px solid var(--ink);
  background:
    repeating-linear-gradient(to bottom, var(--ink) 0 2px, transparent 2px 80px) right top / 14px 100% no-repeat,
    repeating-linear-gradient(to bottom, var(--ink) 0 1px, transparent 1px 16px) right top / 8px 100% no-repeat;
}
.floor__body {
  flex: 1 1 0;
  min-width: 0;
  padding: clamp(48px, 8vw, 104px) clamp(20px, 5vw, 56px);
}
.floor__body--ground { padding-bottom: 0; }

.app {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 48px clamp(32px, 5vw, 72px);
}
.app__text { flex: 1 1 320px; max-width: 400px; min-width: 0; }
.app__icon {
  width: 168px;
  height: 168px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--white);
}
.app__icon img { width: 100%; height: 100%; object-fit: cover; }
/* Keep the full framed image visible. */
.app__icon--inset { border-radius: 0; }
.app__icon--inset img { object-fit: contain; }
.nb { display: inline-block; }
.app__en {
  margin: 28px 0 4px;
  font-family: var(--font-en);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--muted);
}
.app__name {
  margin: 0;
  font-family: var(--font-round);
  font-weight: 700;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.3;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.app__name a { color: inherit; text-decoration: none; }
.app__name a:hover { text-decoration: underline; text-underline-offset: 0.16em; }
.app__copy { margin: 16px 0 0; font-size: 19px; font-weight: 700; line-height: 1.5; color: var(--copy); }
.app__lead { margin: 8px 0 0; font-size: 15px; color: var(--muted); text-wrap: balance; }

.stores { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 32px; }
.stores a { display: inline-flex; align-items: center; min-height: 48px; }
.stores img { height: 46px; width: auto; }

/* Screenshots */
.shots {
  flex: 1 1 400px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.shots__stage {
  position: relative;
  width: 100%;
  max-width: 560px;
  height: 480px;
  overflow: hidden;
  touch-action: pan-y;
}
.shot {
  position: absolute;
  left: 50%;
  top: 0;
  width: 228px;
  margin-left: -114px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.shots.is-ready .shot { transition: transform 0.35s ease, opacity 0.35s ease; }
.shot.is-current { cursor: zoom-in; }
.phone {
  display: block;
  border: 8px solid var(--ink);
  border-radius: 38px;
  overflow: hidden;
  background: var(--white);
}
.phone img { width: 100%; height: auto; aspect-ratio: 540 / 1170; object-fit: cover; }
.shots__nav { display: flex; align-items: center; gap: 20px; }
.round {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--white);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.round:hover { border-color: var(--ink); }
.shots__count {
  margin: 0;
  min-width: 5em;
  text-align: center;
  font-family: var(--font-en);
  font-weight: 500;
  font-size: 17px;
  letter-spacing: 0.1em;
}

/* Contact */
.contact {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap-reverse;
  align-items: flex-start; /* Align to the bottom when wrapping. */
  gap: 40px clamp(32px, 5vw, 72px);
}
.door {
  flex: 0 0 auto;
  position: relative;
  width: 140px;
  height: 196px;
  border: 4px solid var(--ink);
  border-bottom: 0;
  border-radius: 70px 70px 0 0;
  background: var(--sky-mid);
}
.door span { position: absolute; left: 50%; top: 0; bottom: 0; width: 4px; margin-left: -2px; background: var(--ink); }
.door i { position: absolute; top: 112px; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); }
.door i:nth-of-type(1) { left: 44px; }
.door i:nth-of-type(2) { right: 44px; }
.helmet { order: 2; flex: 0 0 auto; margin-right: clamp(0px, 6vw, 88px); }
.contact__text { order: 1; flex: 1 1 300px; min-width: 0; padding-bottom: clamp(48px, 8vw, 104px); }
.contact__text .app__en { margin-top: 0; letter-spacing: 0.22em; }
.contact__text .app__lead { margin-top: 12px; }
.contact__buttons { display: inline-flex; flex-direction: column; align-items: stretch; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 26px;
  background: var(--white);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.btn:hover { background: var(--ink); color: var(--white); }

/* Footer */
.ground-sky {
  position: relative;
  overflow: hidden;
  padding: 190px 20px 40px;
  text-align: center;
  background: linear-gradient(to bottom, var(--sky-low) 0%, var(--sky-mid) 100%);
}
.ground-sky p { position: relative; margin: 0; }
.ground-sky__mark { font-family: var(--font-en); font-weight: 600; font-size: 15px; letter-spacing: 0.2em; }
.ground-sky__copy { margin-top: 4px !important; font-size: 13px; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 64px 12px 20px;
  border: 0;
  background: transparent;
  cursor: zoom-out;
}
.lightbox::backdrop {
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.lightbox:not([open]) { display: none; }
.lightbox__viewer {
  display: grid;
  grid-template-columns: 44px minmax(0, auto) 44px;
  align-items: center;
  gap: clamp(4px, 2vw, 16px);
  max-width: 100%;
}
.lightbox img {
  display: block;
  min-width: 0;
  max-width: min(100%, 420px);
  max-height: calc(100vh - 84px);
  max-height: calc(100dvh - 84px);
  object-fit: contain;
  justify-self: center;
  width: auto;
  height: auto;
  border: 8px solid var(--ink);
  border-radius: 40px;
  background: var(--white);
}
.lightbox__status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.lightbox__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
}

/* Motion */
@keyframes sway {
  0%, 100% { transform: rotate(1.6deg); }
  50% { transform: rotate(-1.6deg); }
}
@keyframes drift {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(32px); }
}
:root {
  --otter-width: min(clamp(78px, 16vw, 144px), 24vh);
  --otter-right: max(3px, env(safe-area-inset-right));
  --otter-gap: clamp(14px, 3.8vw, 21px);
}
.otter-companion {
  position: fixed;
  z-index: 2;
  right: var(--otter-right);
  bottom: max(clamp(16px, 7vh, 64px), calc(env(safe-area-inset-bottom) + 12px));
  width: var(--otter-width);
  pointer-events: none;
  transform: translateY(var(--otter-offset-y, 0px));
  transition: transform 820ms cubic-bezier(.2, .75, .28, 1);
}
.otter-companion img,
.otter-companion canvas {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  scale: -1 1;
}
.otter-companion img { width: 100%; height: auto; }
.otter-companion canvas { position: absolute; height: auto; }
.otter-companion:has(canvas:not([hidden])) img { visibility: hidden; }
.otter-companion canvas[hidden] {
  display: none;
}
.floor__body {
  padding-right: max(5vw, calc(var(--otter-width) + var(--otter-right) + var(--otter-gap)));
}
@media (min-width: 1280px) {
  :root {
    --otter-right: max(8px, env(safe-area-inset-right));
    --otter-gap: 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
/* Tablet portrait and phones: stack and center */
@media (max-width: 899px) {
  .app { justify-content: center; }
  .app__text {
    flex-basis: 100%;
    max-width: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .stores { justify-content: center; }
  .contact { justify-content: center; }
  .contact__text { order: 3; flex-basis: 100%; text-align: center; }
  .helmet { margin-right: 0; }
}

@media (max-width: 600px) {
  :root { --otter-width: min(clamp(76px, 22vw, 108px), 24vh); }
  .nav__mark { font-size: 13px; letter-spacing: 0.04em; }
  .cloud--wide-only { display: none; }
  .nav__links { gap: 14px; font-size: 12px; letter-spacing: 0.06em; }
  .app__icon { width: 144px; height: 144px; }
  .app__name { white-space: normal; }
  .shot { left: 0; right: 0; width: min(228px, 100%); margin-inline: auto; }
  .shots__nav { gap: clamp(10px, 3.5vw, 20px); }
  .cloud-btn { margin-inline-end: max(0px, calc(var(--otter-width) - 9vw)); }
  .ground-sky { padding-top: 150px; }
  .ground-sky .cloud { transform: scale(0.62); transform-origin: left top; }
}
