/* Clorofila Atelier - core tokens, reset, typography */

:root {
  /* Palette - forest green + chalk white + terracotta + dark soil */
  --forest: #006633;
  --forest-deep: #003d1f;
  --forest-soft: #2e7350;
  --sage: #8fa68e;
  --terracotta: #c8553d;
  --terracotta-deep: #8f3b29;
  --soil: #3d2817;
  --paper: #faf7f2;
  --paper-warm: #f3eee5;
  --line: #d9d3c8;
  --ink: #1c1c1c;
  --ink-soft: #4a4a4a;
  --ink-muted: #6b6b6b;

  --font-display: 'Cormorant Garamond', 'Source Serif Pro', Georgia, serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-tag: 'Source Sans 3', 'Inter', system-ui, sans-serif;

  --max-w: 1200px;
  --gutter: 24px;
  --radius-s: 4px;
  --radius-m: 8px;

  --shadow-card: 0 1px 2px rgba(28, 28, 28, 0.04), 0 8px 24px rgba(28, 28, 28, 0.06);
  --shadow-pop: 0 12px 40px rgba(0, 102, 51, 0.12);
}

@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('../fonts/cormorant-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('../fonts/cormorant-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('../fonts/cormorant-semibold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--forest-deep);
  margin: 0 0 16px;
  line-height: 1.18;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(34px, 5.5vw, 56px);
}

h2 {
  font-size: clamp(28px, 3.8vw, 40px);
}

h3 {
  font-size: clamp(20px, 2.4vw, 26px);
}

h4 {
  font-size: 18px;
  font-weight: 600;
}

p {
  margin: 0 0 16px;
  max-width: 68ch;
}

a {
  color: var(--forest);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.18s ease;
}

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

a:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 3px;
  border-radius: 2px;
}

button {
  font-family: inherit;
  cursor: pointer;
}

button:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 2px;
}

.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;
}

.jump-to-main {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--forest);
  color: var(--paper);
  padding: 12px 20px;
  z-index: 100;
  text-decoration: none;
  border-radius: var(--radius-s);
  transition: top 0.18s ease;
}

.jump-to-main:focus {
  top: 16px;
  color: var(--paper);
}

/* Layout */
.shell {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.shell-narrow {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

main {
  min-height: 50vh;
}

/* Latin species name - always italicized */
.latin {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* Common Spanish name */
.common-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-style: normal;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.02em;
  padding: 14px 26px;
  border: 1px solid transparent;
  border-radius: var(--radius-s);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
  min-height: 48px;
}

.btn-primary {
  background: var(--forest);
  color: var(--paper);
  border-color: var(--forest);
}

.btn-primary:hover {
  background: var(--forest-deep);
  border-color: var(--forest-deep);
  color: var(--paper);
}

.btn-ghost {
  background: transparent;
  color: var(--forest-deep);
  border-color: var(--forest);
}

.btn-ghost:hover {
  background: var(--forest);
  color: var(--paper);
}

.btn-soil {
  background: var(--terracotta);
  color: var(--paper);
  border-color: var(--terracotta);
}

.btn-soil:hover {
  background: var(--terracotta-deep);
  border-color: var(--terracotta-deep);
  color: var(--paper);
}

/* Eyebrow / kicker */
.kicker {
  display: inline-block;
  font-family: var(--font-tag);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--terracotta-deep);
  margin-bottom: 16px;
}

.lead {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.1vw, 22px);
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 56ch;
}

/* Botanical divider - inline use */
.divider-leaf {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 64px 0;
  color: var(--forest-soft);
}

.divider-leaf svg {
  width: 96px;
  height: 32px;
}

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

/* Selection */
::selection {
  background: var(--forest);
  color: var(--paper);
}
