/* =========================================================
   Samurai Bikes — custom.css
   Flagship contemplative luxury · Kyoto museum calm
   Palette: Deep Black #0d0d0d · Gold #c9a227 · Ivory #f5f0e6
   ========================================================= */

:root {
  --ink: #0d0d0d;
  --ink-soft: #161616;
  --ink-deep: #0a0a0a;
  --gold: #c9a227;
  --gold-dim: #a6861f;
  --ivory: #f5f0e6;
  --ivory-muted: rgba(245, 240, 230, 0.55);
  --ease-lux: cubic-bezier(0.22, 1, 0.36, 1);
}

html.lenis,
html.lenis body {
  height: auto;
}

html.lenis {
  scroll-behavior: auto !important;
}

body.smb {
  background-color: var(--ink);
  color: var(--ivory);
  overflow-x: hidden;
  cursor: none;
}

body.smb.is-touch,
body.smb.no-custom-cursor {
  cursor: auto;
}

::selection {
  background: rgba(201, 162, 39, 0.35);
  color: var(--ivory);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10000;
  padding: 0.75rem 1.25rem;
  background: var(--gold);
  color: var(--ink);
  font-family: "Shippori Mincho", serif;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  cursor: auto;
}

/* ─── Luxury loader ─── */
.smb-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  transition: opacity 0.8s var(--ease-lux), visibility 0.8s;
}

.smb-loader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.smb-loader__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
}

.smb-loader__mark {
  font-size: 1.75rem;
  color: var(--gold);
  letter-spacing: 0.2em;
  opacity: 0.9;
}

.smb-loader__track {
  width: 8rem;
  height: 1px;
  background: rgba(201, 162, 39, 0.15);
  overflow: hidden;
}

.smb-loader__bar {
  width: 100%;
  height: 100%;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  animation: loaderHairline 1.4s var(--ease-lux) forwards;
}

.smb-loader__label {
  font-size: 0.7rem;
  color: rgba(245, 240, 230, 0.4);
}

@keyframes loaderHairline {
  0% { transform: scaleX(0); }
  100% { transform: scaleX(1); }
}

/* ─── Scroll progress ─── */
.smb-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  z-index: 60;
  pointer-events: none;
  background: transparent;
}

.smb-progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, transparent, var(--gold) 20%, var(--gold));
  box-shadow: 0 0 8px rgba(201, 162, 39, 0.25);
}

/* ─── Custom cursor ─── */
.smb-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.smb-cursor.is-on {
  opacity: 1;
}

.smb-cursor__ring {
  position: absolute;
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border: 1px solid rgba(201, 162, 39, 0.75);
  border-radius: 50%;
  transition: transform 0.35s var(--ease-lux), border-color 0.3s, width 0.35s, height 0.35s, margin 0.35s;
}

.smb-cursor__dot {
  position: absolute;
  width: 3px;
  height: 3px;
  margin: -1.5px 0 0 -1.5px;
  background: var(--gold);
  border-radius: 50%;
}

.smb-cursor.is-hover .smb-cursor__ring {
  width: 52px;
  height: 52px;
  margin: -26px 0 0 -26px;
  border-color: rgba(201, 162, 39, 1);
}

body.smb.is-touch .smb-cursor,
body.smb.no-custom-cursor .smb-cursor {
  display: none !important;
}

/* ─── Sticky nav ─── */
.smb-nav {
  background: transparent;
  transition: background 0.55s var(--ease-lux), backdrop-filter 0.55s;
}

