/* ============================================================
   CallCapsule — design tokens
   Direction: modern SaaS. Clean white ground, record-red brand,
   the product UI as the hero. Professional, trustworthy.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root {
  /* ground */
  --bg:          #ffffff;
  --bg-soft:     #f7f7f8;
  --bg-deep:     #101014;

  /* text */
  --ink:         #17171c;
  --ink-soft:    #51515c;
  --ink-faint:   #8a8a94;

  /* brand — the record dot */
  --brand:       #e02f23;
  --brand-deep:  #bf241a;
  --brand-wash:  #fdeeec;

  /* lines & panels */
  --edge:        #e5e5ea;
  --edge-soft:   #eeeef1;
  --panel:       #ffffff;

  /* legacy aliases so app pages keep working */
  --paper:       var(--bg);
  --paper-warm:  var(--bg-soft);
  --paper-deep:  var(--bg-soft);
  --paper-edge:  var(--edge);
  --ember:       var(--brand);
  --ember-deep:  var(--brand-deep);
  --ember-wash:  var(--brand-wash);
  --amber:       #b45309;
  --amber-wash:  rgba(180, 83, 9, .1);
  --olive:       #16a34a;
  --gold:        #f0b429;

  /* the call room stays a dark theatre — real, product-true */
  --night:       #131316;
  --night-2:     #1b1b20;
  --night-3:     #26262c;
  --night-edge:  #33333b;
  --night-text:  #f2f2f5;

  --live:        #e02f23;

  /* type — one professional family, weights do the work */
  --display: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
  --body:    'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
  --mono:    ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --gut: clamp(1.25rem, 4vw, 2.5rem);
  --max: 1160px;

  --radius:    12px;
  --radius-lg: 18px;

  --shadow-sm: 0 1px 2px rgba(23, 23, 28, .06), 0 1px 3px rgba(23, 23, 28, .08);
  --shadow-md: 0 2px 4px rgba(23, 23, 28, .05), 0 12px 32px -12px rgba(23, 23, 28, .16);
  --shadow-lg: 0 4px 8px rgba(23, 23, 28, .05), 0 28px 64px -24px rgba(23, 23, 28, .28);
  --shadow-print: var(--shadow-md);
  --shadow-lift:  var(--shadow-lg);

  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16.5px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Grain belongs to the call room only — the marketing site is clean. */
body.night::after {
  content: '';
  position: fixed;
  inset: -50%;
  pointer-events: none;
  z-index: 9999;
  opacity: .1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='260' height='260' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  mix-blend-mode: screen;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.028em;
  margin: 0;
  text-wrap: balance;
  color: var(--ink);
}

p { margin: 0 0 1em; text-wrap: pretty; }
a { color: inherit; }

.wrap { width: calc(100% - var(--gut) * 2); max-width: var(--max); margin-inline: auto; }

/* ---------------------------------------------------------------- eyebrow */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-wash);
  border-radius: 999px;
  padding: .35rem .85rem;
  margin: 0 0 1.2rem;
}
.eyebrow::before {
  content: '';
  width: .45rem; height: .45rem;
  border-radius: 50%;
  background: var(--brand);
}

/* ---------------------------------------------------------------- buttons */
.btn {
  white-space: nowrap;
  --btn-bg: var(--brand);
  --btn-fg: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .8rem 1.5rem;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--body);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: 0;
  text-decoration: none;
  cursor: pointer;
  transition: background .16s var(--ease), transform .16s var(--ease), box-shadow .16s var(--ease), border-color .16s var(--ease), color .16s var(--ease);
  box-shadow: var(--shadow-sm);
}
.btn:hover:not(:disabled) { background: var(--brand-deep); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn--ember { /* legacy name — primary */ }
.btn--ghost {
  --btn-bg: #ffffff; --btn-fg: var(--ink);
  border-color: var(--edge);
}
.btn--ghost:hover:not(:disabled) { background: var(--bg-soft); border-color: #d4d4da; color: var(--ink); }
.btn--live  { --btn-bg: var(--live); }
.btn--big   { padding: 1rem 1.9rem; font-size: 1rem; border-radius: 12px; }
.btn--block { width: 100%; }

/* ----------------------------------------------------------------- inputs */
.field { display: block; margin-bottom: 1.1rem; }
.field > span {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: .45rem;
}
.input {
  width: 100%;
  padding: .85rem 1rem;
  font-family: var(--body);
  font-size: 1rem;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--edge);
  border-radius: 10px;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.input::placeholder { color: var(--ink-faint); }
.input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-wash);
}

/* -------------------------------------------------------- entrance motion */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.rise { animation: rise .7s var(--ease) both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* The HTML hidden attribute must always win — author display rules on a class
   (e.g. .modal { display:grid }) silently override the UA's [hidden] rule,
   which is exactly how the consent modal got stuck on screen. */
[hidden] { display: none !important; }
