/* Isolated landing page. Base colors follow D-Map's shared/styles/shell.css. */
:root {
  color-scheme: light;
  --bg: #f4f3f0;
  --card: #fff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --sub: #edf1f5;
  --accent: #3266a2;
  --shadow: 0 20px 60px #0f172a12, 0 2px 8px #0f172a08;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  font-synthesis: none;
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0f172a;
  --card: #1c2330;
  --text: #edf1fa;
  --muted: #a1adbf;
  --border: #303b4d;
  --sub: #252e3d;
  --accent: #91b4ff;
  --shadow: 0 20px 60px #0003, 0 2px 8px #0002;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
:focus { outline: none; }
a:focus-visible { text-decoration: underline; text-underline-offset: 4px; }
button:focus-visible { background: var(--sub); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.page {
  width: min(100%, 1240px);
  height: 100vh;
  height: 100dvh;
  min-height: 35rem;
  margin: 0 auto;
  padding: max(22px, env(safe-area-inset-top)) max(40px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(40px, env(safe-area-inset-left));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.profile { position: relative; padding-bottom: 16px; }
.topline { display: flex; align-items: center; justify-content: space-between; height: 44px; margin-bottom: 10px; }
.wordmark { font-size: 11px; letter-spacing: .15em; font-weight: 650; text-transform: uppercase; }
.wordmark span { color: var(--muted); font-weight: 450; }
.theme-toggle, .round-button { width: 44px; height: 44px; border-radius: 50%; background: transparent; border: 1px solid var(--border); display: grid; place-items: center; padding: 0; flex: 0 0 44px; }
.theme-toggle { border: 0; }
.theme-toggle:hover, .round-button:hover { background: var(--sub); }
.theme-toggle svg, .round-button svg { width: 19px; height: 19px; }
.sun-icon, [data-theme='dark'] .moon-icon { display: none; }
[data-theme='dark'] .sun-icon { display: block; }
.profile-main { display: flex; gap: 15px; align-items: center; }
.avatar { flex: 0 0 62px; width: 62px; height: 62px; display: block; object-fit: cover; border-radius: 50%; border: 1px solid var(--border); background: var(--sub); }
h1 { font-size: 1.6875rem; line-height: 1.2; font-weight: 550; letter-spacing: -.04em; margin: 0 0 3px; }
.handle { font-size: .8125rem; line-height: 1.4; color: var(--muted); text-decoration: none; }
.handle:hover { color: var(--accent); text-decoration: underline; }
.bio { position: absolute; right: 0; bottom: 21px; width: 250px; margin: 0; color: var(--muted); font-size: .8125rem; line-height: 1.6; }
.main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px) minmax(0, 1fr); align-items: center; min-height: 0; gap: 25px; }
.editorial { align-self: center; padding-bottom: 20px; }
.eyebrow { font-size: 10px; line-height: 1.5; letter-spacing: .16em; text-transform: uppercase; font-weight: 500; color: var(--muted); }
.editorial h2 { font-size: clamp(30px, 3.5vw, 49px); line-height: 1.09; font-weight: 450; letter-spacing: -.055em; margin: 18px 0; }
.editorial h2 em { font-style: normal; color: var(--accent); }
.editorial-title, .editorial-note { white-space: pre-line; }
.editorial-note { font-size: 12px; line-height: 1.7; color: var(--muted); max-width: 180px; }
.editorial-rule { width: 28px; height: 1px; background: var(--muted); margin: 26px 0 14px; }
.side-note { justify-self: end; align-self: center; display: flex; flex-direction: column; gap: 18px; color: var(--muted); }
.compass { width: 70px; height: 70px; }
.side-note p { font-size: 10px; line-height: 1.8; letter-spacing: .12em; text-transform: uppercase; }
.carousel { height: 100%; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) 44px; }
/* Transformed cards must not enlarge the page's scrollable area mid-animation. */
.card-stage { min-height: 0; position: relative; isolation: isolate; overflow: hidden; overflow: clip; touch-action: pan-x pinch-zoom; user-select: none; -webkit-user-select: none; }
.carousel.is-ready .fallback { display: none; }
.project-card, .fallback {
  position: absolute; top: 50%; left: 50%;
  width: calc(100% - 28px); height: calc(100% - 100px); max-height: 350px;
  border: 1px solid var(--border); border-radius: 26px; background: var(--card); box-shadow: var(--shadow);
  text-decoration: none; color: var(--text); overflow: hidden;
  transform: translate(-50%, -50%);
  display: flex; flex-direction: column;
}
.project-card { will-change: transform, opacity; touch-action: pan-x pinch-zoom; }
.project-card:focus-visible { text-decoration: none; }
.project-card:focus-visible .open-arrow { background: var(--text); color: var(--card); }
.project-card > :is(.card-top, .card-bottom),
.card-content > :is(.card-logo, .card-icon) { opacity: var(--card-details-opacity, 1); }
/* Keep the artwork visible behind the active card; reserve room for its preview row. */
.project-card .card-content { margin-top: calc(8px * var(--preview-top, 0)); }
.preview-label { position: absolute; left: 0; right: 0; z-index: 3; padding: 8px 20px; display: grid; grid-template-columns: 24px minmax(0, 1fr) 24px; align-items: center; gap: 6px; font-size: 14px; line-height: 20px; letter-spacing: -.02em; font-weight: 500; text-align: center; pointer-events: none; }
.preview-title { grid-column: 2; }
.preview-icon { grid-column: 3; width: 20px; height: 24px; object-fit: contain; color: var(--accent); justify-self: center; }
.preview-label-top { top: 0; opacity: var(--preview-top, 0); }
.preview-label-bottom { bottom: 0; opacity: var(--preview-bottom, 0); }
.card-top { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px 0; gap: 12px; }
.card-category { font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.card-number { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.card-content { position: relative; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; padding: 10px 24px 0; gap: 10px; }
.card-title { margin: 0; font-size: 2.125rem; letter-spacing: -.055em; line-height: 1.15; font-weight: 550; overflow-wrap: anywhere; }
.card-logo { width: 29px; height: 36px; object-fit: contain; }
.card-icon { width: 32px; height: 32px; color: var(--accent); }
.card-visual { position: relative; flex: 1; min-height: 0; margin-top: 3px; overflow: hidden; pointer-events: none; }
.map-drawing { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .9; }
[data-theme='dark'] .map-drawing { opacity: .7; filter: brightness(.64) saturate(.72); }
.place-tag { position: absolute; display: flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 20px; background: var(--card); border: 1px solid var(--border); box-shadow: 0 3px 8px #0f172a0d; color: var(--text); font-size: 10px; white-space: nowrap; }
.place-tag svg { width: 13px; height: 13px; color: var(--accent); }
.place-tag.coffee { left: 16%; top: 24%; transform: rotate(-5deg); }
.place-tag.photo { right: 14%; bottom: 17%; transform: rotate(4deg); }
.map-pin { position: absolute; width: 30px; height: 38px; left: 55%; top: 22%; filter: drop-shadow(0 5px 6px #0002); }
.card-bottom { padding: 4px 24px 20px; position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: end; gap: 14px; }
.card-description { font-size: .8125rem; line-height: 1.45; max-width: 245px; margin: 0; }
.card-cta { display: block; color: var(--accent); margin-top: 9px; font-size: .625rem; font-weight: 550; }
.open-arrow { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; border-radius: 50%; color: var(--text); background: var(--sub); }
.open-arrow svg { width: 18px; height: 18px; }
.project-card[data-project='collab'] .card-title { font-size: 1.75rem; }
.telegram-art { display: grid; place-items: center; height: 100%; }
.orbit { position: absolute; width: 142px; height: 142px; border: 1px solid var(--border); border-radius: 50%; transform: scaleX(1.5) rotate(-25deg); }
.orbit.second { transform: scaleX(1.9) rotate(25deg); width: 95px; height: 95px; }
.paper-plane { width: 83px; height: 83px; color: var(--accent); transform: rotate(-12deg); filter: drop-shadow(0 10px 14px #3266a21c); }
.telegram-caption { position: absolute; bottom: 8px; right: 23px; font-size: 9px; color: var(--muted); letter-spacing: .07em; }
.bot-art { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; transform: rotate(-3deg); }
.bot-bubble { width: 68%; display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--sub); border: 1px solid var(--border); border-radius: 14px 14px 14px 4px; color: var(--text); font-size: 12px; }
.bot-bubble img { width: 22px; height: 27px; }
.bot-reply { align-self: flex-end; margin-right: 15%; background: var(--text); color: var(--card); font-size: 10px; padding: 9px 13px; border-radius: 12px 12px 4px 12px; }
.collab-art { height: 100%; display: grid; place-items: center; }
.envelope { position: relative; width: 154px; height: 94px; border: 1px solid var(--border); border-radius: 8px; background: var(--sub); transform: rotate(-9deg); }
.envelope::before { content: ''; position: absolute; width: 90px; height: 90px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); left: 31px; top: -50px; transform: rotate(45deg); border-radius: 0 0 8px; }
.envelope-mark { position: absolute; left: 0; right: 0; bottom: 12px; color: var(--accent); text-align: center; font-size: 22px; letter-spacing: .12em; font-weight: 550; }
.envelope span { position: absolute; right: -15px; bottom: -8px; width: 45px; height: 45px; border: 1px solid var(--border); background: var(--card); color: var(--accent); border-radius: 50%; display: grid; place-items: center; font-size: 23px; }
.carousel-toolbar { display: flex; align-items: center; justify-content: center; gap: 15px; }
.carousel-toolbar .round-button { width: 38px; height: 38px; flex-basis: 44px; border-color: transparent; }
.carousel-hint { color: var(--muted); font-size: .625rem; letter-spacing: .02em; text-align: center; }
.slide-count { color: var(--text); font-size: 11px; margin-right: 10px; font-variant-numeric: tabular-nums; }
.page-footer { padding-top: 10px; }
.quick-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.quick-link { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; min-width: 44px; border: 1px solid var(--border); border-radius: 999px; padding: 0 18px; font-size: .75rem; text-decoration: none; white-space: nowrap; transition: transform .18s, background-color .2s, color .2s; }
.quick-link svg { width: 14px; height: 14px; flex-shrink: 0; }
.quick-link[data-active='true'] { background: var(--text); color: var(--card); border-color: var(--text); }
.quick-link:hover { background: var(--sub); color: var(--text); }
.quick-link:active, .round-button:active, .theme-toggle:active { transform: scale(.95); }
.footer-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; color: var(--muted); font-size: 10px; }
.legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 18px; }
.legal-links a { display: flex; align-items: center; min-height: 36px; text-decoration: none; }
.legal-links a:hover { text-decoration: underline; }
.theme-ready body, .theme-ready .project-card, .theme-ready .avatar, .theme-ready .place-tag { transition: background-color .24s, color .24s, border-color .24s; }
.fallback { padding: 28px; justify-content: center; gap: 14px; }
.fallback img { width: 42px; height: 53px; }
.fallback strong { font-size: 38px; letter-spacing: -.05em; font-weight: 550; }
.fallback p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
@media (max-width: 900px) {
  .page { max-width: 540px; padding: max(14px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left)); }
  .topline { margin-bottom: 3px; }
  .profile { padding-bottom: 6px; }
  .profile-main { gap: 12px; }
  .avatar { width: 54px; height: 54px; flex-basis: 54px; font-size: 19px; }
  h1 { font-size: 1.5625rem; }
  .bio { position: static; width: auto; max-width: 330px; margin: 10px 0 0; font-size: .8125rem; line-height: 1.5; }
  .main { display: block; }
  .editorial, .side-note { display: none; }
  .project-card, .fallback { width: calc(100% - 8px); height: calc(100% - 96px); max-height: 355px; border-radius: 23px; }
  .project-card[data-project='collab'] .card-title { font-size: 1.6875rem; }
  .page-footer { padding-top: 6px; }
  .quick-links { gap: 5px; }
  .quick-link { padding: 0 12px; font-size: .6875rem; gap: 5px; }
  .quick-link svg { display: none; }
  .footer-meta { justify-content: center; margin-top: 2px; }
  .copyright { display: none; }
  .legal-links { column-gap: 16px; font-size: .5625rem; }
  .legal-links a { min-height: 34px; }
}
@media (max-width: 380px) {
  .page { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  h1 { font-size: 1.4375rem; }
  .quick-link { padding: 0 10px; font-size: .625rem; }
  .card-top { padding: 15px 19px 0; }
  .card-content { padding: 7px 19px 0; }
  .card-title { font-size: 1.875rem; }
  .project-card[data-project='collab'] .card-title { font-size: 1.5rem; }
  .card-bottom { padding: 3px 19px 15px; }
  .card-description { font-size: .75rem; }
  .legal-links { column-gap: 12px; }
}
@media (max-height: 700px) {
  .page { padding-top: max(7px, env(safe-area-inset-top)); }
  .topline { margin-bottom: 0; height: 36px; }
  .bio { font-size: .75rem; margin-top: 6px; }
  .profile { padding-bottom: 0; }
  .project-card, .fallback { height: calc(100% - 76px); }
  .card-top { padding-top: 13px; }
  .card-content { padding-top: 6px; }
  .card-title { font-size: 1.8125rem; }
  .card-logo { width: 23px; height: 29px; }
  .card-bottom { padding-bottom: 14px; }
  .card-description { font-size: .75rem; }
  .card-cta { margin-top: 6px; }
  .place-tag { font-size: 9px; padding: 5px 8px; }
  .map-pin { width: 22px; height: 28px; }
  .orbit { width: 85px; height: 85px; }
  .orbit.second { width: 60px; height: 60px; }
  .paper-plane { width: 55px; height: 55px; }
  .envelope { transform: rotate(-9deg) scale(.72); }
  .bot-bubble { padding: 8px 10px; font-size: 10px; }
  .bot-reply { padding: 6px 10px; font-size: 9px; }
  .bot-art { gap: 4px; }
}
/* Large text and short/landscape viewports get an honest, scrollable layout. */
@media (max-height: 500px), (orientation: landscape) and (max-height: 620px) {
  .page { min-height: 43rem; height: auto; grid-template-rows: auto minmax(24rem, 1fr) auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
