/*
 * The website of Mosec: black and anthracite, white type, the red of the mark, and each product in its own light.
 * Our renderings and the real apps are the imagery. Two pinned parts are driven by scrolling (site.js).
 */
:root {
  color-scheme: dark;
  --bg: #0a0b0d;
  --panel: #121419;
  --raised: #1a1d23;
  --sep: #ffffff17;
  --label: #f4f5f7;
  --label-2: #a3aab6;
  --accent: #ff5c7c;
  --mark: #e0234a;
  --head: 64px;
  --font: 'Segoe UI Variable Display', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, 'Cascadia Mono', Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--head) + 12px); }
body { margin: 0; background: var(--bg); color: var(--label); font: 17px/1.6 var(--font); }
main { overflow-x: clip; }
a { color: var(--accent); }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; height: auto; }
code { font: 0.9em var(--mono); background: var(--raised); padding: 0.1em 0.4em; border-radius: 4px; }
h1, h2, h3 { letter-spacing: -0.025em; line-height: 1.15; text-wrap: balance; }
p, li { text-wrap: pretty; }
.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(720px, 100% - 40px); margin-inline: auto; }
.narrowed { width: min(880px, 100% - 40px); }
.skip { position: absolute; left: 12px; top: -80px; z-index: 30; padding: 8px 14px; background: #fff; color: #000; border-radius: 8px; }
.skip:focus { top: 12px; }

/* Tones: each product has its light */
.blue { --tone: #2b7de0; }
.amber { --tone: #e8960f; }
.red { --tone: #e0234a; }
.steel { --tone: #7f93b3; }

/* Header */
header.top { position: sticky; top: 0; z-index: 20; background: #0a0b0df2; border-bottom: 1px solid var(--sep); }
header.top .wrap { display: flex; align-items: center; gap: 24px; height: var(--head); }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; white-space: nowrap; color: inherit; font-size: 20px; font-weight: 800; text-decoration: none; }
.brand .mark { width: 30px; height: 28px; }
nav.main { display: flex; gap: 4px; }
nav a { padding: 7px 13px; border-radius: 999px; color: var(--label-2); font-size: 15px; font-weight: 600; text-decoration: none; }
nav a:hover { color: var(--label); }
nav a[aria-current] { color: var(--label); background: var(--raised); }
.lang { color: var(--label-2); font-size: 13px; font-weight: 700; text-decoration: none; padding: 6px; }
.menu { display: none; }

/* Buttons, badges */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 46px; padding: 10px 24px; border: 1px solid transparent; border-radius: 999px; background: var(--label); color: #0a0b0d; font-size: 15px; font-weight: 700; text-decoration: none; transition: transform 0.2s, background-color 0.2s, border-color 0.2s; }
a.button:hover { transform: translateY(-2px); background: #fff; }
.button.ghost { background: #ffffff0d; border-color: #ffffff2e; color: var(--label); }
a.button.ghost:hover { background: #ffffff1a; border-color: #ffffff59; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0; color: var(--label-2); font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.badge { display: inline-flex; align-items: center; gap: 7px; padding: 3px 11px; border: 1px solid var(--sep); border-radius: 999px; background: #00000040; color: var(--label); font-size: 12px; letter-spacing: 0.02em; text-transform: none; white-space: nowrap; }
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #3ecf8e; }
.badge.development::before { background: #f0b429; }

/* The opening of the home page: the mark and the name that decrypts */
.pin { position: relative; display: grid; place-items: center; min-height: calc(100svh - var(--head)); overflow: hidden; }
.moving .intro { height: 220vh; }
.moving .pin { position: sticky; top: var(--head); height: calc(100svh - var(--head)); min-height: 0; }
.intro .pin { background: radial-gradient(60% 55% at 50% 42%, #2a0f18 0%, var(--bg) 70%); }
.mark3d { position: absolute; width: min(900px, 108vw, 108svh); opacity: 0.45; transform: scale(calc(1 + var(--p, 0) * 0.22)); }
/* On opening there is only the mark; the name and what belongs to it come with the first scrolling */
.moving { overflow-anchor: none; }
.moving .mark3d { opacity: calc(0.95 - min(var(--p, 0) * 3, 1) * 0.5); }
.moving .intro .over { opacity: min(var(--p, 0) * 6, 1); }
.moving .intro:not(.shown) .over { pointer-events: none; }
.moving .intro .over:focus-within { opacity: 1; pointer-events: auto; }
.over { position: relative; display: grid; justify-items: center; gap: 22px; padding: 0 20px; text-align: center; }
.over p { margin: 0; font-size: clamp(18px, 2.2vw, 24px); font-weight: 600; text-shadow: 0 2px 18px #000; }
.over .actions { justify-content: center; }
.decode { display: flex; flex-wrap: wrap; justify-content: center; column-gap: 0.3em; margin: 0; font-size: clamp(56px, 13vw, 150px); font-weight: 800; line-height: 1; letter-spacing: -0.04em; text-shadow: 0 8px 50px #000000b3; }
.decode .word { display: flex; }
.decode .letter { text-align: center; }
.decode .letter.open { width: 0.9em; color: #ffffff59; font-family: var(--mono); }

/* Sections */
.block { padding-block: clamp(64px, 9vw, 120px); }
.block.first { padding-top: clamp(40px, 6vw, 72px); }
.block.alt { background: var(--panel); border-block: 1px solid var(--sep); }
.head { margin-bottom: 36px; }
.head h1, .head h2 { margin: 0; font-size: clamp(30px, 4.4vw, 52px); font-weight: 800; }
.head p { max-width: 56ch; margin: 12px 0 0; color: var(--label-2); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }

/* Product cards */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--sep); border-radius: 22px; background: var(--panel); transition: border-color 0.25s, transform 0.25s; }
.card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--tone) 65%, transparent); }
.card .visual { display: grid; place-items: center; aspect-ratio: 16 / 10; overflow: hidden; background: radial-gradient(70% 75% at 50% 55%, color-mix(in srgb, var(--tone) 24%, #101216), #0d0f12 75%); }
.card .art { height: 100%; width: auto; object-fit: contain; transition: transform 0.5s; }
.card:hover .art { transform: scale(1.05); }
.card .body { display: flex; flex: 1; flex-direction: column; gap: 10px; padding: 24px 26px 28px; }
.card .meta { justify-content: space-between; }
.card h2, .card h3 { margin: 4px 0 0; font-size: 28px; }
.card p:not(.meta) { margin: 0; color: var(--label-2); }
.card .actions { margin-top: auto; padding-top: 12px; }

/* Surfaces that slide over each other */
.surface { display: grid; align-items: center; min-height: calc(100svh - var(--head)); overflow: hidden; border-top: 1px solid #ffffff2b; border-radius: 32px 32px 0 0; background: radial-gradient(75% 90% at 75% 45%, color-mix(in srgb, var(--tone) 34%, #0e1013), #0e1013 72%); }
.stack .surface { position: sticky; top: var(--head); box-shadow: 0 -18px 50px #000000a6; }
.surface .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; padding-block: 40px; }
.surface h2 { margin: 14px 0; font-size: clamp(42px, 6vw, 84px); font-weight: 800; line-height: 1; }
.lead { max-width: 40ch; margin: 0 0 28px; color: #d3d7de; font-size: clamp(17px, 1.6vw, 20px); }
.surface .art { display: block; margin-inline: auto; max-height: calc(100svh - var(--head) - 80px); width: auto; }

/* Real screenshots */
.frame { display: block; overflow: hidden; border: 1px solid #ffffff24; border-radius: 14px; background: #1c1c1e; box-shadow: 0 30px 70px #000000a6; }
.frame img { display: block; width: 100%; }
.frame.tilt { transform: perspective(1400px) rotateY(-9deg) rotateX(3deg); }

/* A huge outlined line that runs behind the app */
.runner .pin { align-content: end; padding-bottom: 5vh; }
.moving .runner { height: 240vh; }
.run { position: absolute; left: 0; top: 3%; display: flex; width: max-content; margin: 0; color: transparent; font-size: clamp(100px, 16vw, 230px); font-weight: 900; line-height: 1.2; white-space: nowrap; -webkit-text-stroke: 1.5px #ffffff4d; }
.run span { padding-right: 0.5em; }
/* A part that has played, on the way back up: one screen high and still */
.moving .intro.done, .moving .runner.done { height: auto; }
.moving .done .pin { position: relative; top: auto; }
.frame.center { position: relative; width: min(760px, 100% - 40px, 108svh - 200px); margin-top: clamp(120px, 15vw, 220px); }

/* Hero of a product */
.hero { overflow: hidden; border-bottom: 1px solid var(--sep); background: radial-gradient(60% 100% at 76% 50%, color-mix(in srgb, var(--tone) 30%, var(--bg)), var(--bg) 75%); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 40px; align-items: center; min-height: min(640px, calc(100svh - var(--head))); padding-block: 48px; }
.hero h1 { margin: 14px 0; font-size: clamp(42px, 6vw, 80px); font-weight: 800; line-height: 1.02; }
.hero .art { display: block; width: 100%; }
.note { max-width: 56ch; margin: 22px 0 0; color: var(--label-2); font-size: 14px; }
.legalline { margin-top: 32px; color: var(--label-2); font-size: 13px; }

/* Features, facts, gallery, steps, changelog */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1px; margin: 0 0 32px; padding: 0; overflow: hidden; border: 1px solid var(--sep); border-radius: 18px; background: var(--sep); list-style: none; }
.features.n3, .features.n6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.features.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .features.n4, .features.n6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .features.n3, .features.n4, .features.n6 { grid-template-columns: minmax(0, 1fr); } }
.features li { padding: 26px; background: var(--bg); }
.features h3 { margin: 0 0 8px; font-size: 19px; }
.features p { margin: 0; color: var(--label-2); font-size: 15px; }
.facts { margin: 0 0 24px; }
.facts > div { display: flex; justify-content: space-between; gap: 20px; padding-block: 11px; border-bottom: 1px solid var(--sep); }
.facts dt { color: var(--label-2); }
.facts dd { margin: 0; font-weight: 600; text-align: right; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr)); gap: 28px; }
.gallery figure { margin: 0; }
figcaption { margin-top: 12px; color: var(--label-2); font-size: 14px; }
.duo { display: grid; gap: 20px; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 0 0 28px; padding: 0; list-style: none; counter-reset: step; }
.steps.single { grid-template-columns: 1fr; gap: 18px; }
.steps li { display: grid; align-content: start; justify-items: start; gap: 4px; padding-top: 14px; border-top: 2px solid var(--raised); color: var(--label-2); font-size: 15px; counter-increment: step; }
.steps strong { color: var(--label); font-size: 17px; }
.steps strong::before { content: counter(step) '  '; white-space: pre; color: var(--accent); }
.log details { border-bottom: 1px solid var(--sep); }
.log summary { display: flex; justify-content: space-between; gap: 16px; padding-block: 14px; cursor: pointer; }
.log time { color: var(--label-2); font-size: 14px; }
.log ul { margin: 0 0 16px; padding-left: 20px; color: var(--label-2); }

/* Examples that run */
.demos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.demo { margin: 0; padding: 28px; border: 1px solid var(--sep); border-radius: 18px; background: var(--panel); }
.face { display: flex; align-items: center; justify-content: center; gap: 18px; min-height: 96px; }
.digits { font: 700 clamp(34px, 5vw, 52px) var(--mono); }
.password { font: 600 clamp(16px, 2.4vw, 24px) var(--mono); word-break: break-all; }
.ring { width: 44px; height: 44px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke: #5aa2f5; stroke-width: 5; stroke-dasharray: 100.5; animation: run-out 30s linear infinite; }
@keyframes run-out { to { stroke-dashoffset: 100.5; } }

/* Downloads */
.downloads { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.download { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 26px; border: 1px solid var(--sep); border-left: 3px solid var(--tone); border-radius: 16px; background: var(--panel); }
.download > img { align-self: start; }
.download h2 { margin: 0 0 8px; font-size: 22px; }
.download .facts { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0; }
.download .facts > div { display: grid; gap: 0; padding: 0; border: 0; }
.download .facts dt { font-size: 12px; }
.download .facts dd { font-size: 15px; text-align: left; }
.download p { margin: 12px 0 0; font-size: 14px; }

/* Legal pages and security details */
.legal h1 {
  font-size: clamp(32px, 4.5vw, 42px);
  line-height: 1.12;
  margin: 64px 0 8px;
}
.legal .meta {
  color: var(--label-2);
  margin: 0 0 28px;
}
.legal h2 {
  font-size: 22px;
  margin: 40px 0 8px;
}
.legal p,
.legal li {
  max-width: 68ch;
}
.legal {
  padding-bottom: 88px;
}
.limits {
  background: var(--raised);
  border-radius: 16px;
  padding: 6px 24px 10px;
}
.limits li {
  margin-bottom: 10px;
}
.gap {
  background: light-dark(#fff3cd, #3d3410);
  border-radius: 6px;
  padding: 1px 7px;
}


footer { position: relative; border-top: 1px solid var(--sep); padding-block: 32px; background: var(--bg); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
footer a { color: var(--label-2); text-decoration: none; }
footer a:hover { color: var(--label); }
footer .grow { display: flex; align-items: center; gap: 9px; margin-right: auto; color: var(--label-2); }
footer .mark { width: 22px; height: 20px; }

@media (max-width: 900px) {
  nav.main { display: none; }
  .lang { order: 2; }
  .menu { display: block; order: 3; }
  .menu summary { padding: 8px 15px; border: 1px solid var(--sep); border-radius: 999px; cursor: pointer; font-size: 14px; font-weight: 700; list-style: none; }
  .menu summary::-webkit-details-marker { display: none; }
  .menu nav { position: absolute; left: 0; right: 0; top: var(--head); display: grid; padding: 8px 20px 16px; border-bottom: 1px solid var(--sep); background: var(--bg); }
  .menu nav a { padding: 13px 14px; border-radius: 12px; font-size: 18px; }
  .split, .hero .wrap, .surface .wrap { grid-template-columns: minmax(0, 1fr); }
  .hero .wrap { min-height: 0; gap: 12px; }
  .hero .visual { order: -1; max-width: 520px; width: 100%; margin-inline: auto; }
  .surface .wrap { gap: 28px; padding-block: 28px; }
  .surface .art { max-height: 36svh; }
  .frame.tilt { transform: none; }
  .runner .pin { align-content: center; padding-bottom: 0; }
  .run { top: 14%; }
  .frame.center { margin-top: 90px; }
  .moving .runner { height: 200vh; }
}
@media (max-width: 700px) {
  .cards, .demos, .steps { grid-template-columns: minmax(0, 1fr); }
  .download { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .download > .button, .download > .badge { justify-self: start; }
}
/* Where a surface does not fit the window, it scrolls like any other */
@media (max-height: 640px), (max-width: 900px) and (max-height: 760px) {
  .stack .surface { position: relative; top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .stack .surface { position: relative; top: 0; }
  .mark3d, .card:hover, .card:hover .art, a.button:hover { transform: none; }
  .card, .card .art, .button { transition: none; }
  .ring circle { animation: none; }
}

@media (max-width: 360px) {
  header.top .wrap { gap: 10px; }
  .brand { gap: 7px; font-size: 17px; }
}
