:root {
  --gold: #d4af37;
  --gold-bright: #f3d56a;
  --gold-soft: #e6c65a;
  --mustard: #c5a12a;
  --gold-deep: #8d6e14;
  --ink: #100e09;
  --lacquer: #16110b;
  --panel: #1d1710;
  --parchment: #f4ead0;
  --cream: #fff6dc;
  --gingham: #c43b3b;
  --line: rgba(212, 175, 55, 0.28);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
  --display: "Fredoka", "Zen Maru Gothic", sans-serif;
  --jp: "Zen Maru Gothic", "Fredoka", sans-serif;
  --body: "Nunito", "Zen Maru Gothic", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  color: var(--parchment);
  background: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

.stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(1200px 700px at 12% -10%, rgba(197, 161, 42, 0.22), transparent 55%),
    radial-gradient(900px 540px at 92% 8%, rgba(196, 59, 59, 0.08), transparent 50%),
    linear-gradient(180deg, #1a140c 0%, #100e09 42%, #0d0b08 100%);
}

.seigaiha {
  position: absolute;
  inset: -8%;
  opacity: 0.16;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='70' viewBox='0 0 140 70'%3E%3Cpath d='M0 70 Q35 20 70 70 Q105 20 140 70' fill='none' stroke='%23d4af37' stroke-width='1.4'/%3E%3Cpath d='M-35 70 Q0 20 35 70' fill='none' stroke='%23d4af37' stroke-width='1.4'/%3E%3C/svg%3E");
  animation: tide 28s linear infinite;
}

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.11;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.fuji {
  position: absolute;
  left: 50%;
  bottom: -6%;
  width: 140vw;
  height: 42vh;
  transform: translateX(-50%);
  background:
    radial-gradient(ellipse at 50% 120%, rgba(212, 175, 55, 0.08), transparent 60%),
    linear-gradient(180deg, transparent 0%, transparent 40%, rgba(212, 175, 55, 0.06) 100%);
  clip-path: polygon(0 100%, 18% 72%, 36% 84%, 50% 46%, 64% 84%, 82% 70%, 100% 100%);
  opacity: 0.45;
}

#dust, #petals {
  position: absolute;
  inset: 0;
}

.cursor-glow {
  position: fixed;
  width: 180px;
  height: 180px;
  margin: -90px 0 0 -90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(243, 213, 106, 0.16), transparent 68%);
  transform: translate(-120vw, -120vh);
  transition: transform 0.12s linear;
  z-index: 1;
}

@keyframes tide {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-140px, 18px, 0); }
}

.nav, main, .footer { position: relative; z-index: 2; }

.nav {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 7vw;
  background: rgba(16, 14, 9, 0.58);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
  z-index: 20;
}

.nav.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(16, 14, 9, 0.82);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
}

.nav-brand img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
  animation: pulse-ring 4.8s ease-in-out infinite;
}

.nav-links {
  display: flex;
  gap: 28px;
  font-family: var(--jp);
  font-weight: 500;
}

.nav-links a {
  position: relative;
  opacity: 0.78;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gingham));
  transition: width 0.25s ease;
}

.nav-links a:hover { opacity: 1; color: var(--gold-bright); }
.nav-links a:hover::after { width: 100%; }

.nav-actions { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid var(--line);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.icon-btn img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: invert(86%) sepia(38%) saturate(650%) hue-rotate(6deg) brightness(104%);
}

.icon-btn:hover {
  transform: translateY(-2px) scale(1.04);
  background: rgba(212, 175, 55, 0.18);
  border-color: var(--gold);
}

.menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 10px;
}

.menu-btn span {
  display: block;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

.hero {
  padding: 64px 7vw 0;
  min-height: calc(100vh - 78px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.hero-orbit {
  position: absolute;
  width: 620px;
  height: 620px;
  left: 4vw;
  top: 8%;
  border-radius: 50%;
  border: 1px dashed rgba(212, 175, 55, 0.22);
  animation: spin 36s linear infinite;
  pointer-events: none;
}

.hero-orbit::before,
.hero-orbit::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 16px var(--gold-bright);
}

.hero-orbit::before { width: 8px; height: 8px; top: 18%; left: 10%; }
.hero-orbit::after { width: 6px; height: 6px; bottom: 22%; right: 14%; background: var(--gingham); }

.hero-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  align-items: center;
}

.portrait {
  position: relative;
  width: min(420px, 100%);
  margin: 0 auto;
  aspect-ratio: 1;
}

.portrait img {
  width: 78%;
  height: 78%;
  object-fit: cover;
  border-radius: 50%;
  position: absolute;
  inset: 11%;
  z-index: 2;
  animation: floaty 6.5s ease-in-out infinite;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), 0 0 0 10px rgba(212, 175, 55, 0.08);
}

.portrait-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--gold);
  box-shadow: inset 0 0 40px rgba(212, 175, 55, 0.12), 0 0 40px rgba(212, 175, 55, 0.12);
  animation: spin 22s linear infinite reverse;
}

