@font-face {
  font-family: 'Bagel Fat One';
  src: url('assets/bagel-fat-one-title.woff2') format('woff2');
  font-display: swap;
  font-weight: 400;
}

:root {
  color-scheme: light;
  --background: oklch(0.987 0.006 188);
  --surface: oklch(1 0 0);
  --ink: oklch(0.28 0.05 184);
  --muted: oklch(0.43 0.036 183);
  --rule: oklch(0.86 0.035 182);
  --primary: oklch(0.9 0.119 113);
  --hero: oklch(0.958 0.062 111);
  --coral-ink: oklch(0.46 0.156 34);
  --ocean: oklch(0.88 0.1 196);
  --sun: oklch(0.935 0.125 97);
  --petal: oklch(0.92 0.073 25);
  --sky: oklch(0.913 0.061 247);
  --lilac: oklch(0.92 0.055 312);
  --display: 'Bagel Fat One', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --text: 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', system-ui, sans-serif;
  --gutter: clamp(1rem, 3.25vw, 3.5rem);
  font-family: var(--text);
  font-size: 100%;
  line-height: 1.55;
  background: var(--background);
  color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, p, figure, ol, ul { margin: 0; }
button, a { touch-action: manipulation; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 0.16rem solid var(--coral-ink); outline-offset: 0.2rem; }
[hidden] { display: none !important; }

.wrap {
  width: min(calc(100% - 2 * var(--gutter)), 80rem);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  z-index: 2;
  top: 0.5rem;
  left: 0.5rem;
  translate: 0 -180%;
  padding: 0.65rem 1rem;
  background: var(--surface);
}
.skip-link:focus { translate: 0; }

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 4.2rem;
  gap: 0.5rem;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.75rem;
  text-decoration: none;
  font-weight: 850;
  font-size: 1.13rem;
  white-space: nowrap;
}
.wordmark-icon {
  display: grid;
  place-items: center;
  width: 1.9rem;
  aspect-ratio: 1;
  border-radius: 45% 55% 48% 52%;
  background: var(--primary);
  font-size: 1.19rem;
  line-height: 1;
}
.masthead nav { display: flex; align-items: center; gap: clamp(0.75rem, 2.7vw, 2rem); }
.masthead nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-size: 0.94rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}
.masthead nav a:hover { text-decoration: underline; text-underline-offset: 0.25em; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 42fr) minmax(0, 58fr);
  overflow: clip;
  border-radius: clamp(1rem, 2.5vw, 2rem);
  background: var(--hero);
}
.hero-copy {
  padding: clamp(1.6rem, 3.8vw, 3.6rem) clamp(1.25rem, 4vw, 4rem);
  align-self: center;
}
.hero-location { margin-bottom: 0.85rem; font-size: clamp(0.85rem, 1.6vw, 1rem); font-weight: 780; }
.hero h1 {
  font: 400 clamp(2.8rem, 5.55vw, 5.4rem) / 1.06 var(--display);
  letter-spacing: -0.035em;
  word-break: keep-all;
}
.hero h1 em { color: var(--coral-ink); font-style: normal; }
.hero-intro { margin-top: clamp(0.9rem, 1.75vw, 1.35rem); font-size: clamp(0.95rem, 1.5vw, 1.1rem); font-weight: 570; }
.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 2.85rem;
  margin-top: 1.35rem;
  padding: 0.42rem 1rem;
  border-radius: 0.55rem;
  background: var(--ink);
  color: var(--surface);
  font-weight: 760;
  text-decoration: none;
}
.hero-link:hover { background: var(--coral-ink); }
.hero-link span { font-size: 1.2em; }
.hero-picture { position: relative; min-height: 100%; background: var(--ocean); }
.hero-picture img { position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: center 57%; }

