/* apegoevitativo.es - public design layer
   Brand-owned editorial calm. Loaded after the Tailwind runtime config.
   Palette, type and voice stay as they are; rhythm, surfaces, states and motion are refined. */

:root {
  --brand-forest: #152f22;
  --brand-forest-soft: #22402f;
  --brand-clay: #8c4e30;
  --brand-clay-deep: #7a4228;
  --brand-cream: #fcf9f4;
  --brand-paper: #fffdf9;
  --brand-sand: #f6f3ee;
  --brand-sand-deep: #efebe4;
  --brand-ink: #1c1c19;
  --brand-muted: #424844;
  --brand-line: #ddd9d1;
  --brand-line-strong: #c9cec7;
  --brand-sage: #b0cdbb;
  --radius-card: 1.25rem;
  --radius-btn: 0.875rem;
  --ease-calm: cubic-bezier(0.22, 0.61, 0.36, 1);
  --shadow-soft: 0 1px 2px rgba(21, 47, 34, 0.04), 0 14px 34px -24px rgba(21, 47, 34, 0.24);
  --shadow-lift: 0 2px 6px rgba(21, 47, 34, 0.05), 0 30px 64px -34px rgba(21, 47, 34, 0.32);
  --shadow-btn: 0 1px 2px rgba(21, 47, 34, 0.12), 0 12px 24px -14px rgba(21, 47, 34, 0.42);
  --shadow-btn-hover: 0 2px 4px rgba(21, 47, 34, 0.12), 0 18px 32px -16px rgba(21, 47, 34, 0.48);
}

html {
  scroll-padding-top: 6rem;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  background-color: var(--brand-cream);
  background-image:
    radial-gradient(64rem 44rem at 92% -12%, rgba(140, 78, 48, 0.05), transparent 62%),
    radial-gradient(52rem 38rem at -8% 18%, rgba(21, 47, 34, 0.045), transparent 58%);
  background-attachment: fixed;
  color: var(--brand-ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
  font-optical-sizing: auto;
  text-wrap: balance;
}

p,
li,
figcaption {
  text-wrap: pretty;
}

::selection {
  background: rgba(140, 78, 48, 0.2);
  color: var(--brand-forest);
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--brand-clay);
  outline-offset: 3px;
  border-radius: 0.35rem;
}

.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 350, "GRAD" 0, "opsz" 24;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 200;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  border-radius: 0.75rem;
  background: var(--brand-forest);
  color: var(--brand-cream);
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: var(--shadow-lift);
  transform: translateY(-180%);
  transition: transform 0.25s var(--ease-calm);
}

.skip-link:focus {
  transform: translateY(0);
  outline-color: var(--brand-cream);
}

/* Header and navigation */

.site-header {
  background-color: rgba(252, 249, 244, 0.86);
  border-bottom: 1px solid transparent;
  transition:
    background-color 0.3s var(--ease-calm),
    border-color 0.3s var(--ease-calm),
    box-shadow 0.3s var(--ease-calm);
}

.site-header[data-scrolled="true"] {
  background-color: rgba(252, 249, 244, 0.95);
  border-bottom-color: rgba(21, 47, 34, 0.09);
  box-shadow: 0 14px 34px -30px rgba(21, 47, 34, 0.4);
}

.site-nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.7rem;
  border-radius: 0.6rem;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--brand-muted);
  transition:
    color 0.2s var(--ease-calm),
    background-color 0.2s var(--ease-calm);
}

.site-nav-link::after {
  content: "";
  position: absolute;
  left: 0.7rem;
  right: 0.7rem;
  bottom: 0.2rem;
  height: 1.5px;
  border-radius: 999px;
  background: var(--brand-clay);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s var(--ease-calm);
}

.site-nav-link:hover {
  color: var(--brand-forest);
  background: rgba(21, 47, 34, 0.045);
}

.site-nav-link:hover::after,
.site-nav-link.is-active::after {
  transform: scaleX(1);
}

.site-nav-link.is-active {
  color: var(--brand-forest);
  font-weight: 600;
}

.site-nav-link .nav-badge {
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: rgba(140, 78, 48, 0.1);
  color: var(--brand-clay-deep);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.8rem 0.9rem;
  border-radius: 0.85rem;
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--brand-muted);
  transition:
    color 0.2s var(--ease-calm),
    background-color 0.2s var(--ease-calm),
    border-color 0.2s var(--ease-calm);
}

.mobile-nav-link:hover {
  color: var(--brand-forest);
  background: rgba(21, 47, 34, 0.045);
}

