/* ============================================================
   AMOROSA — src/index.css の逐語転記
   （Tailwindユーティリティは Tailwind Play CDN で供給。
     ここには @tailwind base/components/utilities 以外の
     ソース独自CSS・フォント・カスタムプロパティを収録）
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,200;0,300;0,400;0,500;1,200;1,300;1,400&family=Noto+Serif+JP:wght@200;300;400&family=Jost:wght@100;200;300;400&display=swap');

* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  box-sizing: border-box;
}

body, p, span, a, li, td, th, label, input, textarea, select, button {
  font-family: 'Jost', 'Noto Serif JP', sans-serif;
  font-weight: 300;
}

.font-display,
h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', 'Noto Serif JP', serif;
}

html {
  scroll-behavior: smooth;
  background-color: #0a0806;
}

body {
  background-color: #0a0806;
  overflow-x: hidden;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 1px; }
::-webkit-scrollbar-track { background: #0a0806; }
::-webkit-scrollbar-thumb { background: rgba(212,168,83,0.25); }

/* ─── Duration utilities ─── */
.duration-1200 { transition-duration: 1200ms; }
.duration-1500 { transition-duration: 1500ms; }
.duration-2000 { transition-duration: 2000ms; }
.duration-2500 { transition-duration: 2500ms; }

