/*
  riddlo.app — tokens mirror lib/theme/tokens.ts / DESIGN.md ("Gece Kıvılcımı").
  Change them there first; contrast pairs are measured in DESIGN.md.
  System font only. Gradient only on brand moments (mark, hero accent).
*/
:root {
  color-scheme: light dark;
  --bg: #faf8ff;
  --surface: #ffffff;
  --surface-muted: #f3f0fc;
  --border: #e9e4fa;
  --text: #1a1433;
  --text-2: #554c77;
  --text-3: #6e6690;
  --primary-text: #5b45e0;
  --brand-from: #5b45e0;
  --brand-to: #b0306e;
  --focus: #5b45e0;
  --shadow-card: 0 1px 2px rgba(42, 30, 120, 0.06), 0 8px 24px rgba(42, 30, 120, 0.06);

  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;
  --space-xxl: 32px;
  --space-3xl: 40px;
  --radius-sm: 12px;
  --radius-card: 24px;
  --measure: 68ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0b1f;
    --surface: #1a1633;
    --surface-muted: #231e42;
    --border: rgba(255, 255, 255, 0.08);
    --text: #f4f2ff;
    --text-2: #b9b3d6;
    --text-3: #8f88b0;
    --primary-text: #c3b9ff;
    --brand-from: #8b7cff;
    --brand-to: #ff6fae;
    --focus: #c3b9ff;
    --shadow-card: 0 0 0 1px rgba(255, 255, 255, 0.08);
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

a:focus-visible,
main:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

main:focus:not(:focus-visible) {
  outline: none;
}

.skip-link {
  position: absolute;
  left: var(--space-lg);
  top: -100px;
  padding: var(--space-sm) var(--space-lg);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius-sm);
  z-index: 10;
}

.skip-link:focus {
  top: var(--space-lg);
}

/* Header */

.site-header {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: 44px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.3px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  flex: none;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-lg);
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 180ms ease;
}

.lang-switch:hover {
  background: var(--surface-muted);
}

main {
  flex: 1;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 var(--space-lg) var(--space-3xl);
}

/* Home */

.hero {
  padding: var(--space-3xl) 0 var(--space-xxl);
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.hero h1 {
  margin: 0;
  font-size: clamp(34px, 7vw, 56px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -1px;
  text-wrap: balance;
}

.hero .accent {
  color: var(--brand-to);
  background: linear-gradient(135deg, var(--brand-from), var(--brand-to));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lead {
  margin: var(--space-xl) auto 0;
  max-width: 34em;
  color: var(--text-2);
  font-size: 18px;
  line-height: 1.55;
  text-wrap: pretty;
}

.hero {
  display: grid;
  gap: var(--space-3xl);
  justify-items: center;
  max-width: none;
}

@media (min-width: 860px) {
  .hero {
    grid-template-columns: 1fr auto;
    align-items: center;
    text-align: left;
  }
  .hero .lead {
    margin-left: 0;
  }
  .hero .stores {
    justify-content: flex-start;
  }
  /* No screenshot yet: centred single column. */
  .hero:not(:has(.phone)) {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero:not(:has(.phone)) .lead {
    margin-left: auto;
  }
  .hero:not(:has(.phone)) .stores {
    justify-content: center;
  }
}

.stores {
  list-style: none;
  margin: var(--space-xl) 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md);
}

/* Not the official store badges: Apple allows its badge only once the app is live. */
.store {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-height: 52px;
  padding: var(--space-sm) var(--space-xl);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: left;
}

.store-name {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
}

.store-soon {
  color: var(--text-3);
  font-size: 13px;
}

/* Phone frame around a 1320×2868 screenshot */

.phone {
  width: min(280px, 72vw);
  aspect-ratio: 1320 / 2868;
  flex: none;
  padding: 10px;
  border-radius: 44px;
  background: var(--text);
  box-shadow: 0 24px 60px rgba(42, 30, 120, 0.22);
}

.phone img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 34px;
  object-fit: cover;
}


/* Promo sections */

.section {
  padding: var(--space-3xl) 0;
}

.section-title {
  margin: 0;
  text-align: center;
  font-size: clamp(26px, 5vw, 34px);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.6px;
  text-wrap: balance;
}

.section-lead {
  margin: var(--space-md) auto 0;
  max-width: 34em;
  text-align: center;
  color: var(--text-2);
  font-size: 17px;
}

.steps {
  list-style: none;
  margin: var(--space-xxl) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-lg);
}

@media (min-width: 720px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step,
.tile {
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: var(--space-xl);
}

.step h3,
.tile h3,
.feature h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 700;
}

.step p,
.tile p,
.feature p {
  margin: var(--space-sm) 0 0;
  color: var(--text-2);
}

.step-num {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: var(--space-md);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand-from), var(--brand-to));
  color: #fff;
  font-weight: 800;
}

