/* Ing. Mabel — Espacio de Estudio
   Paleta: tinta #0F1B2D · marfil #F7F4EE · dorado #C9A227 */

:root {
  --ink: #0F1B2D;
  --ivory: #F7F4EE;
  --gold: #C9A227;
  --ink-soft: #3A465A;
  --line: rgba(15, 27, 45, 0.14);
  --serif: Georgia, "Times New Roman", "Nimbus Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --wrap: 68rem;
}

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

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--ink);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.65rem 1rem;
  border-radius: 4px;
  background: var(--ink);
  color: var(--ivory);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3rem, 9vw, 5.5rem) 1.25rem clamp(2.75rem, 7vw, 4.5rem);
  border-bottom: 1px solid rgba(201, 162, 39, 0.4);
  background: radial-gradient(ellipse 80% 90% at 50% -20%, #1C2E4A 0%, var(--ink) 58%, #0B1524 100%);
  color: var(--ivory);
  text-align: center;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  top: -55%;
  width: min(70vw, 40rem);
  aspect-ratio: 1;
  border: 1px solid rgba(201, 162, 39, 0.16);
  border-radius: 50%;
  pointer-events: none;
}

.hero::before { left: -20%; }
.hero::after { right: -20%; }

.hero-inner {
  position: relative;
  max-width: 46rem;
  margin: 0 auto;
}

.brand-mark {
  display: block;
  width: clamp(92px, 17vw, 124px);
  height: auto;
  margin: 0 auto 1.5rem;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.45));
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.7rem, 9vw, 4.6rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: 0.005em;
}

.hero-subtitle {
  margin: 1rem 0 0;
  color: var(--gold);
  font-size: clamp(0.72rem, 2.2vw, 0.85rem);
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.hero-rule {
  position: relative;
  width: 4.5rem;
  height: 1px;
  margin: 1.6rem auto;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.hero-rule::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 5px;
  background: var(--gold);
  transform: translate(-50%, -50%) rotate(45deg);
}

.hero-welcome {
  max-width: 36rem;
  margin: 0 auto;
  color: rgba(247, 244, 238, 0.82);
  font-size: clamp(0.98rem, 2.4vw, 1.08rem);
  line-height: 1.8;
}

/* Main */
main {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 4.5rem) 1.25rem clamp(3rem, 8vw, 5rem);
}

main:focus {
  outline: none;
}

.section-head {
  margin: 0 0 1.75rem;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 0.6rem;
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: var(--gold);
}

.section-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  font-weight: 400;
  line-height: 1.1;
}

/* Pestañas */
.tabs {
  display: flex;
  gap: 0.5rem;
  margin: 0 -0.25rem 1.75rem;
  padding: 0.25rem 0.25rem 0.85rem;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 27, 45, 0.25) transparent;
  -webkit-overflow-scrolling: touch;
}

.tabs::-webkit-scrollbar { height: 4px; }
.tabs::-webkit-scrollbar-thumb {
  background: rgba(15, 27, 45, 0.25);
  border-radius: 999px;
}

.tab {
  flex: 0 0 auto;
  padding: 0.62rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.tab:hover {
  border-color: rgba(15, 27, 45, 0.32);
  background: rgba(15, 27, 45, 0.05);
}

.tab[aria-selected="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--ivory);
  box-shadow: inset 0 -3px 0 var(--gold);
}

.tab:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

/* Paneles */
.panel {
  padding: clamp(1.4rem, 4.5vw, 2.5rem);
  border: 1px solid var(--line);
  border-top: 2px solid var(--gold);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.42);
}

.panel[hidden] {
  display: none;
}

.panel:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.panel-kicker {
  margin: 0 0 0.55rem;
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.panel h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.55rem, 4.5vw, 2rem);
  font-weight: 400;
  line-height: 1.15;
}

.panel-desc {
  max-width: 46rem;
  margin: 0.7rem 0 0;
  color: var(--ink-soft);
}

/* Zona de material */
.material-slot {
  margin-top: clamp(1.6rem, 4vw, 2.25rem);
  padding: clamp(1.4rem, 4vw, 2rem);
  border: 1px dashed rgba(15, 27, 45, 0.3);
  border-radius: 4px;
  background: rgba(201, 162, 39, 0.05);
  text-align: center;
}

.slot-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--ink);
}

.slot-note {
  max-width: 34rem;
  margin: 0.35rem auto 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.material-slot ul {
  margin: 1rem auto 0;
  padding: 0;
  list-style: none;
}

.material-slot li + li { margin-top: 0.4rem; }

.material-slot a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.material-slot a:hover {
  text-decoration-thickness: 3px;
}

/* Footer */
.site-footer {
  padding: 1.9rem 1.25rem 2.4rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.85rem;
  text-align: center;
}

.site-footer p { margin: 0; }

.site-footer .footer-year {
  margin-top: 0.25rem;
  font-variant-numeric: tabular-nums;
}

/* Movimiento */
@keyframes panel-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .panel:not([hidden]) {
    animation: panel-in 0.32s ease both;
  }
}

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

/* Pantallas amplias */
@media (min-width: 48rem) {
  .tabs {
    flex-wrap: wrap;
    overflow: visible;
    padding-bottom: 0.25rem;
  }

  .hero,
  main {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}