.smb-nav__hairline {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 162, 39, 0.25), transparent);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.smb-nav.is-scrolled {
  background: rgba(13, 13, 13, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.smb-nav.is-scrolled .smb-nav__hairline {
  opacity: 1;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.45s var(--ease-lux);
}

.nav-link:hover::after,
.nav-link.is-active::after {
  width: 100%;
}

/* Gold underline */
.gold-underline {
  background-image: linear-gradient(var(--gold), var(--gold));
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0 1px;
  transition: background-size 0.5s var(--ease-lux), color 0.35s ease;
}

.gold-underline:hover {
  background-size: 100% 1px;
  color: var(--gold);
}

/* Buttons */
.btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.85rem;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: "Shippori Mincho", "Noto Serif JP", serif;
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  transition: background 0.45s var(--ease-lux), color 0.45s, border-color 0.45s, transform 0.4s;
  will-change: transform;
}

.btn-gold:hover {
  background: var(--gold);
  color: var(--ink);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.85rem;
  border: 1px solid rgba(245, 240, 230, 0.22);
  color: var(--ivory);
  font-family: "Shippori Mincho", "Noto Serif JP", serif;
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  transition: border-color 0.45s, color 0.45s, transform 0.4s;
  will-change: transform;
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.writing-vertical {
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.gold-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.5;
}

.gold-line-left {
  height: 1px;
  width: 4rem;
  background: var(--gold);
  opacity: 0.65;
}

/* Soft image treatment */
.img-heritage {
  filter: saturate(0.72) contrast(1.06) brightness(0.82);
  transition: filter 0.7s ease, transform 1s var(--ease-lux);
}

.group:hover .img-heritage,
article:hover .img-heritage,
.heritage-masonry__item:hover .img-heritage {
  filter: saturate(0.88) contrast(1.08) brightness(0.9);
  transform: scale(1.04);
}

/* ─── Parallax layered hero ─── */
.parallax-hero {
  background: var(--ink);
}

.parallax-layer {
  position: absolute;
  inset: -8%;
  will-change: transform;
}

.parallax-layer--bg {
  z-index: 1;
}

.parallax-layer--bg .parallax-layer__img {
  object-position: center 40%;
  opacity: 0.55;
}

.parallax-layer--mid {
  z-index: 2;
  inset: 8% 5% -5% 18%;
  clip-path: inset(0 0 0 0);
}

.parallax-layer--mid .parallax-layer__img {
  object-position: 70% center;
  opacity: 0.85;
  mask-image: linear-gradient(90deg, transparent 0%, #000 25%, #000 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 25%, #000 100%);
}

.parallax-layer--fg {
  inset: 0;
  z-index: 10;
  will-change: transform;
}

.parallax-layer__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.parallax-veil {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(13, 13, 13, 0.5) 0%, rgba(13, 13, 13, 0.35) 35%, rgba(13, 13, 13, 0.92) 100%),
    linear-gradient(90deg, rgba(13, 13, 13, 0.85) 0%, rgba(13, 13, 13, 0.35) 45%, rgba(13, 13, 13, 0.55) 100%);
}

.parallax-dust {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  opacity: 0.45;
}

.hero-calligraphy {
  text-shadow: 0 0 40px rgba(201, 162, 39, 0.08);
}

.hero-gold-line .hero-line-path,
.cta-gold-line .hero-line-path {
  stroke-dasharray: 280;
  stroke-dashoffset: 280;
}

.hero-scroll-line {
  display: block;
  width: 1px;
  height: 48px;
  background: linear-gradient(180deg, var(--gold), transparent);
  transform-origin: top;
  animation: scrollPulse 2.4s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.35; transform: scaleY(0.55); }
  50% { opacity: 0.9; transform: scaleY(1); }
}

.hero-fade {
  opacity: 0;
  transform: translateY(28px);
}

/* Philosophy pin */
.philosophy-line {
  opacity: 0.25;
  transform: translateY(16px);
}

.philosophy-line.is-lit {
  opacity: 1;
  transform: none;
}

/* Image reveal clip-path */
.reveal-clip {
  overflow: hidden;
}

.reveal-clip__inner {
  clip-path: inset(0 0 100% 0);
  transition: none;
}

.reveal-clip.is-revealed .reveal-clip__inner {
  clip-path: inset(0 0 0% 0);
}

/* Timeline scrub */
.timeline-scrub__card {
  position: relative;
  opacity: 0.35;
  transition: opacity 0.5s ease;
}

.timeline-scrub__card.is-active {
  opacity: 1;
}

.timeline-scrub__dot {
  width: 9px;
  height: 9px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: var(--ink);
}

.timeline-scrub__progress {
  transition: none;
}

/* Heritage masonry */
.heritage-masonry {
  columns: 1;
  column-gap: 1.5rem;
}

@media (min-width: 640px) {
  .heritage-masonry {
    columns: 2;
  }
}

@media (min-width: 1024px) {
  .heritage-masonry {
    columns: 3;
    column-gap: 1.75rem;
  }
}

.heritage-masonry__item {
  break-inside: avoid;
  margin-bottom: 1.75rem;
  position: relative;
}

.heritage-masonry__item--tall .reveal-clip__inner {
  aspect-ratio: 3 / 4;
}

.heritage-masonry__item:not(.heritage-masonry__item--tall) .reveal-clip__inner {
  aspect-ratio: 4 / 3;
}

.heritage-masonry__item--offset {
  transform: translateY(1.5rem);
}

.heritage-masonry__cap {
  margin-top: 0.85rem;
  padding-left: 0.15rem;
}

/* Journal cards — no heavy card chrome */
.journal-card {
  border: none;
  background: transparent;
}

/* Page banner (inner pages) */
.page-banner {
  position: relative;
  min-height: 48vh;
  display: flex;
  align-items: flex-end;
  padding: 8rem 0 4rem;
  overflow: hidden;
}

.page-banner__bg {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  filter: saturate(0.6) brightness(0.42);
}

.page-banner__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13, 13, 13, 0.4), rgba(13, 13, 13, 0.94));
}

