/* Kenchinokuni — shared styles */

:root {
  --bg: #0c1226;
  --bg-elevated: rgba(255, 233, 240, 0.05);
  --bg-card: rgba(255, 233, 240, 0.07);
  --accent: #f6b8c9;
  --accent-soft: rgba(246, 184, 201, 0.22);
  --text: #ffe9f0;
  --text-muted: rgba(255, 233, 240, 0.72);
  --border: rgba(246, 184, 201, 0.22);
  --radius: 1.25rem;
  --radius-sm: 0.75rem;
  --space: clamp(1.25rem, 4vw, 2.5rem);
  --max: 40rem;
  --font: "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Noto Sans CJK JP", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  --ease: 0.45s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(246, 184, 201, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(246, 184, 201, 0.06), transparent 50%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color var(--ease), opacity var(--ease);
}

a:hover {
  color: var(--text);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.wrap {
  width: min(100% - 2 * var(--space), var(--max));
  margin-inline: auto;
}

.site-header {
  padding: var(--space) var(--space) 0;
}

.site-header .wrap {
  display: flex;
  justify-content: center;
}

.brand-link {
  display: inline-block;
  text-decoration: none;
  opacity: 0.95;
  transition: opacity var(--ease);
}

.brand-link:hover {
  opacity: 1;
  color: inherit;
}

.brand-link img {
  width: min(100%, 16rem);
  height: auto;
}

main {
  padding: var(--space) 0 calc(var(--space) * 1.5);
}

.section {
  margin-block: clamp(2rem, 6vw, 3.5rem);
}

.section:first-child {
  margin-top: clamp(1rem, 3vw, 1.75rem);
}

.section h1,
.section h2 {
  font-weight: 550;
  letter-spacing: 0.01em;
  line-height: 1.35;
  margin: 0 0 0.85rem;
}

.section h1 {
  font-size: clamp(1.45rem, 4vw, 1.85rem);
}

.section h2 {
  font-size: clamp(1.2rem, 3vw, 1.4rem);
  color: var(--accent);
}

.lead {
  font-size: clamp(1.05rem, 2.5vw, 1.15rem);
  color: var(--text);
  margin: 0 0 1rem;
}

.muted {
  color: var(--text-muted);
}

.mission p {
  margin: 0 0 1.1rem;
}

.mission p:last-child {
  margin-bottom: 0;
}

.mission .closing {
  margin-top: 1.5rem;
  font-size: 1.08rem;
  color: var(--accent);
}

/* Video */
.video-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.video-frame {
  width: min(100%, 22.5rem);
  max-height: 80vh;
  border-radius: var(--radius);
  overflow: hidden;
  background: #060914;
  border: 1px solid var(--border);
  box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.35);
}

.video-frame video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
}

.sound-toggle {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--ease), border-color var(--ease);
}

.sound-toggle:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.sound-toggle[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
}

/* Cards / boxes */
.card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  transition: background var(--ease), border-color var(--ease), transform var(--ease);
}

.card:hover {
  background: rgba(246, 184, 201, 0.12);
  border-color: var(--accent);
  color: inherit;
  transform: translateY(-2px);
}

.card-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.card-row img {
  width: 3rem;
  height: 3rem;
  flex-shrink: 0;
}

.card-title {
  font-weight: 550;
  margin: 0 0 0.2rem;
}

.card-sub {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.product-hero {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.product-hero img {
  width: 3.5rem;
  height: 3.5rem;
}

.product-hero h1 {
  margin: 0;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding: 1rem 1.15rem 1rem 3.25rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 1rem;
  top: 1rem;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  display: grid;
  place-items: center;
}

.price-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.35rem;
  text-align: center;
}

.price-box .price-line {
  margin: 0 0 1.25rem;
  font-size: 1.02rem;
  color: var(--text-muted);
}

.btn,
a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 3rem;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #0c1226;
  font: inherit;
  font-size: 1.08rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--ease), color var(--ease), transform var(--ease);
}

.btn:hover,
a.btn:hover {
  color: #0c1226;
  background: #fad0db;
  opacity: 1;
  transform: translateY(-1px);
}

.btn-block {
  width: 100%;
  max-width: 20rem;
}

