:root {
  --paper: #f5f0e6;
  --paper-light: #fbf9f4;
  --ink: #1f201f;
  --muted: #63635e;
  --line: #d7d0c3;
  /* TODO: 正式なブランドカラー決定後に見直す。公式色ではない。 */
  --fukuji-yellow: #edc84b;
  --content: 70rem;
  --narrow: 49rem;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  font-size: clamp(1rem, 0.96rem + 0.18vw, 1.125rem);
  line-height: 2;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 5px;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 1rem;
  transform: translateY(-160%);
  background: var(--ink);
  color: white;
}

.skip-link:focus {
  transform: translateY(0);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mobile-only-break {
  display: none;
}

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  display: flex;
  min-height: 4.5rem;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.55rem var(--gutter);
  border-bottom: 1px solid rgb(31 32 31 / 12%);
  background: rgb(245 240 230 / 92%);
  backdrop-filter: blur(12px);
}

.site-brand {
  display: block;
  flex: 0 0 auto;
  width: 4.75rem;
}

.site-brand img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.6vw, 2.5rem);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.desktop-nav a {
  position: relative;
  padding: 0.65rem 0;
  text-decoration: none;
}

.desktop-nav a::after {
  position: absolute;
  right: 0;
  bottom: 0.45rem;
  left: 0;
  height: 1px;
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  background: currentColor;
  transition: transform 300ms ease;
}

.desktop-nav a:hover::after,
.desktop-nav a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.mobile-nav {
  display: none;
}

.hero {
  position: relative;
  display: grid;
  min-height: calc(100svh - 4.5rem);
  grid-template-columns: minmax(0, 0.78fr) minmax(18rem, 1.22fr);
  align-items: center;
  gap: clamp(1rem, 3vw, 3rem);
  padding: clamp(3rem, 7vw, 6rem) var(--gutter) 5.5rem;
}

.hero-copy {
  z-index: 2;
  max-width: 32rem;
  justify-self: end;
}

.section-number {
  margin: 0 0 1.75rem;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.13em;
}

.hero-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-bottom: clamp(2.75rem, 6vw, 5rem);
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.hero-menu-label {
  width: 100%;
  margin: 0;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.13em;
}

.hero-menu a {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  border-bottom: 1px solid transparent;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.hero-menu a:hover,
.hero-menu a:focus-visible {
  border-bottom-color: currentColor;
}

.hero-logo {
  width: clamp(13rem, 27vw, 23rem);
  aspect-ratio: 1;
  margin-left: -8%;
  object-fit: contain;
}

.hero-statement {
  margin: 1.25rem 0 0;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(1.45rem, 2.4vw, 2.2rem);
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.9;
}

.hero-figure,
.ending-art {
  position: relative;
  margin: 0;
}

.hero-figure {
  width: min(100%, 42rem);
}

.transparent-art {
  background: transparent;
}

.hero-figure img,
.ending-art img {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
}

.yellow-disc {
  position: absolute;
  z-index: 0;
  top: 12%;
  left: 8%;
  width: 76%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--fukuji-yellow);
}

.scroll-cue {
  position: absolute;
  bottom: 1.7rem;
  left: var(--gutter);
  padding: 0.5rem 0;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-decoration: none;
}

.scroll-cue span {
  display: inline-block;
  margin-left: 0.65rem;
}

.section {
  padding: clamp(6.5rem, 12vw, 11rem) var(--gutter);
}

.section-inner {
  width: min(100%, var(--content));
  margin-inline: auto;
}

.section-inner.narrow {
  width: min(100%, var(--narrow));
}

