/* Mykin Design System - Core */
/* Colors are now centralized in colors.css */

  /* Typography scale */
  --font-family-base: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-md: 1rem;
  --font-size-lg: 1.25rem;
  --font-size-xl: 1.5rem;
  --font-line-height: 1.6;

  /* Spacing scale */
  --space-0: 0;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;

  /* Breakpoints */
  --bp-sm: 480px;
  --bp-md: 768px;
  --bp-lg: 1024px;
  --bp-xl: 1280px;
}

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

html {
  font-family: var(--font-family-base);
  font-size: 16px;
  line-height: var(--font-line-height);
  color: var(--color-gray-900);
  background-color: var(--color-white);
}

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

button,
input,
textarea,
select {
  font: inherit;
}

:focus-visible {
  outline: 2px solid var(--color-mana);
  outline-offset: 2px;
}

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

/* Utilities */
.container {
  width: min(100% - 2rem, 1200px);
  margin-inline: auto;
}

.grid {
  display: grid;
  gap: var(--space-4);
}

.grid--cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: var(--bp-md)) {
  .grid--cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

/* === Button styles moved to mykin-system.css === */

.card {
  border: 1px solid var(--color-gray-200);
  border-radius: 12px;
  padding: var(--space-4);
  background-color: var(--color-white);
  box-shadow: 0 4px 12px rgba(25, 27, 40, 0.04);
}

.card__title {
  font-size: var(--font-size-lg);
  margin-bottom: 0 !important;
}

.form-label {
  font-weight: 600;
  display: block;
  margin-bottom: var(--space-1);
}

.form-input {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md, 10px);
  border: 1px solid var(--color-gray-300);
  background-color: var(--color-white);
  transition: border-color 0.2s ease;
}

.form-input:focus-visible {
  border-color: var(--color-mana);
}

.form-input:disabled {
  background: var(--color-gray-100);
  cursor: not-allowed;
}

/* Components: Chip / Keyword / Tag */
.chip,
.keyword,
.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2, 0.5rem);
  padding: 6px 12px;
  border: 1px solid var(--color-gray-300);
  border-radius: var(--radius-md, 10px);
  background: var(--color-surface, var(--color-white));
  color: var(--color-text, var(--color-gray-900));
  text-transform: lowercase;
  font-variant-caps: normal;
  letter-spacing: normal;
}

a.chip:focus-visible,
button.chip:focus-visible,
a.keyword:focus-visible,
button.keyword:focus-visible,
a.tag:focus-visible,
button.tag:focus-visible {
  outline: 2px solid var(--color-gray-900);
  outline-offset: 2px;
}

/* Latest: article meta spacing and read-more button spacing */
.latest .article-card__meta {
  margin-top: 12px;
  padding-left: 0;
  padding-right: 0;
}

@media (min-width: 768px) {
  .latest .article-card__meta {
    margin-top: 16px;
  }
}

.latest__more {
  margin-top: 24px;
  text-align: center;
}

@media (min-width: 768px) {
  .latest__more {
    margin-top: 32px;
  }
}

/* Mushrooms section */
.mushrooms {
  padding: clamp(3rem, 6vw, 5rem) 0;
  background: var(--color-white);
}

.mushrooms__header {
  max-width: 640px;
  margin: 0 auto var(--space-6);
  text-align: center;
}

.mushrooms__title {
  font-size: clamp(2rem, 3vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.mushrooms__subtitle {
  margin-top: var(--space-2);
  color: var(--color-gray-500);
  font-size: clamp(1rem, 1.35vw, 1.125rem);
}

/* .mushrooms__grid styles moved to sections/mushrooms.css */

.mushroom-card {
  display: flex;
  flex-direction: column;
  gap: 1px !important;
  height: 100%;
  padding: clamp(1.5rem, 2.5vw, 2rem);
  background: var(--color-white);
  border: 1px solid rgba(25, 27, 40, 0.12);
  border-radius: 18px;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
  color: inherit;
  opacity: 0;
  animation: fadeInUp 0.5s ease-out forwards;
}

.mushroom-card:nth-child(1) { animation-delay: 0.05s; }
.mushroom-card:nth-child(2) { animation-delay: 0.1s; }
.mushroom-card:nth-child(3) { animation-delay: 0.15s; }
.mushroom-card:nth-child(4) { animation-delay: 0.2s; }
.mushroom-card:nth-child(5) { animation-delay: 0.25s; }
.mushroom-card:nth-child(6) { animation-delay: 0.3s; }

.mushroom-card:hover,
.mushroom-card:focus-visible {
  background: var(--color-black);
  border-color: var(--color-black);
  color: var(--color-white);
  transform: translateY(-2px);
}

.mushroom-card:focus-visible {
  outline-offset: 6px;
}

.mushroom-card__image {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  background: var(--color-gray-200);
  transition: background-color 0.25s ease;
  overflow: hidden;
}

.mushroom-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mushroom-card:hover .mushroom-card__image,
.mushroom-card:focus-visible .mushroom-card__image {
  background: rgba(255, 255, 255, 0.12);
}

.mushroom-card__name {
  font-size: var(--font-size-md);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 !important;
  line-height: 1 !important;
}

.mushroom-card__latin {
  font-size: var(--font-size-xs);
  font-style: italic;
  color: var(--color-gray-500);
  margin: 4px 0 0 0 !important;
  line-height: 1 !important;
}

/* .mushroom-card__desc styles moved to sections/mushrooms.css */

.mushrooms__more {
  text-align: center;
}

/* .mushrooms__more .btn - unified styling in mykin-system.css */
