/* ===== layout.css ===== */

/* Header */


/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand__mark {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.brand__tag {
  font-size: 12px;
  letter-spacing: .16em;
  color: #1f2937;
}

.brand__name {
  font-family: "Montserrat", "Noto Sans JP", sans-serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: .02em;
}

/* Falling letters canvas */
.letters {
  position: fixed;
  inset: 0;
  /* Put letters above images across the whole screen */
  z-index: 9999;
  /* Higher than everything except maybe modals/header */
  pointer-events: none;
  opacity: .35;
  /* Make more visible */
}

/* Layout */
/* Layout */
/* Layout */
/* Layout */
/* Layout */
.layout {
  position: relative;
  z-index: 2;
  display: grid;
  /* Sides flexible, Center fixed width */
  grid-template-columns: 1fr 620px 1fr;
  width: 100%;
  min-height: 100vh;
  /* Allow growth */
  margin: 0;
  padding-top: 78px;
  /* Pushed down by header */
  gap: 0;
  box-sizing: border-box;
}

/* Header adjust */
.siteHeader {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  height: 78px;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(15, 23, 42, .08);
  z-index: 50;
  pointer-events: auto;
}

.siteHeader__inner {
  width: min(100%, 1400px);
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Side panels */
.side {
  position: sticky;
  /* Sticky position */
  top: 78px;
  /* Stick below header */
  height: calc(100vh - 78px);
  /* Full height minus header */
  border-radius: 0;
  overflow: hidden;
  /* Fill the grid area */
}

.side__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

/* Right Paper BG fixed to 1.png as requested (Texture mode) */
.side__bg--paper {
  background-image: url('../picture/1.png') !important;
  background-size: 140px !important;
  background-repeat: repeat !important;
  background-position: center;
  opacity: 1;
}



/* Right panel adjustment */
.side--right {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.side--right .side__bg {
  opacity: 1;
  background-repeat: no-repeat;
}

/* Left mini contact */
.contactMini {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 24px;
  max-width: 280px;
  margin: 0 auto;
  padding: 18px 16px 16px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(15, 23, 42, .12);
  box-shadow: var(--shadowSm);
  border-radius: 12px;
  z-index: 10;
}

.contactMini__title {
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  letter-spacing: .12em;
  font-size: 14px;
}

.contactMini__list {
  margin: 10px 0 14px;
  padding: 0 0 0 16px;
  color: #334155;
  font-size: 13px;
  line-height: 1.7;
}

/* Right menu wrapper */
.rightBlock {
  position: relative;
  padding: 100px 24px 20px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  /* Grow to fill space */
  overflow-y: auto;
  /* Scroll if needed */
  scrollbar-width: none;
}

.rightBlock::-webkit-scrollbar {
  display: none;
}

.rightBlock__title {
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  letter-spacing: .12em;
  color: var(--navy);
  font-size: 14px;
  margin-bottom: 20px;
}

/* Modern Menu Card Design */
.menuGrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 320px;
  counter-reset: menu-item;
  /* Initialize counter */
}

/* Card Container - Book Style */
.menuCard {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 90px;
  border-radius: 8px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 2px solid #f59e0b;
  box-shadow:
    0 6px 0 0 #d97706,
    0 8px 12px rgba(0, 0, 0, 0.15);
  text-decoration: none;
  overflow: visible;
  transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
  counter-increment: menu-item;
  transform: translateY(0);
}

/* Corner Ribbon Decoration */
.menuCard::before {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 24px 24px 0;
  border-color: transparent #f59e0b transparent transparent;
  transition: border-color 0.3s ease;
  z-index: 3;
}

/* Inner content wrapper */
.menuCard__inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}

/* Label styling - Book Title */
.menuCard__label {
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.06em;
  color: #78350f;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
  transition: transform 0.2s ease, color 0.2s ease;
  position: relative;
  z-index: 2;
}

/* Page Edge Effect */
.menuCard::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 4px;
  bottom: 4px;
  width: 3px;
  background: repeating-linear-gradient(to bottom,
      #f59e0b 0px,
      #f59e0b 2px,
      transparent 2px,
      transparent 4px);
  opacity: 0.4;
  transition: opacity 0.3s ease;
}

