/*
 * compacity.gr: one stylesheet for every page. Colours and radii come from the app's
 * src/constants/theme.ts. The site is dark only, like the app.
 */

@font-face {
  font-family: 'Manrope';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('fonts/Manrope-Regular.ttf') format('truetype');
}

@font-face {
  font-family: 'Manrope';
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url('fonts/Manrope-SemiBold.ttf') format('truetype');
}

:root {
  color-scheme: dark;
  --bg: #1a1622;
  --surface: #241f30;
  --surface-raised: #2e2740;
  --divider: #3a3149;
  --text: #f5f2fa;
  --text-secondary: #bdb3c9;
  --accent: #a06bff;
  --accent-soft: #dcc9ff;
  --accent-strong: #5b3aa6;
  --accent-link: #c4a5ff;
  --gold: #e0b055;
  --gold-soft: rgba(224, 176, 85, 0.14);
  --card-glow: rgba(160, 107, 255, 0.3);
  --ambient-glow: rgba(160, 107, 255, 0.16);
  --glass: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.1);
  --radius-card: 14px;
  --radius-list-card: 22px;
  --radius-pill: 22px;
  --gutter: 20px;
  --tap: 44px;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  /* Ambient light from the top, like the Spots and Events screens. */
  background-image: radial-gradient(ellipse 90% 520px at 50% -120px, var(--ambient-glow), transparent);
  background-repeat: no-repeat;
  color: var(--text);
  font-family:
    'Manrope',
    system-ui,
    -apple-system,
    'Segoe UI',
    sans-serif;
  font-size: 16px;
  line-height: 1.6;
  /* Long words (URLs) may wrap, but words are never hyphenated: US-6.3. */
  overflow-wrap: break-word;
}

a {
  color: var(--accent-link);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-soft);
}

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

h1,
h2,
h3 {
  font-weight: 600;
  line-height: 1.25;
  margin: 0;
}

p {
  margin: 0;
}

.wrap {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: var(--gutter);
  top: 12px;
  z-index: 10;
  padding: 10px 14px;
  background: var(--surface);
  border-radius: var(--radius-card);
}

/* Header */

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: var(--tap);
  color: var(--text);
  font-size: 20px;
  font-weight: 600;
  text-decoration: none;
}

.wordmark:hover {
  color: var(--text);
}

.wordmark img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.wordmark .accent,
.hero h1 .accent {
  color: var(--accent);
}

/* EN/ΕΛ switch, like the segmented control in Settings. */
.lang-switch {
  display: inline-flex;
  padding: 3px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
}

.lang-switch a,
.lang-switch span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--tap);
  min-height: 38px;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.lang-switch [aria-current='true'] {
  background: var(--accent-strong);
  color: #fff;
}

/* Landing: hero */

.hero {
  display: grid;
  gap: 48px;
  align-items: center;
  padding: 40px 0 64px;
}

.hero h1 {
  font-size: clamp(40px, 9vw, 64px);
  letter-spacing: -0.02em;
}

.hero .tagline {
  margin-top: 12px;
  font-size: clamp(20px, 4.5vw, 26px);
  font-weight: 600;
  color: var(--text);
}

.hero .lead {
  margin-top: 16px;
  max-width: 34em;
  color: var(--text-secondary);
  font-size: 17px;
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.store-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 8px 18px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
}

.store-pill svg {
  flex: none;
  width: 22px;
  height: 22px;
  fill: var(--text);
}

.store-pill .name {
  display: block;
  font-weight: 600;
  line-height: 1.2;
}

.store-pill .status {
  display: block;
  color: var(--gold);
  font-size: 13px;
  line-height: 1.3;
}

/* A thin phone frame around a real screenshot of the Spots list (iPhone 17 Pro, test data). */
.phone {
  justify-self: center;
  width: min(300px, 100%);
  margin: 0;
  padding: 14px;
  background: #110e17;
  border: 1px solid var(--divider);
  border-radius: 50px;
  box-shadow:
    0 30px 80px -20px rgba(160, 107, 255, 0.45),
    0 0 0 6px rgba(255, 255, 255, 0.03);
}

.phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 38px;
}

/* Landing: sections */

.section {
  padding: 56px 0;
  border-top: 1px solid var(--divider);
}

.section h2 {
  font-size: clamp(24px, 5vw, 30px);
}

.section .intro {
  margin-top: 10px;
  max-width: 40em;
  color: var(--text-secondary);
}

.grid {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.card {
  padding: 22px;
  background: linear-gradient(to left, var(--card-glow), transparent 60%), var(--surface);
  border-radius: var(--radius-list-card);
}

.card h3 {
  font-size: 19px;
}

.card p {
  margin-top: 8px;
  color: var(--text-secondary);
}

.card .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  background: var(--surface-raised);
  border-radius: 12px;
}

.card .icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--accent-link);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.offer-values {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.offer-values span {
  padding: 6px 12px;
  background: var(--gold-soft);
  border-radius: 14px;
  color: var(--gold);
  font-weight: 600;
}

.city {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.city h3 {
  font-size: 19px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
}

.badge.live {
  background: rgba(160, 107, 255, 0.18);
  color: var(--accent-soft);
}

.badge.soon {
  background: var(--gold-soft);
  color: var(--gold);
}

.city.soon h3 {
  color: var(--text-secondary);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  margin-top: 20px;
  padding: 0 22px;
  background: var(--accent-strong);
  border-radius: var(--radius-card);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.button:hover {
  color: #fff;
  background: #6a46bf;
}

/* Legal pages */

.doc {
  max-width: 720px;
  padding: 24px 0 64px;
}

.doc h1 {
  font-size: clamp(30px, 7vw, 40px);
}

.doc .updated {
  margin-top: 10px;
  color: var(--text-secondary);
  font-size: 14px;
}

.doc .summary {
  margin-top: 24px;
  padding: 18px 20px;
  background: linear-gradient(to left, var(--card-glow), transparent 60%), var(--surface);
  border-radius: var(--radius-card);
}

.doc .summary p + p {
  margin-top: 8px;
}

.toc {
  margin-top: 28px;
  padding: 18px 20px;
  border: 1px solid var(--divider);
  border-radius: var(--radius-card);
}

.toc h2 {
  font-size: 15px;
  color: var(--text-secondary);
}

.toc ol {
  margin: 8px 0 0;
  padding-left: 22px;
}

.toc li {
  padding: 10px 0;
  line-height: 1.5;
}

.toc li + li {
  margin-top: 0;
}

.doc section {
  margin-top: 40px;
  scroll-margin-top: 16px;
}

.doc section h2 {
  font-size: 21px;
}

.doc section h3 {
  margin-top: 20px;
  font-size: 17px;
}

.doc section p,
.doc section ul,
.doc section ol,
.doc section table {
  margin-top: 12px;
}

.doc ul,
.doc ol {
  padding-left: 22px;
}

.doc li + li {
  margin-top: 6px;
}

.doc .muted {
  color: var(--text-secondary);
}

.table-wrap {
  overflow-x: auto;
  margin-top: 12px;
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.doc th,
.doc td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--divider);
  text-align: left;
  vertical-align: top;
}

.doc th {
  color: var(--text-secondary);
  font-weight: 600;
}

/* Placeholders the owner fills in before publishing. */
.todo {
  padding: 0 4px;
  background: var(--gold-soft);
  border-radius: 4px;
  color: var(--gold);
}

/* Footer */

.site-footer {
  padding: 32px 0 40px;
  border-top: 1px solid var(--divider);
  color: var(--text-secondary);
  font-size: 14px;
}

.site-footer nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  color: var(--text);
  text-decoration: none;
}

.site-footer nav a:hover {
  color: var(--accent-soft);
}

.site-footer .copyright {
  margin-top: 12px;
}

/* Wider screens */

@media (min-width: 720px) {
  :root {
    --gutter: 32px;
  }

  .grid.three {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid.two {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.15fr 1fr;
    padding: 56px 0 88px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