.section h2,
.ending h2 {
  margin: 0;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(2.5rem, 6.5vw, 5.8rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.3;
}

.about {
  border-top: 1px solid var(--line);
  background: var(--paper-light);
}

.about-copy {
  margin-top: clamp(4rem, 8vw, 7rem);
}

.lead {
  margin: 0;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  line-height: 2.1;
}

.small-fortunes {
  display: grid;
  gap: 1.25rem;
  margin-top: 4.5rem;
  padding-left: clamp(0rem, 10vw, 8rem);
}

.small-fortunes p,
.quiet-word {
  margin: 0;
}

.quiet-word {
  margin-top: 5rem;
  color: var(--muted);
}

.key-phrase {
  margin: clamp(4.5rem, 10vw, 8rem) 0 0;
  padding: clamp(2.5rem, 6vw, 5rem) 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(2rem, 5vw, 4.4rem);
  font-weight: 600;
  line-height: 1.65;
}

.origin {
  background: var(--paper);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(8rem, 0.35fr) minmax(0, 1fr);
}

.section-heading .section-number {
  margin-top: 1rem;
}

.origin-intro {
  display: grid;
  max-width: 61rem;
  grid-template-columns: minmax(0, 1.1fr) minmax(13rem, 0.7fr);
  align-items: center;
  gap: clamp(2rem, 7vw, 7rem);
  margin: clamp(5rem, 10vw, 9rem) auto 0;
}

.art-frame {
  margin: 0;
  padding: clamp(0.6rem, 1.4vw, 1rem);
  border: 1px solid var(--line);
  background: white;
}

.art-frame img,
.timeline-art img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
}

.original-mask img {
  aspect-ratio: auto;
  object-fit: contain;
}

.origin-note {
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
}

.origin-note p {
  margin: 0.4rem 0;
}

.timeline {
  max-width: 55rem;
  margin: clamp(6rem, 12vw, 11rem) auto 0;
  padding: 0;
  list-style: none;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2.5rem);
  min-height: 13rem;
  padding-bottom: 5rem;
}

.timeline-item::before {
  position: absolute;
  top: 3.4rem;
  bottom: 0;
  left: 1.45rem;
  width: 1px;
  content: "";
  background: var(--line);
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-marker {
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.7rem;
}

.timeline h3 {
  margin: 0.1rem 0 1rem;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(1.45rem, 2.7vw, 2.2rem);
  line-height: 1.5;
}

.timeline p {
  margin: 0;
}

.timeline-with-art {
  grid-template-columns: 4rem minmax(0, 0.8fr) minmax(14rem, 0.6fr);
}

.timeline-art {
  margin: -3rem 0 3rem;
  padding: 0.6rem;
  border: 1px solid var(--line);
  background: white;
}

.timeline-final {
  min-height: 26rem;
}

.inline-logo {
  width: min(16rem, 80%);
  aspect-ratio: 1;
  margin-top: 1.5rem;
  object-fit: contain;
}

.meaning {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper-light);
}

.meaning .section-number {
  color: #b8b7af;
}

.meaning-lead {
  margin: clamp(4rem, 8vw, 7rem) 0 0 clamp(0rem, 20vw, 15rem);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(1.25rem, 2.4vw, 1.9rem);
}

.fortune-list {
  display: grid;
  max-width: 48rem;
  gap: 0;
  margin: clamp(5rem, 10vw, 8rem) 0 0 auto;
  padding: 0;
  border-top: 1px solid rgb(255 255 255 / 35%);
  list-style: none;
}

.fortune-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid rgb(255 255 255 / 35%);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(1.2rem, 2.4vw, 1.75rem);
}

.fortune-list span {
  color: #b8b7af;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", sans-serif;
  font-size: 0.72em;
}

.meaning-ending {
  margin: clamp(6rem, 12vw, 11rem) 0 0;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(2rem, 5vw, 4.4rem);
  font-weight: 600;
  line-height: 1.6;
  text-align: center;
}

.today {
  background: var(--fukuji-yellow);
}

.today .section-number {
  color: #555040;
}

.today-intro {
  margin: clamp(4rem, 8vw, 7rem) 0 0;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(1.25rem, 2.5vw, 1.9rem);
}

.examples {
  display: grid;
  gap: 1.25rem;
  margin: 4rem 0 0 clamp(0rem, 12vw, 8rem);
}

.examples p {
  margin: 0;
}

.acceptance {
  margin: clamp(5rem, 10vw, 9rem) 0 0;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(2rem, 5.5vw, 4.6rem);
  font-weight: 600;
  line-height: 1.55;
}

.take-fukuji {
  background: var(--paper-light);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: clamp(5rem, 10vw, 8rem);
}

.product-card {
  display: flex;
  min-height: 25rem;
  flex-direction: column;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border: 1px solid var(--ink);
  background: var(--paper-light);
}

.product-number {
  margin: 0 0 auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.7rem;
}

