/* Ellis Website — design system entry point.
 *
 * This file is the ONLY stylesheet a rendered design receives. Everything the
 * system needs must be reachable from this @import closure — if a stylesheet
 * is not imported here (directly or transitively), it does not exist as far as
 * a generated design is concerned.
 *
 * Order matters: fonts, then tokens, then component styles, then base.
 */

@import "./fonts/fonts.css";

@import "./tokens/color.css";
@import "./tokens/typography.css";
@import "./tokens/space.css";
@import "./tokens/motion.css";

@import "./_ds_bundle.css";

/* ---------------------------------------------------------------------------
 * Base
 *
 * The Ellis canvas is near-black and the system is dark-only. Set the canvas on
 * the root so a design never renders dark components on a white page.
 * ------------------------------------------------------------------------- */

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

html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ellis-canvas);
  color: var(--ellis-text);
  font-family: var(--ellis-font-body);
  font-size: var(--ellis-text-base);
  line-height: var(--ellis-leading-body);
  letter-spacing: var(--ellis-tracking-body);
  font-weight: var(--ellis-weight-regular);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Headings default to the display face, uppercase, single weight.
   Authors should normally use the <Heading> component rather than raw tags. */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-family: var(--ellis-font-display);
  font-weight: var(--ellis-weight-display);
  line-height: var(--ellis-leading-display);
  letter-spacing: var(--ellis-tracking-display);
  text-transform: uppercase;
}

p {
  margin: 0;
  max-width: var(--ellis-measure);
}

a {
  color: var(--ellis-accent);
  text-decoration: none;
  transition: color var(--ellis-transition);
}

a:hover {
  color: var(--ellis-accent-hover);
}

/* Focus is always accent and always visible. Do not override this to none. */
:where(a, button, input, textarea, select, [tabindex]):focus-visible {
  outline: none;
  box-shadow: var(--ellis-focus-ring);
  border-radius: var(--ellis-radius-sm);
}

::selection {
  background: var(--ellis-accent);
  color: var(--ellis-text-on-accent);
}

/* Utility available to generated designs for the page shell. */
.ellis-canvas {
  min-height: 100%;
  background: var(--ellis-canvas);
  color: var(--ellis-text);
  font-family: var(--ellis-font-body);
}

.ellis-container {
  width: 100%;
  max-width: var(--ellis-container);
  margin-inline: auto;
  padding-inline: var(--ellis-gutter);
}

.ellis-container--narrow {
  max-width: var(--ellis-container-narrow);
}

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