/* Ciphren website. Same tokens and type as the app; dark is the default look. */
@font-face {
  font-family: "Source Sans 3";
  src: url("assets/fonts/source-sans-3-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 200 900;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("assets/fonts/source-sans-3-latin-ext-wght-normal.woff2") format("woff2-variations");
  font-weight: 200 900;
  font-display: swap;
  unicode-range:
    U+0100-024F, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: dark;
  --bg: #05080f;
  --bg-2: #0a101e;
  --card: rgba(255, 255, 255, 0.04);
  --card-border: rgba(255, 255, 255, 0.08);
  --text: #f5f7fb;
  --muted: #9aa6bf;
  --faint: #6c7790;
  --cyan: #6ee7f9;
  --blue: #3b82f6;
  --signal: #22c3ee;
  --window-shadow: 0 40px 120px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08);
  --nav-bg: rgba(5, 8, 15, 0.72);
  --glow-a: rgba(34, 195, 238, 0.22);
  --glow-b: rgba(59, 130, 246, 0.2);
  --radius: 22px;
  --max: 1180px;
  --font: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f7f8fb;
    --bg-2: #eef1f7;
    --card: rgba(255, 255, 255, 0.7);
    --card-border: rgba(10, 16, 30, 0.08);
    --text: #0a101e;
    --muted: #4c566b;
    --faint: #6b7489;
    --cyan: #0891b2;
    --blue: #2563eb;
    --window-shadow: 0 40px 100px rgba(30, 45, 90, 0.22), 0 0 0 1px rgba(10, 16, 30, 0.08);
    --nav-bg: rgba(247, 248, 251, 0.75);
    --glow-a: rgba(34, 195, 238, 0.22);
    --glow-b: rgba(99, 102, 241, 0.14);
  }
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 19px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img,
svg {
  display: block;
}
a {
  color: inherit;
}
h1,
h2,
h3,
p {
  margin: 0;
}
code,
kbd {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.82em;
}
kbd {
  display: inline-block;
  min-width: 1.6em;
  margin: 0 0.12em;
  padding: 0.05em 0.42em;
  border-radius: 6px;
  border: 1px solid var(--card-border);
  background: var(--card);
  text-align: center;
  font-family: var(--font);
  font-weight: 600;
}
.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: 16px;
  top: 12px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
}
:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Navigation ------------------------------------------------------------ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--card-border);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  height: 54px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.brand img {
  border-radius: 6px;
}
.nav nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 15px;
}
.nav nav a {
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s;
}
.nav nav a:hover {
  color: var(--text);
}
.nav .pill {
  color: #fff !important;
  background: var(--blue);
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 600;
}

