/* ============================================================
   青葉モータース テストサイト  style.css(コーポレート調整版)
   紺×白基調 / 見出し明朝・本文ゴシック / 写真プレースホルダー前提
   ============================================================ */

:root {
  --navy-900: #122843;
  --navy-700: #1c3f69;
  --blue-500: #33619b;
  --blue-100: #d9e6f2;
  --mist: #f0f5fa;
  --paper: #ffffff;
  --ink: #243240;
  --muted: #5a6b7a;
  --gold: #b8821e;
  --line: #d5dfe8;

  --font-display: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "MS PMincho", serif;
  --font-body: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "YuGothic", "Meiryo", sans-serif;

  --header-h: 68px;
  --radius: 6px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

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

img, svg { max-width: 100%; height: auto; }

a { color: var(--blue-500); }

h1, h2, h3, h4 { margin: 0; line-height: 1.4; }

p { margin: 0 0 1em; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

@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;
  }
}

.container {
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: 24px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---- header ---- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.25s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 4px 18px rgba(18, 40, 67, 0.12);
}

.header-inner {
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--navy-900);
}

.brand-mark { flex: none; }

.brand-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.2;
}

.brand-sub {
  display: block;
  font-family: var(--font-body);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  color: var(--blue-500);
}

/* ---- global nav ---- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--navy-900);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.gnav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-tel {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--navy-700);
  text-decoration: none;
  border-radius: 4px;
  white-space: nowrap;
}

.nav-tel:hover { background: var(--mist); }

.gnav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.gnav a {
  display: block;
  position: relative;
  padding: 8px 14px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.gnav a:hover { color: var(--navy-700); background: var(--mist); }

.gnav a::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 2px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.gnav a.is-active { color: var(--navy-700); }
.gnav a.is-active::after { transform: scaleX(1); }

.gnav a.nav-stock {
  margin-left: 8px;
  padding: 8px 18px;
  color: var(--paper);
  background: var(--navy-700);
  border-radius: 4px;
}

.gnav a.nav-stock:hover { background: var(--navy-900); }
.gnav a.nav-stock::after { display: none; }

@media (max-width: 860px) {
  .nav-toggle { display: flex; }

  .gnav {
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(18, 40, 67, 0.14);
    display: none;
  }

  .gnav.is-open { display: block; }

  .nav-tel {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 8px 16px 0;
    padding: 12px;
    font-size: 1rem;
    color: var(--paper);
    background: var(--navy-700);
    border-radius: 4px;
    box-sizing: border-box;
  }

  .gnav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 16px 16px;
  }

  .gnav a { padding: 14px 12px; border-bottom: 1px solid var(--mist); }
  .gnav a::after { display: none; }
  .gnav a.is-active { background: var(--mist); }
  .gnav a.nav-stock { margin: 12px 0 0; text-align: center; }
}

/* ---- test banner(テストサイト明示バー) ---- */
.test-banner {
  margin-top: var(--header-h);
  padding: 8px 24px;
  background: var(--gold);
  color: var(--navy-900);
  text-align: center;
}

.test-banner p {
  margin: 0;
  max-width: 1080px;
  margin-inline: auto;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.6;
}

/* ---- hero ---- */
.hero {
  position: relative;
  padding: 72px 0 64px;
  color: var(--paper);
  background:
    linear-gradient(115deg, rgba(18, 40, 67, 0) 55%, rgba(51, 97, 155, 0.3) 100%),
    var(--navy-900);
  border-bottom: 3px solid var(--gold);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.hero-copy .hero-lead {
  font-size: 1rem;
  letter-spacing: 0.12em;
  color: var(--blue-100);
  margin-bottom: 12px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4.2vw, 2.9rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.5;
  margin-bottom: 20px;
}

.hero-desc {
  color: var(--blue-100);
  font-size: 0.9875rem;
  margin-bottom: 28px;
  max-width: 34em;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 36px; }

/* 実績表示(静かな数字の帯) */
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  padding-top: 20px;
  gap: 0 36px;
}

.hero-stats > div {
  padding-right: 36px;
  border-right: 1px solid rgba(255, 255, 255, 0.25);
}

.hero-stats > div:last-child { border-right: 0; padding-right: 0; }

.hero-stats .stat-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: rgba(217, 230, 242, 0.8);
  margin-bottom: 2px;
}

.hero-stats .stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--paper);
  letter-spacing: 0.04em;
}

.hero-stats-note {
  margin: 10px 0 0;
  font-size: 0.6875rem;
  color: rgba(217, 230, 242, 0.7);
}

.hero-fig { position: relative; }

