/* ============================================================================
   Purple RV — style.css
   Brand-led design system for the camping-trailer marketing site.
   Purple primary + warm outdoor accent, light theme, mobile-first responsive.
   No external dependencies (fonts are system stacks).
   ========================================================================== */

:root {
  /* Brand palette */
  --purple-900: #2e1065;
  --purple-800: #4c1d95;
  --purple-700: #5b21b6;
  --purple-600: #6d28d9;
  --purple-500: #7c3aed;
  --purple-200: #d4c9f2;
  --purple-100: #ede9fe;
  --purple-050: #f5f3ff;

  --accent: #f59e0b;      /* warm outdoor accent */
  --accent-dark: #d97706;

  /* Neutrals */
  --ink: #1c1626;
  --body: #453b52;
  --muted: #7a7188;
  --line: #e7e2ef;
  --bg: #ffffff;
  --bg-soft: #f7f5fb;
  --bg-alt: #f5f3ff;

  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(46, 16, 101, .06), 0 1px 3px rgba(46, 16, 101, .08);
  --shadow-md: 0 10px 30px rgba(46, 16, 101, .10);
  --shadow-lg: 0 24px 60px rgba(46, 16, 101, .16);

  --container: 1140px;
  --gutter: clamp(1rem, 4vw, 2.5rem);

  --font: "Helvetica Neue", "Hiragino Kaku Gothic ProN", "Hiragino Sans",
    "Noto Sans JP", Meiryo, system-ui, -apple-system, sans-serif;
}

/* ---- Reset-ish ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--body);
  background: var(--bg);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--purple-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { color: var(--ink); line-height: 1.3; font-weight: 700; letter-spacing: .01em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); margin: 0 0 .5em; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin: 0 0 .6em; }
h3 { font-size: 1.15rem; margin: 0 0 .4em; }
p { margin: 0 0 1rem; }

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

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--purple-700); color: #fff; padding: .6rem 1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--purple-500); outline-offset: 2px; border-radius: 4px; }

/* ---- Layout helpers ---- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 760px; }
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-alt { background: var(--bg-alt); }
.section-center { text-align: center; }
.center { text-align: center; }
.muted { color: var(--muted); }
.lead { font-size: clamp(1.05rem, 2.2vw, 1.25rem); color: var(--body); }
.lead.center { max-width: 760px; margin-inline: auto; }

/* ---- Buttons ---- */
.btn {
  display: inline-block; font-weight: 600; font-size: 1rem;
  padding: .8rem 1.6rem; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
  text-decoration: none; line-height: 1.2;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--purple-600); color: #fff; box-shadow: var(--shadow-md); }
