/* UP website. Tokens and recipes from docs/DESIGN.md: a black room lit by one green, hairlines instead of shadows,
   small tracked labels, numbers as heroes. No inline styles anywhere (the pages' CSP allows only this file). */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/assets/fonts/up-inter-latin.4e8462a362.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/assets/fonts/up-inter-ext-a.b2c4308843.woff2") format("woff2");
  unicode-range: U+0100-017F;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/assets/fonts/up-inter-cyrillic.d4e713cb15.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/up-space-grotesk-bold.7cbe056f3e.woff2") format("woff2");
  unicode-range: U+0020-017F, U+2013-2014, U+2018-201D, U+2022, U+2026, U+203A;
}

:root {
  --bg: #08090a;
  --surface: #111214;
  --card: #16181a;
  --elevated: #1d2023;
  --border: #26292d;
  --hairline: #1e2124;
  --text: #ffffff;
  --secondary: rgba(255, 255, 255, 0.88);
  --muted: rgba(255, 255, 255, 0.56);
  --faint: rgba(255, 255, 255, 0.34);
  --accent: #19b35a;
  --accent-soft: #2bd172;
  --on-accent: #04130a;
  --ring-track: rgba(255, 255, 255, 0.09);
  --ui: "Inter", -apple-system, BlinkMacSystemFont, "SF Arabic", "Segoe UI", "Noto Sans Arabic", system-ui, sans-serif;
  --display: "Space Grotesk", "Inter", -apple-system, BlinkMacSystemFont, "SF Arabic", "Segoe UI", system-ui, sans-serif;
  --gutter: 16px;
  --max: 1080px;
  color-scheme: dark;
}

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

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.45 var(--ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01";
  overflow-x: hidden;
}

a { color: inherit; }
svg { display: block; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  inset-inline-start: var(--gutter);
  top: -60px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--elevated);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  z-index: 10;
}
.skip:focus { top: 10px; }

/* ---- Header -------------------------------------------------------------------------------------------------- */

.top {
  max-width: var(--max);
  margin: 0 auto;
  padding: calc(8px + env(safe-area-inset-top)) var(--gutter) 8px;
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 5;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  font: 700 22px/1 var(--display);
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--text);
}
.wordmark .live-dot { margin-top: 3px; }
/* The mark is "UP" then the dot, as on the app icon, in every language. */
.wordmark { direction: ltr; }

/* Quiet live pulse (DESIGN §3.2): 7 pt dot, 3 pt halo, 10 pt glow, a second halo that grows and fades. */
.live-dot {
  position: relative;
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(25, 179, 90, 0.16), 0 0 10px rgba(25, 179, 90, 0.55);
}
.live-dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 3px solid rgba(25, 179, 90, 0.5);
  opacity: 0;
  animation: pulse 2600ms cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: 0.5; }
  77% { transform: scale(1.9); opacity: 0; }
  100% { transform: scale(1.9); opacity: 0; }
}

/* Language menu: details/summary, no script. */
.lang { position: relative; }
.lang summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 4px;
  list-style: none;
  cursor: pointer;
  color: var(--muted);
  font: 600 13px/1 var(--ui);
  letter-spacing: 0.06em;
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary svg { width: 18px; height: 18px; }
.lang[open] summary, .lang summary:hover { color: var(--text); }
.lang ul {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 4px);
  min-width: 184px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.lang a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 9px;
  text-decoration: none;
  color: var(--secondary);
  font-weight: 500;
}
.lang a:hover { background: var(--elevated); color: var(--text); }
.lang a[aria-current] { color: var(--accent-soft); font-weight: 600; }

/* ---- Layout -------------------------------------------------------------------------------------------------- */

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}

