/* frenlock.fun, shared by every page but the landing (handoff v2.9, WEB.md > Shared rules). Dark theme only; the
   colours are tokens.json's dark set. Page styles live in card.css, guard.css and doc.css (/privacy, /terms); the
   landing (handoff v2.14) has its own header, footer and styles in landing.css. */

@font-face {
  font-family: Geist;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/Geist-Regular.woff2") format("woff2");
}
@font-face {
  font-family: Geist;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/Geist-Medium.woff2") format("woff2");
}
@font-face {
  font-family: Geist;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/Geist-SemiBold.woff2") format("woff2");
}
@font-face {
  font-family: "Geist Mono";
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/GeistMono-Medium.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --bg: #0b0b0c;
  --surface: #161617;
  --raised: #1c1c1e;
  --control: #242426;
  --text: #f5f5f2;
  --text-2: #a1a1a6;
  --text-3: #6b6b70;
  --lime: #c8ff3d;
  --attention: #ffb23f;
  --ink: #0b0b0c;
  /* Side padding; on a notched iPhone in landscape, at least the safe area. */
  --pad: max(clamp(20px, 5vw, 72px), env(safe-area-inset-left), env(safe-area-inset-right));
  --sans: Geist, system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  --rise: cubic-bezier(0.2, 0.8, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

a {
  color: inherit;
}
/* Hover only where a pointer hovers: phones keep :hover on whatever was tapped last, which would leave it lit. */
@media (hover: hover) {
  a:hover {
    opacity: 0.85;
  }
}

input::placeholder {
  color: var(--text-3);
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Header: the logo links home; the right side says where you are. */
.site-header {
  height: clamp(64px, 6vw, 84px);
  flex: none;
  width: 100%;
  max-width: 1424px;
  margin: 0 auto;
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  text-decoration: none;
}
.logo-mark {
  flex: none;
}
.wordmark {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -1px;
  line-height: 1;
}
.pill {
  font: 500 12px/16px var(--mono);
  color: var(--text-2);
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  white-space: nowrap;
}

/* The footer on every page (siteFooter() in api/_lib/html.ts; WEB.md > Shared header and footer): under a
   hairline, mono 13/18 in text-2, as wide as the header. --ink: inside the landing's lime close, in ink. */
.site-foot {
  flex: none;
  width: 100%;
  max-width: 1424px;
  margin: 0 auto;
  padding: 0 var(--pad);
}
.site-foot--ink {
  max-width: none;
  padding: 0;
}
.site-foot-inner {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 18px 0 calc(26px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 6px;
  font: 500 13px/18px var(--mono);
  color: var(--text-2);
}
.site-foot--ink .site-foot-inner {
  border-top-color: rgba(11, 11, 12, 0.16);
  color: var(--ink);
}
.site-foot-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 28px;
}
.site-foot-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
}
.site-foot-logo {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.8px;
  text-decoration: none;
}
.site-foot--ink .site-foot-logo {
  color: var(--ink);
}
.site-foot-nav {
  display: flex;
  flex-wrap: wrap;
  column-gap: 22px;
}
.site-foot-nav a {
  min-height: 44px;
  display: flex;
  align-items: center;
  text-decoration: none;
  text-underline-offset: 3px;
}
.site-foot-nav a[aria-current="page"] {
  color: var(--text);
  opacity: 1;
}
@media (hover: hover) {
  .site-foot-nav a:hover {
    color: var(--text);
    opacity: 1;
  }
  .site-foot--ink .site-foot-nav a:hover {
    color: var(--ink);
    text-decoration: underline;
  }
}

/* Fren's speech bubble: the small corner points at Fren (bottom-left by default). */
.bubble {
  display: inline-block;
  background: #f5f5f2;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.3;
  padding: 0.5em 0.85em;
  border-radius: 18px 18px 18px 6px;
  white-space: nowrap;
}
.bubble--tail-right {
  border-radius: 18px 18px 6px 18px;
}

/* Blinking dots: "Sending…", "Waiting for Ali…". */
.dots > i {
  font-style: normal;
  animation: fl-blink 1.4s infinite;
}
.dots > i:nth-child(2) {
  animation-delay: 0.2s;
}
.dots > i:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes fl-blink {
  0%,
  80%,
  100% {
    opacity: 0.25;
  }
  40% {
    opacity: 1;
  }
}

/* An ink button on the dark ground ("Answer in frenlock", "Copy this link" uses .button--control). */
.button {
  height: 56px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  background: var(--text);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 600 17px var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.12s,
    background 0.15s;
}
@media (hover: hover) {
  .button:hover {
    background: #fff;
    opacity: 1;
  }
  .button--control:hover {
    background: #2c2c2f;
  }
}
.button:active {
  transform: scale(0.97);
}
.button--control {
  background: var(--control);
  color: var(--text);
}

/* Download pills (the landing, the friend card): plain links to /ios and /android, the visitor's own in ink and
   the other in control (api/_lib/request.ts > layoutOf). Each page sets its ink pill's size. Their flex basis
   is the content box, padding on top, as the reference sizes them. */
.get-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.get-main,
.get-alt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 999px;
  text-decoration: none;
  transition:
    transform 0.12s,
    background 0.15s;
}
@media (hover: hover) {
  .get-main:hover,
  .get-alt:hover {
    opacity: 1;
  }
  .get-main:hover {
    background: #fff;
  }
  .get-alt:hover {
    background: #2c2c2e;
  }
}
.get-main:active,
.get-alt:active {
  transform: scale(0.97);
}
.get-main svg,
.get-alt svg {
  flex: none;
}
.get-main {
  background: var(--text);
  color: var(--ink);
}
.get-main .get-title {
  font-weight: 600;
}
.get-main .get-sub {
  color: rgba(11, 11, 12, 0.62);
}
.get-alt {
  box-sizing: content-box;
  min-width: 0;
  gap: 12px;
  height: 56px;
  padding: 0 18px 0 22px;
  background: var(--control);
  color: var(--text);
}
.get-alt svg {
  color: var(--text-2);
}
.get-alt .get-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 19px;
  white-space: nowrap;
}
.get-alt .get-sub {
  font-size: 12px;
  line-height: 16px;
  color: var(--text-2);
  white-space: nowrap;
}

@keyframes fl-rise {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
