/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink: #14100c;
  --ink-2: #1f1712;
  --card: #241a13;
  --rust: #8a4326;
  --rust-deep: #4a2513;
  --gold: #cda05a;
  --gold-bright: #eecd8f;
  --parchment: #e9dcbe;
  --cream: #f3ead2;
  --teal: #4f6d68;
  --sail: #c25a2c;
  --line: rgba(205, 160, 90, 0.25);

  --font-jp-head: "Shippori Mincho", serif;
  --font-en-head: "Cinzel", serif;
  --font-en-script: "Cormorant Garamond", serif;
  --font-jp-body: "Noto Serif JP", serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-jp-body);
  line-height: 1.9;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.nowrap { white-space: nowrap; }

/* ===== Grain texture overlay ===== */
.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 500;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url('assets/texture-rust.jpg');
  background-size: 500px;
}

/* ===== Top nav ===== */
.topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(16px, 4vw, 48px);
  background: linear-gradient(to bottom, rgba(20,16,12,0.85), rgba(20,16,12,0));
  pointer-events: none;
}
.topnav__mark {
  font-family: var(--font-jp-head);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  color: var(--gold-bright);
  opacity: 0.9;
  pointer-events: auto;
}
.topnav__cta {
  pointer-events: auto;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  border: 1px solid var(--line);
  padding: 8px 18px;
  border-radius: 999px;
  color: var(--cream);
  background: rgba(20,16,12,0.4);
  backdrop-filter: blur(4px);
  transition: border-color .3s, color .3s;
}
.topnav__cta:hover { border-color: var(--gold); color: var(--gold-bright); }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--ink);
}
.hero__bg {
  position: absolute;
  inset: 0;
  background-position: center 30%;
  background-size: cover;
  transform: scale(1.05);
}
.hero__vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(14,11,8,0.35) 0%, rgba(14,11,8,0.55) 45%, rgba(14,11,8,0.92) 88%, var(--ink) 100%),
    radial-gradient(ellipse at center, rgba(0,0,0,0) 35%, rgba(10,7,5,0.55) 100%);
}
.hero__sparkles { position: absolute; inset: 0; pointer-events: none; }
.hero__sparkles .spark {
  position: absolute;
  left: var(--x); top: var(--y);
  width: var(--s); height: var(--s);
  color: var(--gold-bright);
  opacity: 0;
  animation: twinkle 3.6s ease-in-out infinite;
  animation-delay: var(--d);
}
.hero__sparkles .spark svg { width: 100%; height: 100%; }
@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(0.6) rotate(0deg); }
  50% { opacity: 0.85; transform: scale(1) rotate(20deg); }
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 20px;
  margin-top: 12vh;
}
.hero__eyebrow {
  font-family: var(--font-en-head);
  font-size: 0.72rem;
  letter-spacing: 0.5em;
  color: var(--gold);
  margin-bottom: 18px;
}
.hero__title {
  font-family: var(--font-jp-head);
  font-weight: 800;
  font-size: clamp(2.6rem, 9vw, 5.2rem);
  line-height: 1.28;
  background: linear-gradient(180deg, #fdf3d8 0%, var(--gold-bright) 45%, var(--gold) 75%, #9a6f37 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 18px rgba(0,0,0,0.55));
  letter-spacing: 0.03em;
}
.hero__subtitle {
  font-family: var(--font-en-script);
  font-style: italic;
  font-size: clamp(1.1rem, 2.6vw, 1.5rem);
  color: var(--parchment);
  opacity: 0.85;
  margin-top: 6px;
  letter-spacing: 0.06em;
}
.hero__copy {
  margin-top: 28px;
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--cream);
  letter-spacing: 0.08em;
}
.hero__badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 26px;
}
.badge {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  border: 1px solid var(--line);
  padding: 7px 16px;
  border-radius: 999px;
  color: var(--gold-bright);
  background: rgba(36, 26, 19, 0.5);
}

