/*
Theme Name: Project Railway
Theme URI: https://example.com/
Author: Project Railway
Description: 駅ごとに白へ一滴だけ空気を加える、英国鉄道紀行のための英日併記WordPressテーマ。
Version: 0.4
Text Domain: project-railway
*/

:root {
  --ink: #20241f;
  --muted: #687066;
  --paper: #fffdf8;
  --header-paper: #fffaf1;
  --surface: #ffffff;
  --line: #d9d4c9;
  --atmosphere-bg: #ffffff;
  --atmosphere-soft: #f7f6f2;
  --atmosphere-accent: #58634f;
  --max: 1180px;
  --reading: 720px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
img { display: block; max-width: 100%; height: auto; }
.site-wrap { width: min(calc(100% - 36px), var(--max)); margin-inline: auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--header-paper) 96%, transparent);
  backdrop-filter: blur(10px);
}
.header-inner { min-height: 82px; display: flex; align-items: center; gap: 34px; }
.site-branding { margin-right: auto; text-decoration: none; }
.site-title { display: block; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.3rem, 2vw, 1.9rem); line-height: 1.1; }
.site-tagline { display: block; margin-top: 5px; color: var(--muted); font-family: Georgia, "Times New Roman", serif; font-size: .72rem; letter-spacing: .03em; }
.primary-nav ul { display: flex; align-items: center; gap: 28px; margin: 0; padding: 0; list-style: none; }
.primary-nav a { display: block; text-decoration: none; font-family: Georgia, "Times New Roman", serif; font-size: .96rem; }
.primary-nav a small { display: block; margin-top: 1px; color: var(--muted); font-family: inherit; font-size: .62rem; }
.from-tokyo { color: #76533d; font-family: Georgia, "Times New Roman", serif; font-style: italic; white-space: nowrap; }
.menu-toggle { display: none; border: 1px solid var(--line); background: transparent; padding: 8px 10px; font: inherit; }

main { min-height: 65vh; }
.station-atmosphere { background: var(--atmosphere-bg); }
.station-atmosphere a:focus-visible { outline: 2px solid var(--atmosphere-accent); outline-offset: 3px; }

.hero { padding: clamp(72px, 10vw, 150px) 0 80px; }
.hero-kicker, .section-kicker, .eyebrow { margin: 0 0 10px; color: var(--atmosphere-accent); font-family: Georgia, "Times New Roman", serif; font-size: .82rem; letter-spacing: .13em; text-transform: uppercase; }
.hero h1 { max-width: 900px; margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.5rem, 7vw, 6.6rem); line-height: .98; font-weight: 500; }
.jp-subtitle { display: block; margin-top: .48em; color: var(--muted); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", sans-serif; font-size: .38em; line-height: 1.55; letter-spacing: .03em; }
.hero-copy { max-width: 720px; margin: 38px 0 0; font-size: clamp(1rem, 2vw, 1.25rem); }

.section { padding: 72px 0; border-top: 1px solid var(--line); }
.section-title { margin: 0 0 30px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 4vw, 4rem); line-height: 1.1; font-weight: 500; }
.section-title .jp-subtitle { font-size: .42em; }
.station-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; }
.station-card { grid-column: span 4; min-height: 100%; background: var(--surface); border: 1px solid var(--line); }
.station-card:nth-child(5n + 1) { grid-column: span 8; }
.station-card a { display: block; height: 100%; text-decoration: none; }
.station-card-media { aspect-ratio: 16 / 10; overflow: hidden; background: #dedbd3; }
.station-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.station-card:hover img { transform: scale(1.018); }
.station-card-body { padding: 24px; }
.station-card h3 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.4rem, 2vw, 2rem); font-weight: 500; line-height: 1.15; }
.station-card h3 small { display: block; margin-top: 10px; color: var(--muted); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", sans-serif; font-size: .56em; line-height: 1.5; }
.station-card-meta { margin-top: 18px; color: var(--muted); font-size: .86rem; }

.breadcrumbs { padding-top: 34px; color: var(--muted); font-size: .78rem; }
.breadcrumbs a { text-decoration: none; }
.breadcrumbs span { margin: 0 7px; }
.station-hero { padding: 22px 0 34px; }
.station-hero h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.6rem, 6vw, 5.4rem); line-height: 1.02; font-weight: 500; letter-spacing: -.02em; }
.station-hero .station-jp-name { display: block; margin-top: 10px; color: var(--atmosphere-accent); font-size: clamp(1rem, 2vw, 1.35rem); letter-spacing: .03em; }
.station-featured-image { overflow: hidden; border: 1px solid color-mix(in srgb, var(--line) 82%, transparent); }
.station-featured-image img { width: 100%; max-height: 720px; object-fit: cover; }
.station-intro { padding: 34px 0 28px; }
.station-motto { max-width: var(--reading); margin: 0; color: var(--atmosphere-accent); font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.22rem, 2.2vw, 1.7rem); line-height: 1.45; }
.station-motto span { display: block; margin-top: 3px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", sans-serif; font-size: .67em; }

.station-content-shell { padding: 12px 0 82px; }
.article-layout { display: grid; grid-template-columns: minmax(0, 760px) minmax(250px, 1fr); gap: clamp(46px, 7vw, 90px); align-items: start; }
.article-body { font-size: 1.02rem; }
.article-body > :first-child { margin-top: 0; }
.article-body p { margin: 0 0 1.45em; }
.article-body blockquote { margin: 36px 0; padding: 20px 24px; border-left: 3px solid var(--atmosphere-accent); background: var(--atmosphere-soft); }
.article-section { padding: 48px 0 20px; border-top: 1px solid color-mix(in srgb, var(--atmosphere-accent) 28%, var(--line)); }
.article-section h2 { margin: 0 0 24px; color: var(--atmosphere-accent); font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.9rem, 3.5vw, 3rem); font-weight: 500; line-height: 1.12; }
.article-section h2 .jp-subtitle { font-size: .44em; color: var(--muted); }

