/*
 * Base — Myra Studio
 *
 * Reset, @font-face declarations, and html/body defaults.
 * References design-tokens.css custom properties.
 * Loaded after design-tokens.css, before component CSS.
 */


/* --- Fonts ------------------------------------------------------------- */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/inter-regular.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/inter-semibold.woff2") format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/jetbrains-mono-regular.woff2") format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/jetbrains-mono-bold.woff2") format("woff2");
}


/* --- Reset ------------------------------------------------------------- */

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

* {
  margin: 0;
  padding: 0;
}

img, svg, video, canvas {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

table {
  border-collapse: collapse;
}


/* --- Defaults ---------------------------------------------------------- */

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-base);
  letter-spacing: var(--letter-spacing-base);
  color: var(--color-text-primary);
  background-color: var(--color-bg-page);
}


/* --- Typography -------------------------------------------------------- */

h1, h2, h3, h4 {
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tight);
  font-weight: var(--font-weight-semibold);
}

h1 { font-size: var(--font-size-3xl); }
h2 { font-size: var(--font-size-2xl); }
h3 { font-size: var(--font-size-xl); }
h4 { font-size: var(--font-size-lg); }

a:not([class]) {
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:not([class]):hover {
  color: var(--color-accent-hover);
}

small {
  font-size: var(--font-size-sm);
}


/* --- Focus ------------------------------------------------------------- */

:focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
}


/* --- Utilities (only where unavoidable) -------------------------------- */

.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;
}

.font-mono {
  font-family: var(--font-family-mono);
  font-variant-numeric: tabular-nums;
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

.divider-or {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
  margin: var(--space-2) 0;
}

.divider-or::before,
.divider-or::after {
  content: "";
  flex: 1;
  border-top: var(--border-width) solid var(--color-border-default);
}

/* Centered content column.
   The one layout primitive for constrained, centered content.
   Safe inside flex-direction: column parents — width: 100% is required
   because auto margins on the cross axis of a flex item override
   align-items: stretch, collapsing to content width. */
.col-content {
  width: 100%;
  max-width: var(--width-max-content);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--page-padding);
  padding-right: var(--page-padding);
}

/* Narrow variant — for forms, wizards, centered cards */
.col-narrow {
  width: 100%;
  max-width: var(--width-max-card);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--page-padding);
  padding-right: var(--page-padding);
}
