/* =========================================================
   ぢどり屋 本家 — Site Styles (LP refresh)
   ========================================================= */

:root {
  --color-bg: #f5f1e8;             /* off-white, washi tone */
  --color-bg-deep: #ece6d8;
  --color-surface: #ffffff;
  --color-ink: #2a241e;            /* sumi-brown black */
  --color-ink-soft: #5a4f44;
  --color-mute: #8c7f72;
  --color-line: rgba(42,36,30,.12);
  --color-accent: #8b3a2e;         /* 朱、ロゴ「本家」より深い赤 */
  --color-accent-soft: #b56258;
  --shadow-soft: 0 12px 40px rgba(40,30,20,.08);
  --shadow-card: 0 16px 50px rgba(40,30,20,.10);
  --radius: 2px;
  --container: 1240px;
  --container-narrow: 880px;
  --font-jp: "Shippori Mincho", "Noto Serif JP", "Hiragino Mincho ProN",
             "Yu Mincho", "ヒラギノ明朝 ProN", serif;
  --font-brand: "Shippori Mincho", "Noto Serif JP", serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-jp);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.95;
  color: var(--color-ink);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* FOUC guard while partials hydrate */
body:not(.is-hydrated) > * { opacity: 0; }
body.is-hydrated > * { opacity: 1; transition: opacity .25s ease-out; }

/* Sub pages (no hero): leave room for fixed header */
body.page-sub { padding-top: 96px; }
body.page-sub main > section:first-of-type { padding-top: 80px; }

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

a { color: inherit; text-decoration: none; transition: color .35s var(--ease-out); }
a:hover { color: var(--color-accent); }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

.container.narrow { max-width: var(--container-narrow); }

/* ---------- Reveal animations (driven by IntersectionObserver in main.js) ---------- */
/* Only hide initially when JS has booted (.js-reveal on <html>). Without JS, content shows. */

.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1.4s var(--ease-out), transform 1.4s var(--ease-out);
  will-change: opacity, transform;
}

.js-reveal [data-reveal="fade"] { transform: none; }

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

/* Stagger children with delay */
.js-reveal [data-reveal-stagger] > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1.2s var(--ease-out), transform 1.2s var(--ease-out);
}
.js-reveal [data-reveal-stagger].is-visible > *:nth-child(1) { transition-delay: 0s; opacity: 1; transform: none; }
.js-reveal [data-reveal-stagger].is-visible > *:nth-child(2) { transition-delay: .12s; opacity: 1; transform: none; }
.js-reveal [data-reveal-stagger].is-visible > *:nth-child(3) { transition-delay: .24s; opacity: 1; transform: none; }
.js-reveal [data-reveal-stagger].is-visible > *:nth-child(4) { transition-delay: .36s; opacity: 1; transform: none; }
.js-reveal [data-reveal-stagger].is-visible > *:nth-child(5) { transition-delay: .48s; opacity: 1; transform: none; }
.js-reveal [data-reveal-stagger].is-visible > *:nth-child(6) { transition-delay: .60s; opacity: 1; transform: none; }
.js-reveal [data-reveal-stagger].is-visible > *:nth-child(n+7) { transition-delay: .72s; opacity: 1; transform: none; }

/* ---------- Header / Nav ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding: 18px 0;
  background: rgba(245, 241, 232, 0);
  transition: background .4s var(--ease-out), backdrop-filter .4s var(--ease-out), padding .4s var(--ease-out), border-color .4s var(--ease-out);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: rgba(245, 241, 232, 0.88);
  backdrop-filter: blur(12px);
  padding: 12px 0;
  border-bottom-color: var(--color-line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  background: transparent;
  transition: filter .4s var(--ease-out);
}

.site-logo img {
  height: 44px;
  width: auto;
  display: block;
  transition: filter .4s var(--ease-out);
}

.site-logo .logo-stack {
  position: relative;
  display: block;
  height: 44px;
  aspect-ratio: 1 / 1;
}

.site-logo .logo-stack img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.site-logo .logo-stack .honke {
  /* 本家 stays crisp on top, no halo */
  z-index: 2;
}