.portrait-ring::after {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  border: 1px dashed rgba(243, 213, 106, 0.45);
}

.portrait-o {
  position: absolute;
  inset: 22%;
  border: 10px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  z-index: 3;
  pointer-events: none;
  mix-blend-mode: screen;
  animation: breathe 5.4s ease-in-out infinite;
}

.portrait-ears {
  position: absolute;
  inset: -18px 40px auto;
  height: 54px;
  z-index: 1;
}

.portrait-ears::before,
.portrait-ears::after {
  content: "";
  position: absolute;
  top: 0;
  width: 46px;
  height: 46px;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold-deep));
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.3));
}

.portrait-ears::before { left: 8%; transform: rotate(-18deg); }
.portrait-ears::after { right: 8%; transform: rotate(18deg); }

.kicker {
  font-family: var(--jp);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 0.74rem;
  color: var(--gold-soft);
  margin-bottom: 12px;
}

.hero-copy h1 {
  font-family: var(--display);
  font-size: clamp(3.2rem, 7vw, 6.4rem);
  line-height: 0.92;
  font-weight: 700;
  color: var(--cream);
  text-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.hero-copy h1 em {
  font-style: normal;
  display: block;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.symbol-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 18px;
  flex-wrap: wrap;
}

.symbol-chip {
  font-family: var(--display);
  background: linear-gradient(180deg, #f0d56a, #b89020);
  color: #2a1c06;
  padding: 7px 14px;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(184, 144, 32, 0.28);
}

.symbol-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gingham);
  box-shadow: 0 0 0 4px rgba(196, 59, 59, 0.15);
}

.symbol-note, .lede {
  color: rgba(244, 234, 208, 0.78);
}

.lede {
  font-size: 1.12rem;
  line-height: 1.7;
  max-width: 38rem;
}

.ca-bar {
  margin: 28px 0 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 10px 16px;
  border: 1px solid var(--line);
  background: rgba(29, 23, 16, 0.72);
  border-radius: 999px;
  max-width: 560px;
}

.ca-label {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.ca-bar code {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--cream);
  font-size: 0.92rem;
}

.ca-bar button {
  background: var(--gold);
  color: #2a1c06;
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease;
}

.ca-bar button:hover { transform: translateY(-1px); background: var(--gold-bright); }

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  border-radius: 999px;
  font-family: var(--display);
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.btn-gold {
  background: linear-gradient(180deg, #f3d56a, #c5a12a);
  color: #2a1c06;
  box-shadow: 0 10px 24px rgba(197, 161, 42, 0.28);
}

.btn-gold img { filter: none; }

.btn-ink {
  background: rgba(16, 14, 9, 0.5);
  border-color: var(--line);
}

.btn-ghost {
  background: rgba(196, 59, 59, 0.08);
  border-color: rgba(196, 59, 59, 0.35);
}

.btn-ink img,
.btn-ghost img,
.step-icon img,
.join-card img {
  filter: invert(86%) sepia(38%) saturate(650%) hue-rotate(6deg) brightness(104%);
}

.btn:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.wave-break {
  height: 84px;
  margin: 56px -7vw 0;
  background:
    radial-gradient(circle at 10% 0, transparent 18px, rgba(212, 175, 55, 0.16) 19px, transparent 20px),
    radial-gradient(circle at 30% 0, transparent 18px, rgba(212, 175, 55, 0.16) 19px, transparent 20px),
    radial-gradient(circle at 50% 0, transparent 18px, rgba(212, 175, 55, 0.16) 19px, transparent 20px),
    radial-gradient(circle at 70% 0, transparent 18px, rgba(212, 175, 55, 0.16) 19px, transparent 20px),
    radial-gradient(circle at 90% 0, transparent 18px, rgba(212, 175, 55, 0.16) 19px, transparent 20px);
  background-size: 20% 40px;
  background-repeat: repeat-x;
  opacity: 0.7;
  animation: tide 16s linear infinite;
}

.section-head { margin-bottom: 36px; }
.section-head h2,
.about-story,
.howto h2,
.chart h2,
.join h2 {
  font-family: var(--display);
}

.section-head h2 {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: 1;
}

.about, .howto, .chart, .join {
  padding: 88px 7vw;
}

.about-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
}

