/* ==========================================================================
   My Japan Traveler — home page
   Design system from ui-ux-pro-max: "Japanese Elegant" type pairing
   (Noto Serif JP + Noto Sans JP), storytelling/hero-centric pattern,
   aurora gradient adapted to a Japan-dawn palette.
   ========================================================================== */

:root {
  --ink:        #14132b;   /* deep indigo night */
  --ink-soft:   #2b2a55;
  --paper:      #fcf9f4;   /* warm washi white */
  --paper-deep: #f4ede2;
  --sakura:     #f6b8c3;
  --vermilion:  #d9381e;   /* torii red */
  --amber:      #ffb347;
  --text:       #232136;
  --text-soft:  #5b5876;
  --serif: 'Noto Serif JP', 'Hiragino Mincho ProN', serif;
  --sans:  'Noto Sans JP', 'Hiragino Kaku Gothic ProN', sans-serif;
  --radius: 18px;
  --shadow: 0 10px 40px rgba(20, 19, 43, 0.10);
  --maxw: 1120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
.jp { font-family: var(--serif); font-weight: 500; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font: 500 0.95rem/1 var(--sans);
  padding: 0.85rem 1.5rem; border-radius: 999px;
  text-decoration: none; transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  cursor: pointer;
}
.btn:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
.btn--primary { background: var(--vermilion); color: #fff; box-shadow: 0 6px 22px rgba(217, 56, 30, .35); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(217, 56, 30, .45); }
.btn--ghost { background: rgba(252, 249, 244, 0.08); color: var(--paper); border: 1px solid rgba(252, 249, 244, 0.35); backdrop-filter: blur(6px); }
.btn--ghost:hover { background: rgba(252, 249, 244, 0.16); transform: translateY(-2px); }
.btn--inverse { background: var(--paper); color: var(--ink); }
.btn--inverse:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,0,0,.3); }
.btn--lg { padding: 1.05rem 1.9rem; font-size: 1.02rem; }
.btn--small { padding: 0.6rem 1.1rem; font-size: 0.85rem; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: rgba(20, 19, 43, 0.72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(252, 249, 244, 0.08);
}
.nav__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0.8rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.nav__brand {
  display: flex; align-items: center; gap: 0.6rem;
  font: 600 1.02rem var(--serif); color: var(--paper); text-decoration: none;
  letter-spacing: 0.02em;
}
.nav__kanji {
  display: grid; place-items: center; width: 2.2rem; height: 2.2rem;
  background: var(--vermilion); color: #fff; border-radius: 8px;
  font: 700 1.15rem var(--serif);
}
.nav__links { display: flex; gap: 1.6rem; }
.nav__links a {
  color: rgba(252, 249, 244, 0.66); text-decoration: none; font-size: 0.92rem;
  padding-bottom: 2px; border-bottom: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.nav__links a:hover { color: var(--paper); }
.nav__links a.is-active { color: var(--paper); border-bottom-color: var(--vermilion); }
@media (max-width: 720px) { .nav__links { display: none; } }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 92vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; color: var(--paper);
  background: var(--ink);
}
.hero__sky {
  position: absolute; inset: 0;
  background:
    radial-gradient(1200px 600px at 75% 85%, rgba(255, 179, 71, 0.34), transparent 60%),
    radial-gradient(900px 500px at 20% 75%, rgba(246, 184, 195, 0.22), transparent 65%),
    linear-gradient(180deg, #0e0d22 0%, #14132b 45%, #3a2a55 78%, #7a4a63 100%);
  animation: dawn 18s ease-in-out infinite alternate;
}
@keyframes dawn {
  from { filter: hue-rotate(0deg) brightness(1); }
  to   { filter: hue-rotate(-8deg) brightness(1.08); }
}
.hero__content {
  position: relative; z-index: 3; text-align: center;
  padding: 7.5rem 1.5rem 16rem; max-width: 820px;
}
.hero__eyebrow {
  font-family: var(--serif); color: var(--sakura);
  letter-spacing: 0.14em; font-size: 0.95rem; margin-bottom: 1.2rem;
}
.hero__title {
  font: 600 clamp(2.8rem, 7.5vw, 5.4rem)/1.12 var(--serif);
  letter-spacing: 0.01em; margin-bottom: 1.4rem;
}
.hero__title em { font-style: normal; color: var(--amber); }
.hero__sub {
  font-size: clamp(1rem, 1.6vw, 1.18rem); color: rgba(252, 249, 244, 0.82);
  max-width: 600px; margin: 0 auto 2.2rem;
}
.hero__cta { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; }
.hero__scene {
  position: absolute; bottom: -2px; left: 0; width: 100%; height: clamp(180px, 30vw, 360px);
  z-index: 2; display: block;
}

/* sakura petals */
.petals { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.petal {
  position: absolute; top: -4%;
  width: 14px; height: 11px;
  background: linear-gradient(135deg, var(--sakura), #eb91a4);
  border-radius: 80% 10% 80% 10%;
  opacity: 0.85;
  animation: fall linear infinite;
}
.petal:nth-child(1) { left: 8%;  animation-duration: 11s; animation-delay: 0s;   transform: scale(0.9); }
.petal:nth-child(2) { left: 22%; animation-duration: 14s; animation-delay: 2.2s; transform: scale(0.7); }
.petal:nth-child(3) { left: 35%; animation-duration: 10s; animation-delay: 4.5s; }
.petal:nth-child(4) { left: 48%; animation-duration: 16s; animation-delay: 1.1s; transform: scale(0.8); }
.petal:nth-child(5) { left: 61%; animation-duration: 12s; animation-delay: 5.8s; transform: scale(1.1); }
.petal:nth-child(6) { left: 73%; animation-duration: 15s; animation-delay: 3.4s; transform: scale(0.75); }
.petal:nth-child(7) { left: 85%; animation-duration: 11.5s; animation-delay: 6.6s; }
.petal:nth-child(8) { left: 94%; animation-duration: 13s; animation-delay: 0.7s; transform: scale(0.85); }
@keyframes fall {
  0%   { transform: translateY(-4vh) rotate(0deg)   translateX(0); }
  25%  { transform: translateY(28vh) rotate(120deg) translateX(3vw); }
  50%  { transform: translateY(55vh) rotate(240deg) translateX(-2vw); }
  75%  { transform: translateY(80vh) rotate(300deg) translateX(2.5vw); }
  100% { transform: translateY(108vh) rotate(420deg) translateX(-1vw); }
}

/* ---------- sections ---------- */
.section { padding: 6.5rem 1.5rem; }
.section--paper { background: var(--paper-deep); }
.section__inner { max-width: var(--maxw); margin: 0 auto; }
.section__kicker {
  font-family: var(--serif); color: var(--vermilion);
  letter-spacing: 0.12em; font-size: 0.92rem; margin-bottom: 0.7rem;
}
.section__title {
  font: 600 clamp(1.8rem, 4vw, 2.6rem)/1.25 var(--serif);
  color: var(--ink); margin-bottom: 1rem; max-width: 720px;
}
.section__lede { color: var(--text-soft); max-width: 640px; margin-bottom: 2.6rem; }
.section__cta { margin-top: 2.4rem; }

/* journey cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.4rem; margin-top: 2.6rem; }
.card {
  background: #fff; border-radius: var(--radius); padding: 2rem 1.8rem;
  box-shadow: var(--shadow); border-top: 4px solid var(--vermilion);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 18px 50px rgba(20, 19, 43, 0.16); }
.card__glyph {
  width: 3.2rem; height: 3.2rem; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--ink), var(--ink-soft));
  color: var(--amber); font: 600 1.5rem var(--serif);
  border-radius: 12px; margin-bottom: 1.2rem;
}
.card h3 { font: 600 1.25rem var(--serif); color: var(--ink); margin-bottom: 0.6rem; }
.card p { color: var(--text-soft); font-size: 0.97rem; }

/* phrasebook */
.tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.tab {
  font: 500 0.95rem var(--sans); padding: 0.6rem 1.4rem;
  border: 1.5px solid rgba(20, 19, 43, 0.18); border-radius: 999px;
  background: transparent; color: var(--text-soft); cursor: pointer;
  transition: all .15s ease;
}
.tab:hover { border-color: var(--ink); color: var(--ink); }
.tab.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.tab:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.phrases__panel { display: none; list-style: none; }
.phrases__panel.is-active { display: grid; gap: 0.8rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.phrases__panel li {
  background: #fff; border-radius: 14px; padding: 1.2rem 1.4rem;
  box-shadow: 0 4px 18px rgba(20, 19, 43, 0.07);
  display: flex; flex-direction: column; gap: 0.2rem;
  border-left: 4px solid var(--sakura);
}
.phrases__panel .jp { font-size: 1.35rem; color: var(--ink); }
.phrases__panel .romaji { color: var(--vermilion); font-size: 0.92rem; font-weight: 500; letter-spacing: 0.03em; }
.phrases__panel .en { color: var(--text-soft); font-size: 0.92rem; }

/* JLPT rail */
.jlpt { list-style: none; margin-top: 2.6rem; position: relative; }
.jlpt::before {
  content: ""; position: absolute; left: 1.55rem; top: 0.5rem; bottom: 0.5rem;
  width: 3px; background: linear-gradient(180deg, var(--sakura), var(--vermilion), var(--ink));
  border-radius: 2px;
}
.jlpt__level { display: flex; gap: 1.6rem; padding: 1.1rem 0; position: relative; }
.jlpt__badge {
  flex: 0 0 3.2rem; height: 3.2rem; display: grid; place-items: center;
  background: var(--paper); border: 3px solid var(--vermilion); color: var(--vermilion);
  border-radius: 50%; font: 700 1rem var(--sans); z-index: 1;
}
.jlpt__level:nth-child(4) .jlpt__badge,
.jlpt__level:nth-child(5) .jlpt__badge { border-color: var(--ink); color: var(--ink); }
.jlpt__level h3 { font: 600 1.15rem var(--serif); color: var(--ink); }
.jlpt__level p { color: var(--text-soft); font-size: 0.95rem; max-width: 560px; }

/* seasons bento */
.bento { display: grid; gap: 1.3rem; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); margin-top: 2.6rem; }
.bento__card {
  position: relative; border-radius: var(--radius); padding: 2.2rem 1.7rem 1.8rem;
  color: #fff; overflow: hidden; min-height: 230px;
  display: flex; flex-direction: column; justify-content: flex-end;
  box-shadow: var(--shadow); transition: transform .2s ease;
}
.bento__card:hover { transform: translateY(-6px) scale(1.01); }
.bento__card h3 { font: 600 1.3rem var(--serif); margin-bottom: 0.4rem; }
.bento__card p { font-size: 0.92rem; opacity: 0.92; }
.bento__kanji {
  position: absolute; top: 0.6rem; right: 1rem;
  font: 700 5.4rem var(--serif); opacity: 0.18; line-height: 1;
}
.bento__card--spring { background: linear-gradient(160deg, #e98ca2 0%, #c75d7d 55%, #93405f 100%); }
.bento__card--summer { background: linear-gradient(160deg, #2c7fb8 0%, #1c5d8f 55%, #123c66 100%); }
.bento__card--autumn { background: linear-gradient(160deg, #e07b39 0%, #b8511f 55%, #7c3214 100%); }
.bento__card--winter { background: linear-gradient(160deg, #8fb6cf 0%, #5d83a3 55%, #38536e 100%); }

/* CTA band */
.cta-band {
  background:
    radial-gradient(900px 420px at 80% 110%, rgba(255, 179, 71, 0.25), transparent 60%),
    radial-gradient(700px 380px at 12% 100%, rgba(246, 184, 195, 0.18), transparent 65%),
    var(--ink);
  color: var(--paper); text-align: center; padding: 6.5rem 1.5rem;
}
.cta-band__inner { max-width: 680px; margin: 0 auto; }
.cta-band__kanji { font: 500 1.1rem var(--serif); color: var(--sakura); letter-spacing: 0.2em; margin-bottom: 1rem; }
.cta-band h2 { font: 600 clamp(1.7rem, 4vw, 2.5rem)/1.25 var(--serif); margin-bottom: 1rem; }
.cta-band p { color: rgba(252, 249, 244, 0.78); margin-bottom: 2.2rem; }

/* footer */
.footer { background: #0e0d22; color: rgba(252, 249, 244, 0.75); padding: 3.5rem 1.5rem 2.5rem; }
.footer__inner { max-width: var(--maxw); margin: 0 auto; display: grid; gap: 1.8rem; }
.footer__brand { display: flex; gap: 0.8rem; align-items: center; }
.footer__brand strong { font-family: var(--serif); color: var(--paper); }
.footer__brand p { font-size: 0.85rem; }
.footer__links { display: flex; gap: 1.6rem; flex-wrap: wrap; }
.footer__links a { color: rgba(252, 249, 244, 0.6); text-decoration: none; font-size: 0.9rem; }
.footer__links a:hover { color: var(--paper); }
.footer__copy { font-size: 0.82rem; color: rgba(252, 249, 244, 0.4); }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* accessibility: respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__sky, .petal { animation: none; }
  .petals { display: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
