/* ricver.com — Editorial design. All colors and sizes are tokens below. */

:root {
  color-scheme: light dark;

  --font-serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-sans: 'Hanken Grotesk', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  --bg: #FFFFFF;
  --ink: #111111;
  --muted: #5C5C5C;
  --body: #3D3D3D;
  --rule: #E6E6E6;
  --line: #D4D4D4;
  --panel: #F2F3F5;
  --btn-bg: #111111;
  --btn-fg: #FFFFFF;
  --band-bg: #111111;
  --band-fg: #FFFFFF;
  --band-muted: #A3A3A3;
  --band-rule: #3A3A3A;
  --phone: #111111;
  --shadow: rgba(17, 17, 17, 0.2);
  --accent: #1260E0;
  --on-accent: #FFFFFF;
  --accent-text: #1260E0;
  --band-accent: #5B95FF;
  --grad: linear-gradient(90deg, #1671FD, #9B01F9);
  --focus: #1260E0;

  --max-w: 1240px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius-btn: 10px;
  --radius-panel: 28px;
  --phone-max-w: 240px;
  --badge-h: 48px;
  --store-bg: #000000;
  --store-fg: #FFFFFF;
  --store-sub: #C9C9C9;
  --store-border: #A6A6A6;
  --phone-radius: 20px;
  --phone-bezel: 6px;
  --header-h: 84px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E0E0F;
    --ink: #F2F2F2;
    --muted: #A3A3A3;
    --body: #C8C8C8;
    --rule: #2A2A2C;
    --line: #3A3A3C;
    --panel: #18191C;
    --btn-bg: #F2F2F2;
    --btn-fg: #0E0E0F;
    --band-bg: #18191C;
    --band-fg: #F2F2F2;
    --band-muted: #A3A3A3;
    --band-rule: #333336;
    --phone: #000000;
    --shadow: rgba(0, 0, 0, 0.5);
    --accent-text: #5B95FF;
    --grad: linear-gradient(90deg, #5B95FF, #B04DFF);
    --focus: #5B95FF;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); }
a:hover { color: var(--muted); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.container { max-width: var(--max-w); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; inset-inline-start: 16px; top: -60px; z-index: 20;
  padding: 10px 16px; background: var(--btn-bg); color: var(--btn-fg); border-radius: 8px;
}
.skip-link:focus { top: 12px; color: var(--btn-fg); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
.site-header__row {
  min-height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); line-height: 1; }
.brand:hover { color: var(--ink); }
.brand__mark { width: 38px; height: auto; }
.brand__text { display: flex; flex-direction: column; }
.brand__name { font-family: var(--font-serif); font-size: 28px; font-weight: 500; letter-spacing: -0.01em; }
.brand__sub { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }

.nav { display: flex; align-items: center; gap: clamp(12px, 3vw, 36px); font-size: 15px; font-weight: 500; }
.nav__link { text-decoration: none; padding-block: 12px; white-space: nowrap; }

/* language picker: <details> works without JavaScript */
.lang { position: relative; }
.lang__btn {
  display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--ink);
  font-size: 14px; cursor: pointer; list-style: none; white-space: nowrap;
}
.lang__btn::-webkit-details-marker { display: none; }
.lang__btn svg { flex-shrink: 0; }
.lang__code { display: none; text-transform: uppercase; }
.lang__menu {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px);
  width: min(260px, calc(100vw - 32px)); max-height: min(70vh, 520px); overflow-y: auto;
  margin: 0; padding: 8px; list-style: none;
  background: var(--bg); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 12px 40px var(--shadow);
}
.lang__item {
  display: block; padding: 10px 12px; border-radius: 8px; text-decoration: none; font-weight: 400;
}
.lang__item:hover { background: var(--panel); color: var(--ink); }
.lang__item[aria-current="true"] { font-weight: 600; color: var(--accent-text); }

@media (max-width: 560px) {
  .brand__name { font-size: 24px; }
  .brand__mark { width: 32px; }
  .lang__name { display: none; }
  .lang__code { display: inline; }
}
@media (max-width: 400px) {
  .brand__text { display: none; }
}

/* ---------- hero ---------- */
.hero { padding-block: clamp(64px, 10vw, 140px) clamp(56px, 8vw, 112px); }
.hero__eyebrow {
  margin: 0 0 24px; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted);
}
.hero__title {
  margin: 0; max-width: 1060px;
  font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(40px, 5.6vw, 80px); line-height: 1.04; letter-spacing: -0.025em;
  text-wrap: balance;
}
.hero__title em {
  font-style: italic;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-inline-end: 0.08em;
}
.hero__bottom {
  margin-top: clamp(40px, 6vw, 72px);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 32px 64px; align-items: end;
}
.hero__intro { margin: 0; max-width: 520px; font-size: 17px; color: var(--body); }
.hero__cta-wrap { display: flex; justify-content: flex-end; }
@media (max-width: 720px) { .hero__cta-wrap { justify-content: flex-start; } }

.btn-primary {
  display: inline-flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 28px;
  background: var(--accent); color: var(--on-accent); border-radius: 999px;
  text-decoration: none; font-weight: 500; font-size: 16px;
}
.btn-primary:hover { color: var(--on-accent); filter: brightness(1.08); }
[dir="rtl"] .btn-primary svg, [dir="rtl"] .icon-flip { transform: scaleX(-1); }

/* ---------- apps ---------- */
.apps { padding-bottom: clamp(72px, 10vw, 128px); }
.section-head { padding: 20px 0; border-top: 1px solid var(--ink); }
.section-head__title {
  margin: 0; font-family: var(--font-serif); font-weight: 400; font-size: 30px; letter-spacing: -0.01em;
}
.app {
  margin-top: 28px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr));
  gap: 48px 72px; align-items: center;
}
.app + .app { margin-top: clamp(56px, 8vw, 96px); padding-top: clamp(56px, 8vw, 96px); border-top: 1px solid var(--rule); }
.app__info { display: flex; flex-direction: column; gap: 28px; }
.app__id { display: flex; align-items: center; gap: 20px; }
.app__icon {
  width: 64px; height: 64px; border-radius: 15px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.08);
}
.app__name { margin: 0; font-family: var(--font-serif); font-weight: 500; font-size: 40px; line-height: 1; letter-spacing: -0.02em; }
.app__category { margin: 6px 0 0; font-size: 15px; color: var(--muted); }
.app__tagline { margin: 0; font-family: var(--font-serif); font-size: 24px; line-height: 1.25; letter-spacing: -0.01em; }
.app__desc { margin: 0; color: var(--body); max-width: 520px; }
.facts {
  margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.facts__item { padding: 16px; }
.facts__item:first-child { padding-inline-start: 0; }
.facts__item + .facts__item { border-inline-start: 1px solid var(--rule); }
.facts dt { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 6px 0 0; font-weight: 500; }

.app__links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.store-btn {
  display: flex; flex-direction: column; justify-content: center; min-height: var(--badge-h); padding: 0 18px;
  /* Same look as the official badges (black, grey outline) in both themes */
  background: var(--store-bg); color: var(--store-fg); border: 1px solid var(--store-border);
  border-radius: var(--radius-btn); text-decoration: none; line-height: 1.1;
}
.store-btn:hover { color: var(--store-fg); opacity: 0.85; }
.store-btn__small { font-size: 11px; color: var(--store-sub); }
.store-btn__big { font-size: 17px; font-weight: 600; }
.store-badge { display: inline-flex; align-items: center; border-radius: 8px; }
.store-badge img { height: var(--badge-h); width: auto; }
.store-badge:hover { opacity: 0.85; }
.site-btn {
  display: flex; align-items: center; gap: 8px; min-height: var(--badge-h); padding: 0 20px;
  border: 1px solid var(--line); border-radius: var(--radius-btn); text-decoration: none; font-weight: 500;
}

.app__gallery {
  background: var(--panel); border-radius: var(--radius-panel);
  padding: clamp(24px, 4vw, 48px);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, 2.4vw, 32px); align-items: start;
}
.phone {
  width: 100%; max-width: var(--phone-max-w); justify-self: center;
  padding: var(--phone-bezel); background: var(--phone); border-radius: var(--phone-radius);
  box-shadow: 0 24px 48px var(--shadow);
}
/* Small inner radius: the store screenshots have toolbar icons close to the
   corners, so a large radius would clip them */
