/* ================================================
   Base Styles - ホタテ料理専門店「帆立の極」
   ================================================ */

/* CSS Variables - カラーパレット・フォント定義 */
:root {
  /* Colors - 色彩 */
  --color-primary: #1a1a1a;
  /* 墨色 */
  --color-secondary: #2c3e50;
  /* 深い藍色 */
  --color-accent: #f5f0e8;
  /* 淡いベージュ（帆立貝柱色） */
  --color-white: #fafaf8;
  /* 生成り */
  --color-text: #1a1a1a;
  /* テキスト墨色 */
  --color-text-light: #666666;
  /* サブテキスト灰色 */
  --color-bg: #fafaf8;
  /* 背景生成り */
  --color-overlay: rgba(26, 26, 26, 0.9);
  /* オーバーレイ */

  /* Typography - フォント */
  --font-primary: 'Noto Serif JP', 'Yu Mincho', 'YuMincho', 'Hiragino Mincho ProN', 'Hiragino Mincho Pro', serif;
  --font-secondary: 'Noto Sans JP', 'Yu Gothic', 'YuGothic', 'Hiragino Kaku Gothic ProN', sans-serif;

  /* Font Sizes - フォントサイズ */
  --font-size-xs: 0.75rem;
  /* 12px */
  --font-size-sm: 0.875rem;
  /* 14px */
  --font-size-base: 1rem;
  /* 16px */
  --font-size-lg: 1.125rem;
  /* 18px */
  --font-size-xl: 1.5rem;
  /* 24px */
  --font-size-2xl: 2rem;
  /* 32px */
  --font-size-3xl: 3rem;
  /* 48px */
  --font-size-4xl: 4rem;
  /* 64px */

  /* Spacing - 余白 */
  --spacing-xs: 0.5rem;
  /* 8px */
  --spacing-sm: 1rem;
  /* 16px */
  --spacing-md: 2rem;
  /* 32px */
  --spacing-lg: 4rem;
  /* 64px */
  --spacing-xl: 6rem;
  /* 96px */
  --spacing-2xl: 8rem;
  /* 128px */

  /* Layout - レイアウト */
  --max-width: 1400px;
  --section-padding: var(--spacing-xl);

  /* Transitions - トランジション */
  --transition-fast: 0.2s ease;
  --transition-base: 0.4s ease;
  --transition-slow: 0.8s ease;

  /* Z-index - 重なり順 */
  --z-index-base: 1;
  --z-index-header: 100;
  --z-index-nav: 200;
  --z-index-overlay: 300;
  --z-index-modal: 400;

  /* Breakpoints (参照用、メディアクエリで使用) */
  --breakpoint-sm: 576px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1400px;
}

/* ================================================
   Reset & Base Styles
   ================================================ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  line-height: 1.8;
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
}

/* リンク */
a {
  color: inherit;
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

a:hover {
  opacity: 0.7;
}

/* 画像 */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* リスト */
ul,
ol {
  list-style: none;
}

/* ボタン */
button {
  font-family: inherit;
  font-size: inherit;
  border: none;
  background: none;
  cursor: pointer;
  transition: opacity var(--transition-fast);
}

button:hover {
  opacity: 0.7;
}

/* フォーム要素 */
input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
  border: 1px solid #ddd;
  padding: var(--spacing-xs) var(--spacing-sm);
  background-color: var(--color-white);
  transition: border-color var(--transition-fast);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-secondary);
}

/* ================================================
   Typography - タイポグラフィ
   ================================================ */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.05em;
}

h1 {
  font-size: var(--font-size-4xl);
}

h2 {
  font-size: var(--font-size-3xl);
}

h3 {
  font-size: var(--font-size-2xl);
}

h4 {
  font-size: var(--font-size-xl);
}

h5 {
  font-size: var(--font-size-lg);
}

h6 {
  font-size: var(--font-size-base);
}

p {
  margin-bottom: var(--spacing-sm);
}

/* 縦書きテキスト */
.vertical-text {
  writing-mode: vertical-rl;
  text-orientation: upright;
  letter-spacing: 0.1em;
}

/* ================================================
   Layout Utilities - レイアウトユーティリティ
   ================================================ */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.section {
  padding: var(--section-padding) 0;
}

.section-title {
  font-size: var(--font-size-3xl);
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

/* グリッドレイアウト */
.grid {
  display: grid;
  gap: var(--spacing-md);
}

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

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Flexboxレイアウト */
.flex {
  display: flex;
}

.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ================================================
   Responsive Design - レスポンシブ
   ================================================ */

/* Tablet (768px以下) */
@media (max-width: 768px) {
  :root {
    --font-size-4xl: 2.5rem;
    /* 40px */
    --font-size-3xl: 2rem;
    /* 32px */
    --font-size-2xl: 1.5rem;
    /* 24px */
    --section-padding: var(--spacing-lg);
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .container {
    padding: 0 var(--spacing-sm);
  }
}

/* Mobile (576px以下) */
@media (max-width: 576px) {
  :root {
    --font-size-4xl: 2rem;
    /* 32px */
    --font-size-3xl: 1.5rem;
    /* 24px */
    --font-size-2xl: 1.25rem;
    /* 20px */
    --section-padding: var(--spacing-md);
  }

  html {
    font-size: 14px;
  }
}

/* ================================================
   Accessibility - アクセシビリティ
   ================================================ */

/* スクリーンリーダー専用 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ================================================
   Utility Classes - ユーティリティクラス
   ================================================ */

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

.text-right {
  text-align: right;
}

.mb-sm {
  margin-bottom: var(--spacing-sm);
}

.mb-md {
  margin-bottom: var(--spacing-md);
}

.mb-lg {
  margin-bottom: var(--spacing-lg);
}

.mt-sm {
  margin-top: var(--spacing-sm);
}

.mt-md {
  margin-top: var(--spacing-md);
}

/* ================================================
   Loading Animation - ローディング画面
   ================================================ */

.loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: var(--color-bg);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.loading.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ================================================
   Page Header (For Subpages)
   ================================================ */

.page-header {
  width: 100%;
  padding: 160px 0 80px;
  /* Header height + spacing */
  background-color: var(--color-primary);
  color: var(--color-white);
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Subtle pattern for page header background */
.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  z-index: 0;
}

.page-header-content {
  position: relative;
  z-index: 1;
}

.page-header-title {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--spacing-sm);
  letter-spacing: 0.1em;
}

.page-header-subtitle {
  font-size: var(--font-size-sm);
  letter-spacing: 0.3em;
  opacity: 0.7;
  text-transform: uppercase;
}

/* ================================================
   Visual Effects (100/100 Quality)
   ================================================ */

/* Film Grain Overlay */
.visual-fx-grain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9000;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Cinematic Vignette */
.visual-fx-vignette {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 8999;
  background: radial-gradient(circle at center, transparent 60%, rgba(10, 10, 10, 0.4) 100%);
  opacity: 0.8;
}

/* Atmospheric Image Treatment */
.atmospheric-image {
  filter: sepia(0.1) contrast(1.05) brightness(0.95);
  transition: filter 0.5s ease;
}

.atmospheric-image:hover {
  filter: sepia(0) contrast(1) brightness(1);
}

/* Premium Text Shadow for readability on dark bgs */
.text-shadow-premium {
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}