/* Keep this palette in sync with styles.css's :root / dark-mode block —
   duplicated rather than shared so the landing page and the editor can be
   updated independently. */
:root {
  --bg: #f7f7fa;
  --panel: #ffffff;
  --text: #1f2430;
  --muted: #6b7280;
  --border: #e2e4ea;
  --accent: #2563eb;
  --accent-2: #f59e0b;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161c;
    --panel: #1c1f27;
    --text: #e6e8ee;
    --muted: #9aa0ae;
    --border: #2a2e38;
    --accent: #5b8def;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Hiragino Kaku Gothic ProN", "Yu Gothic", system-ui, sans-serif;
}

/* Matches the editor page's .app-header exactly (full-width bar, same
   background/border/padding) so the two pages read as one product. */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}
.site-header .brand {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  margin: 0;
}
.site-header .nav-cta {
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 6px;
}
.site-header .nav-cta:hover { opacity: 0.92; }

.header-left { display: flex; align-items: center; gap: 20px; }

/* Pure-CSS hover/focus dropdown. Kept byte-for-byte in sync with the
   editor page's copy in styles.css — see the comment there for why the
   list sits flush against the trigger (no margin-gap) with the visual
   gap done as transparent padding-top instead. */
.tools-menu { position: relative; }
.tools-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px 2px;
  font: inherit;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}
.tools-menu-trigger::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-top: -3px;
}
.tools-menu-trigger:hover,
.tools-menu:focus-within .tools-menu-trigger { color: var(--text); }
.tools-menu-list {
  position: absolute;
  top: 100%;
  left: 0;
  padding-top: 8px;
  min-width: 170px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  z-index: 20;
}
.tools-menu:hover .tools-menu-list,
.tools-menu:focus-within .tools-menu-list {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.tools-menu-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
  padding: 6px;
}
.tools-menu-card a {
  display: block;
  padding: 8px 10px;
  border-radius: 5px;
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.tools-menu-card a:hover { background: var(--bg); }

/* Two-column hero: copy on the left, a showcase card (waveform + feature
   list) on the right — keeps everything above the fold in one section
   instead of a long stack, and the card's elevation is what gives the page
   its "premium" feel rather than heavy gradients/effects. */
.hero {
  max-width: 1040px;
  margin: 0 auto;
  padding: 76px 20px 56px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 56px;
}

.hero-copy { text-align: left; }
.hero-copy h1 {
  font-size: 32px;
  line-height: 1.4;
  margin: 0 0 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.hero-copy p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted);
  margin: 0 0 28px;
  max-width: 40ch;
}

.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  padding: 12px 28px;
  border-radius: 8px;
}
.btn-primary:hover { opacity: 0.92; }