.station-sidebar { position: sticky; top: 112px; padding-left: 36px; border-left: 1px solid var(--line); }
.sidebar-block { padding: 0 0 30px; margin-bottom: 30px; border-bottom: 1px solid var(--line); }
.sidebar-block:last-child { margin-bottom: 0; }
.sidebar-block h2 { margin: 0 0 16px; color: var(--atmosphere-accent); font-family: Georgia, "Times New Roman", serif; font-size: 1.28rem; font-weight: 500; }
.station-facts { margin: 0; }
.station-fact { display: grid; grid-template-columns: 92px 1fr; gap: 12px; padding: 6px 0; }
.station-fact dt { color: var(--muted); font-size: .78rem; }
.station-fact dd { margin: 0; font-size: .86rem; }
.atmosphere-label { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .78rem; }
.atmosphere-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--atmosphere-accent); }

.site-footer { padding: 42px 0; border-top: 1px solid var(--line); background: var(--header-paper); }
.footer-inner { display: flex; justify-content: space-between; align-items: end; gap: 30px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; font-size: .84rem; }
.footer-links a { text-decoration: none; }

.footer-from-tokyo {
  display: inline-block;
  margin-top: 10px;
  font-size: .92rem;
}

@media (max-width: 960px) {
  .primary-nav { display: none; }
  .menu-toggle { display: block; }
  .header-inner.is-open .primary-nav { display: block; position: absolute; inset: 82px 0 auto 0; padding: 18px; border-bottom: 1px solid var(--line); background: var(--header-paper); }
  .header-inner.is-open .primary-nav ul { width: min(calc(100% - 36px), var(--max)); margin-inline: auto; align-items: flex-start; flex-direction: column; gap: 14px; }
}
@media (max-width: 800px) {
  .station-card, .station-card:nth-child(5n + 1) { grid-column: span 12; }
  .article-layout { grid-template-columns: 1fr; }
  .station-sidebar { position: static; padding: 34px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .footer-inner { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 520px) {
  .from-tokyo { display: none; }
  .station-hero h1 { font-size: 2.55rem; }
}

/* --------------------------------------------------
   v0.3 — Station journal refinement
   -------------------------------------------------- */
.station-page {
  background:
    radial-gradient(circle at 12% 10%, color-mix(in srgb, var(--atmosphere-accent) 4%, transparent), transparent 34rem),
    var(--atmosphere-bg);
}
.station-page .breadcrumbs { padding-top: 42px; }
.station-hero { padding: 38px 0 42px; }
.station-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 50px; align-items: end; }
.station-title-block .eyebrow { margin-bottom: 14px; }
.station-hero h1 { max-width: 920px; font-size: clamp(3rem, 7vw, 6.2rem); }
.station-hero .station-jp-name { margin-top: 15px; font-family: Georgia, "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: clamp(1rem, 1.8vw, 1.32rem); }
.station-hero-meta { padding: 0 0 8px 24px; border-left: 1px solid color-mix(in srgb, var(--atmosphere-accent) 28%, var(--line)); color: var(--muted); font-family: Georgia, "Times New Roman", serif; font-size: .84rem; line-height: 1.55; }
.station-hero-meta p { margin: 0 0 6px; }
.station-featured-image { margin-top: 4px; border: 0; }
.station-featured-image img { width: 100%; max-height: 760px; aspect-ratio: 16 / 8.8; object-fit: cover; }
.station-intro { padding: clamp(38px, 5vw, 68px) 0 36px; }
.station-motto { max-width: 850px; font-size: clamp(1.55rem, 3vw, 2.55rem); line-height: 1.3; letter-spacing: -.01em; }
.station-motto::after { content: ""; display: block; width: 38px; margin-top: 25px; border-top: 1px solid var(--atmosphere-accent); }
.station-motto span { margin-top: 9px; color: var(--muted); font-size: .52em; line-height: 1.65; letter-spacing: .04em; }
.station-content-shell { padding-top: 16px; }
.article-layout { grid-template-columns: minmax(0, 760px) minmax(245px, 1fr); }
.article-body { font-size: 1.04rem; }
.station-lead { margin-bottom: 58px; font-size: 1.08em; line-height: 2.05; }
.station-lead > :first-child { margin-top: 0; }
.article-section { position: relative; padding: 64px 0 28px; }
.article-section-number { position: absolute; top: 66px; left: -52px; margin: 0; color: color-mix(in srgb, var(--atmosphere-accent) 52%, var(--muted)); font-family: Georgia, "Times New Roman", serif; font-size: .66rem; letter-spacing: .12em; }
.article-section h2 { margin-bottom: 32px; font-size: clamp(2.05rem, 3.7vw, 3.45rem); }
.article-section h2 .jp-subtitle { margin-top: .58em; font-size: .36em; letter-spacing: .05em; }
.article-body figure { margin: 42px 0; }
.article-body figcaption { margin-top: 10px; color: var(--muted); font-size: .76rem; }
.station-sidebar { top: 116px; padding-left: 32px; }
.sidebar-kicker { margin: 0 0 9px; color: var(--muted); font-family: Georgia, "Times New Roman", serif; font-size: .65rem; letter-spacing: .14em; text-transform: uppercase; }
.sidebar-block h2 { margin-bottom: 22px; font-size: 1.45rem; }
.station-fact { grid-template-columns: 88px 1fr; padding: 8px 0; border-top: 1px solid color-mix(in srgb, var(--line) 68%, transparent); }
.station-fact:first-child { border-top: 0; }
.atmosphere-block { border-bottom: 0; }

/* Front-page cards: less “blog card”, more quiet magazine index. */
.station-card { background: transparent; border: 0; }
.station-card-media { background: #dedbd3; }
.station-card-body { padding: 22px 0 12px; }
.station-card .eyebrow { font-size: .68rem; }
.station-card-meta { max-width: 46rem; margin-top: 15px; font-size: .82rem; line-height: 1.75; }
.station-card h3 { font-size: clamp(1.55rem, 2.2vw, 2.35rem); }
.station-card h3 small { margin-top: 7px; }

.footer-from-tokyo { font-size: 1rem; letter-spacing: .01em; }

@media (max-width: 900px) {
  .station-hero-grid { grid-template-columns: 1fr; gap: 20px; }
  .station-hero-meta { padding: 14px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .article-section-number { position: static; margin-bottom: 10px; }
}
@media (max-width: 620px) {
  .station-page .breadcrumbs { padding-top: 24px; }
  .station-hero { padding-top: 25px; }
  .station-featured-image { width: 100%; }
  .station-featured-image img { aspect-ratio: 4 / 3; }
  .station-intro { padding-top: 32px; }
  .station-motto { font-size: 1.65rem; }
}

/* --------------------------------------------------
   v0.4 — Image-led front page
   -------------------------------------------------- */
.home-visual {
  position: relative;
  min-height: clamp(620px, 78vh, 900px);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.home-visual-link {
  position: relative;
  display: block;
  min-height: inherit;
  color: #fffdf7;
  text-decoration: none;
}
.home-visual-image,
.home-visual-shade {
  position: absolute;
  inset: 0;
}
.home-visual-image {
  background-position: center;
  background-size: cover;
  transform: scale(1.002);
}
.home-visual-shade {
  background:
    linear-gradient(90deg, rgba(18, 24, 17, .66) 0%, rgba(18, 24, 17, .31) 48%, rgba(18, 24, 17, .08) 100%),
    linear-gradient(0deg, rgba(15, 20, 14, .40) 0%, transparent 55%);
}
.home-visual-inner {
  position: relative;
  z-index: 2;
  min-height: inherit;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: clamp(100px, 14vw, 170px);
  padding-bottom: clamp(58px, 8vw, 96px);
}
.home-visual .hero-kicker { color: rgba(255, 253, 247, .82); }
.home-visual h1 {
  max-width: 930px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 7vw, 7rem);
  font-weight: 500;
  line-height: .96;
  letter-spacing: -.025em;
  text-shadow: 0 2px 26px rgba(0, 0, 0, .18);
}
.home-visual h1 .jp-subtitle {
  max-width: 760px;
  color: rgba(255, 253, 247, .9);
  font-size: .31em;
  text-shadow: none;
}
.home-featured-station {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 18px;
  width: fit-content;
  max-width: min(100%, 720px);
  margin-top: clamp(36px, 5vw, 64px);
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .48);
}
.home-featured-label {
  grid-row: span 2;
  align-self: start;
  padding-top: 4px;
  color: rgba(255, 253, 247, .72);
  font-size: .65rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.home-featured-station strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.25rem, 2.4vw, 2rem);
  font-weight: 500;
  line-height: 1.15;
}
.home-featured-station > span:last-child {
  color: rgba(255, 253, 247, .82);
  font-size: .78rem;
}
.home-visual.no-image .home-visual-inner { justify-content: center; }
.home-visual.no-image h1 { color: var(--ink); text-shadow: none; }
.home-visual.no-image h1 .jp-subtitle { color: var(--muted); }
.home-visual.no-image .hero-kicker { color: var(--atmosphere-accent); }

@media (max-width: 700px) {
  .home-visual { min-height: 680px; }
  .home-visual-shade {
    background:
      linear-gradient(0deg, rgba(15, 20, 14, .68) 0%, rgba(15, 20, 14, .26) 65%, rgba(15, 20, 14, .12) 100%);
  }
  .home-visual-inner { padding-bottom: 46px; }
  .home-visual h1 { font-size: clamp(3rem, 15vw, 5rem); }
  .home-featured-station { grid-template-columns: 1fr; gap: 5px; }
  .home-featured-label { grid-row: auto; }
}
