/* Userside Studio: colors and type from the brand sheet. Dark, light and system themes. */
/* Fonts are self-hosted (OFL, see assets/fonts) so text never swaps in from another server. */
@font-face { font-family: "Rajdhani"; font-weight: 700; font-display: swap; src: url("/assets/fonts/rajdhani-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("/assets/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url("/assets/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url("/assets/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("/assets/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("/assets/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  --display: "Rajdhani", "Arial Narrow", system-ui, sans-serif;
  --body: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", monospace;
  /* Dark (default) */
  --bg: #05080D;
  --panel: #0A1118;
  --line: #1C2A36;
  --text: #E8F6FA;
  --muted: #9FB4C2;
  --strong: #FFFFFF;
  --link: #6FF3FF;
  --accent: #6FF3FF;
  --on-accent: #05080D;
  --accent-hover: #FFFFFF;
  --label: #FF9A3C;
  --focus: #FF9A3C;
  --bar: rgba(5, 8, 13, .92);
  --glow: rgba(111, 243, 255, .10);
  --edge: rgba(111, 243, 255, .35);
  --edge-hover: rgba(111, 243, 255, .5);
  color-scheme: dark;
}
/* Light: brand sheet paper/ink, teal for links, a darker orange for labels. */
:root[data-theme="light"] {
  --bg: #F4FAFC; --panel: #FFFFFF; --line: #D8E6EC; --text: #0B1F33; --muted: #4C5872; --strong: #0B1F33;
  --link: #0A6E7C; --accent: #0A6E7C; --on-accent: #FFFFFF; --accent-hover: #0B1F33; --label: #A84F0A; --focus: #A84F0A;
  --bar: rgba(244, 250, 252, .92); --glow: rgba(10, 110, 124, .08); --edge: rgba(10, 110, 124, .45); --edge-hover: rgba(10, 110, 124, .7);
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #F4FAFC; --panel: #FFFFFF; --line: #D8E6EC; --text: #0B1F33; --muted: #4C5872; --strong: #0B1F33;
    --link: #0A6E7C; --accent: #0A6E7C; --on-accent: #FFFFFF; --accent-hover: #0B1F33; --label: #A84F0A; --focus: #A84F0A;
    --bar: rgba(244, 250, 252, .92); --glow: rgba(10, 110, 124, .08); --edge: rgba(10, 110, 124, .45); --edge-hover: rgba(10, 110, 124, .7);
    color-scheme: light;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 var(--body); }
a { color: var(--link); }
a:hover { color: var(--strong); }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--accent); color: var(--on-accent); padding: 8px 12px; z-index: 10; }

.wrap { max-width: 1080px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }

/* Header */
.bar { border-bottom: 1px solid var(--line); background: var(--bar); position: sticky; top: 0; z-index: 5; backdrop-filter: blur(8px); }
.bar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; padding-block: 14px; flex-wrap: wrap; }
.bar nav { display: flex; gap: 20px; flex-wrap: wrap; }
@media (max-width: 480px) {
  .bar-in { flex-wrap: nowrap; gap: 12px; }
  .bar .lockup { gap: 8px; }
  .bar .lockup img { width: 32px; height: 32px; }
  .wm b { font-size: 20px; }
  .wm small { font-size: 7px; }
  .bar nav { gap: 14px; flex-wrap: nowrap; }
  .bar nav a { font-size: 14px; white-space: nowrap; }
}
.bar nav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: 15px; }
.bar nav a:hover, .bar nav a[aria-current] { color: var(--strong); }
.lockup { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.wm { display: inline-flex; flex-direction: column; line-height: 1; }
.wm b { font: 700 24px/1 var(--display); letter-spacing: .08em; color: var(--strong); }
.wm small { font: 500 8px/1 var(--mono); letter-spacing: .42em; color: var(--link); margin-top: 4px; }

/* Type */
h1, h2, h3 { font-family: var(--display); font-weight: 700; color: var(--strong); letter-spacing: .02em; line-height: 1.1; margin: 0 0 12px; text-wrap: balance; }
h1 { font-size: clamp(38px, 7vw, 64px); }
h2 { font-size: clamp(28px, 4.5vw, 38px); }
h3 { font-size: 24px; }
p { margin: 0 0 16px; }
.eyebrow { font: 500 12px/1 var(--mono); letter-spacing: .24em; text-transform: uppercase; color: var(--label); margin: 0 0 14px; }
.lede { color: var(--muted); font-size: 19px; max-width: 60ch; }
.muted { color: var(--muted); }

/* Sections */
.hero { padding-block: clamp(56px, 10vw, 112px) clamp(40px, 7vw, 72px); background: radial-gradient(70% 90% at 90% 0%, var(--glow), transparent 60%); }
.section { padding-block: 56px; border-top: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 12px 24px; flex-wrap: wrap; margin-bottom: 24px; }
.section-head p { margin: 0; }

.btn { display: inline-block; font: 600 15px/1 var(--body); color: var(--on-accent); background: var(--accent); padding: 13px 20px; border-radius: 999px; text-decoration: none; }
.btn:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn.ghost { background: transparent; color: var(--link); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--link); color: var(--strong); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

/* Cards */
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.card { border: 1px solid var(--line); border-radius: 16px; background: var(--panel); padding: 24px; display: grid; gap: 8px; align-content: start; min-width: 0; }
.card h3 { margin: 0; }
.card p { margin: 0; color: var(--muted); }
.card .more { margin-top: 8px; font-weight: 600; text-decoration: none; }
.card .more:hover { text-decoration: underline; }
.tag { justify-self: start; font: 500 11px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--link); border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; }
.card.feature { border-color: var(--edge); }

