/* echivo.app — monument share pages (/m/<id>) + collection (/m). Generated pages: tools/build.py.
   Mobile-first. No web fonts: SF Pro on Apple devices (the app's font), Inter / system elsewhere. */

:root {
  --night: #070a12;
  --ink: #0e1424;
  --midnight: #16213a;
  --gold: #f5c882;
  --gold-hi: #fbdcaa;
  --amber: #d4a560;
  --sky: #4fb3ff;
  --text: #f3f1ec;
  --text-2: rgba(243, 241, 236, 0.72);
  --text-3: rgba(243, 241, 236, 0.46);
  --hair: rgba(255, 255, 255, 0.11);
  --glass: rgba(9, 13, 24, 0.5);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --tint: var(--gold);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --hero-h: 64svh;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--night); }
html, body { margin: 0; padding: 0; }
body {
  background: var(--night);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--gold); color: var(--night); }
/* Category tints (Colors.swift → MonumentCategory.tint) */
.cat-church { --tint: #f5c882; } .cat-synagogue { --tint: #4fb3ff; } .cat-palace { --tint: #d4a560; }
.cat-fortress { --tint: #ff8a5b; } .cat-civic { --tint: #8fb8ff; } .cat-museum { --tint: #9d7bff; }
.cat-square { --tint: #5ee6b5; } .cat-theatre { --tint: #ff7a8a; } .cat-landmark { --tint: #e8d5b0; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.gold { color: var(--gold); }

.eyebrow {
  margin: 0;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 24px; border-radius: 999px;
  font-size: 17px; font-weight: 650; letter-spacing: -0.01em; line-height: 1.1; text-align: center;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .25s;
  user-select: none; -webkit-user-select: none;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 19px; height: 19px; flex: none; }
.btn-gold {
  color: #0a0d16;
  background: linear-gradient(180deg, var(--gold-hi) 0%, var(--gold) 45%, #e9b66c 100%);
  box-shadow: 0 14px 34px -12px rgba(245, 200, 130, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 -1px 0 rgba(120, 80, 30, 0.25);
}
.btn-gold:hover { box-shadow: 0 18px 40px -12px rgba(245, 200, 130, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.55); }
.btn-gold img { width: 26px; height: 26px; border-radius: 7px; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.btn-ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--hair);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  font-size: 15.5px; font-weight: 600;
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.11); }
.btn-ghost svg { width: 17px; height: 17px; margin-top: -2px; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 13.5px; gap: 7px; }
.btn-sm svg { width: 15px; height: 15px; }
.btn-text { min-height: 44px; color: var(--text-2); font-size: 15px; font-weight: 600; }
.btn.is-opening { animation: tap-pulse 1.6s var(--ease); }
@keyframes tap-pulse {
  0% { box-shadow: 0 0 0 0 rgba(245, 200, 130, 0.6); }
  100% { box-shadow: 0 0 0 22px rgba(245, 200, 130, 0); }
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.m-top {
  position: absolute; z-index: 5;
  top: calc(var(--safe-t) + 14px); left: 16px; right: 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.m-logo { display: inline-flex; align-items: center; gap: 9px; filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.45)); }
.m-logo img { height: 30px; width: auto; }
.m-logo img.wm { height: 17px; }
.m-all {
  display: inline-flex; align-items: center; gap: 7px;
  height: 36px; padding: 0 14px 0 11px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--text);
  background: var(--glass); border: 1px solid var(--hair);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
}
.m-all svg { width: 15px; height: 15px; color: var(--gold); }

/* ── Monument page — mobile ──────────────────────────────────────────────── */
.m-wrap { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }

.m-hero {
  position: absolute; top: 0; left: 0; right: 0; z-index: 0;
  height: var(--hero-h); min-height: 380px; margin: 0; overflow: hidden;
  background: var(--ink);
}
.m-hero img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; animation: hero-in 1.4s var(--ease) both; }
.m-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(7, 10, 18, 0.55) 0%, rgba(7, 10, 18, 0) 20%, rgba(7, 10, 18, 0) 38%,
      rgba(7, 10, 18, 0.55) 62%, rgba(7, 10, 18, 0.92) 84%, var(--night) 100%);
}
@keyframes hero-in { from { transform: scale(1.06); opacity: 0.4; } to { transform: none; opacity: 1; } }

