/* ========================================
   あなたのまちの映画祭 — 共通スタイル
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:wght@400;600&family=Noto+Serif+JP:wght@400;600;700&family=Noto+Sans+JP:wght@400;500;700&display=swap');

:root {
  --ivory: #F5F0E6;
  --ivory-dark: #EDE6D6;
  --ink: #1C1A14;
  --ink-mid: #3A3528;
  --ink-light: #6B6455;
  --red: #C9472E;
  --red-dark: #A83820;
  --navy: #241710;
  --gold: #B8963E;
  --film-perf: #D4C9B0;
  --border: #C8BFAA;
  --serif: 'Noto Serif JP', 'Georgia', '游明朝', 'Yu Mincho', serif;
  --sans: 'Noto Sans JP', 'Hiragino Sans', 'Meiryo', sans-serif;
  --label: 'Josefin Sans', var(--sans);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 8px 12px;
  background: var(--ivory);
  border: 1px solid var(--ink);
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

/* ── フィルムパーフォレーション帯 ── */
.film-strip {
  display: none;
}
.film-strip::before, .film-strip::after {
  content: '';
  display: block;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 20px;
  width: 100%;
  pointer-events: none;
}
.perforations {
  display: flex;
  gap: 12px;
  padding: 0 12px;
  align-items: center;
}
.perf-hole {
  width: 14px;
  height: 20px;
  border-radius: 3px;
  background: var(--ivory-dark);
  opacity: 0.9;
  flex-shrink: 0;
}
.film-strip-text {
  color: var(--ivory);
  font-family: var(--label);
  font-size: 11px;
  letter-spacing: 0.15em;
  line-height: 1;
  white-space: nowrap;
  display: flex;
  align-items: center;
  padding: 0 8px;
  opacity: 0.7;
}

.note-index {
  margin-bottom: 8px;
  color: var(--red);
  font-family: var(--label);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── ヘッダー ── */
.site-header {
  background: var(--ivory);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.site-logo {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.logo-main {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.05em;
}
.logo-sub {
  font-size: 10px;
  color: var(--ink-light);
  letter-spacing: 0.1em;
}

.site-nav {
  display: flex;
  gap: 0;
  align-items: center;
}
.site-nav a {
  font-size: 13px;
  padding: 8px 14px;
  color: var(--ink-mid);
  transition: color 0.2s;
  letter-spacing: 0.05em;
  position: relative;
}
.site-nav a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transition: transform 0.2s;
}
.site-nav a:hover { color: var(--red); }
.site-nav a:hover::after { transform: scaleX(1); }
.site-nav a.active { color: var(--red); }
.site-nav a.active::after { transform: scaleX(1); }

.nav-ticket {
  margin-left: 8px;
  background: var(--red);
  color: white !important;
  padding: 8px 18px !important;
  border-radius: 2px;
  font-weight: 700;
  font-size: 12px !important;
  letter-spacing: 0.1em;
  transition: background 0.2s !important;
}
.nav-ticket:hover { background: var(--red-dark) !important; color: white !important; }
.nav-ticket::after { display: none !important; }

/* ハンバーガー */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  transition: 0.3s;
}

/* ── ページヒーロー ── */
.page-hero {
  background: var(--navy);
  color: white;
  padding: 60px 20px 50px;
  text-align: center;
}
.page-hero-label {
  font-family: var(--label);
  font-size: 11px;
  letter-spacing: 0.25em;
  opacity: 0.6;
  margin-bottom: 12px;
  text-transform: uppercase;
}
.page-hero h1 {
  font-family: var(--serif);
  font-size: clamp(26px, 5vw, 42px);
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.3;
}
.page-hero p {
  margin-top: 16px;
  font-size: 14px;
  opacity: 0.75;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ── セクション共通 ── */
section { padding: 64px 20px; }
.section-inner { max-width: 1100px; margin: 0 auto; }

.section-label {
  font-family: var(--label);
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--red);
  text-transform: uppercase;
  margin-bottom: 8px;
  display: block;
}
.section-title {
  font-family: var(--serif);
  font-size: clamp(22px, 4vw, 34px);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
  letter-spacing: 0.03em;
}
.section-lead {
  margin-top: 16px;
  font-size: 14px;
  color: var(--ink-light);
  max-width: 600px;
  line-height: 2;
}

/* ── チケット切り取り線 区切り ── */
.ticket-divider {
  display: flex;
  align-items: center;
  margin: 48px 0;
  gap: 0;
}
.ticket-divider::before, .ticket-divider::after {
  content: '';
  flex: 1;
  border-top: 2px dashed var(--border);
}
.ticket-divider-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
  margin: 0 -10px;
  z-index: 1;
}

/* ── ボタン ── */
.btn {
  display: inline-block;
  padding: 12px 28px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  border-radius: 2px;
  cursor: pointer;
  transition: 0.2s;
}
.btn-primary {
  background: var(--red);
  color: white;
  border: 2px solid var(--red);
}
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--ink);
}
.btn-outline:hover { background: var(--ink); color: white; }
.btn-outline-red {
  background: transparent;
  color: var(--red);
  border: 2px solid var(--red);
}
.btn-outline-red:hover { background: var(--red); color: white; }

/* ── フッター ── */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.8);
  padding: 48px 20px 32px;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.footer-logo {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  color: white;
  margin-bottom: 6px;
}
.footer-tagline {
  font-size: 12px;
  opacity: 0.6;
  letter-spacing: 0.1em;
  margin-bottom: 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 32px;
  margin-bottom: 40px;
}
.footer-col h4 {
  font-size: 12px;
  letter-spacing: 0.15em;
  opacity: 0.5;
  margin-bottom: 12px;
  text-transform: uppercase;
}
.footer-col a {
  display: block;
  font-size: 13px;
  padding: 4px 0;
  opacity: 0.8;
  transition: opacity 0.2s;
}
.footer-col a:hover { opacity: 1; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-bottom p { font-size: 12px; opacity: 0.4; }

/* ── カードグリッド ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 40px;
}
.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(28,26,20,0.10);
}
.card-thumb {
  background: var(--ivory-dark);
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.card-thumb-inner {
  font-family: var(--serif);
  font-size: 13px;
  color: var(--ink-light);
  text-align: center;
  padding: 16px;
  line-height: 1.6;
}
.card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--red);
  color: white;
  font-size: 10px;
  letter-spacing: 0.1em;
  padding: 3px 8px;
  border-radius: 2px;
}
.card-body { padding: 18px 20px 20px; }
.card-title {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.4;
}
.card-meta {
  font-size: 12px;
  color: var(--ink-light);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.card-meta span::before { margin-right: 4px; }
.card-synopsis {
  font-size: 13px;
  color: var(--ink-mid);
  margin-top: 10px;
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── film-strip モバイル ── */
@media (max-width: 600px) {
  .film-strip { overflow: hidden; }
  .film-strip-text { display: none; }
  .perforations { flex-wrap: wrap; gap: 8px; }
}

/* ── スマホ ── */
@media (max-width: 768px) {
  .site-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--ivory);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 12px 0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 24px; border-bottom: 1px solid var(--ivory-dark); width: 100%; }
  .site-nav a::after { display: none; }
  .nav-ticket { margin: 12px 24px 4px; }
  .nav-toggle { display: flex; }
  .header-inner { position: relative; }
  section { padding: 48px 16px; }
  .card-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
