/* ==========================================================================
   松尾珈琲 - 全ページ共通スタイル
   デザインコンセプト: 写真を主役に、余白で空気を語る
   ========================================================================== */

:root {
  /* Color palette */
  --bg: #F9F6F0;
  --bg-dark: #EFE9DD;
  --primary: #8B6239;
  --secondary: #C9A84C;
  --text: #2C1810;
  --text-light: #6B5D52;
  --border: rgba(139, 98, 57, 0.15);
  --white: #ffffff;

  /* Typography */
  --font-serif: "Zen Old Mincho", "Shippori Mincho B1", "Noto Serif JP", serif;
  --font-body: "Shippori Mincho B1", "Zen Old Mincho", "Noto Serif JP", serif;

  /* Layout */
  --max-width: 1200px;
  --content-width: 960px;
  --header-height: 72px;

  /* Spacing scale */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 32px;
  --space-lg: 64px;
  --space-xl: 120px;
  --space-xxl: 180px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.9;
  font-size: 16px;
  letter-spacing: 0.05em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: opacity .3s ease, color .3s ease; }
a:hover { opacity: 0.65; }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.08em;
  color: var(--text);
}
h1 { font-size: clamp(32px, 5vw, 56px); }
h2 { font-size: clamp(26px, 3.5vw, 40px); }
h3 { font-size: clamp(20px, 2.5vw, 28px); }
h4 { font-size: clamp(17px, 2vw, 22px); }
p { font-size: clamp(15px, 1.15vw, 17px); line-height: 2.1; }

.section-label {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.4em;
  color: var(--primary);
  margin-bottom: var(--space-sm);
  font-family: var(--font-serif);
}
.section-title {
  margin-bottom: var(--space-md);
}
.section-title::after {
  content: "";
  display: block;
  width: 40px;
  height: 1px;
  background: var(--primary);
  margin-top: var(--space-md);
}

/* ---------- Header / Navigation ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: rgba(249, 246, 240, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  transition: background .3s ease;
}
.site-header-inner {
  max-width: var(--max-width);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-logo {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--text);
}
.site-logo small {
  display: block;
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--text-light);
  margin-top: 2px;
  font-weight: 400;
}
.site-nav ul {
  display: flex;
  gap: var(--space-lg);
}
.site-nav a {
  font-family: var(--font-serif);
  font-size: 14px;
  letter-spacing: 0.2em;
  color: var(--text);
  position: relative;
  padding: 8px 0;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .3s ease;
}
.site-nav a:hover::after,
.site-nav a.current::after { transform: scaleX(1); }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  width: 32px; height: 32px;
  position: relative;
  z-index: 101;
}
.nav-toggle span {
  position: absolute;
  left: 4px; right: 4px;
  height: 1.5px;
  background: var(--text);
  transition: transform .3s ease, top .3s ease, opacity .3s ease;
}
.nav-toggle span:nth-child(1) { top: 10px; }
.nav-toggle span:nth-child(2) { top: 16px; }
.nav-toggle span:nth-child(3) { top: 22px; }
.nav-open .nav-toggle span:nth-child(1) { top: 16px; transform: rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { top: 16px; transform: rotate(-45deg); }

/* ---------- Page wrapper ---------- */
.page { padding-top: var(--header-height); }
.page-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}
.page-hero {
  height: 50vh;
  min-height: 360px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}
.page-hero img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.85;
}
.page-hero h1 {
  position: relative;
  color: var(--white) !important;
  text-align: center;
  text-shadow: 0 2px 20px rgba(0,0,0,0.6), 0 0 30px rgba(0,0,0,0.4);
  letter-spacing: 0.3em;
}
.page-hero h1 small {
  display: block;
  font-size: 0.4em;
  letter-spacing: 0.4em;
  margin-top: var(--space-sm);
  opacity: 0.8;
}

/* ---------- Section base ---------- */
section { padding: var(--space-xl) 0; }
.section-full { padding: 0; }

