/* ═══════════════════════════════════════════════════════
   PALIMPALIM SURF — Balenciaga-inspired minimal design
   ═══════════════════════════════════════════════════════ */

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

:root {
  --black: #000;
  --white: #fff;
  --gray-100: #f5f5f5;
  --gray-200: #e5e5e5;
  --gray-400: #999;
  --gray-600: #666;
  --gray-800: #222;
  --font: 'Inter', 'Helvetica Neue', Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--white);
  color: var(--black);
  line-height: 1.4;
  overflow-x: hidden;
}

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

/* ── HEADER ───────────────────────────────────────────── */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  background: transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease;
  mix-blend-mode: difference;
}

.header.scrolled {
  background: var(--white);
  mix-blend-mode: normal;
  box-shadow: 0 1px 0 var(--gray-200);
}

.header__logo {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.3em;
  color: var(--white);
  transition: color 0.3s;
}

.header.scrolled .header__logo {
  color: var(--black);
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.header__link {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--white);
  transition: color 0.3s;
}

.header.scrolled .header__link {
  color: var(--black);
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 4px;
}

.lang-btn {
  background: none;
  border: none;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--gray-400);
  cursor: pointer;
  padding: 2px 4px;
  transition: color 0.2s;
}

.lang-btn.active {
  color: var(--white);
}

.header.scrolled .lang-btn.active {
  color: var(--black);
}

.lang-divider {
  font-size: 11px;
  color: var(--gray-400);
  font-weight: 300;
}

/* ── HERO ─────────────────────────────────────────────── */

.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__video-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--white);
}

.hero__subtitle {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.4em;
  margin-bottom: 20px;
  opacity: 0.8;
}

.hero__title {
  font-size: clamp(48px, 10vw, 120px);
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 0.95;
  margin-bottom: 40px;
}

.hero__cta {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3em;
  padding: 18px 50px;
  border: 2px solid var(--white);
  color: var(--white);
  transition: all 0.3s ease;
  cursor: pointer;
}

.hero__cta:hover {
  background: var(--white);
  color: var(--black);
}

/* ── SECTIONS ─────────────────────────────────────────── */

.section-header {
  padding: 80px 40px 40px;
  max-width: 1400px;
  margin: 0 auto;
}

.section-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.3em;
  margin-bottom: 10px;
}

.section-subtitle {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--gray-600);
}

/* ── TOP PICKS ────────────────────────────────────────── */

.top-picks {
  background: var(--white);
  border-top: 1px solid var(--black);
}

.top-picks__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px 80px;
  gap: 1px;
  background: var(--black);
}

.top-pick-card {
  background: var(--white);
  cursor: pointer;
  transition: opacity 0.3s;
}

.top-pick-card:hover {
  opacity: 0.85;
}

.top-pick-card__number {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2em;
  padding: 20px 24px 0;
  color: var(--gray-400);
}

.top-pick-card__img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.top-pick-card__body {
  padding: 20px 24px 24px;
}

.top-pick-card__name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.top-pick-card__region {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--gray-400);
  text-transform: uppercase;
  margin-bottom: 16px;
}

.top-pick-card__conditions {
  display: flex;
  gap: 24px;
  margin-bottom: 16px;
}

.condition {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.condition__label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--gray-400);
  text-transform: uppercase;
}

.condition__value {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.top-pick-card__reasons {
  list-style: none;
  padding: 0;
}

.top-pick-card__reasons li {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--gray-600);
  padding: 4px 0;
  border-top: 1px solid var(--gray-200);
}

.top-pick-card__reasons li::before {
  content: '→ ';
}

/* ── ALL SPOTS ────────────────────────────────────────── */

.all-spots {
  background: var(--gray-100);
  border-top: 1px solid var(--black);
}

.region-group {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
}

.region-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.4em;
  padding: 40px 0 20px;
  border-bottom: 1px solid var(--black);
  color: var(--gray-400);
}

.spots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1px;
  background: var(--gray-200);
  margin-bottom: 0;
}

.spot-card {
  background: var(--white);
  cursor: pointer;
  transition: opacity 0.3s;
}

.spot-card:hover {
  opacity: 0.85;
}

.spot-card__img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  filter: grayscale(30%);
  transition: filter 0.3s;
}

.spot-card:hover .spot-card__img {
  filter: grayscale(0%);
}

.spot-card__body {
  padding: 16px 20px 20px;
}

.spot-card__name {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.spot-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.spot-card__difficulty {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 3px 8px;
  border: 1px solid var(--black);
}

.spot-card__type {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--gray-400);
  text-transform: uppercase;
}

.spot-card__conditions {
  display: flex;
  gap: 20px;
}

.spot-card__conditions .condition__value {
  font-size: 14px;
}

