/* ============================================================
   Free Tours — base + layout primitives + shared atoms
   ============================================================ */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { display: block; max-width: 100%; }
button { font-family: inherit; }

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-hover); }

h1, h2, h3, h4 { margin: 0; font-weight: 400; }
p { margin: 0; }

:focus-visible { outline: 3px solid var(--text-primary); outline-offset: 2px; }

/* Skip link */
.ft-skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--text-primary); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.ft-skip:focus { left: 0; color: #fff; }

/* ---------- Layout container ---------- */
.ft-container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
}
.ft-container--narrow { max-width: var(--maxw-narrow); }

/* Vertical rhythm between sections */
.ft-section { margin-top: var(--sec-y); }

/* Full-bleed strip whose inner content still aligns to 1280 */
.ft-strip { width: 100%; }
.ft-strip__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* ---------- Typography scale (README §10) ---------- */
.ft-h1-display { font: 400 clamp(40px, 5.4vw, 68px)/1.02 var(--font-serif); letter-spacing: -.025em; text-wrap: balance; }
.ft-h1-tour    { font: 400 clamp(36px, 3.4vw, 48px)/1.04 var(--font-serif); letter-spacing: -.022em; text-wrap: balance; }
.ft-h1-done    { font: 400 clamp(40px, 5.2vw, 64px)/1.02 var(--font-serif); letter-spacing: -.02em; text-wrap: balance; }
.ft-h2         { font: 400 clamp(30px, 3.4vw, 46px)/1.08 var(--font-serif); letter-spacing: -.02em; text-wrap: balance; }
.ft-h2-tour    { font: 400 clamp(28px, 3vw, 38px)/1.1 var(--font-serif);   letter-spacing: -.015em; text-wrap: balance; }
.ft-serif      { font-family: var(--font-serif); }
.ft-mono       { font-family: var(--font-mono); }
p { text-wrap: pretty; }

@media (max-width: 720px) {
  .ft-h1-tour { font-size: 40px; }
}

/* ---------- Eyebrow / mono label ---------- */
.ft-eyebrow {
  font: 500 11px/1 var(--font-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* ---------- Section marker (01–09) ---------- */
.ft-marker {
  display: flex; align-items: center; gap: 14px;
  padding-bottom: 22px;
  font: 500 12px/1 var(--font-mono);
  letter-spacing: .06em; text-transform: uppercase;
}
.ft-marker__num {
  width: 30px; height: 30px; flex: none;
  border: 1.5px solid var(--text-primary); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.ft-marker__line { flex: 1; border-top: 1px dashed var(--dashed-marker); }
.ft-marker__label { color: var(--text-primary); }
/* On the dark section */
.ft-marker--dark .ft-marker__num { color: var(--text-inverse); border-color: var(--text-inverse); }
.ft-marker--dark .ft-marker__line { border-color: var(--dark-line-3); }
.ft-marker--dark, .ft-marker--dark .ft-marker__label { color: var(--text-inverse); }

/* Small content marker (tour page sections) */
.ft-marker-sm {
  display: flex; align-items: center; gap: 12px;
  font: 500 11px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-secondary); padding-bottom: 16px;
}
.ft-marker-sm__line { flex: 1; border-top: 1px dashed var(--dashed-marker); }

/* ---------- Buttons ---------- */
.ft-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 22px; border-radius: var(--r-10);
  background: var(--brand); color: #FFFFFF; border: 0;
  font: 600 16px var(--font-sans); cursor: pointer; text-decoration: none;
  transition: background .18s;
}
.ft-btn:hover { background: var(--brand-hover); color: #FFFFFF; }
.ft-btn:active { transform: translateY(1px); }
.ft-btn:focus-visible { outline: 3px solid var(--text-primary); outline-offset: 2px; }
.ft-btn--lg { height: 58px; font-size: 17px; }
.ft-btn--light { background: var(--text-inverse); color: var(--text-primary); }
.ft-btn--light:hover { background: #FFFFFF; color: var(--text-primary); }
.ft-btn[disabled], .ft-btn:disabled { background: var(--text-disabled); cursor: not-allowed; }

.ft-btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: var(--r-10);
  border: 1px solid var(--text-primary); background: transparent; color: var(--text-primary);
  font: 600 15px var(--font-sans); cursor: pointer; text-decoration: none;
  transition: background .15s, color .15s;
}
.ft-btn-outline:hover { background: var(--text-primary); color: #FFFFFF; }

/* Text link with arrow */
.ft-arrowlink {
  display: inline-flex; align-items: center; gap: 6px;
  font: 600 15px var(--font-sans); color: var(--brand); text-decoration: none;
}
.ft-arrowlink:hover { text-decoration: underline; text-underline-offset: 5px; color: var(--brand); }

/* Dashed editorial link ("¿Cómo funciona?") */
.ft-dashlink {
  color: var(--text-primary); font-weight: 500;
  text-decoration: underline; text-decoration-style: dashed;
  text-decoration-thickness: 1px; text-underline-offset: 6px;
}
.ft-dashlink:hover { text-decoration-style: solid; color: var(--text-primary); }

/* ---------- Chips ---------- */
.ft-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font: 500 11px/1 var(--font-mono); letter-spacing: .04em;
  padding: 6px 8px; border-radius: var(--r-6);
  background: var(--surface-alt); color: var(--text-primary);
}
.ft-chip--city { background: var(--city-soft); color: var(--city-ink); }

/* ---------- Image / placeholder ---------- */
.ft-img {
  position: relative; overflow: hidden;
  aspect-ratio: var(--ratio, 16 / 10);
  background: repeating-linear-gradient(135deg, var(--hatch-a) 0 12px, var(--hatch-b) 12px 24px);
  color: var(--text-secondary);
}
.ft-img > img, .ft-img > picture > img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.ft-img__ph {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 16px; font: 400 12px/1.4 var(--font-mono); color: var(--text-secondary);
}
.ft-figcap {
  display: flex; justify-content: space-between; gap: 12px;
  font: 400 12px/1.3 var(--font-mono); color: var(--text-secondary);
  margin-top: 10px;
}

/* ---------- Dashed "ticket" box ---------- */
.ft-ticketbox { background: #FFFFFF; border: 1.5px dashed var(--text-primary); }

/* ---------- Stars ---------- */
.ft-stars { display: inline-flex; gap: 1px; color: var(--success); }

/* ---------- Accordion (answer always in DOM) ---------- */
.ft-acc__panel {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .28s ease;
}
.ft-acc__panel > div { overflow: hidden; }
.ft-acc[aria-expanded="true"] + .ft-acc__panel,
.ft-acc__panel.is-open { grid-template-rows: 1fr; }

/* ---------- Utilities ---------- */
.ft-vh {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.ft-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--city-accent); flex: none; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  *, *::before, *::after {
    transition-duration: .001ms !important;
    animation-duration: .001ms !important;
  }
  .ft-img > img { transform: none !important; }
}
html { scroll-behavior: smooth; }
