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

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

@font-face {
  font-family: "Geist";
  src: url("../assets/fonts/Geist-Variable-Italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

/* ---------- Design tokens ---------- */

:root {
  --color-bg: #ffffff;
  --color-bg-secondary: #f4f4f5;
  --color-text: #18181b;
  --color-text-secondary: #52525b;
  --color-text-tertiary: #71717a;
  --color-border: #e4e4e7;

  --color-orange: #c2410c;
  --color-green: #15803d;
  --color-black: #18181b;

  --font-sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --container-max-width: 1240px;
  --container-padding: clamp(1.25rem, 4vw, 4rem);
  --nav-height: 72px;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
}

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

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

* {
  margin: 0;
}

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

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

ul {
  list-style: none;
  padding: 0;
}

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

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

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

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

/* ---------- Nav ---------- */

.nav {
  display: flex;
  align-items: center;
  min-height: var(--nav-height);
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  width: 100%;
}

.nav__name {
  display: inline-block;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.nav__links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-secondary);
}

.nav__links a:hover {
  color: var(--color-text);
}

/* ---------- Tilt card (Apple TV-style hover tilt) ---------- */

.tilt-wrap {
  display: block;
  min-width: 0;
  perspective: 1400px;
}

.tilt-card {
  position: relative;
  display: block;
  min-width: 0;
  overflow: hidden;
  transition: transform 150ms ease-out, box-shadow 300ms ease;
}

.tilt-card__shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 200ms ease;
}

.tilt-card.is-active .tilt-card__shine {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .tilt-card {
    transition: none;
  }
}

/* ---------- Lenis smooth scroll ---------- */

html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

/* ---------- Copy button (icon-only, e.g. footer email) ---------- */

.copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: none;
  background: none;
  color: var(--color-text-tertiary);
  cursor: pointer;
  border-radius: 6px;
  transition: color 150ms ease, background 150ms ease;
}

.copy-button:hover {
  color: var(--color-text);
  background: var(--color-bg-secondary);
}

.copy-button:focus-visible {
  outline: 2px solid var(--color-orange);
  outline-offset: 2px;
}

.copy-button.is-copied {
  color: var(--color-green);
}

.copy-button__icon {
  width: 14px;
  height: 14px;
}

@media (prefers-reduced-motion: reduce) {
  .copy-button {
    transition: none;
  }
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: var(--space-8);
  z-index: 100;
  transform: translate(-50%, 12px);
  opacity: 0;
  pointer-events: none;
  background: var(--color-black);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
  max-width: calc(100vw - 2 * var(--container-padding));
  text-align: center;
  transition: opacity 250ms cubic-bezier(0.22, 1, 0.36, 1), transform 250ms cubic-bezier(0.22, 1, 0.36, 1);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {
  .toast {
    transition: opacity 150ms ease;
  }

  .toast,
  .toast.is-visible {
    transform: translate(-50%, 0);
  }
}