.mobile-nav-link.is-active {
  color: var(--brand-forest);
  background: var(--brand-sand);
  border-color: rgba(21, 47, 34, 0.1);
  font-weight: 600;
}

/* Buttons */

:where(.btn) {
  display: inline-flex;
}

body .btn {
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.8rem 1.35rem;
  border: 1px solid transparent;
  border-radius: var(--radius-btn);
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition:
    transform 0.2s var(--ease-calm),
    background-color 0.2s var(--ease-calm),
    border-color 0.2s var(--ease-calm),
    box-shadow 0.2s var(--ease-calm),
    color 0.2s var(--ease-calm);
}

body .btn:hover {
  transform: translateY(-1px);
}

body .btn:active {
  transform: translateY(0);
}

body .btn .material-symbols-outlined {
  font-size: 1.2rem;
  transition: transform 0.25s var(--ease-calm);
}

body .btn:hover .material-symbols-outlined[data-move] {
  transform: translateX(3px);
}

body .btn-primary {
  background: var(--brand-forest);
  color: var(--brand-cream);
  box-shadow: var(--shadow-btn);
}

body .btn-primary:hover {
  background: var(--brand-forest-soft);
  box-shadow: var(--shadow-btn-hover);
}

body .btn-clay {
  background: var(--brand-clay);
  color: #fff8f2;
  box-shadow: var(--shadow-btn);
}

body .btn-clay:hover {
  background: var(--brand-clay-deep);
  box-shadow: var(--shadow-btn-hover);
}

body .btn-outline {
  border-color: rgba(21, 47, 34, 0.32);
  background: transparent;
  color: var(--brand-forest);
}

body .btn-outline:hover {
  border-color: var(--brand-forest);
  background: rgba(21, 47, 34, 0.045);
}

body .btn-soft {
  border-color: rgba(21, 47, 34, 0.08);
  background: var(--brand-sand);
  color: var(--brand-forest);
}

body .btn-soft:hover {
  background: var(--brand-sand-deep);
}

body .btn-sm {
  padding: 0.55rem 0.95rem;
  font-size: 0.875rem;
}

body .btn-lg {
  padding: 0.95rem 1.6rem;
  font-size: 1rem;
}

/* Surfaces */

body .panel {
  background: var(--brand-paper);
  border: 1px solid var(--brand-line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
}

body .card-editorial {
  background: var(--brand-paper);
  border: 1px solid var(--brand-line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  transition:
    transform 0.25s var(--ease-calm),
    box-shadow 0.25s var(--ease-calm),
    border-color 0.25s var(--ease-calm);
}

body .card-editorial:hover {
  transform: translateY(-3px);
  border-color: rgba(21, 47, 34, 0.22);
  box-shadow: var(--shadow-lift);
}

body .card-accent {
  border-top: 2px solid var(--brand-clay);
}

body .card-featured {
  background: #faf4ee;
  border-color: rgba(140, 78, 48, 0.22);
}

body .card-featured:hover {
  border-color: rgba(140, 78, 48, 0.34);
}

body .rule-soft {
  border-top: 1px solid var(--brand-line);
}

/* Editorial details */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--brand-clay-deep);
}

.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.eyebrow-center {
  justify-content: center;
}

.eyebrow-center::after {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.hero-title {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-wrap: balance;
}

@media (min-width: 1024px) and (max-width: 1279px) {
  body .hero-title {
    font-size: 3.5rem;
  }
}

.lead-measure {
  max-width: 34rem;
}

.prose-measure {
  max-width: 65ch;
}

.quote-mark {
  position: relative;
}

.quote-mark::before {
  content: "\201C";
  position: absolute;
  top: -0.45em;
  left: -0.08em;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 3.4rem;
  line-height: 1;
  color: var(--brand-clay);
  opacity: 0.22;
  pointer-events: none;
}

.arch-frame {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 24rem;
  margin-inline: auto;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
}

.arch-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(21, 47, 34, 0.12);
  pointer-events: none;
}

/* Hero motion graphic: the corporate wordmark inside a slow relational orbit */

.hero-motion {
  display: grid;
  place-items: center;
  isolation: isolate;
  background: var(--brand-forest);
  box-shadow: var(--shadow-lift);
}

.hero-motion__orbits {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  animation: hero-motion-drift 14s ease-in-out infinite alternate;
}

.hero-motion__orbit {
  position: absolute;
  width: 84%;
  aspect-ratio: 1;
  border: 1px dashed rgba(252, 249, 244, 0.2);
  border-radius: 50%;
  animation: hero-motion-spin 34s linear infinite;
}

