/* JP STAR GROUP i Smart Car Rental — style.css
   コンセプト：成田空港に隣接するプレミアムカーレンタル。
   「空港の出発案内ボード」を思わせるモノスペース数字と、
   夜のドライブを思わせる濃紺 × 真鍮ゴールドを基調とする。 */

@import url('https://fonts.googleapis.com/css2?family=Shippori+Mincho+B1:wght@600;800&family=Noto+Sans+JP:wght@400;500;700&family=Noto+Sans+Thai:wght@400;500;700&family=Roboto+Mono:wght@400;500;700&display=swap');

:root {
  --bg: #0F1419;
  --bg-deep: #0A0D11;
  --surface: #171D24;
  --surface-2: #1E262E;
  --border: #2A323B;
  --text: #F2EFE9;
  --text-muted: #9BA5AF;
  --gold: #B9975B;
  --gold-bright: #D9BD87;
  --eco: #5C8A73;
  --eco-bg: rgba(92, 138, 115, 0.15);
  --danger: #C1554B;
  --danger-bg: rgba(193, 85, 75, 0.15);
  --radius: 4px;
  --radius-lg: 10px;
  --font-display: 'Shippori Mincho B1', serif;
  --font-body: 'Noto Sans JP', 'Hiragino Sans', sans-serif;
  --font-mono: 'Roboto Mono', monospace;
  --max-width: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 800; letter-spacing: 0.02em; margin: 0; }
.mono { font-family: var(--font-mono); }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 20, 25, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.03em;
}
.brand .brand-sub {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--gold);
  letter-spacing: 0.18em;
  display: block;
  font-weight: 500;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.92rem;
}
.nav-links a { color: var(--text-muted); transition: color .15s; }
.nav-links a:hover, .nav-links a.active { color: var(--gold-bright); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.lang-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}
.lang-toggle:hover { border-color: var(--gold); color: var(--gold-bright); }
.hamburger { display: none; background: none; border: none; color: var(--text); font-size: 1.4rem; }

@media (max-width: 860px) {
  .nav-links { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: flex-start;
    background: var(--surface); border-bottom: 1px solid var(--border); padding: 16px 24px; gap: 16px; display: none; }
  .nav-links.open { display: flex; }
  .hamburger { display: block; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: var(--radius);
  font-size: 0.92rem;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform .15s, filter .15s, background .15s;
}
.btn-gold { background: linear-gradient(180deg, var(--gold-bright), var(--gold)); color: #1A140A; }
.btn-gold:hover { filter: brightness(1.08); }
.btn-outline { border-color: var(--gold); color: var(--gold-bright); background: transparent; }
.btn-outline:hover { background: rgba(185, 151, 91, 0.1); }
.btn-ghost { color: var(--text-muted); background: transparent; border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text); border-color: var(--text-muted); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 0.8rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 96px 0 80px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse 900px 480px at 80% -10%, rgba(185,151,91,0.14), transparent 60%),
    var(--bg);
}
.hero .wrap { position: relative; z-index: 2; }
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  color: var(--gold);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-eyebrow::before { content: ''; width: 28px; height: 1px; background: var(--gold); display: inline-block; }
.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.35;
  max-width: 720px;
}
.hero p.lead {
  max-width: 560px;
  color: var(--text-muted);
  margin-top: 22px;
  font-size: 1.05rem;
}
.hero-actions { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }

/* Flight-path signature graphic */
.flight-path {
  margin-top: 64px;
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 640px;
}
.flight-path .node {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted); letter-spacing: 0.08em;
}
.flight-path .icon { width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: var(--gold-bright); background: var(--surface); }
.flight-path .line { flex: 1; height: 1px; background: repeating-linear-gradient(90deg, var(--gold) 0 6px, transparent 6px 12px); position: relative; }
.flight-path .line::after { content: '✈'; position: absolute; top: -9px; left: 50%; transform: translateX(-50%); color: var(--gold-bright); font-size: 0.85rem; }

/* ---------- Sections ---------- */
section { padding: 72px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: 36px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.section-eyebrow { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.2em; color: var(--gold); margin-bottom: 10px; display: block; }
.muted { color: var(--text-muted); }

/* ---------- Car Grid / Cards ---------- */
.car-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 980px) { .car-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .car-grid { grid-template-columns: 1fr; } }

.car-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color .15s, transform .15s;
  display: flex;
  flex-direction: column;
}
.car-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.car-thumb { aspect-ratio: 16/10; background: var(--surface-2); display: flex; align-items: center; justify-content: center; color: var(--gold); border-bottom: 1px solid var(--border); }
.car-thumb svg { width: 58%; opacity: 0.9; }
.car-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.car-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.04em; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-muted); }
.tag.eco { color: var(--eco); background: var(--eco-bg); border-color: transparent; }
.car-name { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; }
.car-name-sub { font-size: 0.82rem; color: var(--text-muted); }
.car-desc { font-size: 0.88rem; color: var(--text-muted); flex: 1; }
.car-price { display: flex; align-items: baseline; gap: 6px; margin-top: 4px; }
.car-price .amount { font-family: var(--font-mono); font-size: 1.3rem; color: var(--gold-bright); font-weight: 700; }
.car-price .unit { font-size: 0.78rem; color: var(--text-muted); }
.car-actions { display: flex; gap: 10px; margin-top: 8px; }

