/* Radar de procesos, interview page, in the Dinamia brand (fonts, colours and logo in brand.css). */

:root {
  color-scheme: light dark;
  --bg: var(--wild-sand);
  --card: #ffffff;
  --ink: var(--mirage);
  --muted: #52616a;
  --line: #cddbde;
  --accent: var(--deep-sea);
  --accent-ink: #ffffff;
  --accent-soft: #dceaec;
  --danger: #b3261e;
  --warn-bg: #ffe9dc;
  --warn-ink: #8a2e00;
  --user: #eaf3f4;
  --radius: 24px;
  --call-light: #0b5f66;
  --call-mid: #0f3a41;
  --call-deep: var(--mirage);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--mirage);
    --card: #1d2d35;
    --ink: var(--wild-sand);
    --muted: #9fb0b6;
    --line: #2e424c;
    --accent: #7cc7cc;
    --accent-ink: var(--mirage);
    --accent-soft: #183a40;
    --danger: #ff8a7d;
    --warn-bg: #4a2a14;
    --warn-ink: #ffd2b3;
    --user: #183039;
  }
  .top .logo { color: var(--wild-sand); }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--font-sans);
}

[hidden] { display: none !important; }

.shell {
  max-width: 480px;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
  min-height: 100dvh;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 4px 20px;
}
.product { color: var(--muted); font-size: 14px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px 26px;
}

h1 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 34px;
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin: 0 0 12px;
  text-wrap: balance;
}
h1 .acento { color: var(--blaze-text); font-size: 1.08em; }
@media (prefers-color-scheme: dark) { h1 .acento { color: var(--blaze-soft); } }
.lead { margin: 0 0 20px; color: var(--muted); }
.muted { color: var(--muted); }

form { display: grid; gap: 14px; }
.fields { display: contents; }
.who { margin: 0; padding: 12px 16px; border-radius: 16px; background: var(--accent-soft); }
label > span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
label em { font-style: normal; font-weight: 400; color: var(--muted); }

input[type="text"], select {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  font: inherit;
  color: inherit;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
}
input[type="text"]:focus-visible, select:focus-visible, button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

button {
  font: inherit;
  font-weight: 600;
  min-height: 52px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
}
button:disabled { opacity: 0.6; cursor: default; }
/* The page's one accent: Blaze with Mirage text (5.2:1). */
.primary { background: var(--blaze); color: var(--mirage); width: 100%; margin-top: 6px; }
.secondary { background: transparent; color: var(--ink); border-color: var(--line); }
.secondary[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); }
.danger { background: transparent; color: var(--danger); border-color: var(--line); }

.error { margin: 0; padding: 12px 16px; border-radius: 16px; background: var(--warn-bg); color: var(--warn-ink); }

.notes { margin: 22px 0 0; padding: 16px 0 0 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.notes li + li { margin-top: 6px; }

/* Done view */
.ended { margin: 0 0 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blaze-text); }
@media (prefers-color-scheme: dark) { .ended { color: var(--blaze-soft); } }
.done-line { margin: 26px 0 0; color: var(--ink); }

/* Live view: a phone call screen. Always dark, like a phone's call screen, in either theme. */
body.in-call { background: var(--call-deep); overscroll-behavior: none; }
body.in-call .top { display: none; }

.call {
  --call-ink: var(--wild-sand);
  --call-soft: rgba(228, 238, 240, 0.74);
  --call-glass: rgba(228, 238, 240, 0.14);
  position: fixed;
  inset: 0;
  z-index: 1;
  display: grid;
  grid-template-rows: auto 1fr auto auto auto;
  justify-items: center;
  padding: max(18px, env(safe-area-inset-top)) 20px max(30px, env(safe-area-inset-bottom));
  background: radial-gradient(130% 75% at 50% 28%, var(--call-light) 0%, var(--call-mid) 52%, var(--call-deep) 100%);
  color: var(--call-ink);
  text-align: center;
  overflow-y: auto;
}

.call-kind { margin: 4px 0 0; font-size: 13px; letter-spacing: 0.04em; color: var(--call-soft); }

.call-who { align-self: center; display: grid; justify-items: center; padding: 12px 0 24px; }