.product-card h3 {
  margin: 4rem 0 0.6rem;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
}

.product-card > p:not(.product-number) {
  margin: 0;
  color: var(--muted);
}

.status {
  align-self: flex-start;
  margin-top: 2.5rem;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10rem;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
}

.ending {
  padding: clamp(8rem, 15vw, 14rem) var(--gutter) clamp(7rem, 12vw, 11rem);
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.ending-inner {
  width: min(100%, 57rem);
  margin: auto;
  text-align: center;
}

.ending-art {
  width: min(100%, 38rem);
  margin: 2rem auto clamp(5rem, 10vw, 9rem);
}

.ending-art .yellow-disc {
  top: 9%;
  left: 12%;
  width: 76%;
}

.ending h2 {
  font-size: clamp(1.7rem, 4vw, 3.5rem);
  font-weight: 600;
  line-height: 1.9;
}

.ending-logo {
  width: 8rem;
  aspect-ratio: 1;
  margin: 5rem auto 0;
  object-fit: contain;
}

.site-footer {
  display: flex;
  min-height: 7rem;
  align-items: center;
  justify-content: center;
  padding: 1.5rem var(--gutter);
  border-top: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}

.site-footer p {
  margin: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(1.1rem);
  transition: opacity 900ms ease, transform 900ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 52rem) {
  .desktop-nav {
    display: none;
  }

  .mobile-nav {
    position: relative;
    display: block;
  }

  .mobile-nav summary {
    min-width: 4.75rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid var(--ink);
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 700;
    list-style: none;
    text-align: center;
  }

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

  .mobile-nav[open] nav {
    position: absolute;
    top: calc(100% + 0.7rem);
    right: 0;
    display: grid;
    width: min(17rem, calc(100vw - 2.5rem));
    padding: 0.75rem;
    border: 1px solid var(--ink);
    background: var(--paper-light);
    box-shadow: 0 1rem 2.5rem rgb(31 32 31 / 15%);
  }

  .mobile-nav nav a {
    min-height: 2.75rem;
    padding: 0.55rem 0.7rem;
    border-bottom: 1px solid var(--line);
    font-size: 0.85rem;
    text-decoration: none;
  }

  .mobile-nav nav a:last-child {
    border-bottom: 0;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 3.2rem;
  }

  .hero-copy {
    max-width: none;
    justify-self: stretch;
  }

  .hero-logo {
    width: clamp(11rem, 48vw, 15rem);
    margin-left: -4%;
  }

  .hero-statement {
    margin-top: 1rem;
  }

  .hero-figure {
    width: min(100%, 34rem);
    margin: 1rem auto 0;
  }

  .scroll-cue {
    position: static;
    grid-column: 1;
    justify-self: start;
    margin-top: 0.5rem;
  }

  .section-heading {
    display: block;
  }

  .origin-intro {
    grid-template-columns: 1fr;
  }

  .origin-note {
    padding-left: 12vw;
  }

  .timeline-with-art {
    grid-template-columns: 4rem minmax(0, 1fr);
  }

  .timeline-art {
    grid-column: 2;
    width: min(100%, 25rem);
    margin: 1.5rem 0 3rem;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .product-card {
    min-height: 18rem;
  }
}

@media (max-width: 34rem) {
  .mobile-only-break {
    display: initial;
  }

  .site-header {
    min-height: 4rem;
  }

  .site-brand {
    width: 4rem;
  }

  .hero-menu {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.25rem 1rem;
  }

  .hero-menu-label {
    grid-column: 1 / -1;
  }

  .hero {
    min-height: calc(100svh - 4rem);
    gap: 0;
    padding-bottom: 2.25rem;
  }

  .hero-figure {
    width: min(100%, 26rem);
  }

  .small-fortunes,
  .examples {
    padding-left: 0;
    margin-left: 0;
  }

  .timeline-item,
  .timeline-with-art {
    grid-template-columns: 3.2rem minmax(0, 1fr);
    gap: 0.85rem;
  }

  .timeline-marker {
    width: 2.6rem;
    height: 2.6rem;
  }

  .timeline-item::before {
    top: 3rem;
    left: 1.28rem;
  }

  .timeline-art {
    grid-column: 2;
  }

  .fortune-list li {
    display: grid;
    gap: 0.2rem;
  }

}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
