:root {
  color-scheme: dark;
  --forest: #012110;
  --ivory: #f2efe5;
  --serif: 'Cormorant Garamond', 'Iowan Old Style', 'Times New Roman', serif;
  --japanese: 'Noto Serif JP', 'Yu Mincho', 'Hiragino Mincho ProN', serif;
}

* { box-sizing: border-box; }
html, body { min-width: 320px; min-height: 100%; margin: 0; background: var(--forest); }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: hidden;
  overflow-y: auto;
  color: var(--ivory);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.ambient, .ambient__glow, .ambient__grain { position: fixed; inset: 0; pointer-events: none; }
.ambient { z-index: 0; overflow: hidden; background: radial-gradient(ellipse at 50% 46%, #07301c 0%, #022615 38%, #012110 72%, #001b0d 100%); }
.ambient__glow { inset: -35%; background: radial-gradient(ellipse at 50% 50%, rgba(17,73,44,.34), transparent 49%); animation: breathe 9s ease-in-out infinite alternate; }
.ambient__grain { opacity: .08; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.3'/%3E%3C/svg%3E"); mix-blend-mode: soft-light; }
.hero {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: max(28px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  text-align: center;
}
.hero__title {
  margin: 0 0 clamp(12px, 2.7vh, 29px);
  color: var(--ivory);
  font: 400 clamp(63px, 10vw, 140px)/.9 var(--serif);
  letter-spacing: -.045em;
  animation: appear 1s cubic-bezier(.2,.75,.25,1) both;
}
.hero__title em { color: #dddccf; font-weight: 400; }
.emblem-stage {
  position: relative;
  display: grid;
  width: clamp(220px, 29vw, 370px);
  place-items: center;
  isolation: isolate;
  transform: translate(var(--pointer-x, 0), var(--pointer-y, 0));
  transition: transform .55s cubic-bezier(.2,.8,.2,1);
  animation: appear 1.15s .12s cubic-bezier(.2,.75,.25,1) both;
}
.emblem { position: relative; z-index: 2; display: block; width: 100%; height: auto; object-fit: contain; filter: drop-shadow(0 12px 38px rgba(0,0,0,.18)); animation: float 7s ease-in-out 1.2s infinite; }
.emblem-stage__halo { position: absolute; z-index: -1; width: 116%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(208,218,196,.14), rgba(65,119,76,.08) 34%, transparent 68%); filter: blur(17px); }
.emblem-stage__orbit { position: absolute; z-index: 0; width: 125%; aspect-ratio: 1; border: 1px solid rgba(242,239,229,.08); border-radius: 50%; transform: scaleY(.43) rotate(-17deg); }
.japanese {
  margin: clamp(18px, 3vh, 31px) 0 0;
  font: 400 clamp(23px, 3vw, 35px)/1.4 var(--japanese);
  letter-spacing: .13em;
  animation: appear 1s .36s cubic-bezier(.2,.75,.25,1) both;
}
@keyframes appear { from { opacity: 0; transform: translateY(16px); filter: blur(5px); } to { opacity: 1; transform: translateY(0); filter: blur(0); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes breathe { from { transform: scale(.94); opacity: .55; } to { transform: scale(1.05); opacity: .9; } }

@media (max-width: 620px) {
  .hero { padding-top: max(24px, env(safe-area-inset-top)); padding-bottom: max(24px, env(safe-area-inset-bottom)); }
  .hero__title { font-size: clamp(60px, 15vw, 82px); margin-bottom: clamp(14px, 3vh, 24px); }
  .emblem-stage { width: clamp(215px, 70vw, 310px); }
  .japanese { margin-top: clamp(16px, 3vh, 25px); font-size: clamp(22px, 6vw, 28px); }
}
@media (max-height: 680px) and (min-width: 621px) {
  .hero { padding-top: max(16px, env(safe-area-inset-top)); padding-bottom: max(16px, env(safe-area-inset-bottom)); }
  .hero__title { font-size: clamp(46px, 10vh, 74px); margin-bottom: 8px; }
  .emblem-stage { width: min(46vh, 270px); }
  .japanese { margin-top: 8px; font-size: clamp(20px, 6vh, 24px); }
}
@media (max-height: 680px) and (max-width: 620px) {
  .hero { padding-top: max(16px, env(safe-area-inset-top)); padding-bottom: max(16px, env(safe-area-inset-bottom)); }
  .hero__title { font-size: clamp(45px, 14vw, 58px); margin-bottom: clamp(8px, 2vh, 12px); }
  .emblem-stage { width: min(64vw, 34vh, 245px); }
  .japanese { margin-top: clamp(9px, 2vh, 13px); font-size: clamp(20px, 5vw, 24px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
