/* ============================================================
   NONSENSE — landing (nonsensestudio.es)
   2 paneles snap · ultra minimalista
   ============================================================ */

:root {
  --ns-black: #222222;
  --ns-acid: #C9ED19;
  --ns-cream: #EDEDE1;
  --ns-taupe: #A99C8B;

  --font-display: 'neue-haas-grotesk-display', 'Helvetica Neue', Inter, system-ui, sans-serif;
  --font-text: 'neue-haas-grotesk-text', 'Helvetica Neue', Inter, system-ui, sans-serif;
}

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

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: var(--ns-cream);
  color: var(--ns-black);
  font-family: var(--font-text);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

::selection { background: var(--ns-acid); color: var(--ns-black); }

/* ============================================================
   Marcas de registro técnicas (fixed, cruzan los 2 paneles)
   ============================================================ */
.reg {
  position: fixed;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 14px;
  color: var(--ns-black);
  opacity: .5;
  z-index: 60;
  pointer-events: none;
  user-select: none;
}
.reg-tl { top: 14px; left: 16px; }
.reg-tr { top: 14px; right: 16px; }
.reg-bl { bottom: 14px; left: 16px; }
.reg-br { bottom: 14px; right: 16px; }

/* ============================================================
   Snap container (2 paneles a 100vh cada uno)
   ============================================================ */
.snap {
  height: 100dvh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.snap::-webkit-scrollbar { display: none; }

.panel {
  height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  flex-direction: column;
  padding: 92px 56px 36px;
  position: relative;
}

/* ============================================================
   Header fijo (compartido por ambos paneles)
   ============================================================ */
.head-fixed {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 30px 56px;
  z-index: 55;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  pointer-events: none;
  box-sizing: border-box;
}
.head-fixed > * { pointer-events: auto; }
.brand {
  display: inline-flex;
  align-items: center;
  color: var(--ns-black);
  flex-shrink: 0;
}
.brand-logo {
  width: 26px;
  height: 26px;
  display: block;
  color: var(--ns-black);
}
.head-meta {
  opacity: .55;
  flex-shrink: 0;
}

/* ============================================================
   Centro (manifiesto o form, centrado vertical y horizontal)
   ============================================================ */
.center {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 16px 0;
  min-height: 0;
}

/* ---- Código pequeño tipo etiqueta técnica ---- */
.code {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .55;
  margin-bottom: 28px;
}

/* ---- Título principal (manifiesto) ---- */
.title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(56px, 9vw, 130px);
  line-height: .82;
  letter-spacing: -0.05em;
  text-transform: lowercase;
  margin: 0;
}

/* ---- Barra acid ---- */
.acid-bar {
  display: inline-block;
  width: 72px;
  height: 8px;
  background: var(--ns-acid);
  margin: 32px 0 32px;
}

/* ---- Párrafo manifiesto ---- */
.lede {
  font-family: var(--font-text);
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.55;
  font-weight: 400;
  max-width: 56ch;
  margin: 0;
  opacity: .85;
}

/* ============================================================
   Prompt de scroll abajo (panel 1)
   ============================================================ */
.foot-prompt {
  flex: 0 0 auto;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.scroll-prompt {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .55;
  transition: opacity .25s ease;
  cursor: pointer;
}
.scroll-prompt:hover { opacity: 1; }
.sp-arrow {
  font-size: 18px;
  display: inline-block;
  animation: nudge 1.8s ease-in-out infinite;
}
@keyframes nudge {
  0%, 100% { transform: translateY(0); opacity: .6; }
  50%      { transform: translateY(6px); opacity: 1; }
}

/* ============================================================
   Panel registro — grid de últimos posts IG
   ============================================================ */
.title-3 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(36px, 5vw, 64px);
  line-height: .85;
  letter-spacing: -0.04em;
  text-transform: lowercase;
  margin: 0;
  text-align: center;
}
.acid-bar-sm {
  width: 48px;
  height: 6px;
  margin: 20px 0 32px;
}
/* Grid manual de trabajos recientes (alimentada por posts.js) */
.work-grid {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
/* Cada tile es un <a> que abre Instagram en pestaña nueva */
.work-tile {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;          /* formato vertical estilo IG */
  background: #111;             /* mientras carga la imagen */
  overflow: hidden;
  border-radius: 0;             /* esquinas rectas, brutalismo */
  filter: grayscale(100%) contrast(1.05);
  transition: filter .35s ease, transform .35s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.work-tile:hover {
  filter: grayscale(100%) contrast(1.18) brightness(1.05);
}
.work-tile:focus-visible {
  outline: 2px solid var(--ns-acid);
  outline-offset: 2px;
}
.work-tile > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #111;
}
/* Mensaje cuando NS_POSTS está vacío */
.work-empty {
  grid-column: 1 / -1;
  text-align: center;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .5;
  padding: 40px 0;
}
.ig-all {
  margin-top: 32px;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .55;
  transition: opacity .18s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ig-all:hover { opacity: 1; }

/* ============================================================
   Panel contacto
   ============================================================ */
.title-2 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(48px, 6.5vw, 88px);
  line-height: .9;
  letter-spacing: -0.05em;
  text-transform: lowercase;
  margin: 0 0 40px;
  text-align: center;
}

/* ---- Form ---- */
.form {
  width: 100%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin: 0 auto;
}
.field { display: flex; flex-direction: column; }
.field input,
.field textarea {
  font-family: var(--font-text);
  font-size: 16px;
  font-weight: 400;
  color: var(--ns-black);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--ns-black);
  border-radius: 0;
  padding: 10px 0 11px;
  outline: none;
  resize: none;
  text-align: center;
  transition: border-color .18s ease, padding .18s ease;
}
.field input::placeholder,
.field textarea::placeholder {
  color: var(--ns-black);
  opacity: .35;
  font-family: var(--font-text);
}
.field input:focus,
.field textarea:focus {
  border-bottom-color: var(--ns-acid);
  border-bottom-width: 2px;
  padding-bottom: 10px;
}
.field textarea { line-height: 1.45; }