/* Hero ------------------------------------------------------------------- */
.hero {
  position: relative;
  text-align: center;
  padding: 96px 22px 0;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  inset: -20% -10% auto;
  height: 900px;
  background:
    radial-gradient(40% 50% at 35% 30%, var(--glow-a), transparent 70%),
    radial-gradient(40% 45% at 68% 38%, var(--glow-b), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
}
.hero > *:not(.hero-glow) {
  position: relative;
}
.hero-icon {
  margin: 0 auto 34px;
  width: 148px;
  height: 148px;
  filter: drop-shadow(0 24px 50px rgba(34, 195, 238, 0.28));
  animation: float 7s ease-in-out infinite;
}
h1 {
  text-wrap: balance;
  font-size: clamp(46px, 8.2vw, 104px);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.04em;
}
.grad {
  background: linear-gradient(100deg, var(--cyan) 10%, var(--blue) 60%, #8b5cf6 110%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede {
  max-width: 680px;
  margin: 26px auto 0;
  font-size: clamp(19px, 2vw, 23px);
  line-height: 1.45;
  color: var(--muted);
}
.cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 36px;
}
.button {
  display: inline-flex;
  align-items: center;
  height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  transition:
    transform 0.2s,
    filter 0.2s,
    background 0.2s;
}
.button.primary {
  color: #fff;
  background: linear-gradient(180deg, #4f93ff, var(--blue));
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.35);
}
.button.primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.button.ghost {
  color: var(--signal);
}
.button.ghost:hover {
  text-decoration: underline;
}
.platforms {
  margin-top: 16px;
  font-size: 14px;
  color: var(--faint);
  letter-spacing: 0.02em;
}

/* The tilted product window flattens as it scrolls in (main.js sets --tilt). */
.stage {
  max-width: 1120px;
  margin: 72px auto 0;
  perspective: 1600px;
  --tilt: 1;
}
.window {
  position: relative;
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--bg-2);
  box-shadow: var(--window-shadow);
}
.window img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.window .lights {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.window-hero {
  transform: rotateX(calc(var(--tilt) * 22deg)) scale(calc(1 - var(--tilt) * 0.06));
  transform-origin: 50% 0;
  will-change: transform;
}

/* Principles ------------------------------------------------------------- */
.principles {
  max-width: var(--max);
  margin: 140px auto 0;
  padding: 0 22px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.principle h2 {
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.principle p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 18px;
}

/* Features --------------------------------------------------------------- */
.features {
  max-width: var(--max);
  margin: 150px auto 0;
  padding: 0 22px;
  display: flex;
  flex-direction: column;
  gap: 150px;
}
.feature {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  align-items: center;
  gap: 64px;
}
.feature.flip {
  grid-template-columns: 1.15fr 0.85fr;
}
.feature.flip .copy {
  order: 2;
}
.eyebrow {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--signal);
  margin-bottom: 12px;
}
.feature h2,
.section-head h2 {
  font-size: clamp(36px, 4.6vw, 56px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.035em;
}
.feature .copy > p {
  margin-top: 20px;
  color: var(--muted);
  font-size: 19px;
}
.ticks {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 17px;
}
.ticks li {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ticks li::before {
  content: "";
  flex: 0 0 18px;
  height: 18px;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.4l2.6 2.5L13 6.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
      center / 18px no-repeat,
    linear-gradient(135deg, var(--cyan), var(--blue));
}

/* Security --------------------------------------------------------------- */
.security {
  max-width: var(--max);
  margin: 180px auto 0;
  padding: 0 22px;
}
.section-head {
  text-align: center;
}
.dim {
  color: var(--faint);
}
.specs {
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.spec {
  padding: 30px 28px 32px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--card-border);
}
.spec svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--signal);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.spec h3 {
  margin-top: 18px;
  font-size: 21px;
  letter-spacing: -0.01em;
}
.spec p {
  margin-top: 8px;
  font-size: 16.5px;
  color: var(--muted);
}

/* Download --------------------------------------------------------------- */
.download {
  position: relative;
  max-width: var(--max);
  margin: 180px auto 0;
  padding: 90px 22px 100px;
  text-align: center;
  border-radius: 36px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  border: 1px solid var(--card-border);
}
.download-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(50% 60% at 50% 0%, var(--glow-a), transparent 70%);
  pointer-events: none;
}
.download > *:not(.download-glow) {
  position: relative;
}
.download-icon {
  margin: 0 auto 26px;
  filter: drop-shadow(0 18px 40px rgba(34, 195, 238, 0.25));
}
.download h2 {
  font-size: clamp(44px, 6vw, 72px);
  letter-spacing: -0.04em;
  line-height: 1.02;
}
.download .lede {
  margin-top: 14px;
}
.platforms-grid {
  max-width: 820px;
  margin: 46px auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.platform {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 28px 18px 24px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--card-border);
  text-decoration: none;
  transition:
    transform 0.25s,
    border-color 0.25s,
    background 0.25s;
}
.platform:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 195, 238, 0.5);
}
.platform.current {
  border-color: rgba(34, 195, 238, 0.6);
  box-shadow:
    0 0 0 1px rgba(34, 195, 238, 0.35),
    0 18px 40px rgba(34, 195, 238, 0.12);
}
.platform svg {
  width: 34px;
  height: 34px;
  margin-bottom: 8px;
  fill: none;
  stroke: var(--text);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.platform[data-platform="mac"] svg {
  fill: var(--text);
  stroke: none;
}
.platform strong {
  font-size: 20px;
}
.platform span {
  font-size: 14px;
  color: var(--faint);
}
.fine {
  max-width: 560px;
  margin: 34px auto 0;
  font-size: 14px;
  color: var(--faint);
}

/* Footer ----------------------------------------------------------------- */
.footer {
  margin-top: 120px;
  border-top: 1px solid var(--card-border);
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 36px 22px 48px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 30px;
  font-size: 14px;
  color: var(--faint);
}
.footer-inner a {
  color: var(--muted);
}
.brand.small {
  font-size: 15px;
  color: var(--text);
}

/* Motion ----------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.9s cubic-bezier(0.2, 0, 0, 1),
    transform 0.9s cubic-bezier(0.2, 0, 0, 1);
}
.reveal.in {
  opacity: 1;
  transform: none;
}
.no-js .reveal {
  opacity: 1;
  transform: none;
}
@keyframes float {
  50% {
    transform: translateY(-10px);
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero-icon {
    animation: none;
  }
  .window-hero {
    transform: none;
  }
}

/* Layout ----------------------------------------------------------------- */
@media (max-width: 900px) {
  .principles,
  .specs {
    grid-template-columns: 1fr 1fr;
  }
  .feature,
  .feature.flip {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .feature.flip .copy {
    order: 0;
  }
  .features {
    gap: 110px;
  }
}
@media (max-width: 620px) {
  body {
    font-size: 17px;
  }
  .nav nav a:not(.pill) {
    display: none;
  }
  .hero {
    padding-top: 64px;
  }
  .hero-icon {
    width: 112px;
    height: 112px;
  }
  h1 {
    font-size: 40px;
    letter-spacing: -0.035em;
  }
  .principles,
  .specs,
  .platforms-grid {
    grid-template-columns: 1fr;
  }
  .stage {
    margin-top: 48px;
  }
  .download {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }
}

/* Docs -------------------------------------------------------------------- */
.nav nav a[aria-current="page"] {
  color: var(--text);
}
.docs-layout {
  max-width: var(--max);
  margin: 0 auto;
  padding: 48px 22px 0;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 56px;
}
.docs-nav {
  position: sticky;
  top: 86px;
  align-self: start;
  font-size: 15px;
}
.docs-home {
  display: block;
  margin-bottom: 12px;
  font-weight: 700;
  text-decoration: none;
}
.docs-nav ol {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 1px solid var(--card-border);
}
.docs-nav li a {
  display: block;
  margin-left: -1px;
  padding: 6px 0 6px 14px;
  border-left: 2px solid transparent;
  color: var(--muted);
  text-decoration: none;
}
.docs-nav li a:hover {
  color: var(--text);
}
.docs-nav li a[aria-current="page"] {
  color: var(--text);
  border-left-color: var(--signal);
  font-weight: 600;
}
.doc {
  max-width: 760px;
  font-size: 18px;
  line-height: 1.65;
}
.doc h1 {
  font-size: clamp(34px, 4.4vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
}
.doc h2 {
  font-size: 26px;
  letter-spacing: -0.02em;
  margin: 44px 0 12px;
}
.doc h3 {
  font-size: 20px;
  margin: 30px 0 8px;
}
.doc h2,
.doc h3 {
  position: relative;
  scroll-margin-top: 80px;
}
.doc .anchor {
  position: absolute;
  left: -0.9em;
  color: var(--faint);
  text-decoration: none;
  opacity: 0;
}
.doc h2:hover .anchor,
.doc h3:hover .anchor {
  opacity: 1;
}
.doc p,
.doc ul,
.doc ol,
.doc table,
.doc pre,
.doc blockquote {
  margin: 0 0 16px;
}
.doc ul,
.doc ol {
  padding-left: 1.3em;
}
.doc li {
  margin: 4px 0;
}
.doc a {
  color: var(--cyan);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.doc .lede {
  margin: 0 0 32px;
  max-width: none;
}
.doc code {
  padding: 0.1em 0.35em;
  border-radius: 6px;
  background: var(--card);
  border: 1px solid var(--card-border);
}
.doc pre {
  overflow-x: auto;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--card-border);
  line-height: 1.5;
}
.doc pre code {
  padding: 0;
  border: 0;
  background: none;
  font-size: 15px;
}
.doc blockquote {
  padding: 12px 18px;
  border-left: 3px solid var(--signal);
  border-radius: 0 12px 12px 0;
  background: var(--card);
  color: var(--muted);
}
.doc blockquote p:last-child {
  margin: 0;
}
.doc table {
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 16px;
}
.doc th,
.doc td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--card-border);
  text-align: left;
  vertical-align: top;
}
.doc th {
  color: var(--muted);
  font-weight: 600;
}
.doc-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0 !important;
  list-style: none;
}
.doc-cards li {
  margin: 0;
}
.doc-cards a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s;
}
.doc-cards a:hover {
  border-color: var(--signal);
}
.doc-cards span {
  font-size: 15px;
  line-height: 1.45;
  color: var(--muted);
}
.pager {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--card-border);
}
.pager a {
  display: flex;
  flex-direction: column;
  max-width: 48%;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}
.pager a span {
  font-size: 14px;
  font-weight: 400;
  color: var(--faint);
}
.pager .next {
  margin-left: auto;
  text-align: right;
}
@media (max-width: 900px) {
  .docs-layout {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 28px;
  }
  .docs-nav {
    position: static;
  }
  .docs-nav ol {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    border: 0;
  }
  .docs-nav li a {
    padding: 2px 0;
    border: 0;
  }
  .doc .anchor {
    display: none;
  }
}