.btn {
  display: inline-block;
  margin-top: 36px;
  padding: 15px 40px;
  font-family: var(--font-jp-body);
  font-size: 0.95rem;
  letter-spacing: 0.15em;
  border-radius: 999px;
  transition: transform .35s ease, box-shadow .35s ease, background .35s ease, border-color .35s ease;
}
.btn--primary {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold) 70%, #a8793f);
  color: #241407;
  font-weight: 600;
  box-shadow: 0 10px 30px -8px rgba(205, 160, 90, 0.55);
}
.btn--primary:hover { transform: translateY(-3px); box-shadow: 0 16px 36px -8px rgba(205, 160, 90, 0.7); }
.btn--ghost {
  border: 1px solid var(--line);
  color: var(--cream);
  margin-top: 14px;
  margin-left: 10px;
  background: rgba(36, 26, 19, 0.35);
}
.btn--ghost:hover { border-color: var(--gold); color: var(--gold-bright); transform: translateY(-2px); }

.hero__scrollcue {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  opacity: 0.75;
}
.hero__scrollcue span {
  width: 1px; height: 34px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scrolldown 1.8s ease-in-out infinite;
}
.hero__scrollcue p { font-size: 0.62rem; letter-spacing: 0.35em; font-family: var(--font-en-head); }
@keyframes scrolldown {
  0% { transform: scaleY(0); transform-origin: top; opacity: 0; }
  40% { transform: scaleY(1); transform-origin: top; opacity: 1; }
  60% { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* ===== Sections shared ===== */
.section { position: relative; padding: clamp(70px, 12vh, 140px) 20px; }
.section__inner { max-width: 980px; margin: 0 auto; }
.section__inner--split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(30px, 6vw, 70px);
  align-items: center;
}
.kicker {
  font-family: var(--font-en-head);
  font-size: 0.7rem;
  letter-spacing: 0.5em;
  color: var(--gold);
  text-align: center;
  margin-bottom: 16px;
}
.section__title {
  font-family: var(--font-jp-head);
  font-weight: 700;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  color: var(--gold-bright);
  text-align: center;
  margin-bottom: 20px;
  letter-spacing: 0.04em;
  text-wrap: balance;
}
.section__lead {
  text-align: center;
  color: var(--parchment);
  opacity: 0.85;
  max-width: 620px;
  margin: 0 auto 50px;
  font-size: 1rem;
}
.world__text .section__title, .world__text .kicker { text-align: left; }

.divider {
  max-width: 200px;
  margin: 0 auto;
  color: var(--gold);
  opacity: 0.4;
  height: 20px;
}
.divider svg { width: 100%; height: 100%; }

/* ===== Reveal animation ===== */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 1s cubic-bezier(.2,.7,.3,1), transform 1s cubic-bezier(.2,.7,.3,1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ===== Prologue ===== */
.prologue__card {
  position: relative;
  background: linear-gradient(180deg, var(--ink-2), var(--card));
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: clamp(36px, 6vw, 64px) clamp(24px, 6vw, 60px);
  max-width: 760px;
  margin: 0 auto;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,0.6);
}
.prologue__card p {
  color: var(--parchment);
  font-size: 1rem;
  margin-bottom: 22px;
}
.prologue__card p:last-of-type { margin-bottom: 0; }
.prologue__climax { color: var(--gold-bright) !important; font-style: italic; }
.quote-mark {
  position: absolute;
  font-family: Georgia, serif;
  font-size: 4rem;
  color: var(--gold);
  opacity: 0.35;
  line-height: 1;
}
.quote-mark--open { top: 14px; left: 20px; }
.quote-mark--close { bottom: 4px; right: 26px; }

/* ===== World ===== */
.world__lead {
  font-size: 1.05rem;
  color: var(--gold-bright);
  margin-bottom: 22px;
}
.world__body { color: var(--parchment); opacity: 0.88; margin-bottom: 16px; font-size: 0.95rem; }
.world__map {
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,0.65);
}

/* ===== Characters ===== */
.crew-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 22px;
}
.crew-card { perspective: 1400px; cursor: pointer; outline: none; }
.crew-card__inner {
  position: relative;
  width: 100%;
  min-height: 420px;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(.2,.7,.3,1);
}
.crew-card.is-flipped .crew-card__inner { transform: rotateY(180deg); }

