/* usekm.com — the app's Palette (Fils/Design/Theme.swift) and Almarai. */

@font-face { font-family: "Almarai"; src: url("/fonts/almarai-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Almarai"; src: url("/fonts/almarai-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Almarai"; src: url("/fonts/almarai-extrabold.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --paper: #F2F4F3;
  --raised: #FFFFFF;
  --ink: #0F1417;
  --ink-soft: #5A656B;
  --hairline: #DCE3E1;
  --mark: #1B1714;
  --good: #0E5E4C;
  --bad: #B3261E;
  --shadow: 0 1px 2px rgb(15 20 23 / 0.06), 0 12px 32px -12px rgb(15 20 23 / 0.18);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: "Almarai", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* The wash: like AmbientBackground, the mesh fades into paper toward the bottom. */
#wash {
  position: fixed;
  inset: 0 0 auto 0;
  width: 100%;
  height: max(560px, 82vh);
  z-index: 0;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(#000 0%, #000 50%, transparent 100%);
  mask-image: linear-gradient(#000 0%, #000 50%, transparent 100%);
}

.top, .hero, .foot { position: relative; z-index: 1; }

.top {
  display: flex;
  justify-content: flex-end;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-left)) 0;
}
.lang {
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  background: color-mix(in srgb, var(--raised) 55%, transparent);
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  border-radius: 999px;
  padding: 9px 16px;
  cursor: pointer;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: background-color 0.2s ease, transform 0.15s ease;
}
.lang:hover { background: color-mix(in srgb, var(--raised) 85%, transparent); }
.lang:active { transform: scale(0.97); }

.hero {
  flex: 1;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(40px, 11vh, 120px) 16px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.mark {
  width: clamp(120px, 30vw, 168px);
  height: auto;
  fill: var(--mark);
  margin-bottom: 40px;
  animation: rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  padding: 7px 14px 7px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  background: color-mix(in srgb, var(--raised) 60%, transparent);
  border: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  animation: rise 0.9s 0.08s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 50%, transparent);
  animation: pulse 2.4s ease-out infinite;
}

.lede {
  margin: 0;
  max-width: 26ch;
  font-size: clamp(21px, 3.4vw, 26px);
  font-weight: 700;
  line-height: 1.65;
  color: var(--ink);
  text-wrap: pretty;
  animation: rise 0.9s 0.2s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
html[lang="en"] .lede { line-height: 1.55; max-width: 34ch; }

/* The app's name drawn as the mark, like Text(kam:) in the app. */
.kam {
  display: inline-block;
  width: 0.92em;
  height: 1em;
  vertical-align: -0.14em;
  fill: var(--ink);
  margin-inline: 0.06em;
}

.signup {
  margin-top: 36px;
  width: 100%;
  max-width: 460px;
  display: flex;
  gap: 6px;
  padding: 6px;
  background: var(--raised);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  box-shadow: var(--shadow);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  animation: rise 0.9s 0.26s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.signup:focus-within { border-color: color-mix(in srgb, var(--ink) 35%, transparent); }
.signup.invalid { border-color: var(--bad); }

.signup input[type="email"] {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 17px;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: none;
  padding: 0 18px;
  text-align: left;
}
.signup input::placeholder { color: var(--ink-soft); opacity: 0.7; }

.signup button {
  flex: none;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  color: var(--paper);
  background: var(--ink);
  border: 0;
  border-radius: 999px;
  padding: 15px 26px;
  min-height: 50px;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.2s ease;
}
.signup button:hover { opacity: 0.88; }
.signup button:active { transform: scale(0.97); }
.signup button:focus-visible, .lang:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.signup button[disabled] { opacity: 0.55; cursor: default; }

.signup.done { justify-content: center; }
.signup.done input, .signup.done button { display: none; }
.signup .thanks {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  margin: 0;
  padding: 0 18px;
  font-weight: 700;
  color: var(--ink);
  animation: rise 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.thanks svg { width: 22px; height: 22px; flex: none; stroke: var(--good); fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.note {
  margin: 14px 0 0;
  max-width: 48ch;
  min-height: 1.6em;
  text-wrap: balance;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
  animation: rise 0.9s 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.note.error { color: var(--bad); }

/* Clipped in place, not pushed off-screen: on an RTL page an element far to the left widens the page. */
.trap, .sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.foot {
  padding: 24px 16px max(24px, env(safe-area-inset-bottom));
  text-align: center;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
}
.foot p { margin: 0; }
.foot .muted { opacity: 0.75; }
.foot .kam { fill: var(--ink-soft); }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); filter: blur(4px); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 45%, transparent); }
  70%, 100% { box-shadow: 0 0 0 9px transparent; }
}

@media (max-width: 420px) {
  .signup { flex-direction: column; border-radius: 26px; gap: 4px; }
  .signup input[type="email"] { min-height: 50px; text-align: center; }
  .signup button { width: 100%; }
}

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