/* ==========================================================================
   TOOLZ — design system
   by samudiaz® · keep walking
   ========================================================================== */

/* TOKENS ----------------------------------------------------------------- */
:root {
  /* color */
  --bg:        #232323;
  --bg-soft:   #2a2a2a;
  --bg-line:   rgba(240, 236, 227, 0.08);
  --cream:     #f0ece3;
  --cream-dim: rgba(240, 236, 227, 0.55);
  --cream-low: rgba(240, 236, 227, 0.25);
  --teal:      #24ada5;
  --teal-soft: rgba(36, 173, 165, 0.15);
  --red:       #e25d4a;
  --green:     #4ac28a;

  /* type */
  --font-display: 'neue-haas-grotesk-display', 'Helvetica Neue', Arial, sans-serif;
  --font-mono:    'DM Mono', 'SF Mono', 'Menlo', 'Courier New', monospace;
  --font-tag:     'Kelsi', 'Permanent Marker', cursive;

  /* spacing */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;

  /* radius */
  --r-sm: 2px;
  --r:    4px;
  --r-lg: 8px;

  /* motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 150ms var(--ease);
  --t:      280ms var(--ease);
  --t-slow: 600ms var(--ease);

  /* layout */
  --maxw: 1280px;
  --header-h: 72px;
}

/* KELSI — fuente del wordmark (subir el archivo .woff2 a /assets/fonts/) -- */
@font-face {
  font-family: 'Kelsi';
  src: url('../fonts/kelsi.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* RESET ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 400;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; transition: var(--t-fast); }
a:hover { color: var(--teal); }
::selection { background: var(--teal); color: var(--bg); }

/* TYPE HELPERS ----------------------------------------------------------- */
.font-display { font-family: var(--font-display); }
.font-mono    { font-family: var(--font-mono); }
.font-tag     { font-family: var(--font-tag); }

.txt-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream-dim);
}
.txt-display {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--cream);
}
.txt-h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--cream);
}
.txt-h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--cream);
}
.txt-body  { font-size: 14px; color: var(--cream); }
.txt-dim   { color: var(--cream-dim); }
.txt-low   { color: var(--cream-low); }
.txt-teal  { color: var(--teal); }

/* LAYOUT ----------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--s-5);
}

.section { padding: var(--s-9) 0; }
.section-sm { padding: var(--s-7) 0; }

.stack > * + * { margin-top: var(--s-4); }
.stack-lg > * + * { margin-top: var(--s-6); }

.row { display: flex; gap: var(--s-4); align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: var(--s-4); align-items: center; justify-content: space-between; flex-wrap: wrap; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--s-4); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s-4); }

/* HEADER ----------------------------------------------------------------- */
.tz-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: var(--bg);
  border-bottom: 1px solid var(--bg-line);
  backdrop-filter: blur(12px);
}
.tz-header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
}
.tz-logo {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-tag);
  font-size: 28px;
  line-height: 1;
  color: var(--cream);
  letter-spacing: 0.01em;
}
.tz-logo:hover { color: var(--cream); }
.tz-logo img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  /* el queco ya viene en negro, lo invertimos para fondo oscuro */
  filter: invert(1);
}
.tz-logo .dot { color: var(--teal); }

.tz-nav { display: flex; gap: var(--s-5); align-items: center; }
.tz-nav a {
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: lowercase;
  color: var(--cream-dim);
}
.tz-nav a:hover, .tz-nav a.active { color: var(--cream); }
.tz-nav .ext::after { content: ' ↗'; color: var(--cream-low); }

@media (max-width: 600px) {
  .tz-nav a:not(.home) { display: none; }
}

/* FOOTER ----------------------------------------------------------------- */
.tz-footer {
  border-top: 1px solid var(--bg-line);
  padding: var(--s-6) 0;
  margin-top: var(--s-9);
}
.tz-footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-4);
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--cream-low);
  letter-spacing: 0.04em;
}
.tz-footer a { color: var(--cream-dim); }

/* TOOL HEADER (intro de cada tool) -------------------------------------- */
.tz-tool-intro {
  padding: var(--s-7) 0 var(--s-6);
  border-bottom: 1px solid var(--bg-line);
}
.tz-tool-intro .layer {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--teal);
  margin-bottom: var(--s-3);
  padding: 4px 8px;
  border: 1px solid var(--teal);
  border-radius: var(--r-sm);
}
.tz-tool-intro h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: var(--s-3);
}
.tz-tool-intro .desc {
  font-size: 15px;
  color: var(--cream-dim);
  max-width: 60ch;
}