@media (max-width: 860px) {
  .hero { padding: 48px 0 56px; }
  .hero-inner { grid-template-columns: 1fr; gap: 28px; }
  .hero-fig { max-width: 480px; }
  .hero-stats { gap: 12px 20px; }
  .hero-stats > div { padding-right: 20px; }
}

/* ---- 写真プレースホルダー ---- */
.photo-ph {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  width: 100%;
  height: 100%;
  min-height: 180px;
  color: var(--muted);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
}

.photo-ph small { font-size: 0.6875rem; opacity: 0.8; letter-spacing: 0.04em; }

.photo-ph--hero {
  aspect-ratio: 4 / 3;
  border: 1px dashed rgba(255, 255, 255, 0.4);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(217, 230, 242, 0.85);
}

.hero-photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.photo-ph--map {
  aspect-ratio: 4 / 3;
  border: 1px dashed var(--line);
  border-radius: 4px;
  background: var(--mist);
}

/* ---- buttons ---- */
.btn {
  display: inline-block;
  padding: 13px 30px;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-radius: 4px;
  border: 2px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn--primary {
  background: var(--paper);
  color: var(--navy-900);
}

.btn--primary:hover { background: var(--blue-100); }

.btn--ghost {
  background: transparent;
  color: var(--paper);
  border-color: rgba(255, 255, 255, 0.65);
}

.btn--ghost:hover { background: rgba(255, 255, 255, 0.12); }

.btn--navy {
  background: var(--navy-700);
  color: var(--paper);
}

.btn--navy:hover { background: var(--navy-900); }

/* ---- sections ---- */
.section { padding: 72px 0; }
.section--alt { background: var(--mist); }

.sec-head { margin-bottom: 36px; }

.sec-label {
  display: inline-block;
  padding: 3px 12px;
  margin-bottom: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--paper);
  background: var(--navy-700);
  border-radius: 2px;
}

.sec-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--navy-900);
}

.sec-note { color: var(--muted); font-size: 0.9375rem; margin-top: 8px; }

@media (max-width: 860px) {
  .section { padding: 52px 0; }
}

/* ---- news ---- */
.news-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.news-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: baseline;
  padding: 16px 4px;
  border-bottom: 1px solid var(--line);
}

.news-date {
  flex: none;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--blue-500);
  font-variant-numeric: tabular-nums;
}

.news-tag {
  flex: none;
  padding: 1px 10px;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--navy-700);
  background: var(--blue-100);
  border-radius: 2px;
}

.news-text { font-size: 0.9375rem; }

/* ---- reasons ---- */
.reason-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.reason-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--navy-700);
  border-radius: var(--radius);
  padding: 28px 24px;
}

.reason-card .icon { margin-bottom: 14px; }

.reason-card h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  color: var(--navy-900);
  margin-bottom: 10px;
}

.reason-card p { font-size: 0.9375rem; color: var(--muted); margin: 0; }

@media (max-width: 860px) {
  .reason-grid { grid-template-columns: 1fr; }
}

/* ---- services ---- */
.svc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}

.svc-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 20px;
  transition: box-shadow 0.2s ease;
}

.svc-card:hover {
  box-shadow: 0 8px 20px rgba(18, 40, 67, 0.1);
}

.svc-card .icon {
  display: grid;
  place-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 14px;
  background: var(--mist);
  border-radius: 4px;
  color: var(--navy-700);
}

.svc-card h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: 8px;
}

.svc-card p { font-size: 0.875rem; color: var(--muted); margin: 0; }

/* ---- car cards ---- */
.car-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.car-card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.car-photo {
  position: relative;
  background: var(--mist);
  border-bottom: 1px solid var(--line);
  aspect-ratio: 4 / 3;
}

/* microCMS導入時: .car-photo内の<img>にそのまま適用される */
.car-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.car-photo img.img-placeholder {
  object-fit: contain;
  background: var(--paper);
  padding: 16px;
  box-sizing: border-box;
}

.badge-sold {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--paper);
  background: #8c3030;
  border-radius: 2px;
}

.car-card.is-sold .car-photo { filter: grayscale(0.55); opacity: 0.9; }

.car-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }

.car-name {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: 4px;
}

.car-grade { font-size: 0.8125rem; color: var(--muted); margin-bottom: 12px; }

.car-spec {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
  margin-bottom: 16px;
}

.car-spec th, .car-spec td {
  padding: 5px 4px;
  border-bottom: 1px solid var(--mist);
  text-align: left;
  font-weight: 400;
}

.car-spec th { width: 5.5em; color: var(--muted); white-space: nowrap; }

/* 価格表示 */
.price {
  margin-top: auto;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-top: 12px;
  border-top: 2px solid var(--navy-900);
}

.price .price-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.price .price-value {
  margin-left: auto;
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1;
  color: var(--navy-900);
  font-variant-numeric: tabular-nums;
}

