/* Dromedar — dirección de arte: "el nombre es el héroe" + la joroba única como motivo.
   Paleta de marca (Verde Guadua / Tinta / Papel / Noche / Menta / Lima Biche), siempre por token. */

/* ---------- fuentes locales (OFL, subset latino, variables) ---------- */
@font-face {
  font-family: 'Sora';
  src: url('assets/fonts/sora-latin-var.woff2') format('woff2');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  src: url('assets/fonts/inter-latin-var.woff2') format('woff2');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --verde: #0E5C4A;
  --lima: #C5F04A;
  --tinta: #10201B;
  --papel: #F5F7F2;
  --noche: #0B1714;
  --menta: #7FD8B4;

  --bg: var(--papel);
  --ink: var(--tinta);
  --muted: #3d4a45;   /* ≈ 8:1 sobre papel */
  --accent: var(--verde);
  --accent-ink: var(--papel);
  --surface: #e7ece3; /* un paso de tono desde papel */
  --card: #ffffff;

  --font-display: 'Sora', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --margin: clamp(1rem, 3vw, 2.5rem);

  --step-small: 0.875rem;
  --step-body: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.75rem);
  --step-title: clamp(2.5rem, 1.4rem + 5vw, 6rem);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: clip; /* red de seguridad; el layout no depende de esto */
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-body);
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

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

h1, h2, h3, p { margin: 0; }

/* Todo hijo de grid/flex puede encogerse por debajo de su contenido. */
.hero > *, .hero-foot > *, .field-dark > *, .work > *, .product > *, .contact > *, .nav > * { min-width: 0; }

/* ---------- navegación (fija, opaca) ---------- */
.nav {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem var(--margin);
  background: var(--bg);
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.nav-logo { height: 28px; width: auto; }

.nav-cta {
  flex: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step-small);
  color: var(--accent-ink);
  background: var(--accent);
  text-decoration: none;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.nav-cta:hover { background: color-mix(in srgb, var(--verde) 85%, var(--tinta)); }

/* ---------- hero ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(1.5rem, 4vw, 3rem);
  padding: calc(60px + var(--margin)) var(--margin) var(--margin);
}

.wordmark { line-height: 0; }
.wordmark-img { width: 100%; }

.hero-foot {
  display: grid;
  gap: 1rem;
}
.hero-line {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step-lead);
  letter-spacing: -0.02em;
}
.hero-note {
  color: var(--muted);
  max-width: 38ch;
}

/* ---------- statement (campo oscuro) ---------- */
.field-dark {
  background: var(--noche);
  color: var(--menta);
  padding: clamp(4rem, 10vw, 9rem) var(--margin);
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.statement-mark {
  order: -1;
  width: clamp(72px, 22vw, 120px);
}

.statement {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.75rem, 1.1rem + 3.4vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 16ch;
  text-wrap: balance;
}

.statement-sub {
  font-size: var(--step-lead);
  color: color-mix(in srgb, var(--menta) 70%, var(--papel));
  max-width: 36ch;
  margin-top: 2rem;
}

/* ---------- qué hace Dromedar ---------- */
.work {
  padding: clamp(4rem, 10vw, 8rem) var(--margin);
  display: grid;
  gap: 2.5rem;
}

.work-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step-title);
  line-height: 1.02; /* "Qué" (Q + tilde) chocaba con la línea de abajo */
  letter-spacing: -0.035em;
  max-width: 9ch;
}

.work-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2.25rem;
}
.work-list h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step-lead);
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--accent);
}
.work-list p {
  margin-top: 0.5rem;
  color: var(--muted);
  max-width: 46ch;
}

/* ---------- producto ---------- */
.product {
  background: var(--surface);
  padding: clamp(4rem, 10vw, 8rem) var(--margin);
  display: grid;
  gap: 3rem;
  align-items: center;
}

.product-title {
  font-family: var(--font-display);
  font-size: var(--step-title);
  line-height: 0.95;
  letter-spacing: -0.035em;
  font-weight: 600;
}

.product-sign {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--accent);
  margin-top: 1.25rem;
}
.product-sign .by { font-weight: 400; color: var(--muted); }

.product-line {
  font-size: var(--step-lead);
  max-width: 30ch;
  margin-top: 1.5rem;
}

.product-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 48px;
  margin-top: 2rem;
  padding-inline: 1.25rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent);
  text-decoration: none;
}
.product-link:hover { background: color-mix(in srgb, var(--verde) 85%, var(--tinta)); }