.kicker {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.formats {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.privacy-note {
  margin: 22px 0 0;
  font-size: 12px;
  color: var(--muted);
}

/* The showcase card: a single elevated panel holding the waveform preview
   and the feature list, standing in for a product screenshot. */
.hero-visual { min-width: 0; }
.showcase-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 26px;
  box-shadow: 0 24px 48px -28px rgba(15, 23, 42, 0.35);
}

.hero-wave { color: var(--accent); margin-bottom: 24px; }
.hero-wave svg { display: block; width: 100%; height: auto; overflow: visible; }
.hero-wave .crop-mark { stroke: var(--accent-2); stroke-width: 2; }
.hero-wave .crop-tab { fill: var(--accent-2); }

/* Waveform hover choreography — each feature, when hovered, drives a
   distinct, smooth reaction in the illustration above via :has(), no JS
   needed. Bars use a soft decelerating easing (not a bounce/linear tween)
   to read as deliberate rather than a stock "AI landing page" flourish. */
.wave-bars-group {
  /* Was relying on the removed opacity="0.85"/fill="currentColor" SVG
     attributes from an earlier version of this markup — without them the
     bars fell back to SVG's default fill (black) instead of the accent
     blue from .hero-wave's `color`. */
  fill: currentColor;
  transition: filter 0.5s ease;
}
.wave-bar {
  transform-box: fill-box;
  transform-origin: center;
  /* opacity is only used by the crop reaction below — kept short (and equal
     to .wave-crop-marks' own duration) so the dimming and the crop-mark
     move+glow all land together instead of trailing each other. */
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
}
.wave-crop-marks {
  transform-box: fill-box;
  transform-origin: center;
  transition: filter 0.25s ease, transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.wave-cut-line {
  stroke: var(--accent-2);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 4 4;
  stroke-dashoffset: 24;
  opacity: 0;
  transition: opacity 0.35s ease, stroke-dashoffset 0.5s ease;
}
/* クロップ: 対象範囲の外側を薄くし、クロップの目印を光らせる。
   右側の目印はさらに少し左へ動かし、クロップバーをドラッグして範囲を
   狭めている様子を表現する。 */
.showcase-card:has(.feature[data-feature="crop"]:is(:hover, .auto-active)) .wave-bar-outside {
  opacity: 0.22;
}
.showcase-card:has(.feature[data-feature="crop"]:is(:hover, .auto-active)) .wave-crop-marks {
  filter: drop-shadow(0 0 5px var(--accent-2));
}
.showcase-card:has(.feature[data-feature="crop"]:is(:hover, .auto-active)) .wave-crop-mark-right {
  transform: translateX(-15px);
  /* Its own longer, pronounced ease-out (fast start, long smooth settle) —
     overrides .wave-crop-marks' shorter/shared transform duration so the
     move reads as a deliberate slide rather than a snap. Glow + the
     dimming it drags along (opacity, above) stay on the quick 0.25s beat. */
  transition: filter 0.25s ease, transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}

/* フェード: 端に近いバーほど大きく縮み、内側に向かって段々に戻る —
   一律に縮めると「無音」に見えるため、バーごとに個別の目標スケール
   (--fade-scale, 0.1〜0.9) を持たせて斜めのランプに見えるようにする */
.showcase-card:has(.feature[data-feature="fade"]:is(:hover, .auto-active)) .wave-bar-fade-in,
.showcase-card:has(.feature[data-feature="fade"]:is(:hover, .auto-active)) .wave-bar-fade-out {
  transform: scaleY(var(--fade-scale, 0.15));
  transition-delay: var(--fade-delay, 0ms);
}

/* カットとミキシング: 切った地点(中央)に破線を出し、その右側
   (切った地点〜右クロップバーの間)の区間だけ振幅を持ち上げて、
   区間ごとの音量調整であることを示す */
.showcase-card:has(.feature[data-feature="cutmix"]:is(:hover, .auto-active)) .wave-cut-line {
  opacity: 1;
  stroke-dashoffset: 0;
}
.showcase-card:has(.feature[data-feature="cutmix"]:is(:hover, .auto-active)) .wave-bar-left {
  transform: translateX(-3px);
  transition-delay: var(--cut-delay, 0ms);
}
.showcase-card:has(.feature[data-feature="cutmix"]:is(:hover, .auto-active)) .wave-bar-right {
  transform: translateX(3px);
  transition-delay: var(--cut-delay, 0ms);
}
.showcase-card:has(.feature[data-feature="cutmix"]:is(:hover, .auto-active)) .wave-bar-inside.wave-bar-right {
  transform: scaleY(1.4) translateX(3px);
}

/* 書き出し: 波形全体が一様に光り、劣化なく丸ごと保持されることを示す */
.showcase-card:has(.feature[data-feature="export"]:is(:hover, .auto-active)) .wave-bars-group {
  filter: drop-shadow(0 0 5px var(--accent));
}

.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 18px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}
.feature {
  padding: 9px 8px;
  margin: -9px -8px;
  border-radius: 10px;
  /* Same shadow shape as the hover state, just fully transparent — so the
     transition fades its opacity in/out smoothly instead of a hard cut. */
  box-shadow: 0 0 3px 1px rgba(255, 255, 255, 0) inset;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.feature:is(:hover, .auto-active) {
  background-color: color-mix(in srgb, var(--panel) 92%, black 8%);
  box-shadow: 0 0 3px 1px rgba(255, 255, 255, 0.45) inset;
}
.feature .feature-icon {
  width: 18px;
  height: 18px;
  color: var(--accent);
  margin-bottom: 8px;
}
.feature h3 {
  font-size: 13px;
  margin: 0 0 3px;
  font-weight: 600;
}
.feature p {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
}

@media (max-width: 840px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 48px;
    text-align: center;
  }
  .hero-copy p { margin-left: auto; margin-right: auto; }
  .hero-copy h1 { font-size: 26px; }
}
@media (max-width: 480px) {
  .features { grid-template-columns: 1fr; }
}
