/* A Walk For You — styles */

:root {
  --bg: #f6f1e7;
  --bg-soft: #f0e9d9;
  --ink: #1d1914;
  --ink-muted: #5a5048;
  --ink-soft: #8a7f72;
  --accent: #6b2d2d;
  --accent-soft: #a66b5c;
  --rule: #d8cfbd;
  --paper: #ffffff;
}

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

html {
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: "EB Garamond", Garamond, Georgia, serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.58;
  font-weight: 400;
  font-feature-settings: "kern", "liga", "onum";
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,0.04) 100%);
  pointer-events: none;
  z-index: 1;
}

main {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 24px 96px;
  position: relative;
  z-index: 2;
}

.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  background: var(--accent);
  transform-origin: left center;
  transform: scaleX(0);
  z-index: 100;
  transition: transform 0.1s linear;
  opacity: 0.8;
}

.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero */

.hero {
  padding: 96px 0 56px;
  text-align: center;
  position: relative;
}

.hero h1 {
  font-family: "EB Garamond", Garamond, Georgia, serif;
  font-weight: 500;
  font-size: clamp(2.75rem, 9vw, 4.5rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  font-style: italic;
  color: var(--ink);
  margin-bottom: 32px;
}

.hero .subtitle {
  font-size: 1.2rem;
  color: var(--ink-muted);
  margin-bottom: 12px;
  max-width: 28em;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

.hero .meta {
  font-size: 1rem;
  color: var(--ink-soft);
  font-style: italic;
  max-width: 30em;
  margin-left: auto;
  margin-right: auto;
}

.scroll-hint {
  margin-top: 64px;
  display: flex;
  justify-content: center;
}

.scroll-hint-line {
  display: block;
  width: 1px;
  height: 48px;
  background: var(--ink-soft);
  opacity: 0.5;
  animation: scroll-hint 2.2s ease-in-out infinite;
  transform-origin: top center;
}

@keyframes scroll-hint {
  0%, 100% { transform: scaleY(0.4); opacity: 0.3; }
  50% { transform: scaleY(1); opacity: 0.7; }
}

/* Intro */

.intro {
  padding: 24px 0 72px;
  border-bottom: 1px solid var(--rule);
  max-width: 34em;
  margin: 0 auto;
}

.intro p {
  font-size: 1.13rem;
  margin-bottom: 18px;
}

.intro .note {
  font-style: italic;
  color: var(--ink-muted);
  font-size: 1rem;
  margin-top: 20px;
}

/* Drop cap */

.drop-cap::first-letter {
  font-family: "EB Garamond", Georgia, serif;
  font-weight: 500;
  font-size: 3.4em;
  line-height: 0.85;
  float: left;
  padding: 4px 10px 0 0;
  color: var(--accent);
  font-style: normal;
}

/* Stops */

.stop {
  padding: 72px 0 36px;
  border-bottom: 1px solid var(--rule);
}

.stop:last-of-type {
  border-bottom: none;
}

.stop-media {
  margin-bottom: 32px;
  overflow: hidden;
  background: var(--bg-soft);
  border-radius: 2px;
  box-shadow: 0 4px 40px -12px rgba(0, 0, 0, 0.14);
}

.stop-media img,
.stop-media video {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #1d1914;
  max-height: 260px;
}

.stop-body {
  max-width: 34em;
  margin: 0 auto;
}

.stop-title {
  font-family: "EB Garamond", Garamond, Georgia, serif;
  font-size: clamp(1.75rem, 5.2vw, 2.2rem);
  font-weight: 500;
  line-height: 1.1;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.stop-numeral {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  opacity: 0.85;
  margin-right: 0.15em;
  letter-spacing: 0.01em;
}

.stop-numeral-optional {
  color: var(--accent-soft);
  font-style: normal;
}

.stop-location {
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-style: italic;
  line-height: 1.45;
  margin-bottom: 24px;
}

.stop-body > p {
  font-size: 1.1rem;
  margin-bottom: 18px;
  hyphens: auto;
  -webkit-hyphens: auto;
}

/* Prompt */

.prompt {
  margin: 36px 0;
  padding: 8px 0 8px 22px;
  border-left: 2px solid var(--accent);
  color: var(--ink);
  font-size: 1.2rem;
  line-height: 1.5;
}

.prompt em {
  font-style: italic;
  font-weight: 500;
}

/* Tool buttons (map pin + note pencil) */

.stop-tools {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
}

.tool-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 6px;
  background: transparent;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  color: inherit;
  font: inherit;
  text-decoration: none;
  transition: transform 0.18s ease, background-color 0.18s ease;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
}

.tool-btn,
.tool-btn:hover,
.tool-btn:active,
.tool-btn:focus,
.tool-btn:visited {
  text-decoration: none !important;
  -webkit-text-decoration: none !important;
  outline: none;
  box-shadow: none;
}

.tool-btn svg {
  display: block;
  transition: transform 0.18s ease;
}

.tool-btn:hover svg,
.tool-btn:focus-visible svg {
  transform: translateY(-2px) scale(1.08);
}

.tool-btn.is-open svg {
  transform: scale(1.12);
}

.tool-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Note dot indicator when note has content */

.note-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.tool-btn.has-note .note-dot {
  opacity: 1;
}

/* Inline expandable panels (map + note share this) */

.inline-panel {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  transition: grid-template-rows 0.3s ease, margin-top 0.3s ease, opacity 0.3s ease;
  margin-top: 0;
  opacity: 0;
}

.inline-panel.is-open {
  grid-template-rows: 1fr;
  margin-top: 14px;
  opacity: 1;
}

.inline-panel-inner {
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--bg-soft);
}

.inline-map-frame {
  display: block;
  width: 100%;
  height: 280px;
  border: none;
  background: var(--bg-soft);
}

.inline-map-open {
  display: block;
  padding: 12px 16px;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  background: var(--bg);
  border-top: 1px solid var(--rule);
  transition: background-color 0.15s ease;
}

.inline-map-open:hover {
  background: var(--bg-soft);
}

/* Note panel */

.inline-note .inline-panel-inner {
  background: #fffbf0;
  padding: 16px;
}

.note-textarea {
  width: 100%;
  min-height: 90px;
  padding: 12px 14px;
  font-family: "EB Garamond", Garamond, Georgia, serif;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 3px;
  resize: vertical;
  outline: none;
  transition: border-color 0.15s ease;
}

.note-textarea::placeholder {
  color: var(--ink-soft);
  font-style: italic;
}

.note-textarea:focus {
  border-color: var(--accent);
}

.note-actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.note-btn {
  padding: 7px 15px;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  background: transparent;
  color: var(--ink-muted);
  border: 1px solid var(--rule);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.note-btn:hover,
.note-btn:focus-visible {
  border-color: var(--ink-muted);
  color: var(--ink);
  outline: none;
}

.note-btn-primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.note-btn-primary:hover,
.note-btn-primary:focus-visible {
  background: #532121;
  color: var(--bg);
  border-color: #532121;
}

.note-btn-danger {
  color: var(--accent);
  border-color: transparent;
  margin-left: auto;
}

.note-btn-danger:hover,
.note-btn-danger:focus-visible {
  color: #fff;
  background: #a22d2d;
  border-color: #a22d2d;
}

/* Optional divider */

.optional {
  padding: 56px 0 0;
  text-align: center;
  border: none;
}

.optional-label {
  font-family: "EB Garamond", Georgia, serif;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
}

.optional-label::before,
.optional-label::after {
  content: "✦";
  font-style: normal;
  color: var(--accent-soft);
  margin: 0 14px;
  font-size: 0.75em;
  position: relative;
  top: -3px;
  opacity: 0.7;
}

.stop-optional {
  border-bottom: 1px solid var(--rule);
}

/* Outro */

.outro {
  padding: 72px 0 40px;
  max-width: 34em;
  margin: 0 auto;
}

.outro h3 {
  font-family: "EB Garamond", Georgia, serif;
  font-size: 1.6rem;
  font-weight: 500;
  font-style: italic;
  margin-bottom: 20px;
}

.outro p {
  font-size: 1.13rem;
  margin-bottom: 16px;
}

.sign-off {
  margin-top: 56px;
  color: var(--ink-soft);
  font-style: italic;
  font-size: 1rem;
  text-align: right;
}

/* Mobile */

@media (max-width: 720px) {
  html { font-size: 17px; }

  main { padding: 0 20px 72px; }

  .hero { padding: 72px 0 40px; }
  .hero h1 { margin-bottom: 24px; }
  .hero .subtitle { font-size: 1.1rem; }

  .intro { padding: 16px 0 48px; }
  .intro p { font-size: 1.06rem; }

  .stop { padding: 48px 0 28px; }

  .stop-media {
    margin-left: -20px;
    margin-right: -20px;
    margin-bottom: 26px;
    border-radius: 0;
    box-shadow: 0 2px 20px -6px rgba(0, 0, 0, 0.12);
  }

  .stop-media video,
  .stop-media img {
    aspect-ratio: 16 / 9;
    max-height: 200px;
  }

  .stop-title {
    font-size: 1.65rem;
    margin-bottom: 4px;
  }

  .stop-location {
    font-size: 0.88rem;
    margin-bottom: 20px;
  }

  .stop-body > p {
    font-size: 1.05rem;
  }

  .prompt {
    font-size: 1.08rem;
    margin: 28px 0;
    padding-left: 16px;
  }

  .drop-cap::first-letter {
    font-size: 3.1em;
  }

  .outro p { font-size: 1.05rem; }

  .inline-map-frame { height: 240px; }

  .inline-note .inline-panel-inner { padding: 14px; }
}

@media (max-width: 400px) {
  .stop-media video,
  .stop-media img {
    max-height: 170px;
  }
}

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
  .fade-in {
    opacity: 1;
    transform: none;
  }
}