/* Hover Effects - Book Lift */
.menuCard:hover,
.menuCard:focus-visible {
  transform: translateY(-3px);
  box-shadow:
    0 9px 0 0 #d97706,
    0 12px 20px rgba(0, 0, 0, 0.2);
  background: linear-gradient(135deg, #fef9c3 0%, #fef08a 100%);
  border-color: #f59e0b;
}

.menuCard:hover::after {
  opacity: 0.6;
}

.menuCard:hover .menuCard__label {
  color: #92400e;
  transform: scale(1.03);
}

.menuCard:hover::before {
  border-color: transparent #ea580c transparent transparent;
}

/* Active State - Selected Book */
.menuCard.is-active:not(.is-locked) {
  background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
  border-color: #ea580c;
  box-shadow:
    0 6px 0 0 #c2410c,
    0 8px 12px rgba(234, 88, 12, 0.3);
}

.menuCard.is-active:not(.is-locked) .menuCard__label {
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.menuCard.is-active:not(.is-locked)::before {
  border-color: transparent #dc2626 transparent transparent;
}

.menuCard.is-active:not(.is-locked)::after {
  opacity: 0.8;
}

/* Deprecated/Hidden structures for this design */
.menuCard__face,
.menuCard__face--front,
.menuCard__face--back,
.menuCard__hint {
  display: contents;
}

.menuCard__face--back {
  display: none;
}

.menuCard__face--front {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

/* Ghost/Locked */
.menuCard--ghost {
  opacity: 0;
  pointer-events: none;
}

.menuCard.is-locked {
  pointer-events: none;
  filter: grayscale(1);
  opacity: 0.5;
}

/* Unlock Animation */
.menuCard.just-unlocked {
  animation: slideUpFade 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.gallery {
  position: relative;
  /* Reset absolute */
  inset: auto;
  width: 280px;
  margin: 0 auto 24px;
  background: rgba(255, 255, 255, .9);
  padding: 16px;
  border-radius: 16px;
  box-shadow: var(--shadowSm);
  flex-shrink: 0;
  z-index: 5;
}

.gallery__title {
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  letter-spacing: .12em;
  color: var(--navy);
  font-size: 12px;
  margin-bottom: 10px;
  text-align: center;
}

.gallery__thumbs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.gallery__thumbs img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
}

.gallery__thumbs img:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 2;
  position: relative;
}

/* Scroll Indicator */
.scrollIndicator {
  position: absolute;
  left: 44px;
  bottom: 0px;
  /* Aligned to bottom */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 20;
}

.scrollIndicator__text {
  font-family: "Montserrat", sans-serif;
  font-size: 11px;
  letter-spacing: .15em;
  color: #fff;
  writing-mode: vertical-rl;
}

.scrollIndicator__bar {
  width: 1px;
  height: 60px;
  background: rgba(255, 255, 255, 0.4);
  position: relative;
  overflow: hidden;
}

.scrollIndicator__bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  animation: scrollDown 2s cubic-bezier(0.77, 0, 0.175, 1) infinite;
}

@keyframes scrollDown {
  0% {
    transform: translateY(-100%);
  }

  100% {
    transform: translateY(100%);
  }
}


/* Center */
.center {
  position: relative;
  overflow: visible;
  /* Allow overflow */
  border-radius: 0;
  z-index: 10;
  background: #fff;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.1);
  /* Shadow on wrapper */
  min-height: 100%;
}

.centerScroll {
  height: auto;
  /* Auto height */
  overflow: visible;
  /* Soft shadow for center */
  border-radius: 0;
}

/* Remove scrollbar styles from centerScroll as it's no longer scrolling */
.centerScroll::-webkit-scrollbar {
  display: none;
}

/* Responsive Fixes */
/* Mobile CTA Base Style (Hidden on Desktop) */
.hero-cta-mobile {
  display: none !important;
}

/* Float Area (Fixed Bottom Right for Desktop Back-to-Top) */
.floatCta {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: none;
  /* Let clicks pass through if empty */
}

/* Hide Floating LINE button on Desktop */
.floatCta__btn {
  display: none !important;
}

/* Ensure BackTop is visible on Desktop */
.backToTop {
  display: flex;
  /* Global flex */
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  /* Clickable */
  width: 50px;
  height: 50px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-radius: 50%;
  color: var(--navy);
  font-size: 24px;
  font-weight: 700;
  cursor: pointer;
  opacity: 0;
  /* Hidden until scroll */
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.backToTop.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.backToTop:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Responsive Fixes - Breakpoint changed to 1120px */
/* Responsive Fixes - Moved to responsive.css to prevent conflicts */
/* See css/responsive.css for 1120px and 480px breakpoints */

/* --- Site Footer --- */
/* --- Site Footer --- */
.siteFooter {
  width: 100%;
  background-color: #111827;
  color: #f3f4f6;
  padding: 30px 20px 20px;
  /* Reduced vertical padding by half */
  position: relative;
  z-index: 100;
}

.siteFooter__inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  /* Reduced gap from 32px to 16px */
}

.siteFooter__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  /* Reduced gap */
}