/* BUTTONS ---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  height: 44px;
  padding: 0 var(--s-5);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  border-radius: var(--r);
  cursor: pointer;
  transition: var(--t-fast);
  white-space: nowrap;
}
.btn-primary {
  background: var(--teal);
  color: var(--bg);
}
.btn-primary:hover { background: var(--cream); color: var(--bg); }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--bg-line);
  color: var(--cream);
}
.btn-ghost:hover { border-color: var(--cream); }

.btn-sm { height: 32px; padding: 0 var(--s-3); font-size: 11px; }
.btn-block { width: 100%; }

.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* INPUTS ----------------------------------------------------------------- */
.field {
  display: block;
  margin-bottom: var(--s-4);
}
.field-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cream-dim);
  margin-bottom: var(--s-2);
}
.field-help {
  font-size: 11px;
  color: var(--cream-low);
  margin-top: var(--s-1);
}

.input,
.textarea,
.select {
  display: block;
  width: 100%;
  padding: var(--s-3) var(--s-4);
  background: var(--bg-soft);
  border: 1px solid var(--bg-line);
  border-radius: var(--r);
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: 14px;
  transition: var(--t-fast);
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--teal);
}
.input::placeholder, .textarea::placeholder {
  color: var(--cream-low);
}
.textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.5;
}

/* DROP ZONE -------------------------------------------------------------- */
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: var(--s-8) var(--s-5);
  border: 1.5px dashed var(--bg-line);
  border-radius: var(--r-lg);
  background: var(--bg-soft);
  text-align: center;
  cursor: pointer;
  transition: var(--t-fast);
  min-height: 240px;
}
.dropzone:hover, .dropzone.over {
  border-color: var(--teal);
  background: var(--teal-soft);
}
.dropzone-title { font-size: 14px; color: var(--cream); }
.dropzone-hint  { font-size: 12px; color: var(--cream-low); }
.dropzone input[type=file] { display: none; }

/* CARDS ------------------------------------------------------------------ */
.card {
  background: var(--bg-soft);
  border: 1px solid var(--bg-line);
  border-radius: var(--r);
  padding: var(--s-5);
}
.card:hover { border-color: var(--cream-low); }

/* TOOL CARD (en la landing) --------------------------------------------- */
.tool-card {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding: var(--s-5);
  background: var(--bg-soft);
  border: 1px solid var(--bg-line);
  border-radius: var(--r);
  transition: var(--t);
  position: relative;
  min-height: 180px;
}
.tool-card:hover {
  border-color: var(--teal);
  transform: translateY(-2px);
}
.tool-card[data-status="soon"]   { opacity: 0.55; }
.tool-card[data-status="soon"]:hover { opacity: 1; transform: none; border-color: var(--cream-low); cursor: not-allowed; }
.tool-card .layer {
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--teal);
}
.tool-card .name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.tool-card .desc {
  font-size: 12px;
  color: var(--cream-dim);
  flex: 1;
}
.tool-card .status {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--cream-low);
  margin-top: auto;
}

/* BADGES ----------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: var(--r-sm);
  text-transform: uppercase;
}
.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.badge-live { color: var(--green); border: 1px solid currentColor; }
.badge-soon { color: var(--cream-low); border: 1px solid currentColor; }
.badge-idea { color: var(--teal); border: 1px solid currentColor; }

/* OUTPUT BOX (resultado de las tools) ----------------------------------- */
.output {
  background: var(--bg-soft);
  border: 1px solid var(--bg-line);
  border-left: 2px solid var(--teal);
  border-radius: var(--r);
  padding: var(--s-5);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  color: var(--cream);
  white-space: pre-wrap;
  word-break: break-word;
}

/* TOAST ------------------------------------------------------------------ */
.tz-toast {
  position: fixed;
  bottom: var(--s-5);
  left: 50%;
  transform: translateX(-50%) translateY(40px);
  background: var(--cream);
  color: var(--bg);
  padding: var(--s-3) var(--s-5);
  border-radius: var(--r);
  font-size: 13px;
  letter-spacing: 0.02em;
  opacity: 0;
  pointer-events: none;
  transition: var(--t);
  z-index: 100;
}
.tz-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* LOADER (queco caminando) ---------------------------------------------- */
.tz-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  padding: var(--s-7) 0;
}
.tz-loader img { width: 80px; height: 80px; filter: invert(1); }
.tz-loader-text {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cream-low);
}

/* UTILS ------------------------------------------------------------------ */
.hidden { display: none !important; }
.flex-1 { flex: 1; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: var(--s-2); }
.mt-4 { margin-top: var(--s-4); }
.mt-5 { margin-top: var(--s-5); }
.mt-6 { margin-top: var(--s-6); }
.mb-2 { margin-bottom: var(--s-2); }
.mb-4 { margin-bottom: var(--s-4); }
.mb-5 { margin-bottom: var(--s-5); }
.mb-6 { margin-bottom: var(--s-6); }
.gap-2 { gap: var(--s-2); }
.gap-4 { gap: var(--s-4); }

/* PRINT ------------------------------------------------------------------ */
@media print {
  .tz-header, .tz-footer { display: none; }
  body { background: white; color: black; }
}