/* ---------- Home: Hero ---------- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
}
.hero-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  animation: heroZoom 14s ease-out both;
}
@keyframes heroZoom {
  from { transform: scale(1.08); }
  to   { transform: scale(1); }
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.05) 40%, rgba(0,0,0,0.55) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  padding: 0 var(--space-md);
}
.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(42px, 7vw, 88px);
  font-weight: 600;
  letter-spacing: 0.4em;
  text-indent: 0.4em; /* balance letter-spacing */
  text-shadow: 0 4px 30px rgba(0,0,0,0.6), 0 0 40px rgba(0,0,0,0.3);
  margin-bottom: var(--space-md);
  color: var(--white);
}
.hero-sub {
  font-family: var(--font-serif);
  font-size: clamp(13px, 1.2vw, 16px);
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  opacity: 0.9;
  text-shadow: 0 2px 15px rgba(0,0,0,0.5);
}
.hero-scroll {
  position: absolute;
  bottom: 40px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: var(--white);
  font-size: 10px;
  letter-spacing: 0.3em;
  opacity: 0.8;
  writing-mode: vertical-rl;
}
.hero-scroll::after {
  content: "";
  display: block;
  width: 1px;
  height: 50px;
  background: var(--white);
  margin: 10px auto 0;
  animation: scrollLine 2s ease-in-out infinite;
}
@keyframes scrollLine {
  0%, 100% { transform: scaleY(0.3); transform-origin: top; opacity: 0.3; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* ---------- Home: Intro (秋田の森からひばりヶ丘へ) ---------- */
.intro {
  padding: var(--space-xxl) 0;
  text-align: center;
}
.intro .section-label { }
.intro h2 {
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1.8;
  margin-bottom: var(--space-lg);
}
.intro-text {
  max-width: 640px;
  margin: 0 auto;
  color: var(--text-light);
}
.intro-text p + p { margin-top: 1.5em; }
.intro-image {
  margin-top: var(--space-xl);
  max-width: 1040px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 var(--space-md);
}
.intro-image img {
  width: 100%;
  aspect-ratio: 21 / 10;
  object-fit: cover;
}

/* ---------- Home: Space preview ---------- */
.space-preview {
  padding: var(--space-xxl) 0;
  background: var(--bg-dark);
}
.space-preview-header {
  max-width: var(--content-width);
  margin: 0 auto var(--space-xl);
  padding: 0 var(--space-md);
  text-align: center;
}
.space-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: var(--space-sm);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}
.space-grid .space-cell {
  overflow: hidden;
  aspect-ratio: 3 / 4;
}
.space-grid .space-cell:first-child { aspect-ratio: 3 / 5; }
.space-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s ease;
}
.space-grid .space-cell:hover img { transform: scale(1.05); }
.space-preview-cta {
  text-align: center;
  margin-top: var(--space-xl);
}

/* ---------- Home: Food highlight ---------- */
.food {
  padding: var(--space-xxl) 0;
}
.food-header { text-align: center; margin-bottom: var(--space-xl); }
.food-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}
.food-item figure { margin-bottom: var(--space-md); overflow: hidden; aspect-ratio: 1 / 1; }
.food-item figure img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1s ease;
}
.food-item:hover figure img { transform: scale(1.05); }
.food-item h4 { margin-bottom: var(--space-sm); font-size: 20px; }
.food-item p { font-size: 14px; color: var(--text-light); line-height: 1.9; }

/* ---------- Home: Access preview ---------- */
.access-preview {
  padding: var(--space-xxl) 0;
  background: var(--bg-dark);
  text-align: center;
}
.access-preview dl {
  max-width: 520px;
  margin: var(--space-xl) auto;
  font-size: 15px;
  line-height: 2.2;
}
.access-preview dl div {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  border-bottom: 1px dashed var(--border);
  padding: var(--space-sm) 0;
}
.access-preview dt {
  font-weight: 600;
  color: var(--primary);
  min-width: 90px;
  text-align: right;
}
.access-preview dd { text-align: left; }

/* ---------- Buttons ---------- */
.btn-line {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-serif);
  font-size: 14px;
  letter-spacing: 0.3em;
  color: var(--text);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--text);
}
.btn-line::after {
  content: "→";
  transition: transform .3s ease;
}
.btn-line:hover::after { transform: translateX(6px); }

/* ---------- Menu page ---------- */
.menu-section {
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--border);
}
.menu-section:last-child { border-bottom: none; }
.menu-section h3 {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  color: var(--primary);
}
.menu-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}
.menu-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px dotted var(--border);
}
.menu-item-name {
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.6;
  flex: 1;
}
.menu-item-note {
  display: block;
  font-size: 12px;
  color: var(--text-light);
  margin-top: 4px;
}
.menu-item-price {
  font-family: var(--font-serif);
  font-size: 15px;
  color: var(--primary);
  white-space: nowrap;
}
.menu-intro {
  padding: var(--space-xl) 0;
  text-align: center;
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-xl);
}
.menu-intro p { max-width: 560px; margin: 0 auto; color: var(--text-light); }