/* Hero overlay: halo applies only to brush layer, not 本家 */
.site-header:not(.is-scrolled) .site-logo .brush {
  filter: drop-shadow(0 0 2px rgba(255,255,255,0.95))
          drop-shadow(0 0 6px rgba(255,255,255,0.55))
          drop-shadow(0 0 14px rgba(255,255,255,0.35));
}

/* Hero overlay header: nav becomes white */
.site-header:not(.is-scrolled) .nav a,
.site-header:not(.is-scrolled) .nav a.is-active { color: rgba(255,255,255,.92); }
.site-header:not(.is-scrolled) .nav a:hover,
.site-header:not(.is-scrolled) .nav a.is-active { color: #fff; }
.site-header:not(.is-scrolled) .nav a::after { background: #fff; }

/* Sub pages: header always in scrolled state (no flash on load) */
body.page-sub .site-header {
  background: rgba(245, 241, 232, 0.88);
  backdrop-filter: blur(12px);
  padding: 12px 0;
  border-bottom-color: var(--color-line);
}
body.page-sub .site-header .site-logo {
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.nav { display: flex; }

.nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 32px;
}

.nav a {
  font-family: var(--font-brand);
  font-weight: 500;
  letter-spacing: .18em;
  font-size: 13px;
  position: relative;
  padding: 6px 0;
  transition: color .35s var(--ease-out);
}

.nav a::after {
  content: "";
  position: absolute;
  left: 50%; bottom: -2px;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width .35s var(--ease-out), left .35s var(--ease-out);
}

.nav a:hover::after,
.nav a.is-active::after {
  width: 100%;
  left: 0;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  animation: heroZoom 12s var(--ease-out) forwards;
}

@keyframes heroZoom {
  to { transform: scale(1); }
}

.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,15,10,.35) 0%, rgba(20,15,10,.55) 60%, rgba(20,15,10,.75) 100%);
  z-index: 1;
}

.hero-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 24px;
  max-width: 720px;
  animation: heroFade 2.4s var(--ease-out) both;
}

@keyframes heroFade {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

.hero .eyebrow {
  font-size: 11px;
  letter-spacing: .55em;
  margin: 0 0 24px;
  opacity: .75;
  text-indent: .55em;
}

.hero h1 {
  font-family: var(--font-brand);
  font-size: clamp(36px, 6vw, 68px);
  font-weight: 400;
  margin: 0 0 28px;
  letter-spacing: .14em;
  line-height: 1.4;
}

.hero h1 .small {
  display: block;
  font-size: .35em;
  letter-spacing: .5em;
  margin-top: 14px;
  opacity: .8;
  font-weight: 300;
}

.hero .lead {
  font-size: clamp(13px, 1.3vw, 15px);
  margin: 0 auto;
  max-width: 540px;
  line-height: 2.2;
  opacity: .88;
  letter-spacing: .08em;
}

.hero .scroll-cue {
  position: absolute;
  bottom: 32px;
  left: 0;
  right: 0;
  z-index: 2;
  font-size: 10px;
  letter-spacing: .4em;
  color: rgba(255,255,255,.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  text-indent: .4em;
  animation: heroFade 2.4s 1.2s var(--ease-out) both;
}

.hero .scroll-cue::after {
  content: "";
  width: 1px;
  height: 56px;
  background: rgba(255,255,255,.4);
  animation: scrollLine 2.4s ease-in-out infinite;
  transform-origin: top;
}

@keyframes scrollLine {
  0%, 100% { transform: scaleY(0); transform-origin: top; }
  50%      { transform: scaleY(1); transform-origin: top; }
  50.01%   { transform-origin: bottom; }
}


/* ---------- Section base ---------- */

main section {
  padding: 140px 0;
  position: relative;
}

main section.tight { padding: 96px 0; }

.section-head {
  text-align: center;
  margin-bottom: 80px;
}

.section-head .latin {
  font-size: 10px;
  letter-spacing: .55em;
  color: var(--color-accent);
  text-transform: uppercase;
  margin: 0 0 14px;
  text-indent: .55em;
}

.section-head .kanji {
  font-family: var(--font-brand);
  font-size: clamp(26px, 3.4vw, 38px);
  letter-spacing: .18em;
  margin: 0;
  font-weight: 400;
}

.section-head .divider {
  width: 28px;
  height: 1px;
  background: var(--color-accent);
  margin: 22px auto 0;
}

/* Sub-heading inside menu */
.subhead {
  font-family: var(--font-brand);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: .25em;
  margin: 96px 0 32px;
  text-align: center;
  position: relative;
  display: flex;
  align-items: center;
  gap: 24px;
  justify-content: center;
}

.subhead::before,
.subhead::after {
  content: "";
  flex: 0 1 80px;
  height: 1px;
  background: var(--color-line);
}

/* ---------- Concept (split section) ---------- */

.concept {
  background: var(--color-bg);
}

.concept-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.concept-text h2 {
  font-family: var(--font-brand);
  font-size: clamp(24px, 2.6vw, 32px);
  letter-spacing: .15em;
  font-weight: 400;
  margin: 0 0 32px;
  line-height: 1.7;
}

.concept-text p {
  font-size: 14.5px;
  line-height: 2.2;
  color: var(--color-ink-soft);
  margin: 0 0 20px;
  letter-spacing: .04em;
}

.concept-image {
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
}

.concept-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 2s var(--ease-out);
}

[data-reveal].is-visible .concept-image img { transform: scale(1.04); }

/* ---------- Cards (recommend) ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
}

.card {
  background: transparent;
  overflow: hidden;
}

.card .thumb {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--color-bg-deep);
  margin-bottom: 24px;
}

.card .thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease-out);
}

.card:hover .thumb img { transform: scale(1.06); }

.card .body { padding: 0 4px; }

.card h3 {
  font-family: var(--font-brand);
  font-size: 19px;
  margin: 0 0 12px;
  letter-spacing: .1em;
  font-weight: 500;
}

.card p {
  font-size: 13.5px;
  line-height: 2;
  color: var(--color-ink-soft);
  margin: 0;
  letter-spacing: .03em;
}

/* simpler menu card */

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
}

