/* Shared styles for every page: fonts, colours, buttons and focus. */

@font-face {
  font-family: "IBM Plex Sans";
  src: url("../assets/fonts/IBMPlexSans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("../assets/fonts/IBMPlexSans-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("../assets/fonts/IBMPlexMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("../assets/fonts/IBMPlexMono-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  /* Palette: "Signal teal" */
  --ink: #0e2a2f; /* dark teal ink: text */
  --ink-soft: #4a6166; /* secondary text */
  --paper: #ffffff;
  --artboard: #eef7f5; /* light teal tint behind the previews */
  --hairline: #cfe0dd; /* borders and rules */
  --brand: #0a9e8e; /* bright teal: logo, markers, handles, focus outlines */
  --brand-strong: #087f73; /* deeper teal: buttons and brand-coloured text (passes contrast) */
  --brand-deep: #066a60; /* button hover */
  --brand-tint: #ddf3ef; /* selected and "Free" backgrounds */
  --pro: #ffb020; /* amber: Pro */
  --pro-tint: #fff1d6;
  --pro-text: #8a5a00;
  --caution: #9a5b00; /* warnings */
  --crop: var(--brand); /* the original accent name, kept for crop marks */

  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --radius: 6px;
  --radius-small: 4px;
  --shadow-hover: 0 6px 18px rgba(14, 42, 47, 0.08);
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  font-weight: 500;
  line-height: 1.2;
}

a {
  color: inherit;
}

.mono {
  font-family: var(--font-mono);
}

/* Anything marked hidden stays hidden, whatever its layout styles say */
[hidden] {
  display: none !important;
}

/* Visible keyboard focus everywhere */
:focus-visible {
  outline: 2px solid var(--crop);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 10;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  font: 500 15px/1 var(--font-sans);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.btn-primary {
  border-color: var(--brand-strong);
  background: var(--brand-strong);
  color: var(--paper);
}

.btn-primary:hover {
  border-color: var(--brand-deep);
  background: var(--brand-deep);
}

.btn-secondary {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--hairline);
}

.btn-secondary:hover {
  border-color: var(--brand-strong);
  color: var(--brand-strong);
}

/* Wordmark: crop marks around a frame */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
}

.wordmark svg {
  width: 20px;
  height: 20px;
  flex: none;
}

/* Small labels such as "Free" and "Pro" */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 7px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-small);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink-soft);
}

.tag-free {
  border-color: var(--brand-tint);
  background: var(--brand-tint);
  color: var(--brand-deep); /* the darker teal keeps small text readable on the tint */
}

.tag-pro {
  border-color: var(--pro-tint);
  background: var(--pro-tint);
  color: var(--pro-text);
}

.tag svg {
  width: 11px;
  height: 11px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
