/**
 * Cycle Enthusiast JP — premium editorial dark theme
 * Accent: #5B7CFF / soft #B8C7FF
 * Display: Libre Baskerville · Body: Plus Jakarta Sans
 */

:root {
  --color-bg: #0A0A0B;
  --color-surface: #121214;
  --color-surface-2: #1A1A1D;
  --color-glass: rgba(255, 255, 255, 0.06);
  --color-glass-strong: rgba(255, 255, 255, 0.1);
  --color-accent: #5B7CFF;
  --color-accent-soft: #B8C7FF;
  --color-accent-dim: rgba(91, 124, 255, 0.15);
  --color-text: #F5F5F4;
  --color-muted: #A8A29E;
  --color-border: rgba(255, 255, 255, 0.1);
  --font-display: "Libre Baskerville", Georgia, serif;
  --font-body: "Plus Jakarta Sans", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 4rem;
  --section-py: clamp(3rem, 6vw, 5.5rem);
  --space-section: clamp(3rem, 6vw, 5.5rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
}

html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.font-display {
  font-family: var(--font-display);
}

/* ---------- Utilities ---------- */
.glass {
  background: var(--color-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--color-border);
}

.text-accent {
  color: var(--color-accent);
}

.text-accent-soft {
  color: var(--color-accent-soft);
}

.bg-surface {
  background: var(--color-surface);
}

.section {
  padding-block: var(--section-py);
}

.section--tight {
  padding-block: clamp(2.75rem, 5.5vw, 4.75rem);
}

.section-label {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 400;
  line-height: 1.2;
  color: var(--color-text);
  margin: 0.75rem 0 0;
}

.section-lead {
  margin-top: 1rem;
  max-width: 36rem;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-muted);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--color-accent);
  color: #0A0A0B;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  border: none;
  cursor: pointer;
  transition: background 0.3s var(--ease-out), transform 0.3s var(--ease-out), box-shadow 0.3s;
}

.btn-primary:hover {
  background: var(--color-accent-soft);
  box-shadow: 0 0 24px rgba(91, 124, 255, 0.35);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.875rem;
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s, color 0.3s;
}

.btn-ghost:hover {
  border-color: var(--color-accent);
  background: var(--color-accent-dim);
  color: var(--color-accent-soft);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--color-border);
  border-radius: 2px;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.875rem;
  padding: 0.7rem 0.9rem;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-dim);
}

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

.form-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-muted);
}

/* ---------- Nav ---------- */
.nav-link.is-active {
  color: var(--color-accent);
  position: relative;
}

.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.35rem;
  height: 1px;
  background: var(--color-accent);
}

@media (min-width: 768px) {
  .primary-nav {
    position: static !important;
    display: block !important;
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
  }
}

.primary-nav.is-open {
  display: block;
}

/* ---------- Parallax Hero ---------- */
.parallax-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  isolation: isolate;
}

.parallax-hero__bg,
.parallax-hero__mid {
  position: absolute;
  inset: -12% 0;
  background-size: cover;
  background-position: center;
  will-change: transform;
}

.parallax-hero__bg {
  z-index: 0;
  background-image: var(--hero-bg);
  transform: scale(1.08);
}

.parallax-hero__mid {
  z-index: 1;
  background-image: var(--hero-mid);
  opacity: 0.35;
  mix-blend-mode: soft-light;
  mask-image: linear-gradient(to bottom, transparent 0%, black 30%, black 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 30%, black 70%, transparent 100%);
}

.parallax-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(120deg, rgba(10, 10, 11, 0.85) 0%, rgba(10, 10, 11, 0.45) 45%, rgba(10, 10, 11, 0.7) 100%),
    linear-gradient(to top, rgba(10, 10, 11, 0.95) 0%, transparent 40%);
  pointer-events: none;
}

.parallax-hero__content {
  position: relative;
  z-index: 3;
  width: 100%;
  padding-block: 6rem 5rem;
}

.parallax-hero__headline {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 14ch;
}

.parallax-hero__headline em {
  font-style: italic;
  color: var(--color-accent-soft);
}

.hero-glass {
  margin-top: 2rem;
  max-width: 28rem;
  padding: 1.5rem 1.75rem;
  border-radius: 2px;
}

.hero-stats {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0 auto;
  padding: 0 1rem 2.5rem;
  max-width: 80rem;
  width: 100%;
}

.hero-stats .stat-card--float {
  flex: 1 1 9rem;
  min-width: 0;
  animation: none;
}

@media (min-width: 1024px) {
  .hero-stats {
    position: absolute;
    display: flex;
    flex-direction: column;
    right: max(1.5rem, calc((100vw - 80rem) / 2 + 1.5rem));
    bottom: 18%;
    margin: 0;
    padding: 0;
    width: auto;
    max-width: none;
  }

  .stat-card--float {
    min-width: 9.5rem;
    animation: floatY 6s ease-in-out infinite;
  }

  .stat-card--float:nth-child(2) {
    animation-delay: -2s;
    margin-left: 1.5rem;
  }

  .stat-card--float:nth-child(3) {
    animation-delay: -4s;
  }
}

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.scroll-indicator {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-muted);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.scroll-indicator__line {
  width: 1px;
  height: 2.5rem;
  background: linear-gradient(to bottom, var(--color-accent), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.7); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
}

/* ---------- Scenic CTA ---------- */
.scenic-cta {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.scenic-cta__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  will-change: transform;
}

