/* ==========================================================================
   Yemma Labs — Base Styles
   Reset, typography, global rules, utility classes.
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scrollbar-width: none;
}

html::-webkit-scrollbar {
  display: none;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: var(--leading-tight);
  color: var(--color-primary);
}

.display {
  font-size: var(--text-display);
  font-weight: var(--weight-bold);
}

h1, .h1 {
  font-size: var(--text-h1);
  font-weight: var(--weight-bold);
}

h2, .h2 {
  font-size: var(--text-h2);
  font-weight: var(--weight-semibold);
}

h3, .h3 {
  font-size: var(--text-h3);
  font-weight: var(--weight-semibold);
}

.body-lg {
  font-size: var(--text-body-lg);
}

.text-small {
  font-size: var(--text-small);
  font-weight: var(--weight-medium);
}

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
}

p {
  margin-bottom: var(--space-4);
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary);
}

a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

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

ul, ol {
  list-style: none;
}

/* Skip to content — accessibility */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  padding: var(--space-2) var(--space-4);
  background: var(--color-primary);
  color: var(--color-bg);
  font-weight: var(--weight-medium);
  border-radius: var(--radius-sm);
  z-index: var(--z-toast);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-4);
  color: var(--color-bg);
}

/* Layout */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

.section {
  padding-top: var(--section-padding);
  padding-bottom: var(--section-padding);
}

/* Selection */
::selection {
  background-color: var(--color-primary);
  color: var(--color-bg);
}

/* Focus visible for keyboard users only */
:focus:not(:focus-visible) {
  outline: none;
}

/* Responsive typography */
@media (max-width: 1024px) {
  .display { font-size: 48px; }
  h1, .h1 { font-size: 40px; }
  h2, .h2 { font-size: 30px; }
  h3, .h3 { font-size: 22px; }
}

@media (max-width: 768px) {
  :root {
    --section-padding: var(--space-16);
  }

  .display { font-size: 36px; }
  h1, .h1 { font-size: 32px; }
  h2, .h2 { font-size: 26px; }
  h3, .h3 { font-size: 20px; }

  .container {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }
}

/* Page transition — fade in on load */
.page-content {
  opacity: 0;
  animation: fadeIn 200ms ease forwards;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

/* Scroll-triggered fade-in sections */
.fade-in-section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in-section.fade-in-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Card reveal animation */
.card-hidden {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.card-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Homepage: GSAP handles all animations — no CSS overrides needed */

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