/* KOMOREBI CAFE MENU */

:root {
  --bg: #ebe6dc;
  --paper: #f7f3ec;
  --ink: #2f2a26;
  --ink-soft: #5c534b;
  --mute: #8a8178;
  --line: #d5cdc0;
  --accent: #5e5348;

  --font-display: "Kaisei Decol", "Hiragino Mincho ProN", serif;
  --font-body: "Zen Maru Gothic", "Hiragino Sans", sans-serif;

  --header-h: 3.4rem;
  --container: min(72rem, calc(100% - 2rem));
  --ease-soft: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 3.25rem);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 90% 55% at 0% 0%, rgba(214, 198, 168, 0.55), transparent 58%),
    radial-gradient(ellipse 70% 50% at 100% 8%, rgba(186, 198, 168, 0.28), transparent 52%),
    radial-gradient(ellipse 60% 40% at 70% 100%, rgba(198, 178, 148, 0.32), transparent 55%),
    radial-gradient(circle at 18% 42%, rgba(120, 100, 70, 0.045) 0 18%, transparent 19%),
    radial-gradient(circle at 72% 28%, rgba(120, 100, 70, 0.035) 0 12%, transparent 13%),
    radial-gradient(circle at 88% 68%, rgba(100, 90, 70, 0.04) 0 22%, transparent 23%),
    radial-gradient(circle at 32% 78%, rgba(110, 95, 70, 0.03) 0 15%, transparent 16%),
    linear-gradient(180deg, #f0ebe3 0%, #ebe6dc 45%, #e7e1d6 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* 木漏れ日の葉影のような柔らかい模様 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220'%3E%3Cg fill='%235e5348' fill-opacity='0.06'%3E%3Cellipse cx='40' cy='50' rx='18' ry='10' transform='rotate(-25 40 50)'/%3E%3Cellipse cx='78' cy='38' rx='14' ry='8' transform='rotate(15 78 38)'/%3E%3Cellipse cx='62' cy='72' rx='16' ry='9' transform='rotate(-5 62 72)'/%3E%3Cellipse cx='150' cy='140' rx='20' ry='11' transform='rotate(20 150 140)'/%3E%3Cellipse cx='180' cy='120' rx='12' ry='7' transform='rotate(-30 180 120)'/%3E%3Cellipse cx='30' cy='170' rx='15' ry='8' transform='rotate(40 30 170)'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 220px 220px;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 1000;
  padding: 0.5rem 0.9rem;
  background: var(--accent);
  color: #fff;
  font-size: 0.85rem;
}

.skip-link:focus {
  top: 1rem;
}

.container {
  width: var(--container);
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(243, 238, 230, 0.9);
  border-bottom: 1px solid transparent;
  transition: background 0.35s var(--ease-soft), border-color 0.35s var(--ease-soft), box-shadow 0.35s var(--ease-soft);
  animation: fade-in 0.8s var(--ease-soft) both;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(247, 243, 236, 0.96);
  box-shadow: 0 1px 0 rgba(94, 83, 72, 0.04);
}

.site-header__inner {
  width: var(--container);
  margin-inline: auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
}

.site-logo {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: 0.18em;
  color: var(--accent);
  transition: opacity 0.25s ease;
}

.site-logo:hover,
.site-logo:focus-visible {
  opacity: 0.72;
}

/* Hero */
.hero {
  position: relative;
  min-height: min(62svh, 28rem);
  display: grid;
  align-items: end;
  isolation: isolate;
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  animation: hero-ken 2.4s var(--ease-soft) both;
}

.hero__img.is-fallback {
  opacity: 0;
  animation: none;
}

.hero__media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #ddd4c6;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(47, 42, 38, 0.08) 0%,
      rgba(47, 42, 38, 0.28) 45%,
      rgba(47, 42, 38, 0.55) 100%
    );
  animation: fade-in 1.4s var(--ease-soft) both;
}

.hero__content {
  width: var(--container);
  margin-inline: auto;
  padding: 4rem 0 2.25rem;
  color: #f7f4ef;
}

@media (min-width: 640px) {
  .hero__content {
    padding-left: clamp(1.5rem, 10vw, 6rem);
  }
}

.hero__brand {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  margin-bottom: 0.55rem;
  opacity: 0.9;
  animation: fade-up 0.95s var(--ease-soft) 0.15s both;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 7vw, 2.8rem);
  letter-spacing: 0.06em;
  line-height: 1.2;
  margin-bottom: 0.7rem;
  animation: fade-up 0.95s var(--ease-soft) 0.28s both;
}

.hero__catch {
  font-size: 0.98rem;
  letter-spacing: 0.04em;
  margin-bottom: 1.25rem;
  opacity: 0.92;
  animation: fade-up 0.95s var(--ease-soft) 0.4s both;
}

.hero__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.88rem;
  letter-spacing: 0.03em;
  animation: fade-up 0.95s var(--ease-soft) 0.52s both;
}

.hero__links a {
  border-bottom: 1px solid rgba(247, 244, 239, 0.55);
  padding-bottom: 0.1rem;
  transition: opacity 0.2s ease;
}

.hero__links a:hover,
.hero__links a:focus-visible {
  opacity: 0.75;
}

.hero__links span {
  opacity: 0.45;
}

/* Category nav */
.menu-nav {
  position: sticky;
  top: var(--header-h);
  z-index: 90;
  background: rgba(243, 238, 230, 0.94);
  border-bottom: 1px solid var(--line);
  animation: fade-in 0.7s var(--ease-soft) 0.45s both;
}

.menu-nav__links {
  display: flex;
  justify-content: center;
  gap: 0;
  min-height: 3rem;
  max-width: 28rem;
  margin-inline: auto;
}