/* Honeypot */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Botón + IG en la misma línea */
.form-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  gap: 24px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  color: var(--ns-black);
  border: 1px solid var(--ns-black);
  padding: 12px 22px;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 700;
  border-radius: 0;
  transition: background .18s ease, color .18s ease;
}
.btn:hover:not(:disabled) {
  background: var(--ns-black);
  color: var(--ns-cream);
}
.btn:disabled { opacity: .55; cursor: wait; }
.btn-arrow { font-size: 14px; }

.ig {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  opacity: .65;
  transition: opacity .18s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ig:hover { opacity: 1; }
.ig-arrow { font-size: 13px; }

.form-status {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-top: 8px;
  text-align: center;
  min-height: 1em;
  opacity: 0;
  transition: opacity .25s ease;
}
.form-status.ok,
.form-status.err { opacity: 1; }
.form-status.ok::before {
  content: '';
  display: inline-block;
  width: 7px; height: 7px;
  background: var(--ns-acid);
  margin-right: 10px;
  vertical-align: middle;
}
.form-status.err::before {
  content: '×';
  margin-right: 8px;
  font-weight: 700;
}

/* ============================================================
   Footer (panel 2)
   ============================================================ */
.foot {
  flex: 0 0 auto;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  opacity: .65;
}
.foot-statement {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: lowercase;
  letter-spacing: -0.01em;
  font-size: 13px;
  opacity: .85;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 720px) {
  .panel { padding: 76px 22px 24px; }
  .head-fixed { padding: 22px 22px; font-size: 11px; }
  .brand-logo { width: 22px; height: 22px; }
  .title { font-size: clamp(48px, 13vw, 96px); }
  .title-2 { font-size: clamp(40px, 12vw, 64px); margin-bottom: 32px; }
  .acid-bar { width: 56px; height: 6px; margin: 24px 0; }
  .lede { font-size: 15px; max-width: 38ch; }
  .reg { font-size: 12px; }
  .reg-tl, .reg-tr { top: 10px; }
  .reg-bl, .reg-br { bottom: 10px; }
  .reg-tl, .reg-bl { left: 12px; }
  .reg-tr, .reg-br { right: 12px; }
  .form { gap: 18px; }
  .field input, .field textarea { font-size: 15px; }
  .form-bottom { gap: 16px; }
  .foot { font-size: 10px; gap: 12px; flex-wrap: wrap; }
  .head-meta { font-size: 10px; }

  /* Panel registro responsive */
  .title-3 { font-size: clamp(32px, 11vw, 56px); }
  .acid-bar-sm { margin: 16px 0 24px; }
  .work-grid {
    max-width: 100%;
    grid-template-columns: repeat(2, 1fr); /* tablet: 2 cols */
    gap: 8px;
  }
  .ig-all { margin-top: 24px; font-size: 10px; }
}

@media (max-width: 480px) {
  /* Móvil estrecho: 2 columnas en lugar de 1, mantiene la sensación de grid */
  .work-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
}

@media (max-height: 640px) {
  .panel { padding: 68px 22px 18px; }
  .head-fixed { padding: 18px 22px; }
  .center { padding: 12px 0; }
  .acid-bar { margin: 18px 0; }
  .title-2 { margin-bottom: 20px; }
  .form { gap: 14px; }
}