.hero-motion__orbit--inner {
  width: 70%;
  border-style: solid;
  border-color: rgba(197, 122, 82, 0.42);
  animation-duration: 24s;
  animation-direction: reverse;
}

.hero-motion__dot {
  position: absolute;
  top: 0;
  left: 50%;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.hero-motion__orbit:not(.hero-motion__orbit--inner) .hero-motion__dot {
  top: 50%;
  left: 100%;
}

.hero-motion__orbit--inner .hero-motion__dot {
  top: 100%;
  left: 50%;
}

.hero-motion__dot--clay {
  background: #cf8a63;
  box-shadow:
    0 0 0 4px rgba(207, 138, 99, 0.12),
    0 0 18px rgba(207, 138, 99, 0.6);
}

.hero-motion__dot--cream {
  background: #fcf9f4;
  box-shadow:
    0 0 0 4px rgba(252, 249, 244, 0.1),
    0 0 16px rgba(252, 249, 244, 0.45);
}

.hero-motion__brand {
  position: relative;
  z-index: 2;
  width: 54%;
  filter: invert(1) sepia(0.18) saturate(1.4) brightness(0.98);
  mix-blend-mode: screen;
  animation: hero-motion-float 10s var(--ease-calm) infinite;
}

.hero-motion__brand img {
  display: block;
  width: 100%;
  height: auto;
}

.hero-portrait {
  position: relative;
}

.hero-meta {
  padding-top: 0.85rem;
  border-top: 1px solid var(--brand-line);
}

@keyframes hero-motion-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes hero-motion-drift {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(0.93);
  }
}

@keyframes hero-motion-float {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-5px) scale(1.012);
  }
}

.media-zoom {
  overflow: hidden;
}

.media-zoom img {
  transition: transform 0.7s var(--ease-calm);
}

.media-zoom:hover img {
  transform: scale(1.035);
}

body .chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: var(--brand-sand);
  border: 1px solid rgba(21, 47, 34, 0.08);
  color: var(--brand-forest);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

body .chip-clay {
  background: rgba(140, 78, 48, 0.09);
  border-color: rgba(140, 78, 48, 0.16);
  color: var(--brand-clay-deep);
}

/* Links and feedback */

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: var(--brand-forest);
  transition: color 0.2s var(--ease-calm);
}

.link-arrow .material-symbols-outlined {
  transition: transform 0.25s var(--ease-calm);
}

.link-arrow:hover {
  color: var(--brand-clay-deep);
}

.link-arrow:hover .material-symbols-outlined {
  transform: translateX(3px);
}

/* Inputs */

body .field-input {
  width: 100%;
  min-height: 2.85rem;
  padding: 0.6rem 1rem;
  border: 1px solid rgba(21, 47, 34, 0.2);
  border-radius: 0.8rem;
  background: var(--brand-paper);
  color: var(--brand-ink);
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 0.9rem;
  transition:
    border-color 0.2s var(--ease-calm),
    box-shadow 0.2s var(--ease-calm),
    background-color 0.2s var(--ease-calm);
}

body .field-input::placeholder {
  color: #626962;
}

body .field-input:focus {
  outline: none;
  border-color: var(--brand-forest);
  background: var(--brand-paper);
  box-shadow: 0 0 0 3px rgba(21, 47, 34, 0.1);
}

/* Footer */

.site-footer {
  border-top: 1px solid rgba(21, 47, 34, 0.08);
}

.footer-heading {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--brand-forest);
}

.footer-link {
  font-size: 0.9rem;
  color: var(--brand-muted);
  transition:
    color 0.2s var(--ease-calm),
    padding-left 0.2s var(--ease-calm);
}

.footer-link:hover {
  color: var(--brand-forest);
  padding-left: 0.15rem;
}

.newsletter-panel {
  background: var(--brand-sand);
  border: 1px solid var(--brand-line);
  border-radius: var(--radius-card);
  padding: 1.25rem;
}

/* Calm entry reveals, driven by the compositor (no scroll listeners) */

@keyframes reveal-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal {
      animation: reveal-in linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 28%;
    }
  }
}

@keyframes breathe-ring {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(140, 78, 48, 0);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(140, 78, 48, 0.12);
  }
}

.is-breathing {
  animation: breathe-ring 6s var(--ease-calm);
}

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

  .reveal {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .hero-motion__orbits,
  .hero-motion__orbit,
  .hero-motion__brand {
    animation: none !important;
  }
}

@media (pointer: fine) {
  * {
    scrollbar-width: thin;
    scrollbar-color: rgba(21, 47, 34, 0.28) transparent;
  }
}