section[id] { scroll-margin-top: 1rem; }
.itinerary, .shops { margin-top: clamp(2.65rem, 5vw, 4rem); }
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 1.1rem;
}
.section-heading h2 { font-size: clamp(1.65rem, 3.15vw, 2.45rem); line-height: 1.18; font-weight: 850; letter-spacing: -0.035em; }
.section-heading p { margin-top: 0.38rem; color: var(--muted); font-size: clamp(0.95rem, 1.6vw, 1.05rem); }
.rail-controls { display: flex; align-items: center; gap: 0.4rem; }
.rail-controls button {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: var(--surface);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}
.rail-controls button:hover { background: var(--primary); }
.rail-controls button[aria-disabled='true'] { color: var(--muted); background: transparent; cursor: default; }
.route-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(11rem, 1fr);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-color: var(--rule) transparent;
  scrollbar-width: thin;
  scroll-snap-type: x mandatory;
  list-style: none;
  padding: 0.35rem 0 0.55rem;
}
.stop {
  position: relative;
  min-width: 0;
  padding: 0.25rem 0.85rem 0.85rem 0.1rem;
  scroll-snap-align: start;
}
.stop:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 2.05rem;
  left: 4.4rem;
  right: 0.52rem;
  border-top: 0.18rem dotted var(--rule);
}
.stop-icon, .shop-stamp {
  display: grid;
  place-items: center;
  width: 3.65rem;
  aspect-ratio: 1;
  border-radius: 49% 51% 52% 48% / 44% 52% 48% 56%;
  background: var(--tint);
  font-size: 1.8rem;
  line-height: 1;
}
.stop-arrival, .shop-cat { --tint: var(--sun); }
.stop-beach, .shop-globe { --tint: var(--ocean); }
.stop-shops, .shop-shell { --tint: var(--petal); }
.stop-market, .shop-turtle { --tint: var(--primary); }
.stop-rest, .shop-bird { --tint: var(--sky); }
.shop-tiger { --tint: oklch(0.928 0.101 71); }
.shop-candle { --tint: var(--lilac); }
.shop-box { --tint: oklch(0.895 0.058 48); }
.stop-time { margin-top: 0.7rem; font-size: clamp(1.2rem, 2.2vw, 1.7rem); line-height: 1.2; font-variant-numeric: tabular-nums; font-weight: 850; letter-spacing: -0.035em; white-space: nowrap; }
.stop-time small { font-size: 0.57em; font-weight: 730; letter-spacing: 0; }
.stop h3 { margin-top: 0.45rem; font-size: 1.14rem; font-weight: 820; }
.stop > p:last-child, .stop-link { color: var(--muted); font-size: 0.94rem; }
.stop > p:last-child { padding-block: 0.62rem; }
.stop-link {
  display: inline-flex;
  gap: 0.3rem;
  align-items: center;
  min-height: 2.75rem;
  text-underline-offset: 0.21em;
  font-weight: 700;
}
.stop-link:hover, .shop-links a:hover { color: var(--coral-ink); }

.shops {
  padding: clamp(1.25rem, 3.1vw, 2.5rem);
  border: 1px solid var(--rule);
  border-radius: clamp(1rem, 2.5vw, 2rem);
  background: oklch(0.962 0.025 186);
}
.shops .section-heading { margin-bottom: 1.4rem; }
.shop-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.6rem, 1.25vw, 1rem);
  padding: 0;
  list-style: none;
}
.shop {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  padding: clamp(0.85rem, 1.45vw, 1.25rem) clamp(0.8rem, 1.4vw, 1.2rem) 0.45rem;
  border: 1px solid var(--rule);
  border-radius: 0.8rem;
  background: var(--surface);
}
.shop-stamp { width: 2.75rem; margin-bottom: 0.65rem; transform: rotate(-6deg); font-size: 1.45rem; }
.shop:nth-child(2n) .shop-stamp { transform: rotate(6deg); }
.shop h3 { font-size: clamp(1.03rem, 1.55vw, 1.25rem); line-height: 1.25; font-weight: 830; word-break: keep-all; overflow-wrap: anywhere; }
.shop-handle { margin-top: 0.22rem; color: var(--muted); font-size: 0.85rem; overflow-wrap: anywhere; }
.shop-links { display: flex; flex-wrap: wrap; gap: 0 0.8rem; margin-top: auto; padding-top: 0.35rem; }
.shop-links a { display: inline-flex; align-items: center; min-height: 2.75rem; gap: 0.2rem; font-size: 0.86rem; font-weight: 760; text-decoration: underline; text-underline-offset: 0.22em; white-space: nowrap; }

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.15rem 1rem;
  padding-block: 1.6rem 2rem;
  color: var(--muted);
  font-size: 0.88rem;
}
.site-footer a { display: inline-flex; gap: 0.25rem; align-items: center; min-height: 2.75rem; font-weight: 750; text-underline-offset: 0.2em; }

@media (max-width: 62rem) {
  .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 44rem) {
  .masthead { min-height: 3.7rem; }
  .hero { grid-template-columns: 1fr; }
  .hero h1 { font-size: clamp(2.9rem, 9vw, 4rem); }
  .hero-copy { padding: 1.45rem 1.4rem 1.55rem; }
  .hero-location { margin-bottom: 0.65rem; }
  .hero-picture { min-height: 0; aspect-ratio: 1.85; }
  .hero-link { margin-top: 1rem; }
  .section-heading { align-items: center; }
  .route-rail { grid-auto-columns: clamp(11rem, 55vw, 16rem); }
  .stop::after { right: 0.7rem; }
  .shops { padding: 1.15rem 0.85rem; }
  .shops .section-heading { padding-inline: 0.28rem; }
}

@media (max-width: 23rem) {
  .shop-handle { font-size: 0.79rem; }
  .shop-links { gap: 0 0.5rem; }
  .shop-links a { font-size: 0.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