.menu-item {
  text-align: center;
}

.menu-item .thumb {
  aspect-ratio: 1 / 1;
  background: var(--color-bg-deep);
  overflow: hidden;
  margin-bottom: 14px;
}

.menu-item .thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease-out);
}

.menu-item:hover .thumb img { transform: scale(1.06); }

.menu-item .thumb.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-deep);
  font-size: 0;
  position: relative;
}

.menu-item .thumb.placeholder::after {
  content: "";
  width: 24px;
  height: 24px;
  border: 1px solid rgba(42,36,30,.18);
  border-radius: 50%;
}

.menu-item h4 {
  font-family: var(--font-brand);
  font-size: 14px;
  margin: 0 0 4px;
  font-weight: 500;
  letter-spacing: .08em;
}

.menu-item .note {
  font-size: 11px;
  color: var(--color-mute);
  margin: 0;
  letter-spacing: .1em;
}

/* ---------- Philosophy list ---------- */

.philosophy-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 64px 80px;
}

.philosophy-item h3 {
  font-family: var(--font-brand);
  font-size: 19px;
  margin: 0 0 18px;
  letter-spacing: .15em;
  font-weight: 500;
  position: relative;
  padding-bottom: 14px;
}

.philosophy-item h3::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 24px; height: 1px;
  background: var(--color-accent);
}

.philosophy-item p {
  margin: 0;
  font-size: 13.5px;
  line-height: 2.1;
  color: var(--color-ink-soft);
  letter-spacing: .03em;
}

/* ---------- Access ---------- */

.access-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 72px;
  align-items: stretch;
}

.access-info dl { margin: 0; }

.access-info dt {
  font-family: var(--font-brand);
  font-size: 11px;
  letter-spacing: .35em;
  color: var(--color-accent);
  margin-top: 28px;
  text-transform: uppercase;
}

.access-info dt:first-of-type { margin-top: 0; }

.access-info dd {
  margin: 10px 0 0;
  font-size: 14.5px;
  line-height: 2;
  color: var(--color-ink);
  letter-spacing: .04em;
}