.m-body {
  position: relative; z-index: 2;
  padding: max(calc(var(--hero-h) - 196px), 220px) 20px 0;
}
.m-body > * { animation: rise .9s var(--ease) both; }
.m-body > :nth-child(2) { animation-delay: .05s; }
.m-body > :nth-child(3) { animation-delay: .1s; }
.m-body > :nth-child(n+4) { animation-delay: .15s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.m-eyebrow {
  display: flex; align-items: center; gap: 8px; margin: 0;
  font-size: 12px; font-weight: 650; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
}
.m-eyebrow .glyph { width: 16px; height: 16px; color: var(--gold); }
.m-eyebrow .dot { opacity: .7; letter-spacing: 0; }

.m-title {
  margin: 12px 0 10px;
  font-size: clamp(2.2rem, 10.6vw, 3.4rem);
  font-weight: 800; line-height: 0.94; letter-spacing: -0.005em;
  text-transform: uppercase;
  text-wrap: balance;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.45);
}
.m-sub { margin: 0; font-size: 18px; line-height: 1.35; color: rgba(243, 241, 236, 0.86); font-weight: 450; text-wrap: pretty; }
.m-local { margin: 6px 0 0; font-size: 13px; color: var(--text-3); letter-spacing: 0.01em; }
.m-summary {
  margin: 14px 0 0; font-size: 15px; line-height: 1.5; color: var(--text-2);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}

.m-facts { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  --c: 245, 200, 130;
  display: inline-flex; align-items: center; gap: 7px; max-width: 100%;
  padding: 7px 13px 7px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 600; line-height: 1.2;
  color: rgb(var(--c));
  background: rgba(var(--c), 0.13);
  border: 1px solid rgba(var(--c), 0.32);
}
.chip svg { width: 15px; height: 15px; flex: none; }
.chip-architect { --c: 122, 196, 255; }
.chip-style { --c: 222, 178, 112; }

.m-ctas { display: grid; gap: 10px; margin-top: 24px; }
.m-qr { display: none; }

/* Listen card */
.m-listen {
  position: relative; z-index: 2; display: block;
  margin: 26px 16px 0; padding: 18px 18px 16px;
  border-radius: 26px;
  background: linear-gradient(160deg, rgba(26, 37, 64, 0.92) 0%, rgba(14, 20, 36, 0.94) 60%);
  border: 1px solid var(--hair);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: transform .3s var(--ease), border-color .3s;
}
.m-listen:active { transform: scale(0.985); }
.m-listen:hover { border-color: rgba(245, 200, 130, 0.35); }
.lc-head { display: grid; grid-template-columns: 50px 1fr 46px; align-items: center; gap: 12px; }
.lc-icon {
  width: 50px; height: 50px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; gap: 3px;
  background: radial-gradient(circle at 50% 35%, rgba(245, 200, 130, 0.28), rgba(245, 200, 130, 0.1));
  box-shadow: inset 0 0 0 1px rgba(245, 200, 130, 0.3);
}
.lc-icon i {
  display: block; width: 3.5px; height: 20px; border-radius: 3px; background: var(--gold);
  transform-origin: 50% 50%; animation: eq 1.15s ease-in-out infinite;
}
.lc-icon i:nth-child(1) { animation-delay: -0.9s; height: 12px; }
.lc-icon i:nth-child(2) { animation-delay: -0.3s; }
.lc-icon i:nth-child(3) { animation-delay: -0.6s; height: 24px; }
.lc-icon i:nth-child(4) { animation-delay: -0.15s; }
.lc-icon i:nth-child(5) { animation-delay: -0.75s; height: 12px; }
@keyframes eq { 0%, 100% { transform: scaleY(0.35); } 50% { transform: scaleY(1); } }
.lc-heading { display: grid; gap: 4px; min-width: 0; }
.lc-heading .eyebrow { font-size: 10.5px; letter-spacing: 0.16em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-title { font-size: clamp(16px, 4.6vw, 19px); white-space: nowrap; font-weight: 800; text-transform: uppercase; letter-spacing: 0.005em; line-height: 1.05; }
.lc-play {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 50%, #e9b66c);
  color: #0a0d16; box-shadow: 0 8px 22px -8px rgba(245, 200, 130, 0.8);
}
.lc-play svg { width: 19px; height: 19px; margin-left: 3px; }
.lc-wave { display: block; width: calc(100% - 4px); height: 38px; margin: 18px 2px 14px; }
.lc-wave rect { fill: rgba(245, 200, 130, 0.26); }
.lc-wave rect.on { fill: var(--gold); }
.lc-wave rect.head { fill: var(--gold); animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.3; } }
.lc-quote { display: block; font-size: 15px; line-height: 1.55; color: var(--text-2); font-style: italic; }
.lc-meta {
  display: block; margin-top: 12px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3);
}