.siteFooter__logo {
  width: 40px;
  /* Slightly smaller logo */
  height: 40px;
  object-fit: contain;
}

.siteFooter__name {
  font-size: 14px;
  /* Slightly smaller text */
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #fff;
}

.siteFooter__sns {
  display: flex;
  gap: 16px;
  /* Reduced gap */
  margin: 8px 0;
  /* Add slight margin */
}

.snsIcon {
  width: 40px;
  height: 40px;
  display: block;
  transition: opacity 0.3s ease, transform 0.3s ease;
  background: transparent;
  flex-shrink: 0;
}

.snsIcon:hover {
  transform: translateY(-2px);
  opacity: 0.8;
}

.snsIcon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.siteFooter__links {
  display: flex;
  gap: 20px;
  list-style: none;
  padding: 0;
  flex-wrap: wrap;
  justify-content: center;
}

.siteFooter__links a {
  color: #9ca3af;
  font-size: 12px;
  text-decoration: none;
  transition: color 0.3s;
}

.siteFooter__links a:hover {
  color: #fff;
  text-decoration: underline;
}

.siteFooter__copy {
  color: #6b7280;
  font-size: 11px;
  margin-top: 8px;
  /* Reduced margin */
  text-align: center;
}

/* Mobile 480px */
@media (max-width: 480px) {
  .siteHeader__inner {
    padding: 0 16px;
  }

  /* Hide CTA on mobile to prevent overlap */
  .siteHeader .btn--line {
    display: none !important;
  }

  .brand__text {
    display: none;
  }

  .brand__mark {
    width: 36px;
    height: 36px;
  }

  .heroTitle {
    font-size: 24px;
  }

  .center {
    overflow-x: hidden;
    width: 100%;
    padding-top: 40px;
  }

  .layout {
    overflow-x: hidden;
    margin-left: auto;
    margin-right: auto;
  }

  /* Fix horizontal overflow */
  .reasonCard__box,
  .tapGrid,
  .plans,
  .contactForm {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
  }

  /* Tap Cards - Keep 3 columns even on mobile */
  .tapGrid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px;
  }

  .tapCard__inner {
    min-height: 80px;
    padding: 8px;
  }

  .tapCard__front {
    font-size: 11px;
    /* Smaller font */
  }

  .tapCard__icon {
    font-size: 20px;
    margin-bottom: 4px;
  }

  .scrollIndicator {
    display: none;
  }
}