.product-shot { display: grid; justify-items: center; gap: 1rem; }
.product-caption {
  font-size: var(--step-small);
  color: var(--muted);
  max-width: 40ch;
  text-align: center;
}

/* maqueta del muro de Cercanía (fiel, no esqueleto) */
.phone {
  margin: 0;
  width: 100%;
  max-width: 360px;
  padding: 10px;
  border-radius: 40px;
  background: var(--tinta);
}
.phone-screen {
  border-radius: 30px;
  background: var(--papel);
  padding: 1.1rem 0.9rem 1.25rem;
  display: grid;
  gap: 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: var(--ink);
}

.app-head { display: flex; align-items: center; gap: 0.6rem; padding-bottom: 0.25rem; }
.app-avatar {
  flex: none;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.75rem;
  background: var(--verde);
  color: var(--papel);
}
.app-head-text { display: grid; min-width: 0; }
.app-head-title { font-family: var(--font-display); font-weight: 600; font-size: 1rem; letter-spacing: -0.01em; }
.app-head-sub { color: var(--muted); font-size: 0.75rem; }

.app-section {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.875rem;
}

.app-event {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: var(--noche);
  aspect-ratio: 16 / 9;
}
.app-event img { width: 100%; height: 100%; object-fit: cover; }
.app-event::after { /* scrim: oscurece la imagen para que el título se lea */
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--noche) 10%, transparent), color-mix(in srgb, var(--noche) 88%, transparent) 70%);
}
.app-event-body {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 1;
  padding: 0.75rem;
  display: grid;
  justify-items: start;
  gap: 0.2rem;
  color: var(--papel);
}
.app-chip {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  background: var(--lima);
  color: var(--noche);
}
.app-event-title { font-family: var(--font-display); font-weight: 600; font-size: 1.125rem; letter-spacing: -0.01em; }
.app-event-place { font-size: 0.75rem; color: color-mix(in srgb, var(--papel) 85%, var(--noche)); }

.app-card {
  background: var(--card);
  border-radius: 16px;
  padding: 0.8rem 0.9rem;
  display: grid;
  justify-items: start;
  gap: 0.3rem;
}
.app-tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
}
.app-tag--official { background: var(--verde); color: var(--papel); }
.app-card-title { font-family: var(--font-display); font-weight: 600; font-size: 0.9375rem; letter-spacing: -0.01em; }
.app-card-text { color: var(--ink); }
.app-meta { font-size: 0.75rem; color: var(--muted); }

/* ---------- contacto ---------- */
.contact {
  background: var(--accent);
  color: var(--accent-ink);
  padding: clamp(4rem, 10vw, 8rem) var(--margin);
}

.contact-title {
  font-family: var(--font-display);
  font-size: var(--step-title);
  line-height: 0.95;
  letter-spacing: -0.035em;
  font-weight: 600;
}

.contact-line {
  font-size: var(--step-lead);
  max-width: 30ch;
  margin: 2rem 0;
}

.contact-mail {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 48px;
  padding-inline: 1.25rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--noche);
  background: var(--lima);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.contact-mail:hover { background: color-mix(in srgb, var(--lima) 85%, var(--papel)); }
.contact-mail:focus-visible { outline-color: var(--lima); }

/* ---------- footer ---------- */
.footer {
  padding: 2rem var(--margin);
  font-size: var(--step-small);
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: space-between;
}

/* ---------- accesibilidad y motion ---------- */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.field-dark :focus-visible, .contact :focus-visible { outline-color: var(--lima); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- escritorio: usar el ancho ---------- */
@media (min-width: 1024px) {
  .hero-foot {
    grid-template-columns: 1fr 1fr;
    align-items: end;
  }
  .hero-line { font-size: clamp(2rem, 1rem + 2vw, 3rem); line-height: 1.05; }
  .hero-note { justify-self: end; }

  /* texto a la izquierda, la D en grande a la derecha */
  .field-dark {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: var(--margin);
  }
  .statement-mark {
    order: 0;
    width: min(100%, 30vw);
    justify-self: end;
  }

  /* título a la izquierda, lista a la derecha */
  .work {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: start;
    column-gap: var(--margin);
  }
  .work-list { gap: 3rem; }

  /* producto en dos columnas: texto | maqueta */
  .product {
    grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
    column-gap: var(--margin);
  }
  .product-shot { justify-items: center; }

  .contact {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    column-gap: var(--margin);
    align-items: end;
  }
  .contact-title { grid-row: span 2; align-self: start; }
  .contact-line { margin-top: 0; }
  .contact-mail { justify-self: start; }
}
