@import url('https://fonts.googleapis.com/css2?family=Anton&family=Work+Sans:ital,wght@0,400;0,500;0,600;1,400&display=swap');

:root {
  --pine: #16302a;
  --parchment: #f3eedf;
  --amber: #e2a63b;
  --dusk: #6e93a8;
  --ink: #1e211d;
  --line: rgba(22, 48, 42, 0.16);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--parchment);
  color: var(--ink);
  font-family: 'Work Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

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

/* ---------- Shared trail-marker mark ---------- */
.mark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.mark svg { width: 28px; height: 28px; flex-shrink: 0; }

/* ============================================================
   DESKTOP EXPERIENCE
   ============================================================ */
.desktop-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3.5rem 1.5rem 2.5rem;
}

.brand {
  text-align: center;
  margin-bottom: 0.4rem;
}
.brand .wordmark {
  font-family: 'Anton', sans-serif;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  letter-spacing: 0.02em;
  color: var(--pine);
  text-transform: lowercase;
  margin: 0.5rem 0 0;
}
.brand .tagline {
  font-style: italic;
  font-size: 1.05rem;
  color: var(--dusk);
  margin: 0.35rem 0 0;
  letter-spacing: 0.01em;
}

.trail-divider {
  width: 100%;
  max-width: 720px;
  height: 1px;
  margin: 2rem 0 2.25rem;
  background-image: linear-gradient(to right, var(--line) 60%, transparent 0%);
  background-size: 10px 1px;
  background-repeat: repeat-x;
}

.carousel-wrap {
  position: relative;
  width: 100%;
  max-width: 1100px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.carousel {
  flex: 1;
  display: flex;
  gap: 1.75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 1.5rem 0.5rem 2rem;
  scrollbar-width: thin;
  scrollbar-color: var(--dusk) transparent;
}
.carousel::-webkit-scrollbar { height: 6px; }
.carousel::-webkit-scrollbar-thumb { background: var(--dusk); border-radius: 4px; }

.postcard {
  position: relative;
  flex: 0 0 auto;
  width: 300px;
  height: 420px;
  scroll-snap-align: center;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
  padding: 10px 10px 34px;
  box-shadow: 0 10px 24px rgba(22, 48, 42, 0.16);
  transition: transform 0.25s ease;
  cursor: pointer;
  user-select: none;
}
.postcard:nth-child(odd) { transform: rotate(-1.2deg); }
.postcard:nth-child(even) { transform: rotate(1deg); }
.postcard:hover { transform: rotate(0deg) translateY(-4px); }

.postcard img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 2px;
  -webkit-user-drag: none;
}

.postcard .caption {
  position: absolute;
  bottom: 8px;
  left: 14px;
  right: 14px;
  font-size: 0.72rem;
  color: var(--pine);
  opacity: 0.75;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.like-stamp {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(243, 238, 223, 0.92);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 9px 3px 7px;
  font-size: 0.72rem;
  color: var(--pine);
  font-weight: 600;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease, background 0.15s ease;
}
.like-stamp:hover { transform: scale(1.08); background: #fff; }
.like-stamp:active { transform: scale(0.95); }
.like-stamp:focus-visible { outline: 2px solid var(--dusk); outline-offset: 2px; }
.like-stamp svg { width: 12px; height: 12px; }

.like-burst {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
}
.like-burst svg { width: 92px; height: 92px; }
.like-burst.pop {
  animation: burst 0.6s ease forwards;
}
@keyframes burst {
  0% { opacity: 0; transform: scale(0.4); }
  35% { opacity: 1; transform: scale(1.08); }
  60% { opacity: 1; transform: scale(0.96); }
  100% { opacity: 0; transform: scale(1); }
}

.nav-btn {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--pine);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}
.nav-btn:hover { background: var(--parchment); transform: scale(1.06); }
.nav-btn svg { width: 18px; height: 18px; }

.mobile-nudge {
  margin-top: 2.5rem;
  text-align: center;
  max-width: 420px;
}
.mobile-nudge .badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--pine);
  color: var(--parchment);
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}
.mobile-nudge .badge svg { width: 16px; height: 16px; }
.mobile-nudge p {
  margin-top: 0.75rem;
  font-size: 0.82rem;
  color: var(--dusk);
}

/* ============================================================
   MOBILE EXPERIENCE
   ============================================================ */
.mobile-shell {
  display: none;
}

@media (max-width: 760px) {
  .desktop-shell { display: none; }

  .mobile-shell {
    display: block;
    position: fixed;
    inset: 0;
    background: #000;
    overflow: hidden;
    touch-action: pan-y;
  }

  .m-track {
    position: absolute;
    inset: 0;
    display: flex;
    height: 100%;
    transition: transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
  }

  .m-slide {
    position: relative;
    flex: 0 0 100%;
    height: 100%;
  }

  .m-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    -webkit-user-drag: none;
    pointer-events: none;
  }

  .m-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.35) 0%, transparent 22%, transparent 72%, rgba(0,0,0,0.55) 100%);
    pointer-events: none;
  }

  .m-topbar {
    position: absolute;
    top: 0; left: 0; right: 0;
    padding: env(safe-area-inset-top, 18px) 18px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 5;
    pointer-events: none;
  }
  .m-topbar .mark { color: #fff; }
  .m-topbar .mark svg path, .m-topbar .mark svg circle { stroke: #fff; }
  .m-topbar .m-wordmark {
    font-family: 'Anton', sans-serif;
    font-size: 1.15rem;
    color: #fff;
    text-transform: lowercase;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 6px rgba(0,0,0,0.4);
  }

  .m-caption {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: calc(env(safe-area-inset-bottom, 22px) + 22px);
    color: #fff;
    z-index: 5;
    pointer-events: none;
  }
  .m-caption .loc {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    opacity: 0.75;
  }
  .m-caption .cap {
    font-size: 1.05rem;
    margin-top: 0.15rem;
    text-shadow: 0 1px 8px rgba(0,0,0,0.4);
  }

  .m-likecount {
    position: absolute;
    right: 10px;
    bottom: calc(env(safe-area-inset-bottom, 22px) + 10px);
    z-index: 6;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: #fff;
    pointer-events: auto;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: none;
    outline: none;
    padding: 14px;
    margin: 0;
    font: inherit;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  .m-likecount:active { transform: scale(0.9); }
  .m-likecount:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
  .m-likecount svg { width: 26px; height: 26px; }
  .m-likecount span { font-size: 0.75rem; font-weight: 600; }

  .m-dots {
    position: absolute;
    top: env(safe-area-inset-top, 14px);
    left: 18px;
    right: 18px;
    display: flex;
    gap: 4px;
    z-index: 6;
  }
  .m-dots .dot {
    height: 2.5px;
    flex: 1;
    background: rgba(255,255,255,0.35);
    border-radius: 2px;
    overflow: hidden;
  }
  .m-dots .dot.active { background: #fff; }

  .m-heart {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 110px;
    height: 110px;
    margin: -55px 0 0 -55px;
    z-index: 8;
    opacity: 0;
    pointer-events: none;
  }
  .m-heart.pop { animation: heartpop 0.65s ease forwards; }
  @keyframes heartpop {
    0% { opacity: 0; transform: scale(0.5) rotate(-8deg); }
    30% { opacity: 1; transform: scale(1.15) rotate(0deg); }
    55% { opacity: 1; transform: scale(0.95); }
    100% { opacity: 0; transform: scale(1.05); }
  }
}