.label {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
  color: var(--muted);
  font: 700 11px/1.3 var(--ui);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.label .live-dot { width: 6px; height: 6px; }

.display-m {
  font: 700 30px/1.1 var(--display);
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.accent { color: var(--accent-soft); }

.lead {
  margin-top: 14px;
  max-width: 30em;
  color: var(--secondary);
  font-size: 16px;
  line-height: 1.5;
  text-wrap: pretty;
}

.body {
  max-width: 36em;
  color: var(--secondary);
  text-wrap: pretty;
}

.meta { margin-top: 10px; color: var(--muted); font-size: 13px; }
.caption { margin-top: 4px; max-width: 34em; color: var(--muted); font-size: 13px; line-height: 1.45; }

.block { padding-top: 64px; }
.pair { display: grid; gap: 56px; }

/* ---- Hero: the sign-in screen (DESIGN §5.5) ------------------------------------------------------------------- */

.hero {
  display: grid;
  justify-items: center;
  gap: 26px;
  padding-top: 10px;
  text-align: center;
}

.hero-ring {
  position: relative;
  width: min(236px, 64vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  isolation: isolate;
}
.hero-ring::before {
  content: "";
  position: absolute;
  inset: -34%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(25, 179, 90, 0.15), rgba(25, 179, 90, 0.05) 55%, rgba(25, 179, 90, 0) 100%);
  pointer-events: none;
}
.hero-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hero-mark {
  font: 700 clamp(54px, 18vw, 72px)/1 var(--display);
  letter-spacing: 0.02em;
  padding-inline-start: 0.04em;
}

.hero-copy { display: grid; justify-items: center; }
.hero-copy .display-m span { display: block; }

.hero-small .hero-ring { width: min(176px, 50vw); }
.hero-small .hero-mark { font-size: clamp(44px, 13vw, 54px); }

.soon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  color: var(--secondary);
  font: 700 12px/1.3 var(--ui);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  margin-top: 24px;
  padding: 0 24px;
  border-radius: 14px;
  background: var(--accent);
  color: var(--on-accent);
  font: 700 15px/1 var(--ui);
  letter-spacing: -0.005em;
  text-decoration: none;
}
.btn:hover { background: #1cc463; }

/* ---- Time-left ring (DESIGN §3.1) ---------------------------------------------------------------------------- */

.ring-track { fill: none; stroke: var(--ring-track); }
.ring-arc { fill: none; stroke: var(--accent); stroke-linecap: round; }
.ring-tip { fill: var(--accent-soft); }
.ring-glow { fill: var(--accent); opacity: 0.9; }

.ring-draw-280 { --d: 585.34; }
.ring-draw-176 { --d: 363.17; }
.ring-draw { animation: ring-draw 900ms cubic-bezier(0.33, 1, 0.68, 1) both; }
.hero-svg .ring-tip, .hero-svg .ring-glow {
  animation: tip-in 300ms 820ms both, breathe 2400ms 1120ms ease-in-out infinite;
}
@keyframes ring-draw { from { stroke-dashoffset: var(--d); } to { stroke-dashoffset: 0; } }
@keyframes tip-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes breathe { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }

/* ---- Keşfet preview: the district hero and two no-photo cards ------------------------------------------------- */

.place-name {
  font: 700 42px/1.02 var(--display);
  letter-spacing: -0.025em;
  margin-bottom: 10px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 174px));
  gap: 10px;
  margin: 22px 0 12px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  aspect-ratio: 174 / 226;
  padding: 10px 12px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(120% 64% at 50% 112%, rgba(25, 179, 90, 0.16), rgba(25, 179, 90, 0) 72%),
    var(--card);
  overflow: hidden;
}
.card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-inline-start: -2px; }
.level-glyph { font-family: var(--ui); font-weight: 800; text-anchor: middle; dominant-baseline: central; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px 3px 4px;
  padding-inline: 4px 8px;
  border-radius: 999px;
  background: rgba(8, 9, 10, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--secondary);
  font: 600 11px/1.2 var(--ui);
  white-space: nowrap;
}

.card-note {
  margin-top: 14px;
  color: var(--text);
  font: 600 16px/1.25 var(--ui);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-foot { margin-top: auto; display: grid; gap: 3px; }
.card-name { font: 700 15px/1.2 var(--ui); }
.card-kind {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--secondary);
  font: 600 13px/1.2 var(--ui);
}
.card-kind .kind-icon svg { width: 14px; height: 14px; stroke-width: 2; color: var(--muted); }

/* ---- What and how long --------------------------------------------------------------------------------------- */

.kinds {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 16px;
  border-top: 1px solid var(--hairline);
}
.kinds li {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  border-bottom: 1px solid var(--hairline);
  font-weight: 600;
}
.kind-icon { display: inline-flex; color: var(--muted); }
.kinds .kind-icon svg { width: 20px; height: 20px; }

.durations {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 10px;
  margin: 8px 0 18px;
}
.durations li { display: flex; align-items: center; gap: 12px; }
.durations svg { flex: none; }
.num {
  font: 800 22px/1 var(--ui);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

/* ---- Hairline rows ------------------------------------------------------------------------------------------- */

.rows { border-top: 1px solid var(--hairline); }
.row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--hairline);
}
.row-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--elevated);
  color: var(--secondary);
}
.row-icon svg { width: 20px; height: 20px; }
.row h3 { font: 600 15px/1.3 var(--ui); margin: 1px 0 3px; }
.row p { color: var(--muted); font-size: 14px; line-height: 1.45; }

/* ---- Ecosystem ----------------------------------------------------------------------------------------------- */

.eco-mark {
  margin: 2px 0 12px;
  color: var(--muted);
  font: 700 15px/1.2 var(--ui);
  letter-spacing: 0.32em;
}
.eco-mark b, .foot-eco b { color: var(--accent-soft); font-weight: 700; }

