/* LockSpeak. Layout: one screen. Left column is a phone whose wallpaper slides between
   languages; right column is the language selector, options and Save. */
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("/fonts/atkinson-hyperlegible-next-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("/fonts/atkinson-hyperlegible-next-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Bricolage Grotesque";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("/fonts/bricolage-grotesque-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Bricolage Grotesque";
  font-weight: 800;
  font-style: normal;
  font-display: swap;
  src: url("/fonts/bricolage-grotesque-latin-800-normal.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --bg: #0b0c10;
  --surface: #15171d;
  --fg: #f1efe9;
  --muted: #9a9ca6;
  --line: #272a33;
  --accent: #ffb020;
  --accent-ink: #14110a;
  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --body: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, sans-serif;
}
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f3f1ec;
    --surface: #e8e5de;
    --fg: #16171b;
    --muted: #62646c;
    --line: #d3cfc6;
    --accent: #c2410c;
    --accent-ink: #ffffff;
  }
}
* {
  box-sizing: border-box;
}
[hidden] {
  /* biome-ignore lint/complexity/noImportantStyles: [hidden] must beat component display rules */
  display: none !important;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  padding-block: 20px 56px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.wrap {
  max-width: 1040px;
  margin: 0 auto;
  display: grid;
  gap: 40px;
}
h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(36px, 5.2vw, 60px);
  line-height: 1.03;
  letter-spacing: -0.025em;
  text-wrap: balance;
  margin: 0;
}
p {
  margin: 0;
}
a {
  color: inherit;
}
.label {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.mark {
  font-family: var(--display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.mark i {
  width: 12px;
  height: 12px;
  background: var(--accent);
  display: inline-block;
  border-radius: 2px;
}
.hint {
  font-size: 14px;
  color: var(--muted);
}

.stage {
  display: grid;
  gap: 48px;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  align-items: center;
}
.left {
  display: grid;
  gap: 28px;
  min-width: 0;
}
.intro {
  display: grid;
  gap: 16px;
}
.lede {
  color: var(--muted);
  font-size: 19px;
  max-width: 44ch;
}
.group {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
}
.opts .group.wide {
  flex: 1 1 100%;
}

/* language selector: scrolls sideways, fades and shows arrows where more exists */
.langwrap {
  position: relative;
}
.langs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px;
  margin: -2px;
  scroll-snap-type: x proximity;
}
.langs::-webkit-scrollbar {
  display: none;
}
.langwrap.r .langs {
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 64px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 64px), transparent);
}
.langwrap.l .langs {
  -webkit-mask-image: linear-gradient(270deg, #000 calc(100% - 64px), transparent);
  mask-image: linear-gradient(270deg, #000 calc(100% - 64px), transparent);
}
.langwrap.l.r .langs {
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent,
    #000 64px,
    #000 calc(100% - 64px),
    transparent
  );
  mask-image: linear-gradient(90deg, transparent, #000 64px, #000 calc(100% - 64px), transparent);
}
.arrow {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: 38px;
  height: 38px;
  margin-top: -19px;
  border-radius: 50%;
  background: var(--fg);
  color: var(--bg);
  display: grid;
  place-items: center;
  font-size: 22px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  z-index: 2;
}
.arrow.prev {
  left: 2px;
}
.arrow.next {
  right: 2px;
}
.langwrap.l .prev,
.langwrap.r .next {
  opacity: 1;
  pointer-events: auto;
}
.arrow:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.more {
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
  margin-left: 6px;
  color: var(--accent);
  font-weight: 400;
}
.chip {
  box-sizing: border-box;
  cursor: pointer;
  flex: none;
  scroll-snap-align: start;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  transition:
    background 0.25s,
    color 0.25s,
    border-color 0.25s;
}
.chip small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  margin-left: 6px;
  transition: color 0.25s;
}
.chip[aria-current="true"] {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.chip[aria-current="true"] small {
  color: inherit;
  opacity: 0.75;
}
.chip:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
}

.seg {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.seg input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.seg label {
  cursor: pointer;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.seg input:checked + label {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.seg input:focus-visible + label {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.sw {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: inline-block;
}
.opts {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 36px;
}
.opts .group {
  flex: 0 0 auto;
}
.cta {
  box-sizing: border-box;
  cursor: pointer;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  padding: 16px 24px;
  border-radius: 10px;
  text-align: center;
  text-decoration: none;
  max-width: 420px;
  display: block;
}
.cta:focus-visible {
  outline: 3px solid var(--fg);
  outline-offset: 3px;
}
.cta small {
  display: block;
  font-family: var(--body);
  font-size: 13px;
  font-weight: 400;
  opacity: 0.85;
}
.how {
  color: var(--muted);
  font-size: 14px;
  max-width: 52ch;
}
.how b {
  color: var(--fg);
}

/* phone + sliding wallpapers */
.phoneCol {
  display: grid;
  gap: 14px;
  justify-items: center;
  order: -1;
}
.phone {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 9 / 19.5;
  border-radius: 44px;
  border: 10px solid #1d1f26;
  overflow: hidden;
  position: relative;
  background: #0b0c10;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.55);
  touch-action: pan-y;
  cursor: grab;
  transition: aspect-ratio 0.3s;
  user-select: none;
  -webkit-user-select: none;
}
.phone.android {
  aspect-ratio: 9 / 20;
  border-radius: 30px;
}
#layers {
  position: absolute;
  inset: 0;
}
.layer {
  position: absolute;
  inset: 0;
  transition: transform 0.7s cubic-bezier(0.65, 0, 0.2, 1);
  will-change: transform;
}
.track {
  display: flex;
  height: 100%;
  transition: transform 0.7s cubic-bezier(0.65, 0, 0.2, 1);
  will-change: transform;
}
.track.drag {
  transition: none;
}
.slide {
  flex: none;
  width: 100%;
  height: 100%;
}
.slide img,
.still {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-user-drag: none;
  pointer-events: none;
}
.dots {
  display: flex;
  gap: 6px;
}
.dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line);
  transition:
    background 0.3s,
    width 0.3s;
}
.dots i.on {
  background: var(--accent);
  width: 18px;
  border-radius: 4px;
}
/* what the phone itself draws on a lock screen; not part of the PNG */
.screen {
  position: absolute;
  inset: 0;
  container-type: inline-size;
  pointer-events: none;
  color: rgba(255, 255, 255, 0.78);
  mix-blend-mode: normal;
}
.screen .clock {
  position: absolute;
  top: 9%;
  left: 0;
  right: 0;
  text-align: center;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.25);
}
.screen .clock small {
  display: block;
  font-size: 5.4cqw;
  font-weight: 700;
}
.screen .clock b {
  display: block;
  font-size: 32cqw;
  line-height: 0.92;
  font-weight: 700;
  letter-spacing: -0.04em;
  opacity: 0.55;
}
.screen .btn {
  position: absolute;
  bottom: 4%;
  width: 11.5%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(40, 42, 50, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.screen .btn.l {
  left: 10%;
}
.screen .btn.r {
  right: 10%;
}
.screen .bar {
  position: absolute;
  bottom: 1.4%;
  left: 35%;
  right: 35%;
  height: .6%;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 4px;
}

footer {
  color: var(--muted);
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

@media (prefers-reduced-motion: reduce) {
  .track,
  .layer,
  .chip,
  .dots i,
  .arrow {
    transition: none;
  }
}
@media (max-width: 820px) {
  .stage {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    align-items: start;
  }
  /* phones: headline, language, then the phone, so the chosen language is visible at once */
  .left {
    display: contents;
  }
  .intro {
    order: 1;
  }
  .langgroup {
    order: 2;
    min-width: 0;
  }
  #glossGroup {
    order: 3;
  }
  .phoneCol {
    order: 4;
  }
  .opts {
    order: 5;
  }
  .savegroup {
    order: 6;
  }
  .phone {
    max-width: 250px;
  }
  h1 {
    font-size: clamp(30px, 8vw, 40px);
  }
  .lede {
    font-size: 17px;
  }
}

/* feedback form */
.feedback {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.feedback summary {
  cursor: pointer;
  font-weight: 700;
  list-style-position: inside;
  width: fit-content;
}
.feedback summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
.feedback form {
  display: grid;
  gap: 14px;
  max-width: 520px;
  margin-top: 16px;
}
.field {
  display: grid;
  gap: 6px;
}
.field span {
  font-size: 14px;
  color: var(--muted);
}
.field select,
.field input,
.field textarea {
  font: inherit;
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  width: 100%;
}
.field select:focus-visible,
.field input:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.trap {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}
.send {
  font: inherit;
  font-family: var(--display);
  font-weight: 700;
  cursor: pointer;
  width: fit-content;
  background: var(--fg);
  color: var(--bg);
  border: 0;
  border-radius: 8px;
  padding: 10px 18px;
}
.send:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.status {
  color: var(--muted);
  font-size: 14px;
  min-height: 1.4em;
}

.seg input:disabled + label {
  opacity: 0.4;
  cursor: not-allowed;
}

.share {
  font: inherit;
  font-family: var(--display);
  font-weight: 700;
  cursor: pointer;
  width: fit-content;
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 20px;
}
.share:hover {
  border-color: var(--fg);
}
.share:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

footer a {
  color: var(--fg);
}
footer a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
