/* ─────────────────────────────────────────
   shared.css — しのぱん 共通スタイル
───────────────────────────────────────── */

/* ── Tokens ── */
:root {
  --linen: oklch(91% 0.025 78);
  --linen-dark: #f0ede9;
  --warm-white: oklch(98% 0.008 76);
  --ink: oklch(26% 0.020 65);
  --ink-mid: oklch(48% 0.018 68);
  --ink-light: oklch(68% 0.015 70);
  --rule: oklch(88% 0.018 75);
  --accent: oklch(57% 0.085 50);
  --accent-lt: #f5f5f5;

  --left-w: 42%;
  --content-max: 640px;
  --sans: 'Noto Sans JP', sans-serif;
  --serif: 'Noto Serif JP', serif;
}

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

html,
body {
  height: 100%;
  font-size: 15px;
  background: var(--warm-white);
  font-family: var(--sans);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* ── Layout shell ── */
.shell {
  display: flex;
  height: 100vh;
  overflow: visible;
}

/* ══════════════════════════════════════
   LEFT PANEL
══════════════════════════════════════ */
.left {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--left-w);
  height: 100vh;
  background: var(--linen);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  z-index: 10;
}

/* Scene illustration */
.scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}

.scene svg,
.scene img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(0.15) saturate(0.9) brightness(0.95);
}

/* Retro overlay: grain + vignette + warm tone */
.scene::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse 100% 100% at 50% 50%,
      transparent 40%,
      oklch(20% 0.02 65 / 0.45) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.08'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
  pointer-events: none;
}

/* Scene transitions */
.scene-cafe {
  opacity: 0;
  pointer-events: none;
}

.left.cafe-mode .scene-cafe {
  opacity: 1;
}

.left.cafe-mode #scene-desk {
  opacity: 0;
}

/* Text overlay */
.left-content {
  position: relative;
  z-index: 2;
  padding: 3rem 3.2rem 3.5rem;
}

.site-title-link {
  text-decoration: none;
}

.site-title {
  font-family: var(--sans);
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  line-height: 1.3;
  color: var(--accent-lt);
  margin-bottom: 0.6rem;
  letter-spacing: 0.08em;
  font-weight: 500;
}

.site-sub {
  font-size: 0.88rem;
  color: var(--accent-lt);
  line-height: 1.8;
  letter-spacing: 0.12em;
  padding-left: 0.45em;
}

/* ── Nav dots (left panel) ── */
.nav-dots {
  position: absolute;
  right: 1.6rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  z-index: 3;
}

.nav-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink-light);
  opacity: 0.35;
  cursor: pointer;
  transition: opacity 0.3s, background 0.3s, transform 0.3s;
}

.nav-dot.active {
  background: #888;
  opacity: 0.9;
  transform: scale(1.3);
}

/* ══════════════════════════════════════
   RIGHT PANEL
══════════════════════════════════════ */
.right {
  margin-left: var(--left-w);
  width: calc(100% - var(--left-w));
  height: 100vh;
  overflow-y: auto;
  background: #fff;
  scroll-behavior: smooth;
}

.right::-webkit-scrollbar {
  width: 4px;
}

.right::-webkit-scrollbar-track {
  background: transparent;
}

.right::-webkit-scrollbar-thumb {
  background: var(--rule);
  border-radius: 2px;
}

/* ── Right header ── */
.right-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
  padding: 0 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  transform: translateY(0);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.35s ease;
  will-change: transform;
}

.right-header.hidden {
  transform: translateY(-100%);
  box-shadow: none;
}

.right-header.scrolled {
  box-shadow: 0 1px 16px oklch(26% 0.02 65 / 0.06);
}

.rh-logo {
  height: 32px;
  width: auto;
  display: block;
  object-fit: contain;
  opacity: 0.85;
}

.rh-title {
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--ink);
  letter-spacing: 0.1em;
}

