/* sim: shared styles for simsocial.org */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("fonts/SchibstedGrotesk-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --raise: #f7f9f9;
  --ink: #0f1419;
  --slate: #536471;
  --hair: #eff3f4;
  --rule: #cfd9de;
  --cobalt: #2b44f0;
  --cobalt-ink: #ffffff;
  --fill: #2b44f0;
  --pill: #0f1419;
  --pill-ink: #ffffff;
  --pill-hover: #272c30;
  --select: rgba(43, 68, 240, 0.18);
  --night: #000000;
  --night-ink: #e7e9ea;
  --night-slate: #8b98a5;
  --night-hair: #2f3336;
  --foil: linear-gradient(135deg, #4ccbff 0%, #ff6fcf 30%, #ffd23f 55%, #3fe29a 80%, #8c72ff 100%);
  --header-img: linear-gradient(118deg, #2b44f0 0%, #5a3ff0 38%, #8c72ff 64%, #c78be8 100%);
  --shadow-float: 0 1px 2px rgba(15, 20, 25, 0.08), 0 10px 28px -6px rgba(15, 20, 25, 0.22);
  --shadow-phone: 0 2px 4px rgba(15, 20, 25, 0.10), 0 30px 60px -18px rgba(15, 20, 25, 0.38);
  --radius-pill: 999px;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --raise: #16181c;
    --ink: #e7e9ea;
    --slate: #8b98a5;
    --hair: #2f3336;
    --rule: #3e4144;
    --cobalt: #7d8cff;
    --cobalt-ink: #000000;
    --pill: #e7e9ea;
    --pill-ink: #0f1419;
    --pill-hover: #ffffff;
    --select: rgba(125, 140, 255, 0.3);
    --night: #0b0c0e;
    --shadow-float: 0 1px 2px rgba(0, 0, 0, 0.5), 0 10px 28px -6px rgba(0, 0, 0, 0.7);
    --shadow-phone: 0 0 0 1px #2f3336, 0 30px 60px -18px rgba(0, 0, 0, 0.9);
  }
}
:root[data-theme="dark"] {
  --bg: #000000;
  --raise: #16181c;
  --ink: #e7e9ea;
  --slate: #8b98a5;
  --hair: #2f3336;
  --rule: #3e4144;
  --cobalt: #7d8cff;
  --cobalt-ink: #000000;
  --pill: #e7e9ea;
  --pill-ink: #0f1419;
  --pill-hover: #ffffff;
  --select: rgba(125, 140, 255, 0.3);
  --night: #0b0c0e;
  --shadow-float: 0 1px 2px rgba(0, 0, 0, 0.5), 0 10px 28px -6px rgba(0, 0, 0, 0.7);
  --shadow-phone: 0 0 0 1px #2f3336, 0 30px 60px -18px rgba(0, 0, 0, 0.9);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  scrollbar-color: var(--rule) var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  font-feature-settings: "ss01" 0;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--select); color: inherit; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--cobalt); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2.5px solid var(--cobalt); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
p { margin: 0; text-wrap: pretty; }
.num { font-variant-numeric: lining-nums; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--pill); color: var(--pill-ink); padding: 10px 16px; border-radius: var(--radius-pill);
  font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }

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

.icon { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--hair);
}
.topbar .wrap { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; border-radius: 8px; padding: 4px 2px; }
.brand img { height: 30px; width: auto; }
.logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none; }
  :root:not([data-theme="light"]) .logo-dark { display: block; }
}
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }
.topnav { display: none; gap: 4px; margin-left: 12px; }
.topnav a {
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.95rem;
  padding: 10px 14px; border-radius: var(--radius-pill); transition: background-color 160ms var(--ease-out);
}
.topnav a:hover { background: var(--raise); }
.topbar .pill { margin-left: auto; }
@media (min-width: 820px) { .topnav { display: flex; } }

/* ---------- pills ---------- */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 44px; padding: 0 22px; border-radius: var(--radius-pill);
  font: inherit; font-weight: 800; font-size: 1rem; letter-spacing: -0.005em; text-decoration: none; white-space: nowrap;
  background: var(--pill); color: var(--pill-ink); border: 1px solid var(--pill);
  transition: background-color 160ms var(--ease-out), transform 160ms var(--ease-out);
  cursor: pointer;
}
.pill:hover { background: var(--pill-hover); text-decoration: none; }
.pill:active { transform: scale(0.97); }
.pill-sm { min-height: 40px; padding: 0 18px; font-size: 0.95rem; }
.pill-outline { background: transparent; color: var(--ink); border-color: var(--rule); }
.pill-outline:hover { background: var(--raise); }
.pill-lg { min-height: 52px; padding: 0 28px; font-size: 1.0625rem; }

/* ---------- phone frame ---------- */
.phone {
  --w: 300px;
  position: relative;
  width: var(--w);
  max-width: 100%;
  padding: calc(var(--w) * 0.032);
  border-radius: calc(var(--w) * 0.155);
  background: #0b0c0e;
  box-shadow: var(--shadow-phone), inset 0 0 0 1.5px #2a2d31;
  flex: none;
}
.phone picture, .phone img {
  display: block; width: 100%; aspect-ratio: 1206 / 2622; height: auto;
  border-radius: calc(var(--w) * 0.125); object-fit: cover; object-position: top center;
  background: #16181c;
}

/* ---------- avatars, seals, rows (the app's own grammar) ---------- */
.av {
  --c: var(--fill);
  display: inline-grid; place-items: center; flex: none;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--c); color: #fff; font-weight: 800; font-size: 0.95rem; letter-spacing: 0.01em;
}
.seal-i { width: 1.05em; height: 1.05em; display: inline-block; vertical-align: -0.14em; }
.name { font-weight: 800; }
.handle { color: var(--slate); }

.stats { display: flex; flex-wrap: wrap; gap: 6px 22px; color: var(--slate); font-size: 0.95rem; }
.stats span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--hair); padding-block: 28px 40px; color: var(--slate); font-size: 0.95rem; }
.foot .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.foot a { color: var(--ink); text-decoration: none; font-weight: 600; padding: 8px 0; display: inline-block; }
.foot a:hover { text-decoration: underline; }
.foot .copy { margin-left: auto; }
@media (max-width: 640px) { .foot .copy { margin-left: 0; width: 100%; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
