/* === DESIGN SYSTEM: layer order ========================================== */
@layer reset, tokens, base, components, widgets, utilities;

/* === DESIGN SYSTEM: reset ================================================ */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  body, h1, h2, h3, h4, p, figure, dl, dd { margin: 0; }
  button, input, select { font: inherit; }
  button, select, summary { cursor: pointer; }
  img, svg { display: block; max-width: 100%; }
  button { color: inherit; }
  a { color: inherit; }
  [hidden] { display: none !important; }
}

/* === DESIGN SYSTEM: tokens =============================================== */
@layer tokens {
  :root {
    --vr-canvas: #f3f5fa;
    --vr-surface: #fff;
    --vr-surface-muted: #edf0f6;
    --vr-ink: #33323e;
    --vr-muted: #666575;
    --vr-border: #dce1ec;
    --vr-brand: #4c20f2;
    --vr-brand-hover: #3614c3;
    --vr-brand-deep: #241052;
    --vr-accent: #da0d6e;
    --vr-success: #18794e;
    --vr-focus: #8768ff;
    --vr-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    --vr-text-xs: .75rem;
    --vr-text-sm: .875rem;
    --vr-text-base: 1rem;
    --vr-text-lg: 1.125rem;
    --vr-radius-sm: 6px;
    --vr-radius: 12px;
    --vr-radius-lg: 18px;
    --vr-shadow: 0 3px 16px rgb(32 35 64 / 4%);
    --vr-space-1: 4px;
    --vr-space-2: 8px;
    --vr-space-3: 12px;
    --vr-space-4: 16px;
    --vr-space-5: 20px;
    --vr-space-6: 24px;
    --vr-space-8: 32px;
    --vr-space-10: 40px;
    --vr-space-12: 48px;
    --vr-space-16: 64px;
    --vr-container: 1184px;
    --vr-gutter: clamp(20px, 4.5vw, 64px);
    --vr-section-gap: clamp(44px, 5vw, 72px);
    --vr-header-height: 76px;
    --vr-transition: 160ms ease;
  }
}

/* === DESIGN SYSTEM: base and typography ================================== */
@layer base {
  html { scroll-behavior: smooth; scroll-padding-top: calc(var(--vr-header-height) + 24px); }
  body { background: var(--vr-canvas); color: var(--vr-ink); font: 400 1rem/1.6 var(--vr-font); -webkit-font-smoothing: antialiased; }
  ::selection { color: white; background: var(--vr-brand); }
  :focus-visible { outline: 3px solid var(--vr-focus); outline-offset: 4px; }
  h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -.035em; font-weight: 750; text-wrap: balance; }
  h1 { font-size: clamp(2.5rem, 4.5vw, 3.85rem); }
  h2 { font-size: clamp(1.65rem, 2.65vw, 2.2rem); }
  h3 { font-size: 1.125rem; letter-spacing: -.02em; }
  p { text-wrap: pretty; }
  a { text-underline-offset: 4px; }
  button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
  input, select { min-width: 0; }
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
  }
}

