/* Wandr static site — palette taken from the original Shopify theme */
:root {
  --bg: #f1f1f1;
  --bg-alt: #ffffff;
  --fg: #2f2f2f;
  --fg-soft: #5a5a5a;
  --dark: #383531;
  --accent: #b64708;
  --accent-text: #ffffff;
  --border: #dcdcdc;
  --font-heading: "IBM Plex Sans Condensed", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Sarabun", "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* keep anchor targets clear of the sticky header (and sub-nav on the Nivo page) */
section[id] { scroll-margin-top: 84px; }
.page-nivo section[id] { scroll-margin-top: 128px; }

body {
  font-family: var(--font-body);
  color: var(--fg);
  background: var(--bg);
  line-height: 1.75;
  font-size: 15px;
}

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

h1, h2, h3 { font-family: var(--font-heading); line-height: 1.15; }

a { color: inherit; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
/* 40px in a 64px header ≈ 62% — enough presence without crowding the bar */
.site-header .logo img { height: 40px; width: auto; }
/* align-items:center keeps the 12px language switch on the same optical line
   as the 14px nav links instead of relying on line-height to centre them */
.site-header nav { display: flex; gap: 28px; align-items: center; }
.site-header nav a {
  text-decoration: none;
  font-size: 14px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--fg);
}
.site-header nav a:hover { color: var(--accent); }

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 30px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-primary:hover { background: #9c3c06; }
.btn-secondary { background: rgba(255,255,255,.92); color: var(--fg); border-color: rgba(255,255,255,.92); }
.btn-secondary:hover { background: #ffffff; border-color: #ffffff; }
.btn-outline { background: transparent; color: var(--fg); border-color: var(--fg); }
.btn-outline:hover { background: var(--fg); color: #ffffff; }

/* Hero */
.hero {
  position: relative;
  height: min(92vh, 56.25vw);
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  background-size: cover;
  background-position: center;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 20, .35);
}
.hero > .hero-inner { position: relative; max-width: 820px; padding: 90px 20px; }

/* Home hero: portrait crop on mobile, wide banner on desktop */
.hero-home {
  background-image: url('/assets/img/wandr-hero.jpg');
  background-position: center 25%;
}
@media (min-width: 821px) {
  .hero-home {
    background-image: url('/assets/img/wandr-hero-wide.jpg');
    background-position: center;
    height: min(84vh, 39.3vw);
  }
}
.hero .kicker {
  font-size: 13px;
  letter-spacing: .35em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(38px, 6vw, 64px);
  font-weight: 700;
  font-style: italic;
  margin-bottom: 18px;
}

/* The product name is always upright — the hero italic is a brand device for
   the headline voice, not for naming the bike. */
.page-nivo .hero h1 { font-style: normal; }
.hero p { font-size: 18px; max-width: 560px; margin: 0 auto 30px; }
.hero .actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* Sections */
section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: var(--dark); color: #fff; }

.eyebrow {
  font-size: 13px;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  font-weight: 600;
}
.section-dark .eyebrow { color: #e8a97e; }
h2 { font-size: clamp(28px, 4vw, 42px); margin-bottom: 18px; }
.lead { font-size: 17px; line-height: 1.8; color: var(--fg-soft); max-width: 640px; }
.section-dark .lead { color: #cfcfcf; }

/* Split (image + text) */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.split.reverse > .split-img { order: 2; }
.split-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* Feature cards */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 40px;
}
.card {
  padding: 30px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  transition: background .15s ease, border-color .15s ease;
}
.card:hover { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.22); }
.card-icon { width: 34px; height: 34px; display: block; margin-bottom: 18px; color: #e8a97e; }
.card h3 { font-size: 20px; margin-bottom: 10px; }
.card p { color: #cfcfcf; font-size: 14px; }

/* Video */
.video-wrap { max-width: 928px; margin: 30px auto 0; }
.video-wrap video { width: 100%; aspect-ratio: 16 / 9; background: #000; }

/* Specs table */
.specs-table { width: 100%; border-collapse: collapse; margin-top: 30px; max-width: 760px; }
.specs-table th, .specs-table td {
  text-align: left;
  padding: 14px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.specs-table th { font-family: var(--font-heading); font-weight: 600; width: 40%; }

/* Colours grid */
.colours { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 40px; }
.colours figure img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.colours figcaption {
  font-family: var(--font-heading);
  font-weight: 600;
  padding-top: 12px;
  text-align: center;
}
.swatch-dots { display: flex; gap: 7px; justify-content: center; margin-top: 9px; }
.swatch-dots span {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.14);
}

/* FAQ */
.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  cursor: pointer;
  padding: 18px 0;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 17px;
  list-style: none;
  position: relative;
  padding-right: 30px;
}
.faq summary::after { content: "+"; position: absolute; right: 4px; font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 0 18px; color: var(--fg-soft); }
.faq details p a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* Newsletter */
.newsletter { text-align: center; }
.newsletter form {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 26px;
  flex-wrap: wrap;
}
.newsletter input[type="email"] {
  padding: 14px 16px;
  font-size: 15px;
  font-family: var(--font-body);
  border: 1px solid var(--border);
  min-width: 300px;
}
.newsletter .form-note { font-size: 13px; color: var(--fg-soft); margin-top: 14px; }
.section-dark .newsletter input[type="email"] { border-color: transparent; }
.section-dark .form-note { color: #9a9a9a; }

/* Footer */
.site-footer { background: var(--dark); color: #cfcfcf; padding: 60px 0 30px; font-size: 14px; }
.site-footer .cols {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,.15);
}
.site-footer h4 {
  font-family: var(--font-heading);
  color: #fff;
  font-size: 15px;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.site-footer .brand img { height: 22px; width: auto; margin-bottom: 14px; filter: invert(1) brightness(1.6); }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: #cfcfcf; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer .fine { padding-top: 24px; text-align: center; color: #9a9a9a; font-size: 13px; }

/* Policy pages */
.policy-page { max-width: 820px; margin: 0 auto; padding: 60px 20px; background: var(--bg); }
.policy-page h1 { font-size: 34px; margin-bottom: 24px; }
.policy-page h2 { font-size: 22px; margin: 32px 0 12px; }
.policy-page p, .policy-page li { margin-bottom: 12px; color: var(--fg-soft); }
.policy-page ul, .policy-page ol { padding-left: 24px; }
.policy-page table { border-collapse: collapse; width: 100%; margin: 16px 0; }
.policy-page td, .policy-page th { border: 1px solid var(--border); padding: 10px; text-align: left; }

/* Sub-nav on Nivo page */
.subnav {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  position: sticky;
  top: 64px;
  z-index: 9;
}
.subnav .wrap { display: flex; gap: 28px; height: 52px; align-items: center; }
.subnav .name { font-family: var(--font-heading); font-weight: 700; font-size: 18px; margin-right: auto; }
.subnav a { text-decoration: none; color: var(--fg-soft); }
.subnav a:hover { color: var(--accent); }

@media (max-width: 820px) {
  /* The header runs out of room once the language switch is in — especially
     in Japanese, where the nav labels are wider. Tighten everything and drop
     the Contact link, which is still reachable from the footer and from the
     in-page CTA on every page. */
  .site-header .logo img { height: 32px; }
  .site-header nav { gap: 14px; }
  .site-header nav > a { font-size: 13px; }
  .nav-secondary { display: none; }
  .lang-switch { padding-left: 14px; }

  section { padding: 56px 0; }
  .hero { height: auto; min-height: 72vh; }
  .split { grid-template-columns: 1fr; gap: 30px; }
  .split.reverse > .split-img { order: 0; }
  .cards, .colours { grid-template-columns: 1fr; }
  .site-footer .cols { grid-template-columns: 1fr; }
  .newsletter input[type="email"] { min-width: 0; width: 100%; }
  .newsletter form { flex-direction: column; }
}

/* ═══════════════════════════════════════════════════════════════════
   Japanese (/ja/) — typography only. Layout is shared with the EN site.
   ═══════════════════════════════════════════════════════════════════ */

/* Body sets Noto Sans JP; headings keep IBM Plex Condensed FIRST so Latin
   words (Nivo, WANDR, Karmina HX200) stay on the brand face and only the
   Japanese glyphs fall through to Noto Sans JP. */
html[lang="ja"] body {
  font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  line-height: 1.85;              /* Japanese needs more leading than Latin */
}
html[lang="ja"] h1,
html[lang="ja"] h2,
html[lang="ja"] h3,
html[lang="ja"] h4,
html[lang="ja"] .kicker,
html[lang="ja"] .eyebrow,
html[lang="ja"] .btn,
html[lang="ja"] .specs-table th,
html[lang="ja"] .faq summary,
html[lang="ja"] .subnav .name {
  font-family: "IBM Plex Sans Condensed", "Noto Sans JP", "Hiragino Sans", sans-serif;
}

html[lang="ja"] h1, html[lang="ja"] h2 { line-height: 1.35; }
html[lang="ja"] .lead { line-height: 1.95; }

/* Japanese has no true italic — browsers synthesise a slant that looks
   broken, so Japanese hero headings run upright. */
html[lang="ja"] .hero h1 { font-style: normal; }

/* Tracking that suits Latin caps is too loose for kana/kanji */
html[lang="ja"] .hero .kicker { letter-spacing: .18em; }
html[lang="ja"] .eyebrow { letter-spacing: .14em; }

/* Japanese already breaks between most characters, so DON'T force
   overflow-wrap:anywhere — that splits Latin terms like "e-bike" across
   lines. `line-break: strict` applies proper kinsoku (no small kana or
   punctuation stranded at the start of a line). */
html[lang="ja"] p,
html[lang="ja"] li { line-break: strict; word-break: normal; overflow-wrap: break-word; }

/* Language switch — a utility control, NOT a nav item. At 13px next to the
   14px nav links it read as a third menu entry, so it's set smaller and
   quieter and fenced off with a rule. */
.lang-switch {
  display: flex;
  gap: 7px;
  align-items: center;
  padding: 7px 0 7px 24px;
  border-left: 1px solid var(--border);
  white-space: nowrap;            /* 「日本語」must never wrap */
}
/* Must out-specify `.site-header nav a` (0,0,1,2), which otherwise wins on
   size, colour and text-transform and makes this look like a nav link. */
.site-header .lang-switch a {
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: none;
  color: #8a8a8a;
}
.site-header .lang-switch a:hover { color: var(--accent); }
.site-header .lang-switch a[aria-current="true"] { color: var(--fg); font-weight: 600; }
.lang-switch span { color: var(--border); font-size: 11px; }