/* Footer */
.m-foot {
  margin-top: auto; padding: 44px 20px calc(30px + var(--safe-b));
}
.m-foot-in {
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
  padding-top: 28px; border-top: 1px solid var(--hair);
}
.m-logo-foot { filter: none; }
.m-logo-foot img { height: 26px; }
.m-logo-foot img.wm { height: 15px; }
.m-foot-tag { margin: 0; font-size: 13px; color: var(--text-3); }
.m-foot-links { display: flex; gap: 18px; font-size: 13.5px; font-weight: 600; }
.m-foot-links a { color: var(--gold); }
.m-foot-links a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* "Coming soon" sheet */
.m-sheet {
  border: 0; padding: 0; background: transparent; color: var(--text);
  width: calc(100% - 20px); max-width: 460px;
  margin: auto auto calc(10px + var(--safe-b));
  overflow: visible;
}
.m-sheet[open] { animation: sheet-in .5s var(--ease); }
.m-sheet::backdrop { background: rgba(3, 5, 10, 0.62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
@keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.m-sheet-in {
  display: grid; justify-items: center; gap: 10px; text-align: center;
  padding: 12px 22px 16px; border-radius: 30px;
  background: linear-gradient(180deg, #1a2643 0%, var(--ink) 70%);
  border: 1px solid var(--hair);
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.8);
}
.m-sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.18); margin-bottom: 10px; }
.m-sheet-icon { width: 64px; height: 64px; border-radius: 16px; box-shadow: 0 10px 30px -8px rgba(245, 200, 130, 0.45); margin-bottom: 6px; }
.m-sheet-title { margin: 0; font-size: 26px; font-weight: 800; text-transform: uppercase; line-height: 1; letter-spacing: 0; }
.m-sheet-text { margin: 2px 0 8px; font-size: 15px; color: var(--text-2); max-width: 36ch; }
.m-sheet .btn-gold { width: 100%; }
.m-sheet .btn-gold svg { width: 18px; height: 18px; }

/* ── Monument page — desktop ─────────────────────────────────────────────── */
@media (min-width: 900px) {
  .m-wrap {
    display: grid;
    grid-template-columns: minmax(420px, 1fr) minmax(0, 1.2fr);
    grid-template-rows: auto 1fr auto;
    grid-template-areas: "top hero" "body hero" "foot hero";
    column-gap: clamp(32px, 4vw, 72px);
    padding: 22px;
    min-height: 100vh;
  }
  .m-top { position: static; grid-area: top; padding: 10px 0 0 clamp(8px, 2vw, 28px); }
  .m-logo { filter: none; }
  .m-hero {
    position: relative; grid-area: hero;
    height: auto; min-height: calc(100vh - 44px);
    border-radius: 34px;
    box-shadow: 0 50px 120px -50px rgba(0, 0, 0, 0.9), 0 0 0 1px var(--hair);
  }
  .m-hero img { position: absolute; inset: 0; }
  .m-hero::after {
    background: linear-gradient(180deg, rgba(7, 10, 18, 0.25) 0%, rgba(7, 10, 18, 0) 25%, rgba(7, 10, 18, 0) 55%, rgba(7, 10, 18, 0.75) 100%);
  }
  .m-body {
    grid-area: body; align-self: center;
    padding: 40px 0 24px clamp(8px, 2vw, 28px);
    max-width: 600px;
  }
  .m-eyebrow { font-size: 12.5px; text-shadow: none; }
  .m-eyebrow .glyph { width: 17px; height: 17px; }
  .m-title { font-size: clamp(3rem, 4.9vw, 5.4rem); margin: 18px 0 14px; text-shadow: none; }
  .m-sub { font-size: clamp(18px, 1.45vw, 22px); }
  .m-summary { font-size: 16px; -webkit-line-clamp: 3; line-clamp: 3; max-width: 54ch; }
  .m-facts { margin-top: 20px; }
  .m-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
  .m-ctas .m-open { display: none; }
  .m-qr {
    display: flex; align-items: center; gap: 20px;
    margin-top: 28px; padding: 14px 22px 14px 14px; max-width: 460px;
    border-radius: 24px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--hair);
  }
  .m-qr-code { flex: none; width: 124px; height: 124px; padding: 7px; border-radius: 16px; background: #fff; }
  .m-qr-code svg { width: 100%; height: 100%; }
  .m-qr-title { margin: 6px 0 4px; font-size: 19px; font-weight: 800; text-transform: uppercase; line-height: 1.05; }
  .m-qr-sub { margin: 0; font-size: 14px; color: var(--text-2); }
  /* iPad / iOS at desktop widths: the app can open here — show the button, not the QR. */
  .is-ios .m-ctas .m-open { display: inline-flex; }
  .is-ios .m-qr { display: none; }

  .m-listen {
    grid-area: hero; align-self: end; justify-self: start;
    margin: 0 0 26px 26px; width: min(430px, calc(100% - 52px));
    background: rgba(10, 14, 26, 0.6);
    -webkit-backdrop-filter: blur(22px) saturate(150%); backdrop-filter: blur(22px) saturate(150%);
    border-color: rgba(255, 255, 255, 0.14);
  }
  .m-foot { grid-area: foot; padding: 18px 0 6px clamp(8px, 2vw, 28px); margin: 0; }
  .m-foot-in { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; gap: 10px 22px; border: 0; padding: 0; text-align: left; }
  .m-sheet { margin: auto; }
}
@media (min-width: 900px) and (max-height: 760px) {
  .m-title { font-size: clamp(2.6rem, 4vw, 4.2rem); }
  .m-qr { margin-top: 20px; }
}

