/* ==========================================================================
   Base Typography, Fonts & Scroll Reveal Animations
   ========================================================================== */

@font-face {
  font-family: "Geist";
  src: url("../assets/fonts/Geist-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist";
  src: url("../assets/fonts/Geist-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist";
  src: url("../assets/fonts/Geist-Bold.woff2") format("woff2");
  font-weight: 600 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("../assets/fonts/GeistMono-Regular.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-feature-settings: "cv03" on, "cv04" on, "cv11" on;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-primary);
  background-color: var(--bg-page);
  transition:
    background-color var(--swap-duration) var(--swap-ease),
    color var(--swap-duration) var(--swap-ease);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

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

button,
input {
  font-family: inherit;
}

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

code {
  display: inline-block;
  padding: 1px 7px;
  font-size: 0.84em;
  line-height: 1.4;
  border-radius: 6px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
}

kbd {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  font-size: 0.82em;
  line-height: 1.3;
  border-radius: 6px;
  background: var(--bg-chip);
  border: 1px solid var(--border-hairline);
  color: var(--ink-primary);
}

/* Typography Hierarchy */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 700;
  color: var(--ink-primary);
}

.h1-display {
  font-size: clamp(2.5rem, 5.2vw, 4.35rem);
  line-height: 1.03;
  letter-spacing: -0.04em;
}

.h2-section {
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.h3-card {
  font-size: clamp(1.15rem, 1.5vw, 1.35rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.lede {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  line-height: 1.6;
  color: var(--ink-secondary);
  margin: 0;
}

.body-copy {
  font-size: 0.96rem;
  line-height: 1.72;
  color: var(--ink-secondary);
  margin: 0;
}

/* Signature Dotted Rule (Awwwards #1) */
.dotted-rule {
  height: 1px;
  width: 100%;
  border: 0;
  margin: 0;
  background-image: linear-gradient(
    to right,
    rgba(var(--dotted-rgb), var(--dotted-alpha)) 0 12%,
    transparent 12%
  );
  background-size: 8px 1px;
  background-repeat: repeat-x;
}

/* Sliding Gradient Underline Link (Awwwards #1) */
.link-underlined {
  display: inline-block;
  padding-bottom: 2px;
  background-image: linear-gradient(
    to right,
    var(--accent) 0 45%,
    var(--border-hairline) 55% 100%
  );
  background-size: 220% 1.5px;
  background-position: 100% 100%;
  background-repeat: no-repeat;
  transition: background-position 0.35s var(--reveal-ease), color 0.25s ease;
}

.link-underlined:hover {
  background-position: 0% 100%;
  color: var(--accent);
}

/* Scroll Reveal Animations (Woday #2 bounce-free spring feel) */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.75s var(--reveal-ease),
    transform 0.75s var(--reveal-ease);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

.reveal.reveal-down {
  transform: translateY(-22px);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .reveal.reveal-down {
    opacity: 1;
    transform: none;
    transition: none;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