/* Legacy timeline (inner pages) */
.timeline-rail {
  position: relative;
}

.timeline-rail::before {
  content: "";
  position: absolute;
  left: 0.55rem;
  top: 0.25rem;
  bottom: 0.25rem;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--gold), transparent);
  opacity: 0.4;
}

@media (min-width: 768px) {
  .timeline-rail::before {
    left: 50%;
    transform: translateX(-50%);
  }
}

.timeline-dot {
  width: 0.7rem;
  height: 0.7rem;
  border: 1px solid var(--gold);
  background: var(--ink);
  border-radius: 9999px;
  flex-shrink: 0;
}

/* Forms */
.smb-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(201, 162, 39, 0.35);
  padding: 0.85rem 0;
  color: var(--ivory);
  font-family: "Noto Serif JP", "Shippori Mincho", serif;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.35s ease;
  cursor: none;
}

body.smb.is-touch .smb-input,
body.smb.no-custom-cursor .smb-input {
  cursor: auto;
}

.smb-input:focus {
  border-bottom-color: var(--gold);
}

.smb-input::placeholder {
  color: rgba(245, 240, 230, 0.35);
}

textarea.smb-input {
  min-height: 8rem;
  resize: vertical;
}

.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1s var(--ease-lux), transform 1s var(--ease-lux);
}

.fade-up.is-in {
  opacity: 1;
  transform: none;
}

#mobileMenu.is-open {
  transform: translateX(0);
}

#menuToggle.is-open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

#menuToggle.is-open span:nth-child(2) {
  opacity: 0;
}

#menuToggle.is-open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.prose-heritage p {
  line-height: 2.2;
  letter-spacing: 0.045em;
}

/* Mobile hero mid layer simplification */
@media (max-width: 767px) {
  .parallax-layer--mid {
    inset: 20% 0 10% 0;
    opacity: 0.5;
  }

  .parallax-layer--mid .parallax-layer__img {
    mask-image: linear-gradient(180deg, transparent 0%, #000 30%, #000 70%, transparent 100%);
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 30%, #000 70%, transparent 100%);
  }

  .heritage-masonry__item--offset {
    transform: none;
  }
}

/* Reduced motion — disable parallax intensity & heavy anim */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  body.smb {
    cursor: auto;
  }

  .smb-cursor,
  .parallax-dust,
  .hero-scroll-line {
    display: none !important;
  }

  .smb-loader__bar {
    animation: none;
    transform: scaleX(1);
  }

  .parallax-layer,
  .parallax-layer--fg {
    transform: none !important;
    will-change: auto;
  }

  .hero-fade {
    opacity: 1 !important;
    transform: none !important;
  }

  .philosophy-line {
    opacity: 1 !important;
    transform: none !important;
  }

  .reveal-clip__inner {
    clip-path: none !important;
  }

  .fade-up,
  .img-heritage,
  .nav-link::after,
  .gold-underline,
  .btn-gold,
  .btn-ghost {
    transition: none !important;
  }

  .hero-gold-line .hero-line-path,
  .cta-gold-line .hero-line-path {
    stroke-dashoffset: 0 !important;
  }
}

.smb-loader{display:none!important}