/* === DESIGN SYSTEM: shared layout and primitives ========================= */
@layer components {
  .vr-container { width: min(var(--vr-container), calc(100% - var(--vr-gutter) * 2)); margin-inline: auto; }
  .vr-section { padding-top: var(--vr-section-gap); }
  .vr-section__head { margin-bottom: var(--vr-space-6); }
  .vr-section__head p { color: var(--vr-muted); margin-top: 10px; max-width: 70ch; }
  .vr-eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: var(--vr-text-xs); letter-spacing: .13em; font-weight: 750; text-transform: uppercase; }
  .vr-eyebrow::before { content: ""; width: 26px; height: 4px; border-radius: 3px; background: var(--vr-brand); }
  .vr-card { padding: var(--vr-space-6); background: var(--vr-surface); border: 1px solid var(--vr-border); border-radius: var(--vr-radius); box-shadow: var(--vr-shadow); }
  .vr-card p { margin-top: 10px; color: var(--vr-muted); font-size: var(--vr-text-sm); }
  .vr-grid { display: grid; gap: var(--vr-space-5); }
  .vr-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vr-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .vr-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .vr-icon { width: 24px; height: 24px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
  .vr-icon-box { display: inline-flex; align-items: center; justify-content: center; color: var(--vr-brand); margin-bottom: 18px; }
  .vr-icon-box .vr-icon { width: 32px; height: 32px; }
  .vr-button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 46px; padding: 11px 20px; border: 1px solid transparent; border-radius: var(--vr-radius-sm); background: var(--vr-brand); color: white; font-size: var(--vr-text-sm); font-weight: 700; line-height: 1.35; text-decoration: none; transition: background var(--vr-transition), box-shadow var(--vr-transition); }
  .vr-button:hover { background: var(--vr-brand-hover); }
  .vr-button .vr-icon { width: 18px; height: 18px; }
  .vr-button--pink { background: var(--vr-accent); }
  .vr-button--pink:hover { background: #ce0864; }
  .vr-button--outline { background: white; color: var(--vr-brand); border-color: var(--vr-brand); }
  .vr-button--outline:hover { background: var(--vr-surface-muted); }
  .vr-button--quiet { background: transparent; color: var(--vr-brand); border-color: var(--vr-border); }
  .vr-button--quiet:hover { background: white; }
  .vr-link { color: var(--vr-brand); font-weight: 650; }
  .vr-control { width: 100%; min-height: 46px; border: 1px solid #cdd3df; background: white; border-radius: var(--vr-radius-sm); padding: 10px 13px; color: var(--vr-ink); }
  .vr-control::placeholder { color: var(--vr-muted); opacity: 1; }
  .vr-badge { display: inline-flex; align-items: center; gap: 7px; font-size: var(--vr-text-xs); font-weight: 650; padding: 5px 9px; border: 1px solid var(--vr-border); border-radius: 6px; background: var(--vr-surface); }
  .vr-note { display: flex; align-items: flex-start; gap: 12px; padding: 16px 20px; border: 1px solid var(--vr-border); border-radius: var(--vr-radius); background: white; color: var(--vr-muted); font-size: var(--vr-text-sm); }
  .vr-note .vr-icon { width: 20px; height: 20px; margin-top: 2px; color: var(--vr-brand); }
  .vr-checklist { padding: 0; margin: 18px 0 0; list-style: none; }
  .vr-checklist li { display: flex; align-items: flex-start; gap: 10px; margin-top: 10px; font-size: var(--vr-text-sm); }
  .vr-checklist .vr-icon { color: var(--vr-success); width: 19px; height: 19px; margin-top: 2px; }
  .vr-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--vr-brand-deep); text-decoration: none; font-weight: 800; font-size: 1.6rem; letter-spacing: -.055em; white-space: nowrap; }
  .vr-brand img { width: 42px; height: 42px; }
  @media (max-width: 1000px) { .vr-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (max-width: 680px) {
    .vr-grid--2, .vr-grid--3 { grid-template-columns: 1fr; }
    .vr-grid { gap: 14px; }
    .vr-card { padding: 22px; }
    .vr-brand { font-size: 1.4rem; }
    .vr-brand img { width: 36px; height: 36px; }
  }
  @media (max-width: 380px) { .vr-grid--4 { grid-template-columns: 1fr; } }
}

/* === DESIGN SYSTEM: utilities ============================================ */
@layer utilities {
  .vr-sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
  .vr-muted { color: var(--vr-muted); }
  .vr-small { font-size: var(--vr-text-sm); }
  .vr-skip-link { position: fixed; z-index: 100; top: 10px; left: 20px; transform: translateY(-150%); }
  .vr-skip-link:focus { transform: translateY(0); }
}
/* === END DESIGN SYSTEM =================================================== */
