/*
 * Code Locker website. One page, dark, built around the app icon:
 * deep navy, graphite metal, and one glowing blue display.
 */

:root {
  --bg: #05080f;
  --bg-2: #080d19;
  --navy: #14275c;
  --ink: #eaf0fa;
  --mute: #95a1bd;
  --dim: #5d6885;
  --line: rgba(150, 175, 230, 0.13);
  --line-2: rgba(150, 175, 230, 0.22);
  --glow: #4f9bff;
  --glow-soft: #8fc0ff;
  --glow-hot: #dcebff;
  --screen: #03050a;

  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --rounded: ui-rounded, "SF Pro Rounded", var(--sans);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }

::selection { background: rgba(79, 155, 255, 0.35); }

:focus-visible {
  outline: 2px solid var(--glow-soft);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- Type ---------- */

h1 {
  font-size: clamp(38px, 5.4vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 650;
  text-wrap: balance;
}

h2 {
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  font-weight: 650;
  text-wrap: balance;
}

h3 {
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-weight: 600;
}

.eyebrow, .label {
  font: 500 12px/1.4 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--glow-soft);
}

.label { color: var(--dim); }

.eyebrow .dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--glow);
  box-shadow: 0 0 10px var(--glow), 0 0 2px #fff;
  vertical-align: 1px;
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.lead {
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.5;
  color: var(--mute);
  max-width: 33em;
}

.body {
  font-size: 19px;
  color: var(--mute);
  max-width: 34em;
}