.text-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin-top: 6px;
  color: var(--accent-soft);
  font-weight: 600;
  text-decoration: none;
}
.text-action::after { content: "›"; }
[dir="rtl"] .text-action::after { content: "‹"; }
.text-action:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---- Documents ----------------------------------------------------------------------------------------------- */

.doc { max-width: 680px; padding-top: 22px; }
.doc .display-m { margin-bottom: 8px; }
.doc > .lead { margin-top: 10px; }

.prose { margin-top: 18px; color: var(--secondary); font-size: 15px; line-height: 1.62; }
.prose > * + * { margin-top: 12px; }
.prose h2 {
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
  color: var(--text);
  font: 600 18px/1.3 var(--ui);
  letter-spacing: -0.01em;
}
.prose h3 { margin-top: 22px; color: var(--text); font: 600 15px/1.35 var(--ui); }
.prose ul { padding-inline-start: 18px; list-style: disc; }
.prose li + li { margin-top: 6px; }
.prose li::marker { color: var(--faint); }
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--accent-soft); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose p:first-child { color: var(--muted); font-size: 13px; }

.mail {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  margin-top: 18px;
  color: var(--accent-soft);
  font: 600 17px/1.2 var(--ui);
  text-decoration: none;
}
.mail svg { width: 20px; height: 20px; }
.doc .rows { margin-top: 26px; }

.more .links { border-top: 1px solid var(--hairline); max-width: 680px; }
.more .links a {
  display: flex;
  align-items: center;
  min-height: 50px;
  border-bottom: 1px solid var(--hairline);
  color: var(--secondary);
  font-weight: 600;
  text-decoration: none;
}
.more .links a:hover { color: var(--text); }
.more .links a::after { content: "›"; margin-inline-start: auto; color: var(--faint); font-weight: 400; }
[dir="rtl"] .more .links a::after { content: "‹"; }
.page-doc .block { padding-top: 48px; }

/* ---- Footer -------------------------------------------------------------------------------------------------- */

.foot {
  max-width: var(--max);
  margin: 80px auto 0;
  padding: 26px var(--gutter) calc(34px + env(safe-area-inset-bottom));
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
  border-top: 1px solid var(--hairline);
  display: grid;
  gap: 12px;
}
.foot-links { display: flex; flex-wrap: wrap; gap: 0 22px; }
.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--secondary);
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
}
.foot-links a:hover { color: var(--text); }
.foot-meta { color: var(--muted); font-size: 13px; }
.foot-meta a { color: var(--muted); text-underline-offset: 3px; }
.foot-eco { color: var(--faint); font: 700 10px/1.2 var(--ui); letter-spacing: 0.32em; margin-top: 4px; }

/* ---- Arabic: no tracking (it breaks joining), system Arabic face ---------------------------------------------- */

:lang(ar) .label, :lang(ar) .soon, :lang(ar) .lang summary { letter-spacing: 0; }
:lang(ar) .display-m, :lang(ar) .place-name { letter-spacing: 0; line-height: 1.25; }
:lang(ar) .prose, :lang(ar) .lead, :lang(ar) .body { line-height: 1.75; }

/* ---- Wider screens ------------------------------------------------------------------------------------------- */

@media (min-width: 560px) {
  .durations { grid-template-columns: repeat(4, max-content); gap: 10px 34px; }
}

@media (min-width: 880px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    align-items: center;
    justify-items: start;
    gap: 72px;
    padding-top: 56px;
    text-align: start;
  }
  .hero-ring { width: 340px; justify-self: center; }
  .hero-mark { font-size: 100px; }
  .hero-copy { justify-items: start; }
  .display-m { font-size: 44px; line-height: 1.06; }
  .hero-small .hero-ring { width: 220px; }
  .hero-small .hero-mark { font-size: 64px; }
  .place-name { font-size: 64px; }
  .block { padding-top: 96px; }
  .place { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 72px; align-items: end; }
  .place > .label, .place > .place-name, .place > .body, .place > .caption { grid-column: 1; }
  .place > .cards { grid-column: 2; grid-row: 1 / span 4; margin: 0; }
  .pair { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); column-gap: 72px; }
  .kinds { column-gap: 28px; }
  .pair .durations { grid-template-columns: repeat(2, max-content); gap: 22px 40px; margin-top: 18px; }
  .rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; border-top: 0; }
  .rows .row { border-top: 1px solid var(--hairline); border-bottom: 0; }
  .doc .rows { display: block; border-top: 1px solid var(--hairline); }
  .doc .rows .row { border-top: 0; border-bottom: 1px solid var(--hairline); }
  .doc .display-m { font-size: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .live-dot::after { animation: none; }
  .ring-draw { animation: none; }
  .hero-svg .ring-tip, .hero-svg .ring-glow { animation: none; opacity: 1; }
}