/* ---------- Forms ---------- */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.82rem; color: var(--text-muted); margin-bottom: 7px; letter-spacing: 0.02em; }
.field input, .field select, .field textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 11px 13px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.94rem;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--gold);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }
.check-row { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; font-size: 0.9rem; }
.check-row input { width: auto; margin-top: 3px; }
.form-error {
  background: var(--danger-bg); border: 1px solid var(--danger); color: #F3C9C4;
  padding: 10px 14px; border-radius: var(--radius); font-size: 0.85rem; margin-bottom: 16px; display: none;
}
.form-error.show { display: block; }
.form-note { font-size: 0.82rem; color: var(--text-muted); margin-top: 8px; }

/* ---------- Boarding-pass card (signature element) ---------- */
.boarding-pass {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: grid;
  grid-template-columns: 1fr 220px;
  overflow: hidden;
  position: relative;
}
@media (max-width: 700px) { .boarding-pass { grid-template-columns: 1fr; } }
.boarding-pass .stub-divider {
  position: absolute;
  top: 0; bottom: 0;
  right: 220px;
  width: 0;
  border-left: 1px dashed var(--border);
}
@media (max-width: 700px) { .boarding-pass .stub-divider { display: none; } }
.bp-main { padding: 30px 32px; }
.bp-eyebrow { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.2em; color: var(--gold); margin-bottom: 6px; }
.bp-title { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: 22px; }
.bp-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 28px; }
.bp-item .k { font-size: 0.7rem; color: var(--text-muted); letter-spacing: 0.1em; font-family: var(--font-mono); margin-bottom: 4px; }
.bp-item .v { font-family: var(--font-mono); font-size: 1.02rem; color: var(--text); }
.bp-item .v.big { font-size: 1.4rem; color: var(--gold-bright); }
.bp-stub {
  background: var(--surface-2);
  padding: 30px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  gap: 16px;
}
.bp-stub .code { font-family: var(--font-mono); font-size: 1.05rem; color: var(--gold-bright); letter-spacing: 0.03em; word-break: break-all; }
.bp-status { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border); }
.bp-status.pending_payment { color: var(--gold-bright); border-color: var(--gold); }
.bp-status.paid, .bp-status.confirmed { color: var(--eco); border-color: var(--eco); }
.bp-status.cancelled { color: var(--danger); border-color: var(--danger); }

/* ---------- Bank transfer block ---------- */
.bank-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-top: 20px;
}
.bank-box h3 { font-size: 1rem; margin-bottom: 14px; }
.bank-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
.bank-row:last-child { border-bottom: none; }
.bank-row .v { font-family: var(--font-mono); color: var(--gold-bright); }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.step { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; background: var(--surface); }
.step .num { font-family: var(--font-mono); color: var(--gold); font-size: 0.85rem; margin-bottom: 12px; }
.step h3 { font-size: 1.02rem; margin-bottom: 8px; }
.step p { font-size: 0.86rem; color: var(--text-muted); margin: 0; }

/* ---------- Table (admin / mypage) ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--text-muted); font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; background: var(--surface-2); }
tr:last-child td { border-bottom: none; }
.status-pill { font-family: var(--font-mono); font-size: 0.68rem; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); }
.status-pill.pending_payment { color: var(--gold-bright); border-color: var(--gold); }
.status-pill.paid, .status-pill.confirmed { color: var(--eco); border-color: var(--eco); }
.status-pill.cancelled { color: var(--danger); border-color: var(--danger); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 48px 0 30px; margin-top: 40px; }
.footer-grid { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.footer-grid .company p { color: var(--text-muted); font-size: 0.86rem; margin: 4px 0; }
.footer-links { display: flex; gap: 24px; font-size: 0.86rem; color: var(--text-muted); }
.copyright { margin-top: 30px; font-size: 0.75rem; color: var(--text-muted); font-family: var(--font-mono); }

/* ---------- Two-column layout (booking form / car detail) ---------- */
.split-layout {
  display: grid;
  align-items: start;
  gap: 32px;
}
.split-layout.wide-left { grid-template-columns: 1.4fr 1fr; }
.split-layout.even { grid-template-columns: 1.1fr 1fr; gap: 48px; }
.split-layout .sticky-aside { position: sticky; top: 96px; }
@media (max-width: 860px) {
  .split-layout.wide-left, .split-layout.even { grid-template-columns: 1fr; gap: 28px; }
  .split-layout .sticky-aside { position: static; top: auto; }
}

/* ---------- Utility ---------- */
html[data-lang="th"] body { font-family: 'Noto Sans Thai', var(--font-body); }
html[data-lang="th"] h1, html[data-lang="th"] h2, html[data-lang="th"] h3,
html[data-lang="th"] .bp-title, html[data-lang="th"] .car-name, html[data-lang="th"] .brand {
  font-family: 'Noto Sans Thai', var(--font-display);
}
.center { text-align: center; }
.mt-lg { margin-top: 40px; }
.narrow { max-width: 560px; margin: 0 auto; }
.toast {
  position: fixed; bottom: 24px; right: 24px; background: var(--surface); border: 1px solid var(--gold);
  color: var(--text); padding: 14px 20px; border-radius: var(--radius); font-size: 0.88rem; z-index: 100;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4); display: none;
}
.toast.show { display: block; }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--border); border-top-color: var(--gold); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
[data-lang-en], [data-lang-th] { display: none; }
html[data-lang="en"] [data-lang-ja], html[data-lang="en"] [data-lang-th] { display: none; }
html[data-lang="en"] [data-lang-en] { display: inline; }
html[data-lang="th"] [data-lang-ja], html[data-lang="th"] [data-lang-en] { display: none; }
html[data-lang="th"] [data-lang-th] { display: inline; }
