/* KrimSoft website. Colours follow Branding/README.md. */
:root {
  --navy: #0B2545;
  --sky: #1FA5D6;
  --link: #1677A3;
  --ink: #2A3B4F;
  --slate: #5B6B7F;
  --mist: #EEF2F6;
  --wash: #EAF6FC;
  --bg: #FFFFFF;
  --card: #FFFFFF;
  --line: #DCE3EB;
  --heading: var(--navy);
  --hero-bg: linear-gradient(160deg, #0B2545 0%, #12345F 60%, #1A4A7E 100%);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --link: #5CCBF2;
    --ink: #D5DEE8;
    --slate: #93A3B6;
    --mist: #0E1D33;
    --wash: #10213A;
    --bg: #0A1626;
    --card: #10213A;
    --line: #1E3352;
    --heading: #FFFFFF;
    --hero-bg: linear-gradient(160deg, #071225 0%, #0B2545 70%, #12345F 100%);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
a { color: var(--link); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { color: var(--heading); line-height: 1.2; margin: 0 0 .5em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--bg); padding: 8px 12px; z-index: 10; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 24px; height: 80px; }
.top .logo img { height: 40px; width: auto; }
.top .brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; text-decoration: none; line-height: 1; }
.top .brand img { width: 52px; height: 52px; border-radius: 22.5%; box-shadow: 0 1px 3px rgba(0, 43, 189, .25); }
/* The name in the icon's own gradient: sky to app blue to deep blue. */
.top .brand span {
  font-weight: 800; font-size: 1.7rem; letter-spacing: -.03em;
  background: linear-gradient(100deg, #23c4fd 0%, #0a7df0 45%, #002bbd 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
@media (prefers-color-scheme: dark) {
  .top .brand span { background-image: linear-gradient(100deg, #7fdcff 0%, #3aa2ff 60%, #5b86ff 100%); }
}
.top nav { margin-left: auto; display: flex; gap: 22px; }
.top nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.top nav a:hover { color: var(--link); }
.lang select {
  font: inherit; font-size: .9rem; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px;
}

/* Hero */
.hero { background: var(--hero-bg); color: #fff; padding: 96px 0 104px; position: relative; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; right: -120px; top: -80px; width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(31,165,214,.35), transparent 65%);
  pointer-events: none;
}
.hero h1 { color: #fff; font-size: clamp(2.2rem, 5.5vw, 3.6rem); max-width: 14em; letter-spacing: -.02em; }
.hero p { font-size: 1.2rem; max-width: 36em; color: #D7E6F5; }
.button {
  display: inline-block; margin-top: 12px; padding: 12px 22px; border-radius: 10px;
  background: var(--sky); color: #04203A; font-weight: 600; text-decoration: none;
}
.button:hover { background: #5CCBF2; }

section { padding: 88px 0; }
section.alt { background: var(--mist); }
.lead { font-size: 1.15rem; max-width: 40em; }

/* Aerovue */
.status {
  border-left: 4px solid var(--sky); background: var(--wash);
  padding: 12px 16px; border-radius: 0 8px 8px 0; max-width: 40em;
}
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 20px; margin-top: 40px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.card p { margin: 0; color: var(--slate); }
.shots {
  display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory;
  margin: 48px 0 0; padding: 4px 0 16px;
}
.shots figure { flex: 0 0 220px; margin: 0; scroll-snap-align: start; }
.shots img { border-radius: 22px; border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(11,37,69,.15); }
.shots figcaption { font-size: .85rem; color: var(--slate); margin-top: 10px; text-align: center; }

/* Values */
.values { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 32px; margin-top: 32px; }
.values h3::before {
  content: ""; display: block; width: 32px; height: 4px; border-radius: 2px;
  background: var(--sky); margin-bottom: 14px;
}
.values p { color: var(--slate); }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 40px 0 56px; font-size: .9rem; color: var(--slate); }
footer .wrap { display: grid; gap: 24px; grid-template-columns: 1fr auto; }
footer .legal a { margin-right: 14px; white-space: nowrap; }
footer p { margin: 0 0 .4em; }

/* Legal pages */
.doc { max-width: 760px; padding: 64px 20px 88px; }
.doc h2 { font-size: 1.25rem; margin-top: 2em; }
.doc .meta { color: var(--slate); }
.doc nav a { margin-right: 14px; }

/* Hero buttons */
.hero .buttons { margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 12px; font-size: 1rem; }
section[id], .page-end { scroll-margin-top: 80px; }
.hero .buttons .button { margin-top: 0; }
.button.secondary { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.55); }
.button.secondary:hover { background: rgba(255,255,255,.1); }
.top nav a[aria-current="page"] { color: var(--link); }
.top nav a.signin { color: var(--link); border: 1px solid currentColor; border-radius: 999px; padding: 2px 12px; }
.top nav a.signin:hover { background: var(--link); color: var(--bg, #fff); }

/* The stores' badges with a "coming soon" tag on the corner, clear of the
   badge's own text. */
.stores { display: flex; flex-wrap: wrap; gap: 24px 20px; margin: 32px 0 8px; }
.store { position: relative; display: inline-block; }
.store img {
  display: block; height: 56px; width: auto;
  border-radius: 9px; box-shadow: 0 6px 18px rgba(11,37,69,.18);
}
.ribbon {
  position: absolute; top: -11px; right: -12px;
  transform: rotate(8deg);
  padding: 0 9px; border-radius: 999px;
  background: var(--sky); color: #04203A;
  font-size: .62rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  line-height: 20px; white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0,0,0,.35);
}
.more { margin-top: 20px; font-weight: 500; }

/* The devices: real screens in frames drawn with CSS */
.devices {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: center;
  gap: 40px; margin-top: 48px;
}
.device { margin: 0; text-align: center; }
.device .frame {
  display: inline-block; background: #0F1114; border: 1px solid #2B3340;
  box-shadow: 0 16px 40px rgba(11,37,69,.25), inset 0 0 0 2px #23282F;
  position: relative;
}
.device img { display: block; background: #000; }
.device figcaption { margin-top: 16px; }
.device figcaption strong { display: block; color: var(--heading); }
.device figcaption span { font-size: .9rem; color: var(--slate); }
.device.iphone .frame { padding: 11px; border-radius: 38px; }
.device.iphone img { width: 200px; border-radius: 28px; }
.device.android .frame { padding: 9px; border-radius: 26px; }
.device.android img { width: 196px; border-radius: 18px; }
.device.ipad .frame { padding: 16px; border-radius: 22px; }
.device.ipad img { width: 400px; border-radius: 8px; }
.device.watch .frame { padding: 10px; border-radius: 40px; }
.device.watch img { width: 150px; border-radius: 32px; }
.device.watch .frame::after {
  content: ""; position: absolute; right: -7px; top: 44px; width: 7px; height: 34px;
  background: #2B3340; border-radius: 0 4px 4px 0;
}
.device.watch .frame::before {
  content: ""; position: absolute; right: -5px; top: 92px; width: 5px; height: 22px;
  background: #2B3340; border-radius: 0 3px 3px 0;
}
@media (max-width: 720px) {
  .devices { gap: 32px; }
  .device.ipad img { width: min(400px, calc(100vw - 72px)); }
}
.note { font-size: .9rem; color: var(--slate); max-width: 40em; }

/* Downloads (the user guides) */
.downloads { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0 12px; }
.download {
  display: inline-block; padding: 10px 16px 10px 40px; border-radius: 10px;
  background: var(--card); border: 1px solid var(--line); color: var(--heading);
  font-weight: 500; text-decoration: none; position: relative;
}
.download::before {
  content: ""; position: absolute; left: 14px; top: 50%; width: 16px; height: 16px; margin-top: -8px;
  background: currentColor;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M7 1h2v7.6l2.3-2.3 1.4 1.4L8 12.4 3.3 7.7l1.4-1.4L7 8.6zM2 13h12v2H2z"/></svg>') center/contain no-repeat;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M7 1h2v7.6l2.3-2.3 1.4 1.4L8 12.4 3.3 7.7l1.4-1.4L7 8.6zM2 13h12v2H2z"/></svg>') center/contain no-repeat;
}
.download:hover { border-color: var(--sky); color: var(--link); }

/* Features and releases pages */
.page { padding: 64px 0 88px; }
.page h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); letter-spacing: -.02em; }
.feature-list { display: grid; gap: 56px; margin-top: 48px; }
.feature { display: grid; grid-template-columns: 1fr 220px; gap: 48px; align-items: center; }
.feature:nth-child(even) { grid-template-columns: 220px 1fr; }
.feature:nth-child(even) figure { order: -1; }
.feature h2 { font-size: 1.5rem; }
.feature ul { padding-left: 1.2em; margin: 0; color: var(--slate); }
.feature li { margin-bottom: .4em; }
.feature figure { margin: 0; }
.feature img { border-radius: 22px; border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(11,37,69,.15); }
.page-end { margin-top: 72px; padding-top: 48px; border-top: 1px solid var(--line); }
.releases { margin-top: 40px; }
.release { border-top: 1px solid var(--line); padding: 28px 0; }
.release h2 { font-size: 1.3rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 14px; }
.release time { color: var(--slate); font-weight: 400; font-size: .95rem; }
.release ul { padding-left: 1.2em; margin: 0; max-width: 46em; }
.release li { margin-bottom: .5em; }
.release .note { margin: 0 0 .6em; }

/* Demos page: a card per clip, the video with the browser's own controls */
.demo-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 32px; margin-top: 32px; }
.demo { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.demo video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.demo h2 { font-size: 1.2rem; margin: 16px 18px 6px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.demo .length { color: var(--slate); font-weight: 400; font-size: .9rem; font-variant-numeric: tabular-nums; }
.demo > p { margin: 0 18px 18px; color: var(--slate); }

@media (max-width: 720px) {
  .top .wrap { flex-wrap: wrap; height: auto; padding-top: 12px; padding-bottom: 10px; row-gap: 8px; }
  .top nav {
    order: 3; flex: 1 0 100%; gap: 18px; overflow-x: auto; white-space: nowrap;
    font-size: .95rem; scrollbar-width: none;
  }
  .top nav::-webkit-scrollbar { display: none; }
  section[id], .page-end { scroll-margin-top: 120px; }
  .lang { margin-left: auto; }
  .top .brand img { width: 44px; height: 44px; }
  .top .brand span { font-size: 1.45rem; }
  .hero { padding: 64px 0 72px; }
  section { padding: 64px 0; }
  footer .wrap { grid-template-columns: 1fr; }
  .feature, .feature:nth-child(even) { grid-template-columns: 1fr; gap: 24px; }
  .feature figure, .feature:nth-child(even) figure { order: 1; justify-self: center; }
}
