/* base.css — reset, type scale, layout primitives, components.
   Theme files load after this and override the variables in :root. */

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

@font-face {
  font-family: 'Hk Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../../fonts/HKGrotesk-Regular.woff') format('woff');
}

@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../../fonts/Jost-Regular.ttf') format('truetype');
}

/* ----- Theme variables ----- */

:root {
  /* Surfaces */
  --bg: #121c1e;
  --bg-deep: #0f1618;
  --surface: #171f21;
  --surface-raised: #1c2528;

  /* Text */
  --heading: #f0e9f2;
  --text: #9aa8ab;
  --text-strong: #e5e5e6;
  --text-faint: #5d6c70;

  /* Accent */
  --accent: #5ab5a8;
  --accent-hover: #6fc7ba;
  --on-accent: #10201e;

  /* Lines */
  --border: 1px solid #1e2a2d;
  --border-strong: 1px solid #2c3a3e;

  /* Type */
  --font-display: 'Jost', sans-serif;
  --font-body: 'Hk Grotesk', sans-serif;

  /* Shape */
  --radius: 10px;
  --radius-sm: 5px;

  /* Type scale */
  --fs-xs: 1.2rem;
  --fs-sm: 1.4rem;
  --fs-base: 1.6rem;
  --fs-md: 1.9rem;
  --fs-lg: 2.6rem;
  --fs-xl: 4.2rem;
  --fs-hero: 5.6rem;

  --lh-tight: 1.25;
  --lh-normal: 1.7;

  /* Layout */
  --container: 1080px;
  --gutter-xs: 0.8rem;
  --gutter-sm: 1.6rem;
  --gutter: 2.4rem;
  --gutter-lg: 4rem;
  --gutter-xl: 7rem;
}

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

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

html {
  font-size: 62.5%; /* 1rem = 10px */
  scroll-behavior: smooth;
}

@media (max-width: 1000px) {
  html {
    font-size: 56%;
  }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  color: var(--heading);
  font-weight: 500;
  line-height: var(--lh-tight);
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

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

/* ----- Layout primitives ----- */

.row {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: var(--gutter-xl) 0;
}

.section--tight {
  padding: var(--gutter-lg) 0;
}

/* Screen-reader-only text */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--on-accent);
  padding: 1rem 2rem;
  z-index: 100;
}

.skip-link:focus {
  left: 0;
}

/* ----- Site nav ----- */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--gutter) 0;
  border-bottom: var(--border);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-display);
  font-size: var(--fs-md);
  color: var(--heading);
  letter-spacing: 0.02em;
}

.nav__mark {
  width: 2.8rem;
  height: 2.8rem;
  object-fit: contain;
}

.nav__links {
  display: flex;
  gap: 2.8rem;
  font-size: var(--fs-sm);
}

.nav__link {
  color: var(--text);
  transition: color 0.2s ease;
}

.nav__link:hover {
  color: var(--accent);
}

@media (max-width: 540px) {
  .nav {
    flex-direction: column;
    gap: var(--gutter-sm);
  }
}

/* ----- Buttons ----- */

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  padding: 1.1rem 2.4rem;
  border-radius: var(--radius-sm);
  transition: background-color 0.2s ease, border-color 0.2s ease,
    transform 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn--primary:hover {
  background: var(--accent-hover);
}

.btn--ghost {
  border: var(--border-strong);
  color: var(--text-strong);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ----- Eyebrow label ----- */

.eyebrow {
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ----- Cards ----- */

.card {
  background: var(--surface);
  border: var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.card__media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface-raised);
}

.card__media img,
.card__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__body {
  padding: var(--gutter);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card__title {
  font-size: var(--fs-md);
}

.card__text {
  font-size: var(--fs-sm);
  margin-top: 0.8rem;
}

.card__cta {
  font-size: var(--fs-sm);
  color: var(--accent);
  margin-top: auto;
  padding-top: var(--gutter-sm);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--gutter);
}

/* ----- Badge ----- */

.badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  background: var(--accent);
  color: var(--on-accent);
  padding: 0.4rem 1.2rem;
  border-radius: var(--radius-sm);
}

/* ----- Footer ----- */

.footer {
  background: var(--bg-deep);
  padding: var(--gutter) 0;
  font-size: var(--fs-xs);
  color: var(--text-faint);
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--gutter-sm);
  flex-wrap: wrap;
}

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