.price .price-unit {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--navy-900);
}

.price-note {
  font-size: 0.75rem;
  color: var(--muted);
  text-align: right;
  margin: 6px 0 0;
}

/* ---- hours ---- */
.hours-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.hours-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.hours-card h3 {
  font-size: 1rem;
  color: var(--navy-900);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--blue-100);
}

.hours-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.hours-table th, .hours-table td {
  padding: 10px 6px;
  border-bottom: 1px solid var(--mist);
  text-align: left;
  font-weight: 400;
}

.hours-table th { width: 8em; color: var(--muted); font-weight: 600; }

@media (max-width: 700px) {
  .hours-grid { grid-template-columns: 1fr; }
}

/* ---- company ---- */
.company-dl {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper);
}

.company-dl > div {
  display: grid;
  grid-template-columns: 220px 1fr;
}

.company-dl > div:nth-child(odd) { background: var(--mist); }

.company-dl dt {
  padding: 16px 20px;
  font-weight: 700;
  color: var(--navy-900);
  font-size: 0.9375rem;
}

.company-dl dd {
  margin: 0;
  padding: 16px 20px;
  font-size: 0.9375rem;
}

.company-dl ul { margin: 0; padding-left: 1.2em; }

@media (max-width: 700px) {
  .company-dl > div { grid-template-columns: 1fr; }
  .company-dl dt { padding-bottom: 0; }
  .company-dl dd { padding-top: 4px; }
}

/* ---- access ---- */
.access-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.map-frame {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
}

.map-caption { font-size: 0.75rem; color: var(--muted); text-align: center; margin: 8px 0 0; }

.route-list { margin: 0 0 20px; padding: 0; list-style: none; }

.route-list li {
  position: relative;
  padding: 10px 0 10px 26px;
  font-size: 0.9375rem;
  border-bottom: 1px solid var(--mist);
}

.route-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 1.15em;
  width: 8px;
  height: 8px;
  background: var(--gold);
}

.addr-box {
  background: var(--navy-900);
  color: var(--paper);
  border-radius: var(--radius);
  padding: 20px 24px;
  font-size: 0.9375rem;
}

.addr-box strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.125rem;
  margin-bottom: 6px;
}

.addr-box a { color: var(--blue-100); }

@media (max-width: 860px) {
  .access-grid { grid-template-columns: 1fr; }
}

/* ---- page hero(下層ページ用) ---- */
.page-hero {
  padding: 52px 0 44px;
  color: var(--paper);
  background:
    linear-gradient(115deg, rgba(18, 40, 67, 0) 55%, rgba(51, 97, 155, 0.3) 100%),
    var(--navy-900);
  border-bottom: 3px solid var(--gold);
}

.page-hero .hero-lead {
  font-size: 0.875rem;
  letter-spacing: 0.14em;
  color: var(--blue-100);
  margin-bottom: 6px;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.6vw, 2.4rem);
  letter-spacing: 0.06em;
}

/* ---- stock notice ---- */
.stock-notice {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--navy-700);
  border-radius: 4px;
  padding: 18px 22px;
  font-size: 0.9375rem;
  margin-bottom: 36px;
}

.stock-notice p:last-child { margin-bottom: 0; }

/* ---- sub-title(在庫ページのグルーピング見出し) ---- */
.sub-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy-900);
  letter-spacing: 0.04em;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--blue-100);
}

.sub-title--sold {
  margin-top: 56px;
  color: var(--muted);
  border-bottom-color: var(--line);
}

.sub-title--sold + .sec-note { margin-top: -12px; margin-bottom: 24px; }

/* ---- footer ---- */
.site-footer {
  background: var(--navy-900);
  color: var(--blue-100);
  padding: 56px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  margin-bottom: 36px;
}

.footer-brand .brand-name { color: var(--paper); font-size: 1.35rem; }
.footer-brand .brand-sub { color: var(--blue-100); }

.footer-brand p { font-size: 0.875rem; margin-top: 14px; }

.footer-contact { font-size: 0.9375rem; }

.footer-contact .tel {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.04em;
}

.footer-contact .tel a {
  color: var(--paper);
  text-decoration: none;
}

.footer-contact .tel a:hover { text-decoration: underline; }

.footer-contact a { color: var(--blue-100); }

.footer-note {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding-top: 20px;
  font-size: 0.75rem;
  color: rgba(217, 230, 242, 0.75);
}

.footer-note .test-note {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 12px;
  border: 1px solid rgba(217, 230, 242, 0.4);
  border-radius: 2px;
}

.copyright { font-size: 0.75rem; margin: 10px 0 0; }

@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---- section CTA ---- */
.section-cta { text-align: center; margin-top: 36px; }