.scenic-cta__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10, 10, 11, 0.9) 0%, rgba(10, 10, 11, 0.55) 100%);
}

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

@media (min-width: 768px) {
  .timeline::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, transparent, var(--color-accent), transparent);
    transform: translateX(-50%);
  }
}

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  .gallery-grid__item:nth-child(1) {
    grid-row: span 2;
  }

  .gallery-grid__item:nth-child(1) img {
    height: 100%;
    min-height: 100%;
    object-fit: cover;
  }
}

.gallery-grid__item {
  overflow: hidden;
  border-radius: 2px;
  border: 1px solid var(--color-border);
}

.gallery-grid__item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out);
}

.gallery-grid__item:hover img {
  transform: scale(1.05);
}

/* ---------- Awards strip ---------- */
.awards-track {
  display: flex;
  gap: 1.5rem;
  overflow: hidden;
}

.award-pill {
  flex: 0 0 auto;
  min-width: 240px;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: 2px;
}

/* ---------- FAQ ---------- */
.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1.25rem 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  color: var(--color-accent);
  font-family: var(--font-body);
  font-size: 1.25rem;
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item p {
  padding: 0 0 1.25rem;
  margin: 0;
  color: var(--color-muted);
  font-size: 0.925rem;
  line-height: 1.7;
}

/* ---------- Map placeholder ---------- */
.map-placeholder {
  position: relative;
  min-height: 320px;
  background:
    radial-gradient(circle at 40% 45%, rgba(91, 124, 255, 0.25), transparent 45%),
    linear-gradient(145deg, #121214 0%, #1a1f35 50%, #0A0A0B 100%);
  border: 1px solid var(--color-border);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.map-placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(91, 124, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 124, 255, 0.08) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.5;
}

.map-pin {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 1.5rem;
}

.map-pin__dot {
  width: 14px;
  height: 14px;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 0 8px rgba(91, 124, 255, 0.2);
  animation: pinPulse 2.5s ease-out infinite;
}

@keyframes pinPulse {
  0% { box-shadow: 0 0 0 0 rgba(91, 124, 255, 0.45); }
  70% { box-shadow: 0 0 0 18px rgba(91, 124, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(91, 124, 255, 0); }
}

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.5rem;
  font-size: 0.8rem;
  border: 1px solid var(--color-border);
  border-radius: 2px;
  color: var(--color-muted);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.pagination a:hover {
  border-color: var(--color-accent);
  color: var(--color-accent-soft);
}

.pagination .is-current {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #0A0A0B;
  font-weight: 600;
}

/* ---------- Swiper tweaks ---------- */
.testimonials-swiper .swiper-pagination-bullet {
  background: var(--color-muted);
  opacity: 0.4;
}

.testimonials-swiper .swiper-pagination-bullet-active {
  background: var(--color-accent);
  opacity: 1;
}

/* ---------- Page hero (inner) ---------- */
.page-hero {
  position: relative;
  padding: 3.25rem 0 2.25rem;
  min-height: 0;
}

.page-hero--compact {
  padding: 2.75rem 0 1.75rem;
  min-height: 0;
}

.category-jump__link {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-muted);
  text-decoration: none;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.category-jump__link:hover,
.category-jump__link:focus-visible {
  color: #fff;
  border-color: var(--color-accent);
  background: rgba(91, 124, 255, 0.15);
}

.category-band {
  scroll-margin-top: 7rem;
}
  border-bottom: 1px solid var(--color-border);
  background:
    radial-gradient(ellipse at 20% 0%, rgba(91, 124, 255, 0.12), transparent 50%),
    var(--color-bg);
}

/* ---------- Newsletter band ---------- */
.newsletter-band {
  background:
    linear-gradient(135deg, rgba(91, 124, 255, 0.12) 0%, transparent 50%),
    var(--color-surface);
  border-block: 1px solid var(--color-border);
}

/* ---------- Ambient grain ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .scroll-indicator__line,
  .stat-card--float {
    animation: none;
  }

  [data-aos],
  .parallax-hero__headline,
  .hero-glass,
  .hero-stats,
  .parallax-hero__content {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Breadcrumbs */
.breadcrumbs {
  font-size: 0.75rem;
  color: #a8a29e;
  margin-bottom: 1rem;
}
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.breadcrumbs a {
  color: #b8c7ff;
  text-decoration: none;
}
.breadcrumbs a:hover {
  text-decoration: underline;
}
.breadcrumbs [aria-current="page"] {
  color: #f5f5f4;
}

.related-links {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.related-links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
}
.related-links a {
  color: #b8c7ff;
  font-size: 0.875rem;
}

/* Responsive — stats + CTAs always visible */
@media (max-width: 1023px) {
  .parallax-hero__content {
    padding-block: 5.5rem 1.5rem;
  }

  .parallax-hero__headline {
    font-size: clamp(2rem, 8vw, 3.5rem);
    max-width: none;
  }

  .hero-glass {
    margin-top: 1.25rem;
    padding: 1.25rem 1.35rem;
  }

  .hero-glass .btn-primary,
  .hero-glass .btn-ghost {
    min-height: 44px;
  }

  .scroll-indicator {
    display: none;
  }

  .primary-nav {
    max-height: calc(100svh - var(--header-h, 4.5rem));
    overflow-y: auto;
  }

  .category-jump {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 639px) {
  .hero-stats {
    padding-bottom: 1.75rem;
  }
}
