/* ============================================================
   WeedPassport — hoja de estilos compartida (inicio y 404)
   ============================================================ */

/* ---------- Fuentes autoalojadas ---------- */
@font-face {
  font-family: "DM Sans";
  src: url("/assets/dm-sans.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("/assets/dm-sans-semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DM Serif Display";
  src: url("/assets/dm-serif.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ---------- Variables y base ---------- */
:root {
  --cream: #fdfdfa;
  --ink: #1d2420;
  --green: #326e58;
  --sage: #e6efe9;
  --white: #ffffff;
  --line: rgba(29, 36, 32, 0.14);
  --line-strong: rgba(29, 36, 32, 0.3);
  --muted: rgba(29, 36, 32, 0.72);
  --green-deep: #285845;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "DM Serif Display", Georgia, "Times New Roman", serif;
}

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

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

body {
  margin: 0;
  overflow-x: clip;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

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

::selection {
  background: var(--sage);
  color: var(--ink);
}

/* ---------- Accesibilidad: foco visible y enlace de salto ---------- */
:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 100;
  transform: translateY(-220%);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.6rem 1.25rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.skip-link:focus-visible {
  transform: translateY(0);
}

/* ---------- Estructura ---------- */
.wrap {
  width: min(1120px, 100% - 2.5rem);
  margin-inline: auto;
}

@media (min-width: 720px) {
  .wrap {
    width: min(1120px, 100% - 4rem);
  }
}

/* ---------- Cabecera ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  flex-shrink: 0;
}

.brand img {
  width: 220px;
  max-width: 40vw;
  height: auto;
}

.header-nav {
  display: flex;
  align-items: center;
}

.login-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.5rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease;
}

.login-link:hover {
  background: var(--sage);
  border-color: var(--green);
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.75rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.btn-primary {
  background: var(--green);
  color: var(--cream);
}

.btn-primary:hover {
  background: var(--green-deep);
}

.btn-secondary {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn-secondary:hover {
  background: var(--sage);
  border-color: var(--green);
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  gap: 3rem;
  align-items: center;
  padding-block: clamp(3rem, 8vw, 6.5rem) clamp(3.5rem, 8vw, 6rem);
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.05fr 0.95fr;
    gap: clamp(2.5rem, 5vw, 5rem);
  }
}

.kicker {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.5rem;
  color: var(--green);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.kicker::before {
  content: "";
  width: 2.25rem;
  height: 1px;
  flex-shrink: 0;
  background: var(--green);
}

.hero h1 {
  margin: 0 0 1.25rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.9rem, 11vw, 6.25rem);
  line-height: 1.04;
  letter-spacing: -0.01em;
}

.lede {
  margin: 0 0 1.25rem;
  font-family: var(--serif);
  font-size: clamp(1.3rem, 3vw, 1.85rem);
  line-height: 1.35;
  color: var(--green);
}

.intro {
  margin: 0 0 2rem;
  max-width: 34rem;
  font-size: 1.0625rem;
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  margin-bottom: 1.5rem;
}

.beta-note {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  max-width: 34rem;
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--muted);
}

.beta-note .dot {
  flex-shrink: 0;
  width: 0.55rem;
  height: 0.55rem;
  margin-top: 0.4em;
  border-radius: 50%;
  background: var(--sage);
  border: 1px solid var(--green);
}

/* ---------- Ilustración y tarjeta pasaporte ---------- */
.hero-art {
  position: relative;
}

.art-frame {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: clamp(18px, 3vw, 28px);
  background: var(--sage);
}

.art-frame img {
  width: 100%;
}

.passport-card {
  position: relative;
  margin: -3.25rem 1.25rem 0;
  padding: 1.35rem 1.5rem 1.5rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 20px 44px -26px rgba(29, 36, 32, 0.4);
  transform: rotate(-1.5deg);
}

@media (min-width: 900px) {
  .passport-card {
    margin: -4.5rem 2rem 0 2.75rem;
  }
}

.passport-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.passport-name {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.passport-tag {
  margin: 0;
  color: var(--green);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.perforation {
  margin: 1.05rem 0 1.1rem;
  border: 0;
  border-top: 2px dashed var(--line-strong);
}

.passport-fields {
  display: grid;
  gap: 0.7rem;
  margin: 0;
}

.field {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--line);
}

.field:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.field dt {
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.field dd {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: right;
}

.passport-stamp {
  position: absolute;
  top: -1.35rem;
  right: 1.1rem;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  margin: 0;
  border-radius: 50%;
  border: 2px solid var(--green);
  outline: 1px dashed var(--green);
  outline-offset: 4px;
  background: var(--cream);
  color: var(--green);
  font-family: var(--serif);
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  transform: rotate(8deg);
}

/* ---------- Filas editoriales ---------- */
.features {
  padding-bottom: clamp(3rem, 7vw, 5.5rem);
}

.section-title {
  margin: 0 0 1.5rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  letter-spacing: -0.01em;
}

.rows {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line-strong);
}

.row {
  display: grid;
  gap: 0.35rem 1.5rem;
  align-items: baseline;
  margin-inline: -0.75rem;
  padding: 1.6rem 0.75rem;
  border-bottom: 1px solid var(--line);
  border-radius: 12px;
  transition: background-color 0.2s ease;
}

.row:hover {
  background: var(--sage);
}

@media (min-width: 760px) {
  .row {
    grid-template-columns: 4.5rem minmax(11rem, 0.9fr) 1.4fr;
  }
}

.row-number {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.4rem;
  color: var(--green);
}

.row-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.row-text {
  margin: 0;
  max-width: 38rem;
  color: var(--muted);
}

/* ---------- Pie ---------- */
.site-footer {
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  padding-block: 1.75rem;
}

.footer-brand {
  margin: 0;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.footer-badge {
  margin: 0;
  padding: 0.15rem 0.7rem;
  border: 1px solid var(--green);
  border-radius: 999px;
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer-nav {
  margin-left: auto;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  font-weight: 600;
}

.footer-nav a:hover {
  color: var(--green);
}

/* ---------- Página 404 ---------- */
.error {
  display: grid;
  justify-items: start;
  padding-block: clamp(4rem, 12vw, 8rem);
}

.error-symbol {
  width: 56px;
  height: 56px;
  margin-bottom: 1.5rem;
}

.error-title {
  margin: 0 0 1.25rem;
  max-width: 16ch;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.3rem, 8vw, 4.25rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.error-text {
  margin: 0 0 2rem;
  max-width: 30rem;
  font-size: 1.0625rem;
  color: var(--muted);
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