.avatar {
  --level: 0;
  position: relative;
  width: 132px;
  height: 132px;
  margin: 0 0 26px;
  display: grid;
  place-items: center;
}
.avatar .face {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--wild-sand);
  color: var(--mirage);
  font-size: 74px;
  padding-top: 0.08em;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.3);
  transition: opacity 200ms ease;
}
.avatar .ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(228, 238, 240, 0.14);
  transform: scale(calc(1 + var(--level) * 0.42));
  transition: transform 90ms linear, background 200ms ease;
}
.avatar .ring.two { background: rgba(228, 238, 240, 0.06); transform: scale(calc(1 + var(--level) * 0.85)); }
.avatar[data-mode="listening"] .ring { background: rgba(124, 199, 204, 0.2); }
.avatar[data-mode="listening"] .ring.two { background: rgba(124, 199, 204, 0.09); }
.avatar[data-mode="connecting"] .ring,
.avatar[data-mode="reconnecting"] .ring { animation: calling 1.8s ease-out infinite; }
.avatar[data-mode="connecting"] .ring.two,
.avatar[data-mode="reconnecting"] .ring.two { animation-delay: 0.9s; }
.avatar[data-mode="thinking"] .ring { animation: breathe 1.1s ease-in-out infinite; }
.avatar[data-mode="muted"] .face { opacity: 0.72; }

@keyframes calling { from { transform: scale(1); opacity: 0.9; } to { transform: scale(1.75); opacity: 0; } }
@keyframes breathe { 50% { transform: scale(1.12); } }

.call-name { margin: 0 0 6px; font-family: var(--font-display); font-size: 30px; font-weight: 400; letter-spacing: -0.03em; line-height: 1.1; }
.call-line { margin: 0; display: flex; gap: 8px; justify-content: center; color: var(--call-soft); font-size: 17px; }
.timer { font-variant-numeric: tabular-nums; }
.timer::before { content: "·"; margin-right: 8px; }

.banner {
  width: 100%;
  max-width: 360px;
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 14px;
  display: grid;
  gap: 10px;
  text-align: left;
  background: rgba(255, 159, 102, 0.14);
  border: 1px solid rgba(255, 159, 102, 0.3);
  color: #ffe1cc;
}
.banner-btn { min-height: 46px; background: var(--wild-sand); color: var(--mirage); }

.call-hint { max-width: 330px; margin: 0 0 18px; font-size: 14px; color: var(--call-soft); }
.call-hint b { color: var(--call-ink); }

.controls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; width: 100%; max-width: 340px; }
.control { display: grid; justify-items: center; gap: 8px; font-size: 13px; color: var(--call-soft); }
.round {
  width: 70px;
  height: 70px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--call-glass);
  color: var(--call-ink);
  transition: background 150ms ease, transform 100ms ease;
  -webkit-tap-highlight-color: transparent;
}
.round svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.round .slash { display: none; }
.round[aria-pressed="true"] { background: var(--wild-sand); color: var(--mirage); }
.round[aria-pressed="true"] .slash { display: inline; }
.round:active { transform: scale(0.94); }
.round:focus-visible { outline: 3px solid var(--call-ink); outline-offset: 3px; }
/* Hanging up is the call screen's one accent: Blaze with a Mirage icon. */
.round.hangup { background: var(--blaze); color: var(--mirage); }
.round.hangup svg { width: 36px; height: 36px; }
.round.hangup .fill { fill: currentColor; stroke: none; }

/* "Hang up?" sheet */
.sheet { border: 0; border-radius: 24px; padding: 0; width: min(400px, calc(100vw - 32px)); background: var(--card); color: var(--ink); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35); }
.sheet::backdrop { background: rgba(22, 35, 42, 0.6); }
.sheet form { display: grid; gap: 10px; padding: 22px 20px 18px; text-align: left; }
.sheet h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 22px; letter-spacing: -0.02em; }
.sheet p { margin: 0; color: var(--muted); }
.sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.sheet-stay { background: transparent; color: var(--ink); border-color: var(--line); }
.sheet-end { background: var(--blaze); color: var(--mirage); }

@media (prefers-reduced-motion: reduce) {
  .avatar .ring { animation: none !important; transition: none; }
}