/* ---------- Space page ---------- */
.space-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
  padding: var(--space-xxl) 0;
  border-bottom: 1px solid var(--border);
}
.space-feature:nth-child(even) { direction: rtl; }
.space-feature:nth-child(even) > * { direction: ltr; }
.space-feature img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.space-feature-text .num {
  font-family: var(--font-serif);
  font-size: 48px;
  color: var(--secondary);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: var(--space-sm);
  line-height: 1;
}
.space-feature-text h3 { margin-bottom: var(--space-md); }
.space-feature-text p { color: var(--text-light); }
.space-gallery {
  padding: var(--space-xxl) 0;
  background: var(--bg-dark);
}
.space-gallery h2 { text-align: center; margin-bottom: var(--space-xl); }
.space-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}
.space-gallery-grid figure { overflow: hidden; aspect-ratio: 3 / 4; }
.space-gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s ease; }
.space-gallery-grid figure:hover img { transform: scale(1.05); }

/* ---------- Access page ---------- */
.access-info {
  padding: var(--space-xl) 0;
}
.access-table {
  width: 100%;
  border-collapse: collapse;
  max-width: 720px;
  margin: 0 auto;
  font-size: 15px;
}
.access-table th, .access-table td {
  padding: var(--space-md) var(--space-sm);
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.access-table th {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--primary);
  width: 140px;
  letter-spacing: 0.2em;
}
.access-map {
  padding: var(--space-xl) 0;
  background: var(--bg-dark);
}
.access-map iframe {
  width: 100%;
  height: 480px;
  border: 0;
  max-width: var(--max-width);
  margin: 0 auto;
  display: block;
}
.faq {
  padding: var(--space-xxl) 0;
}
.faq h2 { text-align: center; margin-bottom: var(--space-xl); }
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: var(--space-md) 0;
}
.faq-q {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  padding-left: 32px;
  position: relative;
  margin-bottom: var(--space-sm);
  color: var(--text);
}
.faq-q::before {
  content: "Q.";
  position: absolute;
  left: 0; top: 0;
  color: var(--primary);
  font-size: 20px;
}
.faq-a {
  padding-left: 32px;
  position: relative;
  color: var(--text-light);
  font-size: 15px;
  line-height: 2;
}
.faq-a::before {
  content: "A.";
  position: absolute;
  left: 0; top: 0;
  color: var(--secondary);
  font-size: 20px;
  font-family: var(--font-serif);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--text);
  color: #d6cec4;
  padding: var(--space-xl) var(--space-md) var(--space-lg);
}
.site-footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.site-footer h4 {
  font-family: var(--font-serif);
  color: var(--white);
  font-size: 18px;
  letter-spacing: 0.3em;
  margin-bottom: var(--space-md);
}
.site-footer small {
  font-size: 10px;
  letter-spacing: 0.3em;
  display: block;
  opacity: 0.6;
  margin-top: 4px;
}
.site-footer p { font-size: 13px; line-height: 2; color: #d6cec4; }
.site-footer ul { font-size: 13px; line-height: 2.2; }
.site-footer a { color: #d6cec4; }
.site-footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-top: var(--space-md);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-align: center;
  opacity: 0.5;
}

/* ---------- Scroll fade-in ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1.2s ease, transform 1.2s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  :root {
    --space-xl: 80px;
    --space-xxl: 120px;
    --header-height: 60px;
  }
  .site-nav {
    position: fixed;
    top: 0; right: 0;
    width: 75%;
    max-width: 320px;
    height: 100vh;
    background: var(--bg);
    padding: calc(var(--header-height) + 40px) var(--space-md) var(--space-lg);
    transform: translateX(100%);
    transition: transform .4s ease;
    border-left: 1px solid var(--border);
  }
  .nav-open .site-nav { transform: translateX(0); }
  .site-nav ul { flex-direction: column; gap: var(--space-md); }
  .site-nav a { font-size: 18px; padding: 12px 0; }
  .nav-toggle { display: block; }

  .space-grid {
    grid-template-columns: 1fr 1fr;
  }
  .space-grid .space-cell:first-child { grid-column: 1 / -1; aspect-ratio: 3 / 2; }

  .food-grid { grid-template-columns: 1fr; gap: var(--space-xl); }
  .food-item figure { aspect-ratio: 4 / 3; }

  .space-feature {
    grid-template-columns: 1fr;
    gap: var(--space-md);
    padding: var(--space-xl) 0;
  }
  .space-feature:nth-child(even) { direction: ltr; }
  .space-feature img { aspect-ratio: 4 / 3; }

  .space-gallery-grid { grid-template-columns: repeat(2, 1fr); }

  .site-footer-inner { grid-template-columns: 1fr; gap: var(--space-md); }

  .access-table th { width: 100px; font-size: 13px; }

  .menu-item { flex-wrap: wrap; }

  .hero-title { letter-spacing: 0.3em; }
}

@media (max-width: 560px) {
  :root {
    --space-xl: 60px;
    --space-xxl: 100px;
  }
  body { font-size: 15px; }
  .page-hero { height: 40vh; min-height: 280px; }
  .space-gallery-grid { grid-template-columns: 1fr; }
}