.links { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 12px; }
.prose { max-width: 68ch; }
.prose h2 { margin-top: 40px; font-size: 28px; }

/* Footer */
.foot { border-top: 1px solid var(--line); margin-top: 56px; }
.foot-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 16px; padding-block: 28px; font: 400 13px/1.6 var(--mono); color: var(--muted); }

/* App icons, with the iOS-style rounded corners */
.app-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.app-icon { width: 64px; height: 64px; border-radius: 22.5%; display: block; box-shadow: 0 0 0 1px var(--line); }
.app-icon.big { width: 112px; height: 112px; margin-bottom: 20px; }

/* Review pass */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Phone: the logo is a faint, cropped backdrop at the top right, behind the headline.
   Desktop: text and buttons on the left, the logo full strength on the right. */
.hero { overflow: hidden; }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "text" "actions"; }
.hero-text, .hero-actions { position: relative; z-index: 1; }
.hero-text { grid-area: text; }
.hero-text .lede { margin-bottom: 0; }
.hero-actions { grid-area: actions; }
.hero-mark { position: absolute; z-index: 0; right: -110px; top: -64px; width: 300px; height: 300px; opacity: .16; pointer-events: none; }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "text mark" "actions mark"; column-gap: 32px; align-items: center; }
  .hero-text { align-self: end; }
  .hero-actions { align-self: start; }
  .hero-mark { position: static; grid-area: mark; width: 280px; height: 280px; opacity: 1; filter: drop-shadow(0 0 40px rgba(111, 243, 255, .25)); }
}
.cards.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.steps { list-style: none; padding: 0; margin: 0; }
.card.linked { position: relative; transition: border-color .15s; }
.card.linked:hover { border-color: var(--edge-hover); }
.card.linked .more::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }

/* Hero logo: the hologram half drifts and a scan band sweeps down. */
.hero-mark .hm-lines { animation: hm-drift 1.2s linear infinite; }
.hero-mark .hm-band { animation: hm-sweep 3.6s cubic-bezier(.45, 0, .55, 1) infinite; }
.hero-mark .hm-glow { animation: hm-breathe 4.8s ease-in-out infinite; }
@keyframes hm-drift { to { transform: translateY(5px); } }
@keyframes hm-sweep { 0% { transform: translateY(0); opacity: 0; } 10% { opacity: 1; } 75% { opacity: 1; } 100% { transform: translateY(70px); opacity: 0; } }
@keyframes hm-breathe { 0%, 100% { opacity: 1; } 50% { opacity: .65; } }
@media (prefers-reduced-motion: reduce) {
  .hero-mark * { animation: none !important; }
  .hero-mark .hm-band { opacity: 0; }
}

/* Light theme: header and hero logos use the on-light mark (assets/brand/mark-on-light.svg): dark
   inside its own frame, with a navy outline around the frame. */
.logo-light { display: none; }
.hero-mark .hm-ink, .hero-mark .hm-fill { display: none; }
:root[data-theme="light"] .hero-mark { filter: none; }
@media (max-width: 899px) { :root[data-theme="light"] .hero-mark { opacity: .1; } }
:root[data-theme="light"] .hero-mark .hm-ink, :root[data-theme="light"] .hero-mark .hm-fill { display: inline; }
:root[data-theme="light"] .logo-dark { display: none; }
:root[data-theme="light"] .logo-light { display: block; }
@media (prefers-color-scheme: light) and (max-width: 899px) {
  :root:not([data-theme="dark"]) .hero-mark { opacity: .1; }
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .logo-dark { display: none; }
  :root:not([data-theme="dark"]) .logo-light { display: block; }
  :root:not([data-theme="dark"]) .hero-mark { filter: none; }
  :root:not([data-theme="dark"]) .hero-mark .hm-ink, :root:not([data-theme="dark"]) .hero-mark .hm-fill { display: inline; }
}

/* Theme switch in the footer (shown only when JavaScript runs) */
.foot-meta, .foot-links { grid-column: 1; display: flex; flex-wrap: wrap; column-gap: 12px; }
.foot-in .sep { display: none; }
.foot-in .theme { grid-column: 2; grid-row: 1 / span 2; }
@media (min-width: 720px) {
  .foot-in { grid-template-columns: auto minmax(0, 1fr) auto; }
  .foot-meta, .foot-links { column-gap: 0; }
  .foot-in .sep { display: inline; white-space: pre; }
  .foot-links { grid-column: 2; grid-row: 1; justify-self: end; }
  .foot-in .theme { grid-column: 3; grid-row: 1; }
}
.theme { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; gap: 2px; }
.theme[hidden] { display: none; }
.theme button { display: grid; place-items: center; width: 30px; height: 30px; color: var(--muted); background: none; border: 0; border-radius: 999px; padding: 0; cursor: pointer; }
.theme button:hover { color: var(--strong); }
.theme button[aria-pressed="true"] { background: var(--panel); color: var(--strong); box-shadow: 0 0 0 1px var(--line); }
.theme svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