.crew-card__face, .crew-card__back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 8px;
  overflow: hidden;
}
.crew-card__face {
  background: linear-gradient(180deg, var(--ink-2), var(--card));
  border: 1px solid var(--line);
  padding: 26px 18px 22px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.crew-card__portrait {
  width: 108px; height: 108px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--gold);
  box-shadow: 0 0 0 5px rgba(205,160,90,0.12);
  margin-bottom: 16px;
  flex-shrink: 0;
}
.crew-card__portrait img { width: 100%; height: 100%; object-fit: cover; }
.crew-card__role {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: var(--gold);
  margin-bottom: 6px;
}
.crew-card__name {
  font-family: var(--font-jp-head);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--gold-bright);
  margin-bottom: 8px;
}
.crew-card__spec {
  font-size: 0.72rem;
  color: var(--parchment);
  opacity: 0.7;
  letter-spacing: 0.03em;
  margin-bottom: 14px;
}
.crew-card__desc {
  font-size: 0.83rem;
  color: var(--parchment);
  opacity: 0.9;
  margin-bottom: 14px;
  flex-grow: 1;
}
.crew-card__line {
  font-size: 0.8rem;
  font-style: italic;
  color: var(--sail);
  opacity: 0.9;
}
.crew-card__back {
  transform: rotateY(180deg);
  border: 1px solid var(--line);
  background: var(--ink-2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.crew-card__back img { width: 100%; height: 100%; object-fit: contain; }

.crew-card:hover .crew-card__portrait,
.crew-card:focus-visible .crew-card__portrait { box-shadow: 0 0 0 5px rgba(205,160,90,0.28); }

.crew-hint {
  text-align: center;
  font-size: 0.78rem;
  color: var(--gold);
  opacity: 0.6;
  margin-top: 22px;
  letter-spacing: 0.05em;
}

.captain {
  margin-top: 70px;
  padding-top: 50px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.captain__label {
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  color: var(--gold);
  margin-bottom: 10px;
}
.captain__name {
  font-family: var(--font-jp-head);
  font-size: 1.6rem;
  color: var(--gold-bright);
  margin-bottom: 16px;
}
.captain__desc {
  max-width: 620px;
  margin: 0 auto;
  color: var(--parchment);
  opacity: 0.85;
  font-size: 0.92rem;
}

/* ===== Features ===== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px 40px;
}
.feature-item {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.feature-item__num {
  font-family: var(--font-en-head);
  font-size: 0.85rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 10px;
}
.feature-item h3 {
  font-family: var(--font-jp-head);
  font-size: 1.08rem;
  color: var(--gold-bright);
  margin-bottom: 10px;
  font-weight: 600;
}
.feature-item p { font-size: 0.88rem; color: var(--parchment); opacity: 0.85; }

/* ===== Wanted gallery ===== */
.wanted-scroll {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 10px 4px 24px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.wanted-scroll img {
  scroll-snap-align: center;
  flex: 0 0 auto;
  width: min(58vw, 240px);
  border-radius: 6px;
  border: 1px solid var(--line);
  box-shadow: 0 20px 40px -20px rgba(0,0,0,0.6);
  transition: transform .4s ease;
}
.wanted-scroll img:hover { transform: translateY(-6px); }
.wanted-scroll::-webkit-scrollbar { height: 6px; }
.wanted-scroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }

/* ===== Booking ===== */
.booking { text-align: center; }
.booking__inner { max-width: 640px; }
.booking__copy { color: var(--parchment); opacity: 0.9; margin-bottom: 8px; font-size: 1rem; }
.booking__links { margin-top: 30px; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.booking__links .btn { margin-left: 0; margin-right: 0; }

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 60px 20px 40px;
  border-top: 1px solid var(--line);
}
.footer__title {
  font-family: var(--font-jp-head);
  font-size: 1.2rem;
  color: var(--gold-bright);
}
.footer__sub {
  font-family: var(--font-en-script);
  font-style: italic;
  color: var(--parchment);
  opacity: 0.7;
  margin-top: 4px;
  font-size: 0.95rem;
}
.footer__credit {
  margin-top: 18px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--parchment);
  opacity: 0.5;
}

/* ===== Responsive ===== */
@media (max-width: 760px) {
  .section__inner--split { grid-template-columns: 1fr; }
  .world__text .section__title, .world__text .kicker { text-align: center; }
  .btn--ghost { margin-left: 0; }
  .crew-card__inner { min-height: 380px; }
}

@media (max-width: 480px) {
  .hero__title { font-size: clamp(2.2rem, 11vw, 3rem); }
  .section { padding: 60px 16px; }
}