.feature {
  display: grid;
  gap: var(--space-xl);
  justify-items: center;
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}

.feature + .feature {
  margin-top: var(--space-3xl);
}

.feature-text {
  max-width: 28em;
}

.feature h3 {
  font-size: 24px;
}

.feature p {
  font-size: 17px;
}

@media (min-width: 720px) {
  .feature {
    grid-template-columns: auto 1fr;
    align-items: center;
    text-align: left;
    gap: var(--space-3xl);
  }
  .feature:nth-child(even) {
    grid-template-columns: 1fr auto;
  }
  .feature:not(:has(.phone)) {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .feature:nth-child(even) .phone {
    order: 2;
  }
}

.screens-note {
  margin: var(--space-xxl) 0 0;
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
}

.tiles {
  list-style: none;
  margin: var(--space-xxl) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-lg);
}

@media (min-width: 720px) {
  .tiles {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

.checks {
  list-style: none;
  margin: var(--space-xl) auto 0;
  padding: 0;
  max-width: 420px;
}

.checks li {
  position: relative;
  padding: var(--space-sm) 0 var(--space-sm) 32px;
  font-weight: 600;
}

.checks li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 11px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand-from), var(--brand-to));
}

.checks li::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 15px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.faq {
  max-width: var(--measure);
  margin: var(--space-xxl) auto 0;
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: var(--space-sm) var(--space-xl);
}

.faq-item + .faq-item {
  border-top: 1px solid var(--border);
}

.faq-item summary {
  min-height: 52px;
  display: flex;
  align-items: center;
  padding: var(--space-md) 0;
  font-weight: 600;
  cursor: pointer;
}

.faq-item summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}

.faq-item p {
  margin: 0 0 var(--space-lg);
  color: var(--text-2);
}

.cards {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: 1fr;
  max-width: 760px;
  margin: 0 auto;
}

@media (min-width: 720px) {
  .cards {
    grid-template-columns: 1fr 1fr;
  }
}

.card {
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: var(--space-lg) var(--space-sm) var(--space-sm);
}

.card h2 {
  margin: 0 var(--space-md) var(--space-sm);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-3);
}

.rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rows li + li {
  border-top: 1px solid var(--border);
  margin: 0 var(--space-md);
}

.rows li + li .row {
  margin: 0 calc(-1 * var(--space-md));
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  min-height: 52px;
  padding: var(--space-md);
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  transition: background-color 180ms ease;
}

.row:hover {
  background: var(--surface-muted);
}

.row > span {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.row-hint {
  color: var(--text-2);
  font-size: 14px;
  font-weight: 400;
  overflow-wrap: anywhere;
}

.chevron {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--text-3);
}

/* Legal documents */

.doc {
  max-width: var(--measure);
  margin: 0 auto;
  padding-top: var(--space-xl);
}

.doc h1 {
  margin: 0;
  font-size: clamp(28px, 5vw, 34px);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.6px;
  text-wrap: balance;
}

.doc-meta {
  margin: var(--space-sm) 0 0;
  color: var(--text-3);
  font-size: 14px;
}

.doc-body {
  margin-top: var(--space-xl);
  font-size: 16px;
  line-height: 1.65;
}

.doc-body h2 {
  margin: var(--space-xxl) 0 0;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 700;
}

.doc-body h3 {
  margin: var(--space-xl) 0 0;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 600;
}

.doc-body p,
.doc-body ul,
.doc-body ol {
  margin: var(--space-md) 0 0;
}

.doc-body ul,
.doc-body ol {
  padding-left: 1.4em;
}

.doc-body li + li {
  margin-top: var(--space-xs);
}

.doc-body li::marker {
  color: var(--text-2);
}

.doc-body strong {
  font-weight: 700;
}

.doc-nav {
  margin-top: var(--space-3xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border);
}

.doc-nav h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-3);
}

.doc-nav ul {
  list-style: none;
  margin: var(--space-sm) 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-xl);
}

.doc-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}

/* Footer */

.site-footer {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg) var(--space-3xl);
  border-top: 1px solid var(--border);
  color: var(--text-2);
  font-size: 14px;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-xl);
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-2);
}

.site-footer p {
  margin: var(--space-sm) 0 0;
}

/* 404 */

.not-found {
  max-width: 480px;
  padding-top: var(--space-3xl);
  text-align: center;
}

.not-found .brand {
  justify-content: center;
}

.not-found h1 {
  margin: var(--space-xl) 0 0;
  font-size: 28px;
}

.not-found h2 {
  margin: var(--space-xl) 0 0;
  font-size: 20px;
}

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

@media print {
  .site-header,
  .site-footer,
  .doc-nav,
  .skip-link {
    display: none;
  }
  body {
    background: #fff;
    color: #000;
  }
}