/* ── MODAL ────────────────────────────────────────────── */

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  align-items: flex-end;
  justify-content: center;
}

.modal.open {
  display: flex;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  cursor: pointer;
}

.modal__content {
  position: relative;
  background: var(--white);
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal__close {
  position: sticky;
  top: 0;
  float: right;
  background: var(--white);
  border: none;
  font-size: 28px;
  font-weight: 300;
  padding: 16px 24px;
  cursor: pointer;
  z-index: 1;
  line-height: 1;
}

.modal__close:hover {
  opacity: 0.5;
}

/* Modal inner layout */
.modal-detail {
  padding: 0;
}

.modal-detail__hero {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.modal-detail__body {
  padding: 32px 40px 40px;
}

.modal-detail__name {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.modal-detail__region {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--gray-400);
  text-transform: uppercase;
  margin-bottom: 24px;
}

.modal-detail__conditions {
  display: flex;
  gap: 40px;
  padding: 20px 0;
  border-top: 1px solid var(--black);
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 24px;
}

.modal-detail__conditions .condition__value {
  font-size: 24px;
}

.modal-detail__description {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--gray-800);
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}

.modal-detail__info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 32px;
}

.info-block__label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--gray-400);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.info-block__value {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--gray-800);
}

.modal-detail__actions {
  display: flex;
  gap: 1px;
  background: var(--black);
  margin-top: 32px;
}

.modal-action {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  background: var(--white);
  font-family: var(--font);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  color: var(--black);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.modal-action:hover {
  background: var(--black);
  color: var(--white);
}

.modal-action--disabled {
  color: var(--gray-400);
  cursor: default;
  pointer-events: none;
}

/* Webcam overlay on hero image */
.modal-detail__hero-wrap {
  position: relative;
  width: 100%;
}

.modal-detail__live-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.25);
  text-decoration: none;
  transition: background 0.3s;
  cursor: pointer;
}

.modal-detail__live-overlay:hover {
  background: rgba(0, 0, 0, 0.5);
}

.modal-detail__live-badge {
  background: #e00;
  color: var(--white);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.2em;
  padding: 4px 10px;
  animation: livePulse 2s ease-in-out infinite;
}

.modal-detail__live-play {
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2em;
  padding: 12px 28px;
  border: 2px solid var(--white);
  transition: all 0.3s;
}

.modal-detail__live-overlay:hover .modal-detail__live-play {
  background: var(--white);
  color: var(--black);
}

@keyframes livePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Google Maps embed in modal */
.modal-detail__map {
  width: 100%;
  height: 250px;
  border: none;
  margin-top: 24px;
  filter: grayscale(100%);
  transition: filter 0.3s;
}

.modal-detail__map:hover {
  filter: grayscale(0%);
}

/* ── FOOTER ───────────────────────────────────────────── */

.footer {
  background: var(--black);
  color: var(--gray-400);
  padding: 60px 40px;
  text-align: center;
}

.footer__text {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.15em;
  margin-bottom: 8px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.footer__credit {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--white);
  margin-top: 24px;
}

/* ── LOADING STATE ────────────────────────────────────── */

.loading-pulse {
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.skeleton {
  background: var(--gray-200);
  height: 20px;
  width: 60px;
}

/* ── RESPONSIVE ───────────────────────────────────────── */

@media (max-width: 1024px) {
  .top-picks__grid {
    grid-template-columns: 1fr;
  }

  .modal-detail__info-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .header {
    padding: 16px 20px;
  }

  .header__link {
    display: none;
  }

  .hero__title {
    font-size: clamp(36px, 14vw, 80px);
  }

  .hero__cta {
    padding: 14px 36px;
    font-size: 12px;
  }

  .section-header {
    padding: 60px 20px 30px;
  }

  .top-picks__grid {
    padding: 0 20px 60px;
  }

  .region-group {
    padding: 0 20px;
  }

  .spots-grid {
    grid-template-columns: 1fr;
  }

  .top-pick-card__conditions {
    gap: 16px;
  }

  .modal__content {
    max-height: 95vh;
  }

  .modal-detail__body {
    padding: 24px 20px 30px;
  }

  .modal-detail__conditions {
    gap: 20px;
    flex-wrap: wrap;
  }

  .modal-detail__conditions .condition__value {
    font-size: 18px;
  }

  .modal-detail__actions {
    flex-direction: column;
  }

  .footer {
    padding: 40px 20px;
  }
}

@media (max-width: 480px) {
  .hero__subtitle {
    font-size: 9px;
    letter-spacing: 0.3em;
  }

  .spot-card__conditions {
    gap: 12px;
  }
}

/* ── SCROLLBAR ────────────────────────────────────────── */

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--white);
}

::-webkit-scrollbar-thumb {
  background: var(--gray-400);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--black);
}