/* ── Collection (/m) ─────────────────────────────────────────────────────── */
.m-index .c-wrap { max-width: 1280px; margin: 0 auto; padding: 0 16px; min-height: 100vh; display: flex; flex-direction: column; }
.m-index .m-top { position: static; padding-top: calc(var(--safe-t) + 16px); }
.m-index .m-logo { filter: none; }
.c-hero { padding: 44px 4px 26px; position: relative; }
.c-hero::before {
  content: ""; position: absolute; z-index: -1; left: -20%; top: -60%; width: 90%; height: 160%;
  background: radial-gradient(closest-side, rgba(245, 200, 130, 0.16), rgba(245, 200, 130, 0));
  pointer-events: none;
}
.c-title {
  margin: 14px 0 12px; font-size: clamp(2.6rem, 11vw, 6rem); font-weight: 800; line-height: 0.92;
  text-transform: uppercase; letter-spacing: -0.005em; text-wrap: balance;
}
.c-lede { margin: 0; max-width: 56ch; font-size: clamp(15px, 1.3vw, 18px); color: var(--text-2); }
.c-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.c-card {
  position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden;
  border-radius: 22px; background: var(--ink);
  box-shadow: 0 0 0 1px var(--hair);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.c-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; transition: transform .8s var(--ease); }
.c-card.no-photo img { object-position: 50% 32%; transform: scale(1.05); transform-origin: 50% 0%; top: -14%; }
.c-shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(7, 10, 18, 0) 30%, rgba(7, 10, 18, 0.55) 50%, rgba(7, 10, 18, 0.9) 70%, rgba(7, 10, 18, 0.97) 100%);
}
.c-text { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 12px 14px; display: grid; gap: 5px; }
.c-eyebrow {
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--tint);
}
.c-eyebrow .glyph { width: 12px; height: 12px; flex: none; }
.c-name { font-size: 15.5px; font-weight: 800; line-height: 1.02; text-transform: uppercase; letter-spacing: 0.005em; text-wrap: balance; }
.c-sub {
  font-size: 12px; line-height: 1.35; color: var(--text-2);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
.c-card:hover { transform: translateY(-4px); box-shadow: 0 0 0 1px rgba(245, 200, 130, 0.35), 0 30px 60px -30px rgba(0, 0, 0, 0.9); }
.c-card:hover img { transform: scale(1.05); }
.c-card.no-photo:hover img { transform: scale(1.1); }
.c-card:active { transform: scale(0.98); }
.c-card:focus-visible, .btn:focus-visible, .m-listen:focus-visible, .m-all:focus-visible, a:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 3px;
}
.m-index .m-foot { padding-left: 0; padding-right: 0; }

@media (min-width: 700px) {
  .c-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .c-text { padding: 18px 18px 20px; gap: 7px; }
  .c-eyebrow { font-size: 10.5px; }
  .c-eyebrow .glyph { width: 14px; height: 14px; }
  .c-name { font-size: 20px; }
  .c-sub { font-size: 13.5px; }
}
@media (min-width: 900px) {
  .m-index .c-wrap { padding: 0 32px; }
  .m-index .m-top { padding: 26px 0 0; }
  .c-hero { padding: 72px 0 40px; }
  .m-index .m-foot { padding: 56px 0 28px; }
  .m-index .m-foot-in { justify-content: space-between; border-top: 1px solid var(--hair); padding-top: 24px; }
}
@media (min-width: 1160px) {
  .c-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
