/* ------------------------------------------------------------------ *
 * Ari design system.
 *
 * One stylesheet for every surface: the landing page, the guided
 * recording flow, the toy screen and the quick join page. Dark, quiet,
 * square edges, mono for labels, Inter for everything else. The only
 * ornament in the whole system is the glass orb, because that is the
 * product.
 * ------------------------------------------------------------------ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --bg: #0e0e0e;
  --surface: #161616;
  --surface-2: #1c1c1c;
  --chip: #3b3b34;
  --line: #202020;
  --line-soft: rgba(255, 255, 255, .09);
  --text: rgba(255, 255, 255, .92);
  --muted: rgba(255, 255, 255, .45);
  --dim: rgba(255, 255, 255, .28);
  --accent: #78e772;
  --warn: #e0836b;
  --sans: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

a { color: inherit; text-decoration: none; }

/* ---- type ---------------------------------------------------------- */

.mono { font-family: var(--mono); }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--dim);
}

h1, h2, h3 { font-weight: 400; letter-spacing: -.01em; line-height: 1.15; }

p { color: var(--muted); line-height: 1.7; }
strong { color: var(--text); font-weight: 500; }

/* ---- buttons ------------------------------------------------------- *
 * Square, small, mono, uppercase. White is the one action that matters
 * on any given screen; there is never a second white button.
 * -------------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 0; cursor: pointer;
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .1em;
  padding: 12px 16px; transition: background-color .18s ease, opacity .18s ease;
}
.btn-primary { background: #fff; color: #0e0e0e; }
.btn-primary:hover { background: rgba(255, 255, 255, .9); }
.btn-ghost { background: var(--chip); color: rgba(255, 255, 255, .9); }
.btn-ghost:hover { background: rgba(59, 59, 52, .8); }
.btn-quiet { background: transparent; color: var(--dim); }
.btn-quiet:hover { color: var(--muted); }
.btn:disabled { opacity: .55; cursor: default; }

/* Full width action, for the phone flows where one thumb does everything. */
.btn-block { display: flex; width: 100%; padding: 18px 20px; font-size: 12px; }

/* ---- the glass orb -------------------------------------------------- *
 * A real glass surface, so it needs something behind it to refract. The
 * .orb-field holds two slow drifting blooms, the .orb itself is a thin
 * translucent shell over them with an inset highlight and a specular
 * sweep. It breathes at rest and pulses brighter while she is speaking.
 * --------------------------------------------------------------------- */

.orb-wrap {
  position: relative; display: grid; place-items: center;
  width: var(--orb, 200px); height: var(--orb, 200px);
}

.orb-field { position: absolute; inset: -40%; filter: blur(34px); opacity: 1; }
.orb-field::before, .orb-field::after {
  content: ''; position: absolute; border-radius: 50%;
}
.orb-field::before {
  inset: 18% 34% 40% 12%;
  background: radial-gradient(circle, rgba(120, 231, 114, .68), transparent 70%);
  animation: drift-a 13s ease-in-out infinite;
}
.orb-field::after {
  inset: 34% 10% 16% 38%;
  background: radial-gradient(circle, rgba(120, 170, 255, .58), transparent 70%);
  animation: drift-b 17s ease-in-out infinite;
}

.orb {
  position: relative; width: 100%; height: 100%; border-radius: 50%;
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, .5), rgba(255, 255, 255, .08) 42%, rgba(255, 255, 255, .02) 68%),
    radial-gradient(circle at 68% 86%, rgba(255, 255, 255, .13), transparent 44%),
    rgba(255, 255, 255, .055);
  border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(18px) saturate(1.6);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, .4),
    inset 0 -22px 40px rgba(0, 0, 0, .3),
    0 30px 70px rgba(0, 0, 0, .6);
  animation: breathe 4.6s ease-in-out infinite;
  overflow: hidden;
}
/* A soft light travelling round the inside of the shell. Blurred, because a
   hard conic edge reads as a pie slice instead of a reflection. */
.orb::after {
  content: ''; position: absolute; inset: -20%; border-radius: 50%;
  background: conic-gradient(from 200deg, transparent 0deg, rgba(255, 255, 255, .15) 65deg, transparent 155deg);
  filter: blur(18px);
  animation: sweep 9s linear infinite;
}
/* The one hard highlight, small and off centre, which is what makes the eye
   call it glass. */
.orb::before {
  content: ''; position: absolute; left: 20%; top: 15%; width: 22%; height: 15%;
  border-radius: 50%; background: rgba(255, 255, 255, .5); filter: blur(6px);
  transform: rotate(-24deg); z-index: 2;
}

/* Speaking: the whole thing lifts a little and the glass warms up. */
.orb-wrap.speaking .orb { animation: breathe 1.9s ease-in-out infinite; border-color: rgba(255, 255, 255, .26); }
.orb-wrap.speaking .orb-field { opacity: 1; }

@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.055); } }
@keyframes sweep { to { transform: rotate(360deg); } }
@keyframes drift-a { 0%, 100% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(8%, -6%, 0) scale(1.12); } }
@keyframes drift-b { 0%, 100% { transform: translate3d(0, 0, 0) scale(1.06); } 50% { transform: translate3d(-7%, 7%, 0) scale(.94); } }

@media (prefers-reduced-motion: reduce) {
  .orb, .orb::after, .orb-field::before, .orb-field::after { animation: none; }
}

/* Safari and Firefox without backdrop-filter would show a flat grey disc, so
   give them a solid glassy fill instead of nothing. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .orb { background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, .5), rgba(255, 255, 255, .1) 42%, transparent 68%),
    radial-gradient(circle at 62% 74%, rgba(120, 231, 114, .3), transparent 60%),
    radial-gradient(circle at 34% 62%, rgba(120, 170, 255, .26), transparent 62%),
    rgba(255, 255, 255, .06); }
}