.btn-primary:hover { background: var(--purple-700); color: #fff; }
.btn-ghost { background: transparent; color: var(--purple-700); border-color: var(--purple-200, #d4c9f2); }
.btn-ghost:hover { background: var(--purple-050); color: var(--purple-800); }

.link-arrow { font-weight: 600; color: var(--purple-700); white-space: nowrap; }
.link-arrow::after { content: " →"; }

/* ---- Header / nav ---- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 1rem; }
.brand-logo { display: block; height: 30px; width: auto; }
.brand-logo-footer { height: 34px; }

.nav-list { list-style: none; display: flex; align-items: center; gap: clamp(.6rem, 2vw, 1.6rem); margin: 0; padding: 0; }
.nav-list a { color: var(--body); font-weight: 600; font-size: .95rem; padding: .4rem 0; }
.nav-list a:hover { color: var(--purple-700); text-decoration: none; }
.nav-list a[aria-current="page"] { color: var(--purple-700); border-bottom: 2px solid var(--purple-600); }
.nav-lang a {
  border: 1.5px solid var(--line); border-radius: 999px; padding: .35rem .9rem !important;
  color: var(--purple-700); font-size: .85rem;
}
.nav-lang a:hover { background: var(--purple-050); border-color: var(--purple-200, #d4c9f2); }

.nav-toggle { display: none; background: none; border: 0; padding: .5rem; cursor: pointer; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 24px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease; content: "";
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before { position: absolute; top: -7px; }
.nav-toggle-bars::after { position: absolute; top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { top: 0; transform: rotate(-45deg); }

/* ---- Hero ---- */
.hero { position: relative; overflow: hidden; background: linear-gradient(160deg, var(--purple-900), var(--purple-700) 55%, var(--purple-500)); color: #fff; }
.hero-bg { position: absolute; inset: 0; opacity: .5; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-inner { position: relative; padding: clamp(3.5rem, 10vw, 7rem) var(--gutter); max-width: var(--container); }
.hero-eyebrow { text-transform: uppercase; letter-spacing: .28em; font-size: .8rem; font-weight: 700; color: var(--accent); margin: 0 0 1rem; }
.hero-title { color: #fff; max-width: 16ch; }
.hero-sub { font-size: clamp(1.05rem, 2.4vw, 1.35rem); max-width: 46ch; color: rgba(255, 255, 255, .92); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }

/* ---- Highlights ---- */
.highlights { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2.5rem; }
.highlight { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 2rem 1.6rem; box-shadow: var(--shadow-sm); }
.highlight-icon { display: inline-flex; width: 52px; height: 52px; border-radius: 14px; background: var(--purple-100); margin-bottom: 1rem; position: relative; }
.highlight-icon::before { content: ""; position: absolute; inset: 0; background: var(--purple-700); -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; -webkit-mask-size: 26px; mask-size: 26px; }
.highlight-icon[data-icon="road"]::before { -webkit-mask-image: url("/static/img/icon-road.svg"); mask-image: url("/static/img/icon-road.svg"); }
.highlight-icon[data-icon="home"]::before { -webkit-mask-image: url("/static/img/icon-home.svg"); mask-image: url("/static/img/icon-home.svg"); }
.highlight-icon[data-icon="shield"]::before { -webkit-mask-image: url("/static/img/icon-shield.svg"); mask-image: url("/static/img/icon-shield.svg"); }

/* ---- Section head ---- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
.section-head h2 { margin: 0; }

/* ---- Model cards ---- */
.model-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.model-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .15s ease, box-shadow .2s ease; display: flex; flex-direction: column; }
.model-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.model-card-media { display: block; aspect-ratio: 16 / 10; background: var(--purple-100); }
.model-card-media img { width: 100%; height: 100%; object-fit: cover; }
.model-card-body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.model-card-name { margin: 0; }
.model-card-tag { color: var(--purple-600); font-weight: 600; font-size: .9rem; margin: 0; }
.model-card-summary { color: var(--body); font-size: .95rem; flex: 1; }
.model-card .link-arrow { margin-top: .4rem; }

/* ---- Page head ---- */
.page-head { background: var(--bg-alt); padding: clamp(2.5rem, 6vw, 4rem) 0; border-bottom: 1px solid var(--line); }
.page-head h1 { margin-bottom: .3em; }
.page-head .lead { max-width: 60ch; }
.crumb { margin: 0 0 .6rem; font-size: .9rem; }
.hero-eyebrow { }
.page-head .hero-eyebrow { color: var(--purple-600); }

/* ---- Dealer CTA ---- */
.dealer-cta { background: linear-gradient(135deg, var(--purple-700), var(--purple-500)); color: #fff; border-radius: var(--radius-lg); padding: clamp(2rem, 5vw, 3.5rem); box-shadow: var(--shadow-md); }
.dealer-cta h2 { color: #fff; }
.dealer-cta p { color: rgba(255, 255, 255, .92); max-width: 52ch; }
.dealer-cta .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .6); }
.dealer-cta .btn-ghost:hover { background: rgba(255, 255, 255, .12); }

/* ---- Model detail ---- */
.model-detail { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.model-detail-media img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); background: var(--purple-100); }
.model-price { font-weight: 600; color: var(--ink); }
.specs-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); }
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table th, .spec-table td { text-align: left; padding: .75rem .5rem; border-bottom: 1px solid var(--line); }
.spec-table th { color: var(--muted); font-weight: 600; width: 42%; }
.equip-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.equip-list li { padding-left: 1.6rem; position: relative; }
.equip-list li::before { content: ""; position: absolute; left: 0; top: .55em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* ---- Features ---- */
.feature-sections { display: grid; gap: 2.5rem; }
.feature-row { display: grid; grid-template-columns: auto 1fr; gap: 1.5rem; align-items: start; padding-bottom: 2.5rem; border-bottom: 1px solid var(--line); }
.feature-row:last-child { border-bottom: 0; padding-bottom: 0; }
.feature-row-index { font-size: 2.5rem; font-weight: 800; color: var(--purple-100); line-height: 1; }
.check-list { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .5rem; }
.check-list li { padding-left: 1.9rem; position: relative; }
.check-list li::before { content: ""; position: absolute; left: 0; top: .35em; width: 18px; height: 18px; background: var(--purple-600); -webkit-mask: url("/static/img/icon-check.svg") center / contain no-repeat; mask: url("/static/img/icon-check.svg") center / contain no-repeat; }

/* ---- Prose + info card (about / dealer / privacy) ---- */
.prose-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.prose p { max-width: 68ch; }
.prose h2 { margin-top: 1.8rem; }
.info-card { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.8rem; box-shadow: var(--shadow-sm); position: sticky; top: 88px; }
.info-card h2 { font-size: 1.2rem; }
.info-dl { display: grid; grid-template-columns: 1fr; gap: .2rem; margin: 1rem 0 0; }
.info-dl dt { font-size: .8rem; color: var(--muted); font-weight: 700; margin-top: .8rem; }
.info-dl dd { margin: 0; color: var(--ink); }

/* ---- Contact form ---- */
.form-wrap { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.contact-form { display: grid; gap: 1.2rem; }
.field { display: grid; gap: .4rem; }
.field label { font-weight: 600; color: var(--ink); font-size: .95rem; }
.field .req { color: #b91c1c; font-size: .72rem; font-weight: 700; margin-left: .25rem; }
.field .opt { color: var(--muted); font-size: .72rem; font-weight: 600; margin-left: .25rem; }
.field input, .field select, .field textarea {
  font: inherit; color: var(--ink); padding: .7rem .85rem; border: 1.5px solid var(--line);
  border-radius: 10px; background: #fff; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--purple-500); outline: none; }
.field-error input, .field-error textarea, .field-error select { border-color: #dc2626; background: #fef2f2; }
.field-msg { color: #b91c1c; font-size: .85rem; margin: 0; }

/* ---- Thanks / error ---- */
.thanks-mark { font-size: 3rem; color: var(--purple-600); }
.error-code { font-size: clamp(4rem, 16vw, 8rem); font-weight: 800; color: var(--purple-100); line-height: 1; margin: 0; }

/* ---- Footer ---- */
.site-footer { background: var(--purple-900); color: rgba(255, 255, 255, .8); margin-top: 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.4fr; gap: 2rem; padding-top: 3rem; padding-bottom: 2.5rem; }
.footer-brand .brand-logo { filter: brightness(0) invert(1); }
.footer-tagline { margin-top: 1rem; color: rgba(255, 255, 255, .7); max-width: 30ch; }
.footer-operator { margin-top: .6rem; font-size: .82rem; color: rgba(255, 255, 255, .55); }
.footer-nav ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.footer-nav a, .footer-dealer a { color: rgba(255, 255, 255, .85); }
.footer-nav a:hover, .footer-dealer a:hover { color: #fff; }
.footer-dealer-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .16em; color: var(--accent); margin: 0 0 .3rem; }
.footer-dealer-name { font-weight: 700; color: #fff; margin: 0 0 .3rem; }
.footer-dealer p { margin: 0 0 .3rem; font-size: .92rem; }
.footer-legal { border-top: 1px solid rgba(255, 255, 255, .12); padding: 1.2rem 0; font-size: .85rem; }
.footer-legal p { margin: 0; }

/* ============================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .highlights, .model-grid { grid-template-columns: repeat(2, 1fr); }
  .model-detail, .specs-wrap, .prose-grid, .form-wrap { grid-template-columns: 1fr; }
  .info-card { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: fixed; inset: 68px 0 auto 0; background: #fff; border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height .28s ease; box-shadow: var(--shadow-md);
  }
  .site-nav.is-open { max-height: 80vh; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; padding: .5rem var(--gutter) 1.2rem; }
  .nav-list li { border-bottom: 1px solid var(--line); }
  .nav-list a { display: block; padding: .9rem 0; }
  .nav-list a[aria-current="page"] { border-bottom: 1px solid var(--line); }
  .nav-lang { border-bottom: 0 !important; margin-top: .6rem; }
  .nav-lang a { display: inline-block; }
  .highlights, .model-grid { grid-template-columns: 1fr; }
  .feature-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