/* ─── Color tokens ─── */
.text-gold { color: #d4a853; }
.border-gold { border-color: #d4a853; }
.bg-gold { background-color: #d4a853; }

/* ─── Dark backgrounds ─── */
.bg-warm-black   { background-color: #0a0806; }
.bg-warm-black-2 { background-color: #0d0b09; }
.bg-cool-black   { background-color: #090b0d; }
.bg-near-black   { background-color: #070503; }

/* ─── Grain texture — dark sections ─── */
.grain::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  mix-blend-mode: overlay;
  z-index: 1;
}

/* ─── Grain texture — light sections ─── */
.grain-light::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  mix-blend-mode: multiply;
  z-index: 1;
}

/* ─── Gold rule ─── */
.rule-gold {
  display: block;
  width: 32px;
  height: 1px;
  background: linear-gradient(90deg, #d4a853 0%, rgba(212,168,83,0.15) 100%);
}

/* ─── Reveal animations ─── */
@keyframes reveal-up {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes reveal-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes line-expand {
  from { transform: scaleX(0); transform-origin: left; }
  to   { transform: scaleX(1); transform-origin: left; }
}
@keyframes char-in {
  from { opacity: 0; transform: translateY(100%); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-reveal-up   { animation: reveal-up  1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.animate-reveal-fade { animation: reveal-fade 1.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.animate-line-expand { animation: line-expand 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

/* ─── Marquee ─── */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.animate-marquee {
  animation: marquee 28s linear infinite;
  display: flex;
  width: max-content;
}

/* ─── Vertical text ─── */
.writing-vertical {
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

/* ─── Pulse（story heroのスクロールインジケーター用） ─── */
@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* ─── Typography scale — unified ─── */
/*
  SP  (< 640px):  body 14px, h2 1.6–2rem, h3 1.3–1.6rem
  MD  (640–1024): body 14px, h2 2–3rem,   h3 1.5–2rem
  PC  (> 1024px): body 14px, h2 3–5rem,   h3 2–3rem
  Display headings use clamp() with tighter max to avoid over-scaling
*/

/* ─── Oversized display — Responsive ─── */
.text-display-hero {
  font-size: clamp(2.4rem, 10vw, 10rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
}

@media (min-width: 640px) {
  .text-display-hero {
    font-size: clamp(3rem, 10vw, 10rem);
    line-height: 0.9;
  }
}

.text-display-xl {
  font-size: clamp(1.9rem, 6.5vw, 7rem);
  line-height: 0.97;
  letter-spacing: -0.02em;
}

@media (min-width: 640px) {
  .text-display-xl {
    font-size: clamp(2.5rem, 6.5vw, 7rem);
    line-height: 0.95;
  }
}

.text-display-lg {
  font-size: clamp(1.7rem, 4.5vw, 5rem);
  line-height: 1.1;
}

@media (min-width: 640px) {
  .text-display-lg {
    font-size: clamp(2rem, 4.5vw, 5rem);
    line-height: 1.08;
  }
}

/* ─── Section eyebrow — Responsive ─── */
.eyebrow {
  font-family: 'Jost', sans-serif;
  font-weight: 200;
  font-size: 9px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
}

@media (min-width: 640px) {
  .eyebrow {
    font-size: 10px;
    letter-spacing: 0.45em;
  }
}

/* ─── Hover underline ─── */
.hover-underline {
  position: relative;
}
.hover-underline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.hover-underline:hover::after {
  width: 100%;
}

/* ─── Image parallax container ─── */
.img-parallax {
  overflow: hidden;
}
.img-parallax img {
  transform: scale(1.08);
  transition: transform 8s cubic-bezier(0.16, 1, 0.3, 1);
}
.img-parallax:hover img {
  transform: scale(1.0);
}

/* ─── Gold CTA button — Responsive ─── */
.btn-gold-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.9rem 1.8rem;
  border: 1px solid rgba(212,168,83,0.35);
  color: rgba(212,168,83,0.75);
  font-family: 'Jost', sans-serif;
  font-weight: 200;
  font-size: 7px;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  white-space: nowrap;
}

@media (min-width: 640px) {
  .btn-gold-outline {
    padding: 1.1rem 2.5rem;
    gap: 1.5rem;
    font-size: 8px;
    letter-spacing: 0.5em;
  }
}

.btn-gold-outline:hover {
  border-color: rgba(212,168,83,0.85);
  color: rgba(212,168,83,1);
  background: rgba(212,168,83,0.05);
}

/* ─── Dark CTA button — Responsive ─── */
.btn-dark-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.9rem 1.8rem;
  border: 1px solid rgba(17,17,17,0.12);
  color: rgba(17,17,17,0.35);
  font-family: 'Jost', sans-serif;
  font-weight: 200;
  font-size: 7px;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  white-space: nowrap;
}

@media (min-width: 640px) {
  .btn-dark-outline {
    padding: 1.1rem 2.5rem;
    gap: 1.5rem;
    font-size: 8px;
    letter-spacing: 0.5em;
  }
}

.btn-dark-outline:hover {
  border-color: #d4a853;
  color: #d4a853;
}

/* ─── Mobile typography utilities ─── */
.text-body-mobile {
  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.02em;
}

@media (min-width: 640px) {
  .text-body-mobile {
    font-size: 13px;
    line-height: 2.2;
    letter-spacing: 0.03em;
  }
}

/* ─── Mobile section padding ─── */
.section-padding {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

@media (min-width: 640px) {
  .section-padding {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
  }
}

@media (min-width: 1024px) {
  .section-padding {
    padding-left: 4rem;
    padding-right: 4rem;
  }
}

@media (min-width: 1280px) {
  .section-padding {
    padding-left: 6rem;
    padding-right: 6rem;
  }
}

/* ─── Hero breathe / scroll pulse（HeroSection内 <style> の転記） ─── */
@keyframes breathe {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.9; }
}
.hero-breathe {
  animation: breathe 5s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(6px); opacity: 1; }
}
.scroll-pulse {
  animation: scrollPulse 2s ease-in-out infinite;
}

/* ─── ファーストビュー（ヒーロー）読み込み時のふわっと表示 ─── */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes heroImageIn {
  from { opacity: 0; transform: scale(1.08); }
  to   { opacity: 1; transform: scale(1); }
}
.hero-anim {
  opacity: 0;
  animation: heroFadeUp 1.5s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: var(--hero-delay, 0s);
  will-change: opacity, transform;
}
.hero-anim-img {
  opacity: 0;
  animation: heroImageIn 4.5s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: var(--hero-delay, 0s);
  will-change: opacity, transform;
}
/* 黒いオーバーレイ（シャドウ）：写真の表示に合わせて少しずつ薄くなり消える */
@keyframes heroShadowOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}
.hero-shadow-fade {
  animation: heroShadowOut 7s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: var(--hero-delay, 0s);
  will-change: opacity;
}
@media (prefers-reduced-motion: reduce) {
  .hero-shadow-fade {
    opacity: 1 !important;
    animation: none !important;
  }
}
/* 背景の「ROSE」文字：黒画面に最初にふわっと浮かぶ */
@keyframes heroRoseIn {
  from { opacity: 0; }
  to   { opacity: 0.04; }
}
.hero-rose {
  opacity: 0;
  animation: heroRoseIn 1.8s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: var(--hero-delay, 0s);
  will-change: opacity;
}
/* transformを使う要素（中央寄せ等）と干渉しない、不透明度のみのフェード */
@keyframes heroFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.hero-anim-fade {
  opacity: 0;
  animation: heroFade 1.5s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: var(--hero-delay, 0s);
  will-change: opacity;
}
@media (prefers-reduced-motion: reduce) {
  .hero-anim,
  .hero-anim-img {
    opacity: 1 !important;
    animation: none !important;
    transform: none !important;
  }
  .hero-anim-fade {
    opacity: 1 !important;
    animation: none !important;
  }
  .hero-rose {
    opacity: 0.025 !important;
    animation: none !important;
  }
}

/* ─── Scroll Reveal（ふわっと表示）─── */
/* .reveal は JS で付与。JS無効時はクラスが付かず通常表示されるため安全 */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 1.1s cubic-bezier(0.16, 1, 0.3, 1),
    transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ─── ヘッダー（デスクトップナビ）の文字視認性アップ ─── */
/* 明るい背景でも読めるよう、白リンクを濃く＋うっすら影 */
#navbar nav a.eyebrow:not([style]) {
  color: rgba(255, 255, 255, 0.96) !important;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.55), 0 0 2px rgba(0, 0, 0, 0.35);
}
/* ゴールド系アクセントリンク（STORY 等）も濃く＋影 */
#navbar nav a[style*="184,150,90"],
#navbar nav a[style*="212,168,83"] {
  color: rgba(224, 184, 104, 0.98) !important;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.55), 0 0 2px rgba(0, 0, 0, 0.35);
}

/* ─── モバイルメニューの文字視認性アップ ─── */
/* 通常リンク（text-white/40 等）を明るく＋文字サイズ1.5倍 */
#mobile-menu a {
  color: rgba(255, 255, 255, 0.88);
  font-size: 15px !important; /* 元10px → 1.5倍 */
}
#mobile-menu a:hover {
  color: #ffffff;
}
/* ゴールド系のアクセントリンク（インラインstyle指定）も明るく保持 */
#mobile-menu a[style*="184,150,90"],
#mobile-menu a[style*="212,168,83"] {
  color: rgba(216, 174, 92, 0.95) !important;
}
#mobile-menu a[style*="184,150,90"]:hover,
#mobile-menu a[style*="212,168,83"]:hover {
  color: rgba(230, 192, 120, 1) !important;
}