.phone img { width: 100%; border-radius: calc(var(--phone-radius) - var(--phone-bezel)); }

/* ---------- privacy page ---------- */
.legal { padding-block: clamp(56px, 8vw, 104px); }
.legal__inner { max-width: 760px; }
.legal__title {
  margin: 0; font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(36px, 4.6vw, 60px); line-height: 1.08; letter-spacing: -0.02em;
}
.legal__updated { margin: 16px 0 40px; color: var(--muted); font-size: 14px; }
.legal__intro { font-size: 18px; color: var(--body); margin: 0 0 8px; }
.legal h2 { margin: 40px 0 10px; font-family: var(--font-serif); font-weight: 500; font-size: 24px; letter-spacing: -0.01em; }
.legal p { margin: 0 0 12px; color: var(--body); }
.legal address { font-style: normal; line-height: 1.6; margin-top: 12px; }
.legal__back { display: inline-flex; align-items: center; gap: 8px; margin-top: 48px; font-weight: 500; }

/* ---------- 404 / redirect ---------- */
.center-page { min-height: 60vh; display: flex; align-items: center; }
.center-page h1 { font-family: var(--font-serif); font-weight: 400; font-size: clamp(36px, 5vw, 56px); margin: 0 0 12px; }
.center-page p { color: var(--body); margin: 0 0 32px; }

/* ---------- footer ---------- */
.site-footer { background: var(--band-bg); color: var(--band-fg); }
.site-footer a { color: var(--band-fg); }
.site-footer__grid {
  padding-top: clamp(56px, 7vw, 88px);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 40px;
}
.site-footer__brand { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; }
.site-footer__brand img { width: 32px; height: auto; }
.site-footer__brand span { font-family: var(--font-serif); font-size: 22px; font-weight: 500; }
.site-footer h2 {
  margin: 0 0 12px; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--band-muted); font-weight: 500;
}
.site-footer address, .site-footer p { font-style: normal; line-height: 1.6; margin: 0; }
.site-footer .site-footer__email { color: var(--band-accent); }
.site-footer__bottom {
  margin-top: clamp(48px, 6vw, 72px); padding-block: 28px; border-top: 1px solid var(--band-rule);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px;
  font-size: 14px; color: var(--band-muted);
}
.site-footer__bottom a { color: var(--band-muted); text-decoration: none; }
.site-footer__bottom a:hover { color: var(--band-fg); }
