/* Coreva — base layer: reset, type scale, utilities, primitives */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.65;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; letter-spacing: -.015em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }
p  { color: var(--fg-muted); }
a  { color: inherit; }
img, svg { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(34,211,238,.32); }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 6px; }

/* ── layout ── */
.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: 20px; }
.section { padding-block: var(--gap-8); position: relative; z-index: 1; }
.section--tight { padding-block: var(--gap-7); }
.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.wrap { flex-wrap: wrap; }
.grid { display: grid; gap: var(--gap-4); }
.g2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

/* ── text helpers ── */
.eyebrow {
  font-size: .74rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--primary);
  display: inline-flex; align-items: center; gap: var(--gap-2);
}
.lead { font-size: clamp(1.02rem, 1.6vw, 1.18rem); color: var(--fg-muted); max-width: 62ch; }
.muted { color: var(--fg-muted); }
.small { font-size: .86rem; }
.tiny { font-size: .76rem; color: var(--fg-faint); }
.center { text-align: center; margin-inline: auto; }
.balance { text-wrap: balance; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── surfaces ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--gap-5);
  box-shadow: var(--shadow-sm);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
.card--hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.card--glass {
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.card--flat { box-shadow: none; }

/* ── buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--gap-2);
  min-height: 46px; padding: 0 22px; border: 1px solid transparent; border-radius: var(--r-pill);
  font-weight: 700; font-size: .93rem; letter-spacing: .01em;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .16s var(--ease), box-shadow .16s var(--ease), background .16s, opacity .16s;
}
.btn:hover:not(:disabled) { transform: translateY(-2px); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn--primary { background: var(--grad-brand); color: var(--on-brand); box-shadow: 0 8px 24px rgba(8,145,178,.28); }
.btn--primary:hover:not(:disabled) { box-shadow: 0 14px 34px rgba(8,145,178,.38); }
.btn--accent { background: var(--accent); color: #fff; box-shadow: 0 8px 24px rgba(5,150,105,.26); }
.btn--ghost { background: transparent; border-color: var(--border-strong); color: var(--fg); }
.btn--ghost:hover:not(:disabled) { background: var(--surface-2); }
.btn--quiet { background: var(--surface-2); border-color: var(--border); color: var(--fg); }
.btn--sm { min-height: 38px; padding: 0 15px; font-size: .84rem; }
.btn--icon { min-height: 42px; width: 42px; padding: 0; border-radius: 50%; }

/* ── badges + chips ── */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .72rem; font-weight: 700; letter-spacing: .04em;
  padding: 5px 11px; border-radius: var(--r-pill);
  background: rgba(8,145,178,.10); color: var(--primary-dark);
}
.badge--green { background: rgba(5,150,105,.12); color: var(--accent); }
.badge--gold  { background: rgba(245,158,11,.14); color: #B45309; }
.badge--plain { background: var(--surface-2); color: var(--fg-muted); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
  border: 1px solid var(--border); border-radius: var(--r-pill);
  background: var(--surface); font-size: .8rem; font-weight: 600; color: var(--fg-muted);
}

/* ── forms ── */
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span {
  font-size: .76rem; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--fg-muted);
}
input[type="text"], input[type="email"], input[type="number"], input[type="time"],
select, textarea {
  width: 100%; padding: 12px 14px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-sm);
  transition: border-color .18s, box-shadow .18s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: var(--ring);
}
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--danger); }
.err { color: var(--danger); font-size: .78rem; font-weight: 600; min-height: 1em; }

/* ── toast ── */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: var(--r-sm); font-size: .88rem; font-weight: 600;
  background: var(--surface); border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg); animation: rise .28s var(--ease);
}
.toast--ok { border-color: rgba(5,150,105,.4); color: var(--accent); }
.toast--err { border-color: rgba(220,38,38,.4); color: var(--danger); }

/* ── misc ── */
.divider { border: 0; border-top: 1px solid var(--border); margin-block: var(--gap-5); }
.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 50%, var(--surface-2) 75%);
  background-size: 220% 100%; animation: shimmer 1.3s linear infinite;
  border-radius: var(--r-sm); min-height: 14px;
}
.stars { display: inline-flex; gap: 2px; color: var(--gold); }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes shimmer { from { background-position: 210% 0; } to { background-position: -110% 0; } }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.045); opacity: .88; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes spin { to { transform: rotate(360deg); } }

.rise { animation: rise .5s var(--ease) both; }
.rise-1 { animation-delay: .07s; } .rise-2 { animation-delay: .14s; }
.rise-3 { animation-delay: .21s; } .rise-4 { animation-delay: .28s; }