.about-story {
  padding: 36px;
  background:
    linear-gradient(180deg, rgba(212, 175, 55, 0.07), rgba(16, 14, 9, 0.2)),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.about-story p + p { margin-top: 16px; }
.about-story p {
  font-size: 1.08rem;
  line-height: 1.8;
  color: rgba(244, 234, 208, 0.86);
}

.about-cards {
  display: grid;
  gap: 16px;
}

.trait {
  padding: 22px 24px;
  border-radius: 22px;
  background: rgba(29, 23, 16, 0.8);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.trait::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 8px;
  background: repeating-linear-gradient(
    45deg,
    var(--gingham) 0 6px,
    #fff6dc 6px 12px
  );
}

.trait:hover {
  transform: translateX(6px);
  border-color: var(--gold);
}

.trait h3 {
  font-family: var(--display);
  color: var(--gold-bright);
  margin-bottom: 8px;
}

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.step {
  background: linear-gradient(180deg, rgba(243, 213, 106, 0.08), rgba(16, 14, 9, 0.35));
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 28px 22px 24px;
  min-height: 320px;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.step:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
}

.step-num {
  font-family: var(--display);
  color: var(--gold);
  letter-spacing: 0.12em;
  font-size: 0.86rem;
}

.step-icon {
  width: 64px;
  height: 64px;
  margin: 16px 0 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(16, 14, 9, 0.55);
  border: 1px solid var(--gold);
  animation: bob 3.6s ease-in-out infinite;
}

.step-icon img { width: 30px; height: 30px; object-fit: contain; }

.step h3 {
  font-family: var(--display);
  font-size: 1.35rem;
  margin-bottom: 10px;
}

.step p {
  color: rgba(244, 234, 208, 0.74);
  line-height: 1.65;
}

.step a {
  display: inline-block;
  margin-top: 16px;
  color: var(--gold-bright);
  font-weight: 700;
}

.chart-frame {
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid var(--gold);
  box-shadow: 0 0 0 8px rgba(212, 175, 55, 0.08), var(--shadow);
  background: #0b0b0b;
  min-height: 640px;
}

.chart-frame iframe {
  width: 100%;
  height: 640px;
  border: 0;
}

.banner-wrap {
  width: 100%;
  aspect-ratio: 3 / 1;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--gold);
  box-shadow: 0 0 0 8px rgba(212, 175, 55, 0.08), var(--shadow);
  position: relative;
}

.banner-wrap::before,
.banner-wrap::after {
  content: "";
  position: absolute;
  width: 28px;
  height: 28px;
  border: 2px solid var(--gold-bright);
  z-index: 2;
}

.banner-wrap::before { top: 12px; left: 12px; border-right: 0; border-bottom: 0; }
.banner-wrap::after { bottom: 12px; right: 12px; border-left: 0; border-top: 0; }

.banner-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: ken 18s ease-in-out infinite alternate;
}

.join-copy {
  text-align: center;
  max-width: 40rem;
  margin: 28px auto 0;
  line-height: 1.7;
  color: rgba(244, 234, 208, 0.8);
}

.join-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.join-card {
  min-width: 160px;
  padding: 18px 22px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(29, 23, 16, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--display);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.join-card img { width: 18px; height: 18px; }
.join-card:hover { transform: translateY(-4px); border-color: var(--gold); }

.footer {
  padding: 40px 7vw 56px;
  text-align: center;
  border-top: 1px solid var(--line);
}

.footer img {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  margin: 0 auto 12px;
  border: 2px solid var(--gold);
}

.fine { opacity: 0.55; margin-top: 8px; font-size: 0.88rem; }

.petal {
  position: absolute;
  width: 10px;
  height: 14px;
  background: radial-gradient(circle at 30% 30%, #fff6dc, #e6c65a);
  border-radius: 80% 0 80% 0;
  opacity: 0.55;
  animation: fall linear infinite;
}

.reveal {
  opacity: 1;
  transform: none;
}

html.js-ready .reveal:not(.is-in) {
  opacity: 0;
  transform: translateY(28px);
}

.reveal.is-in {
  animation: rise 0.8s ease forwards;
}

.about-cards .trait:nth-child(2) { animation-delay: 0.08s; }
.about-cards .trait:nth-child(3) { animation-delay: 0.16s; }
.steps .step:nth-child(2) { animation-delay: 0.08s; }
.steps .step:nth-child(3) { animation-delay: 0.16s; }
.steps .step:nth-child(4) { animation-delay: 0.24s; }

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes spin { to { transform: rotate(360deg); } }

@keyframes breathe {
  0%, 100% { opacity: 0.18; transform: scale(1); }
  50% { opacity: 0.32; transform: scale(1.03); }
}

@keyframes pulse-ring {
  0%, 100% { box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15); }
  50% { box-shadow: 0 0 0 7px rgba(212, 175, 55, 0.08); }
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes ken {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}

@keyframes rise {
  to { opacity: 1; transform: none; }
}

@keyframes fall {
  0% { transform: translate3d(0, -10vh, 0) rotate(0deg); }
  100% { transform: translate3d(40px, 110vh, 0) rotate(360deg); }
}

@media (max-width: 980px) {
  .hero-grid, .about-layout, .steps { grid-template-columns: 1fr; }
  .hero-orbit { width: 340px; height: 340px; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    padding: 18px 7vw 22px;
    background: rgba(16, 14, 9, 0.96);
    border-bottom: 1px solid var(--line);
  }
  .nav-links.open { display: flex; }
  .menu-btn { display: flex; }
  .chart-frame, .chart-frame iframe { min-height: 480px; height: 480px; }
}

@media (max-width: 640px) {
  .ca-bar { border-radius: 18px; flex-wrap: wrap; }
  .hero { padding-top: 36px; }
  .portrait { width: min(300px, 88%); }
}
