/* Uppercut — shared stylesheet. No JS, no build. */

:root {
  --ink: #1A1F2B;
  --ink-2: #4A5060;
  --ink-3: #8A8F9A;
  --line: #E4E5E8;
  --paper: #FFFFFF;
  --paper-2: #F6F6F4;
  --accent: #A8864F;

  --display: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --wrap: 72rem;
  --gutter: clamp(1rem, 5vw, 2.5rem);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: -999px; }
.skip:focus { left: var(--gutter); top: 0.75rem; background: var(--ink); color: var(--paper); padding: 0.5rem 0.75rem; z-index: 10; }

/* ---------- Header ---------- */

.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 4rem; gap: 1rem;
}
.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.brand .mark { height: 2rem; width: auto; }
.brand .wordmark { height: 0.8rem; width: auto; }
.nav { display: flex; align-items: center; gap: 1rem; font-size: 0.9375rem; }
@media (min-width: 40rem) { .nav { gap: 1.5rem; } }
@media (max-width: 26rem) { .brand .wordmark { display: none; } }
.lang { display: flex; gap: 0.4rem; padding-left: 1rem; border-left: 1px solid var(--line); font-size: 0.8125rem; letter-spacing: 0.06em; }
.lang [aria-current] { color: var(--ink); font-weight: 600; }
.lang a { color: var(--ink-3); }
.nav a { text-decoration: none; color: var(--ink-2); }
.nav a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Type ---------- */

h1, h2, h3 { font-family: var(--display); font-stretch: 112%; line-height: 1.1; margin: 0; letter-spacing: -0.01em; }
h1 { font-weight: 800; font-size: clamp(2.25rem, 7vw, 4.5rem); }
h2 { font-weight: 750; font-size: clamp(1.6rem, 4vw, 2.5rem); }
h3 { font-weight: 700; font-size: 1.125rem; }

.label {
  display: block;
  font: 600 0.75rem/1 var(--body);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
.lead { font-size: clamp(1.125rem, 2.4vw, 1.3rem); color: var(--ink-2); max-width: 38rem; }
.muted { color: var(--ink-3); }

/* ---------- Buttons ---------- */

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: 0 1.4rem;
  border: 1.5px solid var(--ink); border-radius: 0;
  font: 600 0.9375rem/1 var(--body);
  text-decoration: none;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: #000; }
.btn-ghost:hover { background: var(--paper-2); }

/* ---------- Sections ---------- */

.section { padding: clamp(4rem, 10vw, 7rem) 0; border-top: 1px solid var(--line); }
.section:first-of-type { border-top: 0; }
.section-head { margin-bottom: clamp(2rem, 5vw, 3.5rem); max-width: 40rem; }

.hero { padding: clamp(4rem, 12vw, 9rem) 0 clamp(4rem, 10vw, 7rem); }
.hero-mark { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 2.5rem; }
.hero-mark .mark { height: 3.75rem; width: auto; }
.hero-mark .wordmark { height: 1.2rem; width: auto; }
.hero h1 { max-width: 15ch; }
.hero .lead { margin-top: 1.5rem; }

.grid { display: grid; gap: 2.5rem; }
@media (min-width: 48rem) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); gap: 3rem; }
  .grid-2 { grid-template-columns: 2fr 1fr; gap: 1.5rem; }
}
@media (min-width: 40rem) { .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 3rem 2.5rem; } }
@media (min-width: 64rem) { .grid-4 { grid-template-columns: repeat(4, 1fr); gap: 2.5rem; } }

.col { border-top: 2px solid var(--ink); padding-top: 1.25rem; }
.num { display: block; font: 700 0.875rem/1 var(--display); color: var(--accent); margin-bottom: 1rem; letter-spacing: 0.06em; }
.col p { margin: 0.6rem 0 0; color: var(--ink-2); }

/* Cards */
.card { border: 1px solid var(--line); padding: clamp(1.5rem, 4vw, 2.25rem); display: flex; flex-direction: column; gap: 0.75rem; }
.card h3 { font-size: 1.6rem; }
.card p { margin: 0; color: var(--ink-2); }
.card .more { margin-top: auto; padding-top: 1rem; font-weight: 600; }
.card-muted { background: var(--paper-2); border-color: transparent; color: var(--ink-3); }
.card-muted h3, .card-muted p { color: var(--ink-3); }

.badges { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.5rem; }
.badge {
  display: inline-flex; flex-direction: column; justify-content: center;
  min-width: 9.5rem; height: 3rem; padding: 0 1rem;
  background: var(--ink); color: var(--paper);
  border-radius: 0.5rem; text-decoration: none; line-height: 1.1;
}
.badge small { font-size: 0.625rem; opacity: 0.8; }
.badge strong { font-size: 1rem; font-weight: 600; }
.badge[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; gap: 2rem; }
@media (min-width: 48rem) { .steps { grid-template-columns: repeat(3, 1fr); gap: 3rem; } }
.steps li { counter-increment: s; }
.steps li::before {
  content: counter(s, decimal-leading-zero);
  display: block; font: 800 2.5rem/1 var(--display); font-stretch: 125%;
  color: var(--ink); margin-bottom: 1rem;
}
.steps p { margin: 0.5rem 0 0; color: var(--ink-2); }

/* Contact */
.contact-mail {
  display: inline-block;
  font: 800 clamp(1.5rem, 6.5vw, 4rem)/1.1 var(--display);
  font-stretch: 112%;
  letter-spacing: -0.02em;
  word-break: break-word;
  text-decoration: none;
  border-bottom: 3px solid var(--accent);
}
.contact-mail:hover { border-bottom-color: var(--ink); }

