/* ==========================================================================
   CREATICS · Base layer
   Sensible resets + brand defaults (link colors, selection, focus,
   body type). Kept small; components carry their own styling.
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-size: var(--type-body-size);
  line-height: var(--type-body-leading);
  font-weight: var(--weight-regular);
  color: var(--color-ink);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Headings default to the geometric heading face; colour inherits from context
   (so headings on dark surfaces come out light without per-use overrides). */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: inherit;
  text-wrap: balance;
}

p { text-wrap: pretty; }

img, svg, video { display: block; max-width: 100%; }

/* Links — always defined so editor-added links aren't browser-blue */
a { color: var(--color-link); text-decoration-color: color-mix(in srgb, var(--color-link) 40%, transparent); text-underline-offset: 0.15em; transition: color var(--dur-fast) var(--ease-out); }
/* Los botones llevan su propio color de texto (--_fg). Sin el :not(), esta regla
   se lo pisaba al pasar el ratón y dejaba texto rosa sobre botón rosa: 1,34:1. */
a:not(.cs-btn):hover { color: var(--color-link-hover); }

::selection { background: var(--color-selection); color: var(--color-ink); }

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--radius-xs); }

/* Form controls inherit type */
button, input, select, textarea { font: inherit; color: inherit; }

/* Utility: the brand "." device */
.cs-dot { color: var(--color-accent); }

code, kbd, samp, pre { font-family: var(--font-mono); }