.access-info .hours {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 28px;
  margin: 10px 0 0;
  font-size: 14px;
}

.access-info .hours .day { color: var(--color-mute); letter-spacing: .15em; }

.map-frame {
  border: 0;
  width: 100%;
  height: 100%;
  min-height: 460px;
  display: block;
}

/* ---------- CTA ---------- */

.cta {
  background: var(--color-ink);
  color: #fff;
  text-align: center;
  padding: 120px 24px !important;
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(139,58,46,.18) 0%, transparent 70%);
  pointer-events: none;
}

.cta > * { position: relative; }

.cta .latin {
  font-size: 10px;
  letter-spacing: .55em;
  color: var(--color-accent-soft);
  margin: 0 0 16px;
}

.cta h2 {
  font-family: var(--font-brand);
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: .2em;
  margin: 0 0 18px;
  font-weight: 400;
}

.cta p { color: rgba(255,255,255,.65); margin: 0 0 36px; font-size: 13.5px; letter-spacing: .08em; }

.cta .tel {
  display: inline-block;
  font-family: var(--font-brand);
  font-size: clamp(28px, 3.5vw, 36px);
  letter-spacing: .12em;
  border: 1px solid rgba(255,255,255,.3);
  padding: 18px 48px;
  color: #fff;
  transition: background .4s var(--ease-out), border-color .4s var(--ease-out), color .4s var(--ease-out);
}

.cta .tel:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

/* ---------- Footer ---------- */

.site-footer {
  background: #1c1812;
  color: rgba(255,255,255,.55);
  padding: 64px 0 40px;
  font-size: 12px;
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.site-footer .brand {
  font-family: var(--font-brand);
  font-size: 16px;
  color: rgba(255,255,255,.85);
  letter-spacing: .25em;
}

.site-footer .copyright { font-size: 10px; letter-spacing: .25em; }

/* ---------- Mobile ---------- */

@media (max-width: 880px) {
  .container { padding: 0 20px; }
  main section { padding: 80px 0; }
  .section-head { margin-bottom: 48px; }
  .section-head .kanji { font-size: 26px; letter-spacing: .14em; }
  .concept-grid,
  .access-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .concept-text h2 { font-size: 22px; letter-spacing: .1em; }
  .map-frame { min-height: 320px; }
  .philosophy-list { gap: 48px; grid-template-columns: 1fr; }
  .card-grid { gap: 32px; }
  .menu-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .menu-item h4 { font-size: 13px; }
  .nav ul { gap: 14px; flex-wrap: wrap; justify-content: center; }
  .nav a { font-size: 11px; letter-spacing: .12em; padding: 4px 0; }
  .site-header { padding: 10px 0; }
  .site-header .container { flex-direction: column; gap: 10px; padding-top: 0; padding-bottom: 0; }
  .site-logo img { height: 38px; }
  .site-logo { padding: 4px 10px; }
  .hero { min-height: 540px; }
  .hero h1 { letter-spacing: .08em; }
  .hero h1 .small { letter-spacing: .35em; margin-top: 10px; }
  .hero .lead { font-size: 12px; line-height: 2; padding: 0 12px; }
  .hero .scroll-cue { bottom: 22px; font-size: 9px; letter-spacing: .35em; }
  .hero .scroll-cue::after { height: 40px; }
  .subhead { font-size: 17px; letter-spacing: .2em; margin: 64px 0 24px; gap: 16px; }
  .subhead::before, .subhead::after { flex: 0 1 50px; }
  .cta { padding: 80px 20px !important; }
  .cta .tel { font-size: 26px; padding: 14px 28px; letter-spacing: .08em; }
  .site-footer .container { justify-content: center; text-align: center; }
  body.page-sub { padding-top: 128px; }
}

@media (max-width: 480px) {
  .menu-grid { grid-template-columns: 1fr 1fr; }
  .nav ul { gap: 10px; }
  .nav a { font-size: 10px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  [data-reveal-stagger] > * { opacity: 1; transform: none; transition: none; }
  .hero-bg { animation: none; }
  .hero-inner, .scroll-cue { animation: none; }
}