.body.small { font-size: 17px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 24px;
  border-radius: 13px;
  background: linear-gradient(180deg, #8dbdff 0%, #4a8cf7 100%);
  color: #04112b;
  font-weight: 650;
  font-size: 17px;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 0 0 1px rgba(110, 170, 255, 0.5),
    0 10px 36px -8px rgba(70, 140, 255, 0.75);
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn:hover {
  filter: brightness(1.07);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 0 0 1px rgba(140, 190, 255, 0.7),
    0 12px 48px -6px rgba(70, 140, 255, 0.95);
}

.btn:active { transform: translateY(1px); }

.btn-small {
  padding: 8px 15px;
  border-radius: 10px;
  font-size: 15px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 4px 18px -6px rgba(70, 140, 255, 0.7);
}

.btn-big { padding: 18px 30px; font-size: 19px; border-radius: 15px; }

.cta-note {
  font: 13px/1.4 var(--mono);
  color: var(--dim);
  letter-spacing: 0.02em;
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(5, 8, 15, 0.72);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--line);
}

.nav-row {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  letter-spacing: -0.015em;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 26px;
  margin-left: auto;
  font-size: 15px;
}

.nav-links a {
  color: var(--mute);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-links a:hover { color: var(--ink); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: clamp(48px, 8vw, 104px) 0 clamp(64px, 9vw, 120px);
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(46% 58% at 74% 44%, rgba(34, 68, 160, 0.55), transparent 70%),
    radial-gradient(40% 40% at 10% 0%, rgba(20, 39, 92, 0.5), transparent 70%);
}

.hero-glow::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(140, 175, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 175, 255, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(50% 60% at 74% 44%, #000, transparent 75%);
  mask-image: radial-gradient(50% 60% at 74% 44%, #000, transparent 75%);
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: center;
  gap: 48px;
}

.hero-copy { display: grid; gap: 26px; justify-items: start; }

.cta { display: grid; gap: 14px; justify-items: start; margin-top: 8px; }

/* The padlock, with a live display laid over the icon's own. */

.lock { display: grid; justify-items: center; gap: 6px; }

.lock-icon {
  position: relative;
  width: min(400px, 78vw);
  filter: drop-shadow(0 30px 60px rgba(8, 20, 60, 0.9)) drop-shadow(0 0 70px rgba(50, 100, 220, 0.28));
}

.lock-screen {
  position: absolute;
  left: 31.3%;
  top: 54.5%;
  width: 37.4%;
  height: 15.2%;
  border-radius: 11% / 27%;
  background: radial-gradient(120% 140% at 50% 40%, #060b18, var(--screen) 70%);
  box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.9);
  display: none;
  place-items: center;
}

.js .lock-screen { display: grid; }

.lock-screen .seg { width: 80%; }

.lock-controls {
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
  visibility: hidden;
}

.js .lock-controls { visibility: visible; }

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: 4px;
  border-radius: 12px;
  background: rgba(8, 14, 30, 0.7);
  border: 1px solid var(--line);
}

.chips button {
  appearance: none;
  border: 0;
  background: none;
  color: var(--mute);
  font: 500 14px/1 var(--sans);
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}

.chips button:hover { color: var(--ink); }

.chips button[aria-checked="true"] {
  color: var(--glow-hot);
  background: rgba(79, 155, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(110, 170, 255, 0.4), 0 0 18px -4px rgba(79, 155, 255, 0.6);
  text-shadow: 0 0 12px rgba(79, 155, 255, 0.9);
}

.lock-caption {
  font: 13px/1.6 var(--mono);
  color: var(--dim);
  min-height: 1.6em;
}

.lock-caption b { color: var(--mute); font-weight: 500; }

/* ---------- Segment display ---------- */

.seg { display: block; line-height: 0; }

.seg svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 0 1.5px rgba(120, 180, 255, 0.95)) drop-shadow(0 0 7px rgba(60, 130, 255, 0.85));
}

.seg .off { fill: none; }
.seg .on { fill: var(--glow-hot); }

.screen {
  display: inline-grid;
  place-items: center;
  margin-top: 12px;
  padding: 20px 26px;
  border-radius: 18px;
  background: radial-gradient(120% 140% at 50% 30%, #070c1a, var(--screen) 70%);
  border: 1px solid rgba(120, 150, 200, 0.35);
  box-shadow:
    0 0 0 4px #0c1120,
    0 0 0 5px rgba(150, 175, 230, 0.16),
    inset 0 0 22px rgba(0, 0, 0, 0.9),
    0 20px 60px -20px rgba(40, 100, 255, 0.45);
}

.screen .seg { width: min(360px, 66vw); }

/* ---------- Sections ---------- */

.section {
  position: relative;
  padding: clamp(72px, 10vw, 136px) 0;
  border-top: 1px solid var(--line);
}

.head { display: grid; gap: 20px; max-width: 760px; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}

.split-top { align-items: start; }

.split-copy { display: grid; gap: 22px; }

/* Steps */

.steps { display: grid; gap: 14px; margin-top: 6px; }

.steps li {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 14px;
  align-items: start;
  color: var(--mute);
}

.steps b { color: var(--ink); font-weight: 600; }

.step-n {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  font: 500 13px/1 var(--mono);
  color: var(--glow-soft);
  background: rgba(79, 155, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(110, 170, 255, 0.28);
}

/* The app window */

.split-art { display: grid; justify-items: center; gap: 18px; }

.window {
  width: min(390px, 100%);
  border-radius: 14px;
  background: #1c1d22;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 0 0 2px rgba(0, 0, 0, 0.6),
    0 40px 90px -20px rgba(0, 0, 0, 0.9),
    0 0 120px -20px rgba(50, 100, 220, 0.4);
  overflow: hidden;
  font-family: var(--sans);
}

.window-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 44px;
  padding: 0 14px;
  background: linear-gradient(180deg, #2c2d33, #25262b);
  border-bottom: 1px solid rgba(0, 0, 0, 0.5);
}

.lights { display: flex; gap: 8px; }
.lights i { width: 12px; height: 12px; border-radius: 50%; background: #4a4b52; }
.lights i:nth-child(1) { background: #ff5f57; }
.lights i:nth-child(2) { background: #febc2e; }
.lights i:nth-child(3) { background: #28c840; }

.window-title { font-size: 13px; font-weight: 600; color: #d6d7dc; }
.window-plus { justify-self: end; font-size: 21px; font-weight: 300; line-height: 1; color: #a9abb3; }

.rows { padding: 6px 8px 10px; }

.row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
}

.row + .row { box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.06); }

.row[data-live] { cursor: pointer; }
.row[data-live]:hover { background: rgba(255, 255, 255, 0.04); }

.row-main { display: grid; gap: 1px; margin-right: auto; }
.row-name { font-size: 13px; color: #9a9ca5; }

.row-code {
  font: 500 27px/1.15 var(--rounded);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  color: #f1f2f5;
}

.is-locked .row-code { color: #55575f; }

.row-note { font-size: 13px; color: #9a9ca5; white-space: nowrap; }

.ring { flex: none; }
.ring circle { fill: none; stroke: rgba(255, 255, 255, 0.12); stroke-width: 3; }
.ring .ring-fill {
  stroke: #3b8bff;
  stroke-linecap: round;
  stroke-dasharray: 50.27;
  transition: stroke-dashoffset 1s linear, stroke 0.3s;
}
.ring.is-ending .ring-fill { stroke: #ff5a52; }

.padlock { flex: none; fill: #55575f; }

.art-note { font: 13px/1.4 var(--mono); color: var(--dim); text-align: center; }

/* ---------- How: the beacon ---------- */

.section-how {
  background:
    radial-gradient(60% 420px at 50% 520px, rgba(26, 52, 128, 0.42), transparent 75%),
    var(--bg);
}

.beacon { margin: clamp(48px, 6vw, 80px) 0; }

.beacon-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.beacon-note {
  max-width: 19em;
  color: var(--mute);
  font-size: 17px;
  padding-bottom: 6px;
}

.tape {
  position: relative;
  height: 116px;
  margin-top: 36px;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(79, 155, 255, 0.07), rgba(79, 155, 255, 0.02) 50%, transparent 50%);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}

.tape-track {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  display: flex;
  will-change: transform;
}

.tape-cell {
  flex: none;
  width: 104px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 12px;
}

.tape-cell i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px dashed rgba(150, 175, 230, 0.35);
  transition: all 0.4s ease;
}

.tape-cell span {
  font: 11px/1 var(--mono);
  color: #3f4963;
  letter-spacing: 0.02em;
  transition: color 0.4s ease;
}

.tape-cell.lit i {
  border: 1.5px solid transparent;
  background: var(--glow);
  box-shadow: 0 0 10px rgba(79, 155, 255, 0.8);
}

.tape-cell.lit span { color: var(--mute); }

.tape-cell.fresh i {
  background: var(--glow-hot);
  box-shadow: 0 0 0 5px rgba(79, 155, 255, 0.22), 0 0 22px var(--glow);
  transform: scale(1.25);
}

.tape-cell.fresh span { color: var(--glow-hot); }

.tape-now {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--glow-soft) 30%, var(--glow-soft) 70%, transparent);
  box-shadow: 0 0 12px var(--glow);
}

.tape-now span,
.tape-side {
  position: absolute;
  top: 9px;
  font: 500 10px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tape-now span {
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 6px;
  border-radius: 4px;
  background: var(--glow-soft);
  color: #04112b;
}

.tape-side { color: var(--dim); }
.tape-left { right: calc(50% + 34px); }
.tape-right { left: calc(50% + 34px); }

.yours {
  display: flex;
  gap: 10px;
  align-items: baseline;
  margin-top: 22px;
  font: 14px/1.6 var(--mono);
  color: var(--dim);
}

.yours .padlock { fill: var(--glow-soft); position: relative; top: 2px; }
.yours b { color: var(--ink); font-weight: 500; }

/* Cards */

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.card {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 26px 26px 28px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(150, 175, 230, 0.07), rgba(150, 175, 230, 0.02));
  box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.card p { color: var(--mute); font-size: 16px; }
.card a, .notes a { color: var(--glow-soft); text-underline-offset: 3px; text-decoration-color: rgba(143, 192, 255, 0.4); }
.card a:hover, .notes a:hover { text-decoration-color: currentColor; }

.card-n {
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.14em;
  color: var(--glow-soft);
  margin-bottom: 10px;
}

/* ---------- Opening it early ---------- */

.tries {
  border-radius: 18px;
  background: var(--bg-2);
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
}

.tries li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 22px;
}

.tries li + li { border-top: 1px solid var(--line); }

.tries div { display: grid; gap: 2px; }
.tries b { font-weight: 600; font-size: 17px; }
.tries span { color: var(--mute); font-size: 15px; }

.tries em {
  flex: none;
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-style: normal;
  color: var(--dim);
  padding: 7px 9px;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px var(--line-2);
}

.tries li:not(.is-open) b {
  color: #c4cce0;
  text-decoration: line-through;
  text-decoration-color: rgba(150, 175, 230, 0.4);
  text-decoration-thickness: 1px;
}

.tries .is-open {
  background: linear-gradient(90deg, rgba(79, 155, 255, 0.14), rgba(79, 155, 255, 0.03));
}

.tries .is-open em {
  color: #04112b;
  background: var(--glow-soft);
  box-shadow: 0 0 20px rgba(79, 155, 255, 0.7);
}

/* ---------- Good to know ---------- */

.notes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 36px 32px;
  margin-top: clamp(40px, 5vw, 64px);
}

.notes > div {
  display: grid;
  gap: 8px;
  align-content: start;
  padding-top: 18px;
  border-top: 1px solid var(--line-2);
}

.notes dt { font-weight: 600; line-height: 1.3; }
.notes dd { color: var(--mute); font-size: 15.5px; }

/* ---------- Download ---------- */

.section-get { padding-bottom: clamp(56px, 7vw, 96px); }

.get {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 22px;
  text-align: center;
  padding: clamp(48px, 7vw, 88px) 24px;
  border-radius: 32px;
  background:
    radial-gradient(70% 90% at 50% 0%, rgba(40, 80, 190, 0.6), transparent 70%),
    linear-gradient(180deg, #0e1b42, #080f24);
  box-shadow: inset 0 0 0 1px rgba(150, 175, 230, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.get img { filter: drop-shadow(0 16px 30px rgba(0, 0, 0, 0.6)); margin-bottom: -6px; }
.get h2 { max-width: 14em; }
.get .btn { margin-top: 8px; }
.get .cta-note { color: #7d8db4; }
.get-how { color: var(--mute); font-size: 16px; max-width: 26em; }

/* ---------- Footer ---------- */

.footer { padding: 28px 0 44px; }

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--dim);
}

.footer .brand { color: var(--mute); font-size: 15px; }
.footer-links { display: flex; gap: 8px 22px; flex-wrap: wrap; }
.footer-links a { text-decoration: none; transition: color 0.15s; }
.footer-links a:hover { color: var(--ink); }

/* ---------- Reveal on scroll ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Smaller screens ---------- */

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 56px; }
  .hero-copy { justify-items: center; text-align: center; }
  .cta { justify-items: center; }
  .hero-glow { background: radial-gradient(70% 40% at 50% 68%, rgba(34, 68, 160, 0.55), transparent 70%); }
  .hero-glow::after {
    -webkit-mask-image: radial-gradient(70% 40% at 50% 68%, #000, transparent 75%);
    mask-image: radial-gradient(70% 40% at 50% 68%, #000, transparent 75%);
  }
  .split { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .notes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-row { justify-content: space-between; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding: 0 20px; }
  .body { font-size: 17px; }
  .lock-icon { width: min(320px, 84vw); }
  .chips button { padding: 9px 9px; font-size: 13px; }
  .caption-sep { display: none; }
  .caption-round { display: block; }
  .beacon-note { padding-bottom: 0; }
  .tape-cell { width: 92px; }
  .tape-side { display: none; }
  .tries li { padding: 15px 16px; gap: 12px; }
  .tries em { font-size: 10px; padding: 6px 7px; }
  .notes { grid-template-columns: 1fr; gap: 26px; }
  .get { border-radius: 24px; padding-left: 16px; padding-right: 16px; }
  .btn-big { padding: 16px 22px; font-size: 17px; }
  .cta-note { font-size: 12px; }
  .footer-row { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .eyebrow .dot { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .ring .ring-fill, .tape-cell i, .tape-cell span { transition: none; }
}
