/* Saathi: black on white, large type, one idea per screen. See devpost/spec.md > Look and Feel. */

@font-face { font-family: "Inter"; src: url("/static/fonts/Inter.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Noto Sans Devanagari"; src: url("/static/fonts/NotoSansDevanagari-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Noto Sans Devanagari"; src: url("/static/fonts/NotoSansDevanagari-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Dancing Script"; src: url("/static/fonts/DancingScript.ttf") format("truetype"); font-weight: 400 700; font-display: swap; }

:root {
  --ink: #111;
  --paper: #fafaf8;     /* near-white */
  --white: #fff;        /* fields and cards sit on it */
  --accent: #111;       /* actions */
  --accent-2: #3a3a3a;  /* pressed / hover */
  --grey-1: #f4f4f4;   /* quiet fills */
  --grey-2: #e2e2e2;   /* borders */
  --grey-3: #767676;   /* secondary text (AA on paper) */
  --grey-4: #4a4a4a;
  --radius: 12px;
  --tap: 64px;
  --font: "Inter", "Noto Sans Devanagari", system-ui, sans-serif;
  --font-ne: "Noto Sans Devanagari", "Inter", system-ui, sans-serif;
  --font-sign: "Dancing Script", cursive;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
[lang="ne"], .ne { font-family: var(--font-ne); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
a { color: inherit; }
.muted { color: var(--grey-3); }
.small { font-size: 15px; }
.hidden { display: none !important; }

/* -- layout ----------------------------------------------------------------- */

.page { max-width: 880px; margin: 0 auto; padding: 32px 20px 64px; }
.phone { max-width: 520px; margin: 0 auto; min-height: 100svh; display: flex; flex-direction: column; padding: 20px 20px 28px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.brand { font-weight: 800; letter-spacing: .02em; font-size: 15px; text-transform: uppercase; }
.brand .ne { font-weight: 700; text-transform: none; margin-left: 6px; }

.grow { flex: 1; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 12px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.spread { justify-content: space-between; }
hr { border: 0; border-top: 1px solid var(--grey-2); margin: 24px 0; }

/* -- controls --------------------------------------------------------------- */

button { font: inherit; color: inherit; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border: 1.5px solid var(--ink); border-radius: var(--radius);
  background: var(--paper); color: var(--ink);
  font-weight: 600; cursor: pointer; text-decoration: none;
  transition: background .15s, color .15s, opacity .15s;
}
.btn svg { width: 22px; height: 22px; flex: none; }
.btn:hover { background: var(--grey-1); }
.btn:disabled { opacity: .35; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--white); }
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn.quiet { border-color: var(--grey-2); }
.btn.big { min-height: var(--tap); font-size: 20px; width: 100%; }
.btn.link { border: 0; background: none; padding: 0 4px; min-height: 40px; text-decoration: underline; text-underline-offset: 3px; }
.btn:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.icon-btn {
  width: 48px; height: 48px; border-radius: 50%;
  border: 1.5px solid var(--grey-2); background: var(--white);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none;
}
.icon-btn:hover { border-color: var(--ink); }
.icon-btn svg { width: 22px; height: 22px; }

.mic {
  width: 96px; height: 96px; border-radius: 50%;
  border: 0; background: var(--accent); color: var(--white);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  transition: transform .15s;
}
.mic svg { width: 38px; height: 38px; }
.mic:active { transform: scale(.96); }
.mic.listening { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(0,0,0,.35); } 50% { box-shadow: 0 0 0 18px rgba(0,0,0,0); } }

label.field { display: block; }
label.field > span { display: block; font-size: 15px; font-weight: 600; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=search], textarea, select {
  width: 100%; font: inherit; color: var(--ink);
  border: 1.5px solid var(--grey-2); border-radius: var(--radius);
  background: var(--white); padding: 12px 14px; min-height: 52px;
}
input:focus, textarea:focus, select:focus { border-color: var(--ink); outline: none; }
textarea { min-height: 120px; resize: vertical; }

.card { border: 1.5px solid var(--grey-2); border-radius: var(--radius); padding: 18px; background: var(--white); }
.card.ink { border-color: var(--ink); }
.card.dashed { border-style: dashed; border-color: var(--ink); }
.tag {
  display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .02em;
  border: 1px solid var(--ink); border-radius: 999px; padding: 2px 10px;
}
.tag.quiet { border-color: var(--grey-2); color: var(--grey-4); }

.notice { border-left: 3px solid var(--accent); padding: 10px 14px; background: var(--grey-1); border-radius: 0 var(--radius) var(--radius) 0; }

/* -- motion ----------------------------------------------------------------- */

.screen { animation: enter .22s ease-out both; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .screen, .mic.listening { animation: none; } }