/* ---------- Long-form text (legal, support) ---------- */

.doc { padding: clamp(3rem, 8vw, 5rem) 0 clamp(4rem, 10vw, 6rem); }
.doc .wrap { max-width: calc(68ch + 2 * var(--gutter)); }
.doc header { margin-bottom: 2.5rem; padding-bottom: 2rem; border-bottom: 1px solid var(--line); }
.doc h1 { font-size: clamp(2rem, 5.5vw, 3rem); }
.doc .dates { margin: 1.25rem 0 0; font-size: 0.875rem; color: var(--ink-3); }
.doc .dates span + span::before { content: " · "; }
.doc h2 { font-size: 1.35rem; margin: 2.75rem 0 0.75rem; font-stretch: 100%; }
.doc h3 { font-size: 1.0625rem; margin: 1.75rem 0 0.5rem; }
.doc p, .doc ul, .doc ol { margin: 0 0 1rem; }
.doc ul, .doc ol { padding-left: 1.25rem; }
.doc li { margin-bottom: 0.4rem; }
.doc li::marker { color: var(--ink-3); }
.doc table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; margin: 0 0 1.25rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 0.6rem 0.75rem 0.6rem 0; border-bottom: 1px solid var(--line); }
.doc th { font-weight: 600; }
.table-scroll { overflow-x: auto; }

.note { background: var(--paper-2); padding: 1rem 1.25rem; border-left: 3px solid var(--accent); margin: 0 0 1.5rem; }
.note p:last-child { margin-bottom: 0; }

.confirm { background: #FFF3C4; padding: 0 0.2em; font-size: 0.85em; font-weight: 600; }

ol.numbered { list-style: none; counter-reset: n; padding-left: 0; }
ol.numbered > li { counter-increment: n; position: relative; padding-left: 2.75rem; margin-bottom: 1.25rem; min-height: 2rem; }
ol.numbered > li::before {
  content: counter(n);
  position: absolute; left: 0; top: -0.1rem;
  width: 2rem; height: 2rem; display: grid; place-items: center;
  background: var(--ink); color: var(--paper);
  font: 700 0.9375rem/1 var(--display);
}

details { border-bottom: 1px solid var(--line); padding: 1rem 0; }
details:first-of-type { border-top: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--accent); font-weight: 700; }
details[open] summary::after { content: "–"; }
details p { margin: 0.75rem 0 0; color: var(--ink-2); }

.linklist { list-style: none; padding: 0; margin: 2rem 0 0; border-top: 1px solid var(--line); }
.linklist li { border-bottom: 1px solid var(--line); margin: 0; }
.linklist a { display: flex; justify-content: space-between; padding: 1rem 0; text-decoration: none; font-weight: 600; }
.linklist a::after { content: "→"; color: var(--accent); }
.linklist a:hover { text-decoration: underline; }

/* ---------- 404 ---------- */

.notfound { padding: clamp(5rem, 16vw, 10rem) 0; }
.notfound .code { font: 800 clamp(5rem, 22vw, 11rem)/0.9 var(--display); font-stretch: 125%; letter-spacing: -0.03em; }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--line); padding: 2rem 0 2.5rem; font-size: 0.875rem; color: var(--ink-3); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.site-footer p { margin: 0; }
.site-footer nav { display: flex; gap: 1.25rem; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }

@media print {
  .site-header, .site-footer, .skip { display: none; }
  .doc { padding: 0; }
}

/* ---------- Motion (CSS only; off for prefers-reduced-motion) ---------- */

.mark-anim { position: relative; display: block; aspect-ratio: 490 / 538; }
.mark-anim img { position: absolute; inset: 0; width: 100%; height: 100%; }

@media (prefers-reduced-motion: no-preference) {
  /* Hero: the U throws the uppercut, then the impact lines pop. */
  .mark-anim .fist { animation: uppercut 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.25) both; transform-origin: 40% 100%; }
  .mark-anim .impact { animation: impact 0.35s ease-out 0.55s both; transform-origin: 70% 60%; }
  .hero-mark .wordmark { animation: rise 0.6s ease-out 0.35s both; }
  .hero h1 { animation: rise 0.7s ease-out 0.5s both; }
  .hero .lead { animation: rise 0.7s ease-out 0.62s both; }
  .hero .actions, .hero .badges { animation: rise 0.7s ease-out 0.74s both; }

  /* Sections fade up as they scroll into view (where supported). */
  @supports (animation-timeline: view()) {
    .section-head, .col, .card, .steps li, .contact-mail {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 60%;
    }
  }

  /* Buttons and cards: small hover lift. */
  .btn, .card, .badge { transition: transform 0.15s ease, background-color 0.15s ease; }
  .btn:hover, .badge:hover { transform: translateY(-2px); }
  .card:not(.card-muted):hover { transform: translateY(-3px); }
}

@keyframes uppercut {
  0%   { transform: translateY(35%) rotate(-12deg); opacity: 0; }
  60%  { transform: translateY(-6%) rotate(3deg); opacity: 1; }
  100% { transform: none; }
}
@keyframes impact {
  0%   { transform: scale(0.4); opacity: 0; }
  70%  { transform: scale(1.12); opacity: 1; }
  100% { transform: none; }
}
@keyframes rise {
  from { transform: translateY(16px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