.rh-nav {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.rh-nav a {
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  color: var(--ink-light);
  text-decoration: none;
  transition: color 0.2s;
}

.rh-nav a:hover,
.rh-nav a.active {
  color: var(--accent);
}

/* ── Content ── */
.content {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 2.5rem;
}

/* ── Section base ── */
.section {
  padding: 6rem 0;
  border-bottom: 1px solid var(--rule);
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.75s ease, transform 0.75s ease;
  scroll-margin-top: 52px;
}

.section.visible {
  opacity: 1;
  transform: translateY(0);
}

.section:last-child {
  border-bottom: none;
}

/* Section label */
.sec-label {
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.28em;
  color: var(--accent);
  margin-bottom: 2.2rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.sec-label::after {
  content: '';
  display: block;
  width: 1.8rem;
  height: 1px;
  background: var(--accent);
  opacity: 0.5;
}

/* ── Contact form ── */
.contact-text {
  font-weight: 400;
  font-size: 1.05rem;
  line-height: 2.2;
  color: #333;
  margin-bottom: 2.8rem;
  letter-spacing: 0.04em;
  text-wrap: pretty;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: #333;
}

.form-input,
.form-textarea {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1.02rem;
  color: #333;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--rule);
  padding: 0.75rem 0;
  outline: none;
  letter-spacing: 0.04em;
  transition: border-color 0.25s;
  width: 100%;
  resize: none;
}

.form-input:focus,
.form-textarea:focus {
  border-color: #888;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #aaa;
  font-weight: 400;
}

.form-textarea {
  min-height: 100px;
}

.form-note {
  font-size: 0.85rem;
  font-weight: 400;
  color: #333;
  line-height: 1.8;
  letter-spacing: 0.05em;
}

.form-submit {
  align-self: flex-start;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.92rem;
  letter-spacing: 0.18em;
  color: #333;
  background: transparent;
  border: 1px solid #bbb;
  padding: 0.85rem 2.2rem;
  cursor: pointer;
  transition: border-color 0.25s, color 0.25s, background 0.25s;
  margin-top: 0.4rem;
}

.form-submit:hover {
  border-color: #666;
  color: #666;
  background: #f5f5f5;
}

.wpcf7-form-control-wrap .wpcf7-form-control.wpcf7-text,
.wpcf7-form-control-wrap .wpcf7-form-control.wpcf7-email {
  border: 1px solid var(--rule);
}

.wpcf7-form-control-wrap .wpcf7-form-control.wpcf7-textarea {
  border: 1px solid var(--rule);

}

.wpcf7-form-control.wpcf7-submit {
  /* .form-submit と同等のスタイル */
}

/* ── Consult button ── */
.btn-consult {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.92rem;
  letter-spacing: 0.18em;
  color: #333;
  background: var(--linen);
  border: 1px solid #bbb;
  padding: 0.85rem 2.2rem;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.25s, color 0.25s;
}

.btn-consult:hover {
  border-color: #888;
  color: #555;
}

/* ── Page title (sub-pages) ── */
.page-title {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
  font-weight: 300;
  line-height: 1.6;
  letter-spacing: 0.04em;
  color: var(--ink);
  margin-bottom: 2.4rem;
}

/* ── Footer ── */
.footer {
  padding: 2rem 0 2rem;
  font-size: 0.82rem;
  font-weight: 400;
  color: #333;
  letter-spacing: 0.12em;
}

/* ── Back to top ── */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 30;
  width: 44px;
  height: 44px;
  background: #fff;
  border: 1px solid oklch(88% 0.018 75);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease, border-color 0.2s;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  border-color: #999;
}

.back-to-top svg {
  width: 16px;
  height: 16px;
  stroke: #555;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Burger button ── */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 30;
}

.burger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: #333;
  transition: transform 0.3s, opacity 0.3s;
  transform-origin: center;
}

.burger.open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.burger.open span:nth-child(2) {
  opacity: 0;
}

.burger.open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ── Drawer ── */
.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.18);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.drawer-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(80vw, 300px);
  height: 100%;
  background: #fff;
  z-index: 50;
  transform: translateX(100%);
  transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  padding: 5rem 2.4rem 3rem;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.08);
}

.drawer.open {
  transform: translateX(0);
}

.drawer-close {
  position: absolute;
  top: 1.2rem;
  right: 1.4rem;
  background: none;
  border: none;
  font-size: 1.1rem;
  color: #999;
  cursor: pointer;
  padding: 0.3rem;
  line-height: 1;
  transition: color 0.2s;
}

.drawer-close:hover {
  color: #333;
}

.drawer-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.drawer-nav li {
  border-bottom: 1px solid #f0ede9;
}

.drawer-nav a {
  display: block;
  padding: 1.1rem 0;
  font-size: 0.92rem;
  font-weight: 400;
  color: #333;
  text-decoration: none;
  letter-spacing: 0.1em;
  transition: color 0.2s, padding-left 0.2s;
}

.drawer-nav a:hover {
  color: var(--accent);
  padding-left: 0.5rem;
}

/* ══════════════════════════════════════
   RESPONSIVE — モバイル
══════════════════════════════════════ */
@media (max-width: 768px) {
  html {
    overflow-x: hidden;
  }

  .shell {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }

  .left {
    position: relative;
    width: 100%;
    height: 55vw;
    min-height: 220px;
    max-height: 340px;
    justify-content: flex-end;
  }

  .left-content {
    padding: 1.8rem 1.8rem 2rem;
  }

  .site-title {
    font-size: 1.5rem;
  }

  .site-sub {
    font-size: 0.82rem;
  }

  .nav-dots {
    display: none;
  }

  .right {
    margin-left: 0;
    width: 100%;
    height: auto;
    overflow-y: visible;
  }

  .right-header {
    position: sticky;
    top: 0;
  }

  .rh-nav {
    gap: 1.2rem;
    display: none;
  }

  .rh-nav a {
    font-size: 0.72rem;
  }

  .content {
    padding: 0 1rem;
  }

  .section {
    padding: 3.5rem 0;
  }

  .back-to-top {
    bottom: 1.4rem;
    right: 1.4rem;
  }

  .burger {
    display: flex;
  }

  .drawer-overlay {
    display: block;
  }
}

@media (max-width: 480px) {
  .left {
    height: 65vw;
    max-height: 280px;
  }

  .rh-nav {
    gap: 0.8rem;
  }

  .rh-nav li:nth-child(3),
  .rh-nav li:nth-child(4) {
    display: none;
  }
}