/* ==========================================================================
   Langen × VINS — leggenda.motorists.jp
   Design tokens
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Color — named from the brief: brand steel (from the MOTORISTS logo),
     ink of a crankcase, smoke-blue of two-stroke exhaust, throttle red for
     urgency, and a warm paper for light sections. */
  --ink:          #14171a;
  --ink-soft:     #1e2226;
  --steel:        #707f87; /* matches supplied logo fill */
  --steel-soft:   #aab4b9;
  --paper:        #f1eee7;
  --paper-dim:    #e7e2d7;
  --smoke-blue:   #3c6e71;
  --throttle-red: #b23a2e;
  --white:        #ffffff;

  /* Type */
  --font-display: 'Oswald', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  /* Layout */
  --max-width: 1200px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius: 2px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

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

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

img { max-width: 100%; display: block; }

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0 0 0.5em;
  text-transform: uppercase;
}

p { margin: 0 0 1em; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--smoke-blue);
  margin-bottom: 0.75em;
  display: inline-block;
}

.section {
  padding: clamp(64px, 10vw, 128px) 0;
  scroll-margin-top: 90px; /* keeps anchored sections clear of the fixed header */
}

.section--dark {
  background: var(--ink);
  color: var(--paper);
}

.section--dark .eyebrow { color: var(--steel-soft); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.9em 1.6em;
  border-radius: var(--radius);
  border: 1px solid currentColor;
  cursor: pointer;
  background: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.btn--solid {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.btn--solid:hover { background: var(--smoke-blue); border-color: var(--smoke-blue); }

.btn--ghost-light {
  color: var(--paper);
  border-color: var(--steel-soft);
}
.btn--ghost-light:hover { background: rgba(241,238,231,0.1); }

.btn--urgent {
  background: var(--throttle-red);
  color: var(--white);
  border-color: var(--throttle-red);
}
.btn--urgent:hover { background: #963025; border-color: #963025; }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  background: rgba(20, 23, 26, 0.88);
  backdrop-filter: blur(6px);
}

.site-header .logo {
  width: 140px;
  height: auto;
}

.site-nav {
  display: flex;
  gap: clamp(16px, 3vw, 36px);
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.site-nav a {
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color 0.2s ease;
}
.site-nav a:hover { border-color: var(--steel-soft); }

.nav-toggle { display: none; }

@media (max-width: 760px) {
  .site-nav {
    position: fixed;
    top: 62px; left: 0; right: 0;
    flex-direction: column;
    background: var(--ink);
    padding: 20px var(--gutter) 28px;
    gap: 18px;
    transform: translateY(-140%);
    transition: transform 0.25s ease;
  }
  .site-nav.is-open { transform: translateY(0); }
  .nav-toggle {
    display: block;
    background: none;
    border: none;
    color: var(--paper);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
  }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
  padding-top: 110px;
}

.hero::before {
  /* racing stripe motif — a single deliberate diagonal, not decoration piled on */
  content: "";
  position: absolute;
  top: 0; right: -10%;
  width: 46%;
  height: 100%;
  background: linear-gradient(180deg, var(--smoke-blue), var(--ink) 85%);
  clip-path: polygon(38% 0, 100% 0, 100% 100%, 12% 100%);
  opacity: 0.9;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 var(--gutter) clamp(56px, 8vw, 96px);
  max-width: 760px;
}

.hero-content .eyebrow { color: var(--steel-soft); }

.hero-content h1 {
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  line-height: 1.02;
  margin-bottom: 0.3em;
}

.hero-content h1 em {
  font-style: normal;
  color: var(--steel-soft);
}

.hero-sub {
  font-size: 1.05rem;
  max-width: 46ch;
  color: var(--steel-soft);
  margin-bottom: 2em;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* Tachometer scroll indicator — the signature element.
   A rev-counter arc that sweeps as the visitor scrolls the page,
   echoing the dashboard of the machines themselves. */
.tacho {
  position: fixed;
  right: clamp(14px, 3vw, 32px);
  bottom: clamp(14px, 3vw, 32px);
  width: 74px;
  height: 74px;
  z-index: 90;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.tacho.is-visible { opacity: 1; }

.tacho svg { width: 100%; height: 100%; }
.tacho-track { fill: none; stroke: rgba(112,127,135,0.35); stroke-width: 4; }
.tacho-fill  { fill: none; stroke: var(--throttle-red); stroke-width: 4; stroke-linecap: round;
  transition: stroke-dashoffset 0.1s linear; }
.tacho-label {
  font-family: var(--font-mono);
  font-size: 9px;
  fill: var(--paper);
  text-anchor: middle;
}

/* ==========================================================================
   Brand intro (shared pattern for VINS / Langen openers)
   ========================================================================== */

.brand-intro {
  max-width: 68ch;
}

.brand-intro h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
}

/* Full-bleed brand hero shot — sits between the intro and the model grid */
.brand-visual {
  position: relative;
  margin: 48px calc(var(--gutter) * -1) 0;
  overflow: hidden;
}

.brand-visual img {
  width: 100%;
  height: clamp(280px, 52vw, 640px);
  object-fit: cover;
  display: block;
}

.brand-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(20,23,26,0.85) 0%, rgba(20,23,26,0.05) 45%, rgba(20,23,26,0) 70%);
  pointer-events: none;
}

.section:not(.section--dark) .brand-visual::after {
  background: linear-gradient(0deg, rgba(20,23,26,0.55) 0%, rgba(20,23,26,0.02) 45%, rgba(20,23,26,0) 70%);
}

.brand-visual__caption {
  position: absolute;
  left: var(--gutter);
  bottom: 20px;
  z-index: 2;
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brand-visual__caption strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.6vw, 2rem);
  text-transform: none;
  letter-spacing: 0.01em;
  margin-bottom: 0.15em;
}

/* ==========================================================================
   Model grid (VINS Strada/Competitione, Langen 2T/Lightspeed)
   ========================================================================== */

.model-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-top: 48px;
}

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