.qr-wrap {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.qr-wrap img {
  width: 9.5rem;
  height: 9.5rem;
  padding: 0.55rem;
  background: #fff;
  border-radius: var(--radius-sm);
}

.qr-caption {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.app-link {
  display: inline-block;
  margin-top: 1.25rem;
  font-size: 1rem;
}

.story p {
  margin: 0 0 1rem;
}

.story p:last-child {
  margin-bottom: 0;
}

.faq details {
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 0;
}

.faq details:first-of-type {
  border-top: 1px solid var(--border);
}

.faq summary {
  cursor: pointer;
  font-weight: 550;
  list-style: none;
  color: var(--text);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  float: right;
  color: var(--accent);
  font-weight: 400;
}

.faq details[open] summary::after {
  content: "–";
}

.faq details p {
  margin: 0.65rem 0 0.25rem;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.legal h1 {
  margin-bottom: 0.35rem;
}

.legal .updated {
  margin: 0 0 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.legal ol {
  margin: 0;
  padding-left: 1.25rem;
}

.legal li {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.legal li::marker {
  color: var(--accent);
}

.site-footer {
  margin-top: auto;
  padding: var(--space);
  border-top: 1px solid var(--border);
  text-align: center;
}

.site-footer .motto {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  color: var(--accent);
}

.site-footer .meta {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.site-footer .meta a {
  color: var(--text-muted);
}

.site-footer .meta a:hover {
  color: var(--accent);
}

/* 404 */
.not-found {
  text-align: center;
  padding-block: clamp(3rem, 12vw, 6rem);
}

.not-found h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.6rem, 5vw, 2rem);
}

.not-found .jp {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
}

/* Gentle entrance — no flash */
@media (prefers-reduced-motion: no-preference) {
  .fade-in {
    animation: fade-up 0.8s ease both;
  }

  .fade-in-delay {
    animation: fade-up 0.9s ease 0.15s both;
  }

  @keyframes fade-up {
    from {
      opacity: 0;
      transform: translateY(0.6rem);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .card:hover,
  .btn:hover {
    transform: none;
  }
}

/* —— Home layout —— */
.page-home .card-row img {
  width: 4.25rem;
  height: 4.25rem;
}

.page-home .home-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.55rem;
  margin-bottom: clamp(0.5rem, 2vw, 1rem);
}

.page-home .home-brand-mark {
  width: auto;
  height: clamp(7.5rem, 32vw, 12rem);
  filter: drop-shadow(0 0 1.4rem rgba(246, 184, 201, 0.45))
    drop-shadow(0 0 2.8rem rgba(246, 184, 201, 0.22));
}

.page-home .home-brand-jp {
  margin: 0.35rem 0 0;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  color: var(--text);
}

.page-home .home-brand-en {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  text-transform: uppercase;
  color: var(--text);
  opacity: 0.9;
}

/* Phones: big rakkan shown → hide header logo */
.page-home .home-header-logo {
  display: none;
}

@media (max-width: 899px) {
  .page-home .site-header {
    display: none;
  }
}

/* Tablet / small laptop: 2 columns, header logo on, big rakkan off */
@media (min-width: 900px) and (max-width: 1099px) {
  .page-home .home-brand {
    display: none;
  }

  .page-home .home-header-logo {
    display: inline-block;
  }

  .page-home .site-header {
    display: block;
    flex-shrink: 0;
    padding-top: clamp(0.65rem, 1.5vh, 1.25rem);
    padding-bottom: 0;
  }

  .page-home .site-header .brand-link img {
    width: min(100%, clamp(10rem, 18vh, 14rem));
  }

  .page-home {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .page-home > .wrap,
  .page-home main.wrap {
    width: min(100% - 2 * var(--space), 64rem);
  }

  .page-home main {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-block: clamp(0.5rem, 1.5vh, 1rem);
    min-height: 0;
  }

  .page-home .home-stage {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: clamp(1.25rem, 3vw, 2.5rem);
    align-items: center;
  }

  .page-home .home-media .section,
  .page-home .home-copy .section {
    margin-block: 0;
  }

  .page-home .home-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: clamp(0.85rem, 2vh, 1.35rem);
    min-width: 0;
  }

  .page-home .home-copy .mission .lead {
    margin-bottom: 0.65rem;
  }

  .page-home .home-copy .mission p {
    margin-bottom: 0.7rem;
    font-size: clamp(0.92rem, 1.55vh + 0.35rem, 1.05rem);
    line-height: 1.55;
  }

  .page-home .home-copy .mission h1 {
    font-size: clamp(1.25rem, 2.2vh + 0.55rem, 1.7rem);
    margin-bottom: 0.5rem;
  }

  .page-home .home-copy .mission .lead {
    font-size: clamp(0.98rem, 1.4vh + 0.45rem, 1.12rem);
  }

  .page-home .home-copy .mission .closing {
    margin-top: 0.85rem;
    font-size: clamp(0.98rem, 1.3vh + 0.4rem, 1.08rem);
  }

  .page-home .home-media .video-block {
    gap: 0.65rem;
  }

  .page-home .home-media .video-frame {
    width: auto;
    max-width: min(100%, 22.5rem);
    max-height: 70vh;
    max-height: 70dvh;
  }

  .page-home .home-media .video-frame video {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 70vh;
    max-height: 70dvh;
  }

  .page-home .home-copy .card {
    padding: 1rem 1.15rem;
  }

  .page-home .site-footer {
    flex-shrink: 0;
    padding-block: clamp(0.65rem, 1.5vh, 1.15rem);
  }

  .page-home .site-footer .motto {
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
  }

  .page-home .site-footer .meta {
    font-size: 0.78rem;
  }

  @media (prefers-reduced-motion: no-preference) {
    .page-home .fade-in,
    .page-home .fade-in-delay {
      animation: fade-only 0.7s ease both;
    }

    .page-home .fade-in-delay {
      animation-delay: 0.12s;
    }
  }
}

/* Wide desktop: 3 columns, big rakkan on, header logo off */
@media (min-width: 1100px) {
  .page-home .home-brand {
    display: flex;
    margin-bottom: 0;
    justify-content: center;
  }

  .page-home .home-header-logo {
    display: none;
  }

  .page-home .site-header {
    display: none;
  }

  .page-home {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .page-home > .wrap,
  .page-home main.wrap {
    width: min(100% - 2 * var(--space), 76rem);
  }

  .page-home main {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-block: clamp(0.5rem, 1.5vh, 1rem);
    min-height: 0;
  }

  .page-home .home-stage {
    display: grid;
    grid-template-columns: minmax(7rem, 0.7fr) minmax(0, 0.95fr) minmax(22rem, 1.2fr);
    gap: clamp(1rem, 2.5vw, 2.25rem);
    align-items: center;
  }

  .page-home .home-brand-mark {
    width: auto;
    height: auto;
    max-height: 58dvh; /* ~80–85% of video's 70dvh cap */
  }

  .page-home .home-brand-jp {
    font-size: clamp(0.95rem, 1.4vh + 0.4rem, 1.15rem);
  }

  .page-home .home-brand-en {
    font-size: clamp(0.58rem, 0.9vh + 0.25rem, 0.72rem);
    letter-spacing: 0.38em;
    text-indent: 0.38em;
  }

  .page-home .home-media .section,
  .page-home .home-copy .section {
    margin-block: 0;
  }

  .page-home .home-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: clamp(0.85rem, 2vh, 1.35rem);
    min-width: 22rem;
  }

  .page-home .home-copy .mission .lead {
    margin-bottom: 0.65rem;
  }

  .page-home .home-copy .mission p {
    margin-bottom: 0.7rem;
    font-size: clamp(0.92rem, 1.55vh + 0.35rem, 1.05rem);
    line-height: 1.55;
  }

  .page-home .home-copy .mission h1 {
    font-size: clamp(1.25rem, 2.2vh + 0.55rem, 1.7rem);
    margin-bottom: 0.5rem;
  }

  .page-home .home-copy .mission .lead {
    font-size: clamp(0.98rem, 1.4vh + 0.45rem, 1.12rem);
  }

  .page-home .home-copy .mission .closing {
    margin-top: 0.85rem;
    font-size: clamp(0.98rem, 1.3vh + 0.4rem, 1.08rem);
  }

  .page-home .home-media .video-block {
    gap: 0.65rem;
  }

  .page-home .home-media .video-frame {
    width: auto;
    max-width: min(100%, 22.5rem);
    max-height: 70vh;
    max-height: 70dvh;
  }

  .page-home .home-media .video-frame video {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 70vh;
    max-height: 70dvh;
  }

  .page-home .home-copy .card {
    padding: 1rem 1.15rem;
  }

  .page-home .site-footer {
    flex-shrink: 0;
    padding-block: clamp(0.65rem, 1.5vh, 1.15rem);
  }

  .page-home .site-footer .motto {
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
  }

  .page-home .site-footer .meta {
    font-size: 0.78rem;
  }

  @media (prefers-reduced-motion: no-preference) {
    .page-home .fade-in,
    .page-home .fade-in-delay {
      animation: fade-only 0.7s ease both;
    }

    .page-home .fade-in-delay {
      animation-delay: 0.12s;
    }
  }
}

@keyframes fade-only {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