.menu-nav__link {
  flex: 1;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.menu-nav__link:hover,
.menu-nav__link:focus-visible,
.menu-nav__link.is-active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

/* Sections */
.section {
  padding: 2rem 0 0.75rem;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.15rem;
  letter-spacing: 0.12em;
  margin-bottom: 0.85rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--line);
  color: var(--accent);
}

/* Menu list — スマホはコンパクトな横並び */
.menu-list {
  display: grid;
  gap: 0;
}

.menu-item {
  display: grid;
  grid-template-columns: 4.25rem 1fr;
  align-items: start;
  gap: 0.7rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}

.menu-item:first-child {
  padding-top: 0;
}

.menu-item__photo {
  position: relative;
  display: block;
  width: 4.25rem;
  aspect-ratio: 1;
  overflow: hidden;
  background: #e0d8cc;
  transition: opacity 0.25s ease;
}

.menu-item__photo:hover,
.menu-item__photo:focus-visible {
  opacity: 0.92;
}

.menu-item__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.65s var(--ease-soft);
}

.menu-item__photo:hover img,
.menu-item__photo:focus-visible img {
  transform: scale(1.05);
}

.menu-item__photo img.is-fallback {
  opacity: 0;
}

.menu-item__text {
  min-width: 0;
  padding-top: 0.05rem;
}

.menu-item__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.1rem;
}

.menu-item__name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  line-height: 1.35;
}

.menu-item__price {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  color: var(--accent);
}

.menu-item__en {
  font-size: 0.65rem;
  letter-spacing: 0.03em;
  color: var(--mute);
  margin-bottom: 0.2rem;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-item__desc {
  font-size: 0.74rem;
  color: var(--ink-soft);
  line-height: 1.45;
  max-width: 36rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* Lightbox */
.lightbox {
  padding: 0;
  border: 0;
  background: transparent;
  max-width: min(56rem, calc(100vw - 1.5rem));
  max-height: calc(100vh - 2rem);
}

.lightbox[open] {
  animation: fade-in 0.28s var(--ease-soft) both;
}

.lightbox::backdrop {
  background: rgba(40, 34, 28, 0.72);
}

.lightbox[open]::backdrop {
  animation: fade-in 0.28s var(--ease-soft) both;
}

.lightbox__inner {
  position: relative;
  background: #f7f3ec;
  padding: 1rem;
}

.lightbox[open] .lightbox__inner {
  animation: fade-up 0.4s var(--ease-soft) both;
}

.lightbox__close {
  position: absolute;
  top: 0.35rem;
  right: 0.5rem;
  z-index: 2;
  width: 2.4rem;
  height: 2.4rem;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--ink-soft);
}

.lightbox__close:hover,
.lightbox__close:focus-visible {
  color: var(--ink);
}

.lightbox__img {
  width: 100%;
  max-height: min(78vh, 52rem);
  object-fit: contain;
  background: #e8e2d7;
}

.lightbox__caption {
  margin-top: 0.75rem;
  text-align: center;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--accent);
}

/* Note / Footer */
.note {
  padding: 2rem 0 1.5rem;
}

.note p {
  font-size: 0.74rem;
  color: var(--mute);
  text-align: center;
  line-height: 1.7;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2rem;
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  text-align: center;
  font-family: var(--font-display);
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.site-footer__copy {
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0;
  color: var(--mute);
}

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

@media (min-width: 640px) {
  .section {
    padding: 2.75rem 0 1.25rem;
  }

  .section-title {
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.6rem;
  }

  .menu-item {
    grid-template-columns: 13rem 1fr;
    gap: 1.5rem;
    padding: 1.65rem 0;
  }

  .menu-item__photo {
    width: 100%;
  }

  .menu-item__name {
    font-size: 1.12rem;
    line-height: 1.45;
  }

  .menu-item__price {
    font-size: 1.05rem;
  }

  .menu-item__en {
    font-size: 0.75rem;
    margin-bottom: 0.55rem;
    white-space: normal;
  }

  .menu-item__desc {
    font-size: 0.88rem;
    line-height: 1.75;
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
  }
}

@media (min-width: 768px) {
  :root {
    --container: min(88rem, calc(100% - 2.5rem));
    --header-h: 3.6rem;
  }

  .hero {
    min-height: min(58svh, 28rem);
  }

  .hero__content {
    padding: 4.5rem 0 2.75rem;
    padding-left: clamp(2.5rem, 14vw, 12rem);
  }

  .section {
    padding: 3.75rem 0 1.75rem;
  }

  .section-title {
    font-size: 1.35rem;
    margin-bottom: 1.75rem;
    padding-bottom: 0.7rem;
  }

  .menu-item {
    grid-template-columns: 15rem 1fr;
    gap: 1.85rem;
  }

  .site-footer__inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

@media (min-width: 1024px) {
  :root {
    --container: min(100rem, calc(100% - 2rem));
  }

  .hero__content {
    padding-left: clamp(3rem, 16vw, 14rem);
  }

  .menu-list {
    grid-template-columns: 1fr 1fr;
    gap: 0 4rem;
    column-gap: 4.5rem;
  }

  .menu-item {
    grid-template-columns: 12.5rem 1fr;
    gap: 1.5rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--line);
  }

  .menu-item:nth-child(-n + 2) {
    padding-top: 0;
  }

  .lightbox__inner {
    padding: 1.25rem;
  }
}

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

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

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

/* スクロール出現 */
.reveal {
  opacity: 0;
  transform: translateY(0.9rem);
  transition:
    opacity 0.75s var(--ease-soft),
    transform 0.75s var(--ease-soft);
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

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

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

@keyframes hero-ken {
  from {
    opacity: 0.35;
    transform: scale(1.06);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