.model-card {
  position: relative;
  border: 1px solid rgba(112,127,135,0.4);
  padding: 28px;
  background: rgba(255,255,255,0.02);
}

.section:not(.section--dark) .model-card {
  background: var(--white);
  border-color: var(--paper-dim);
}

.model-card.is-recommended {
  border-color: var(--smoke-blue);
}

.model-card__badge {
  position: absolute;
  top: -12px; left: 24px;
  background: var(--smoke-blue);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
}

.model-card__badge.badge--urgent { background: var(--throttle-red); }

.model-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.2em;
}

.model-card .model-tagline {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--steel);
  margin-bottom: 1.2em;
}

.model-card__status {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  padding: 8px 12px;
  border: 1px dashed rgba(112,127,135,0.5);
  margin: 1em 0 1.4em;
}

.model-card__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 1.2em;
}

/* Approved Used slot — an independent, clearly-marked block so it can be
   swapped or hidden without touching the rest of the 2T card. */
.approved-used-slot {
  margin-top: 1.4em;
  padding: 14px;
  border: 1px solid rgba(178,58,46,0.4);
  background: rgba(178,58,46,0.06);
  font-size: 0.9rem;
}
.approved-used-slot[data-state="empty"] {
  border-style: dashed;
  border-color: rgba(112,127,135,0.4);
  background: none;
  color: var(--steel-soft);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

/* ==========================================================================
   Detail gallery (thumbnails → lightbox)
   ========================================================================== */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 8px;
  margin-top: 1.2em;
}

.gallery button {
  padding: 0;
  border: 1px solid rgba(112,127,135,0.4);
  background: none;
  cursor: pointer;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.gallery img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.gallery button:hover img { transform: scale(1.06); }

/* EV01 — deliberately small, quiet treatment */
.ev01-note {
  margin-top: 3em;
  padding-top: 2em;
  border-top: 1px solid rgba(112,127,135,0.3);
  font-size: 0.9rem;
  color: var(--steel);
  max-width: 50ch;
}
.ev01-note h4 {
  font-size: 0.85rem;
  color: var(--steel);
  margin-bottom: 0.4em;
}

/* Test ride / consultation callout */
.consult-block {
  margin-top: 3em;
  padding: 28px;
  background: rgba(112,127,135,0.08);
  border-left: 3px solid var(--smoke-blue);
}
.section--dark .consult-block {
  background: rgba(241,238,231,0.05);
}
.consult-block h4 {
  font-size: 1.1rem;
  margin-bottom: 0.6em;
}
.consult-block ul {
  margin: 0.8em 0 1.4em;
  padding-left: 1.2em;
  font-size: 0.92rem;
}
.consult-block li { margin-bottom: 0.4em; }

/* ==========================================================================
   Contact / consultation form
   ========================================================================== */

.form-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 2em;
}

.form-tab {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.8em 1.4em;
  background: none;
  border: 1px solid var(--steel-soft);
  color: var(--paper);
  cursor: pointer;
}
.form-tab.is-active {
  background: var(--paper);
  color: var(--ink);
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 720px;
}

.contact-form .field--full { grid-column: 1 / -1; }

@media (max-width: 640px) {
  .contact-form { grid-template-columns: 1fr; }
}

.contact-form label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.5em;
  color: var(--steel-soft);
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form select,
.contact-form textarea {
  width: 100%;
  background: rgba(241,238,231,0.06);
  border: 1px solid rgba(170,180,185,0.4);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.7em 0.9em;
  border-radius: var(--radius);
}

.contact-form textarea { min-height: 120px; resize: vertical; }

.contact-form .checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 0.6em;
  font-size: 0.9rem;
}
.contact-form .checkbox-field input { margin-top: 0.3em; }

.consult-fields {
  display: none;
}
.consult-fields.is-active {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 640px) {
  .consult-fields.is-active { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Lightbox
   ========================================================================== */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10,12,14,0.94);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 32px;
}
.lightbox.is-open { display: flex; }

.lightbox img {
  max-width: 90vw;
  max-height: 78vh;
  object-fit: contain;
}

.lightbox-caption {
  position: absolute;
  bottom: 28px; left: 0; right: 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--steel-soft);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: 1px solid var(--steel-soft);
  color: var(--paper);
  font-family: var(--font-mono);
  cursor: pointer;
  padding: 10px 14px;
}
.lightbox-close { top: 24px; right: 24px; }
.lightbox-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 24px; top: 50%; transform: translateY(-50%); }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--ink);
  color: var(--steel-soft);
  padding: 48px var(--gutter) 32px;
  font-size: 0.85rem;
}

.site-footer .logo { width: 120px; margin-bottom: 1.4em; opacity: 0.85; }

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgba(112,127,135,0.3);
  padding-bottom: 24px;
  margin-bottom: 20px;
}

.footer-links {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0; padding: 0;
}
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--paper); }
