/* RESET */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Helvetica, Arial, sans-serif;
  background: #D8DDCE;
  color: #111;
}

/* CONTAINER PRINCIPAL */
.container {
  padding: 55px 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
}

/* COLOR BAR */
.color-bar {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 4px;
}

.color-bar div {
  width: 20px;
  height: 20px;
}

.bar-red    { background: #22b195; }
.bar-green  { background: #2bb78f; }
.bar-yellow { background: #FB6759; }
.bar-orange { background: #ebf346; }
.bar-blue   { background: #6BCBD2; }
.bar-indigo { background: #6BCBD2; }

/* TEXTO NARRATIVO */
.text-block {
  font-family: serif;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  color: #F75445;
  text-align: justify;
  margin-bottom: 40px;
  max-width: 80%;
  line-height: 1.2;
}

.text-block p {
  margin-bottom: 1.1em;
}

/* TITULARES */
h1 {
  font-family: Helvetica, Arial, sans-serif;
  font-size: clamp(8rem, 14vw, 12rem);
  font-weight: bold;
  margin: 25px 0 10px;
  color: #FB6759;
  text-align: left;
  line-height: 1.1;
}

h2 {
  font-family: Helvetica, Arial, sans-serif;
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: bold;
  margin: -20px 0 0;
  color: #FB6759;
  text-align: left;
}

/* TERMINAL INPUT */
.terminal-wrapper {
  width: 100%;
  display: inline-block;
}

.terminal-input {
  font-family: monospace;
  font-size: 1rem;
  padding: 10px;
  border: none;
  border-bottom: 2px solid #FB6759;
  background-color: rgba(255, 255, 255, 0.05);
  color: #FB6759;
  width: clamp(20rem, 62vw, 70rem);
  outline: none;
  caret-color: #2bb78f;
  transition: all 0.3s ease;
}

.terminal-input::placeholder {
  color: #FB6759;
  opacity: 0.5;
  font-style: italic;
}

.terminal-input:focus {
  background-color: rgba(255, 130, 178, 0.07);
  border-bottom-color: #2bb78f;
}

/* RESPUESTA */
#response {
  display: none;
  margin-top: 30px;
  padding: 20px;
  font-family: 'Courier New', Courier, monospace;
  font-size: clamp(0.95rem, 1.1vw, 1.2rem);
  color: #00FF99;
  background-color: #1A1A1A;
  border-radius: 6px;
  max-width: 70%;
  white-space: pre-wrap;
  line-height: 1.6;
  box-shadow: 0 0 10px rgba(0, 255, 153, 0.2);
  transition: all 0.3s ease;
}

#response.visible {
  display: block;
}

/* ASCII ART */

#tiresult {
  font-family: monospace;
  font-size: clamp(0.24rem, 0.45vw, 0.35rem);
  z-index: -1;
  position: absolute;
  right: 20px;
  top: 28%;
  background: transparent;
  color: #376164;
  opacity: 0.8;
  line-height: 1.15;
}

.ascii-art, .grounded-trio {
  font-family: monospace;
  font-size: 12px;
  white-space: pre;
  color: #FB6759;
  text-align: center;
  animation: bob 2.5s ease-in-out infinite;
  line-height: 1.2;
}

.grounded-trio {
  margin-top: 15px;
}

/* MENU VERTICAL */
.vertical-menu {
  position: fixed;
  top: 70px;
  right: 25px;
  writing-mode: vertical-lr;
  text-orientation: mixed;
  transform: rotate(360deg);
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-family: monospace;
  font-size: 0.75rem;
  color: #1a8a74;
}

.vertical-menu a {
  color: #1a8a74;
  text-decoration: none;
  font-weight: bold;
  letter-spacing: 1px;
}

.vertical-menu a:hover {
  text-decoration: underline;
}

/* LANG SWITCH */
.lang-switch {
  position: absolute;
  top: 48px;
  right: 20px;
  font-family: monospace;
  font-size: 0.75rem;
  color: #376164;
  z-index: 10;
}

.lang-link {
  color: #FB6759;
  text-decoration: none;
  margin: 0 4px;
  transition: color 0.2s ease;
}

.lang-link:hover {
  color: #2bb78f;
}

.lang-link.active {
  text-decoration: underline;
  font-weight: bold;
  color: #2bb78f;
}

/* FORMULARIO */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5em;
  margin-top: 3em;
  max-width: clamp(20rem, 62vw, 70rem);
  font-family: monospace;
  color: #FB6759;
}

.contact-form label {
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px;
  font-size: 1rem;
  background-color: rgba(255, 255, 255, 0.05);
  border: none;
  border-bottom: 2px solid #FB6759;
  color: #FB6759;
  font-family: monospace;
  transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-bottom-color: #2bb78f;
  background-color: rgba(255, 130, 178, 0.07);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #FB6759;
  opacity: 0.5;
  font-style: italic;
}

/* FILAS Y COLUMNAS DEL FORMULARIO */
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  width: 100%;
}

.col {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* BOTÓN */
.contact-form button {
  align-self: flex-start;
  padding: 0.75em 1.5em;
  background-color: #2bb78f;
  color: white;
  font-size: 1em;
  border: none;
  cursor: pointer;
  font-family: monospace;
  transition: background 0.3s ease;
}

.contact-form button:hover {
  background-color: #6BCBD2;
}

/* DOTS */
.dots {
  font-size: 16px;
  color:#2bb78f;
  animation: blink 1s step-end infinite;
  margin-top: 10px;
  margin-bottom:10px;
}

/* RESPONSIVE */
@media screen and (max-width: 600px) {
  .container {
    padding: 20px;
  }

  .text-block {
    max-width: 90%;
    padding-top: 20px;
    font-size: clamp(0.6rem, 3.1vw, 1.1rem);
  }

  h1 {
    font-size: clamp(4.2rem, 8vw, 3rem);
  }

  .row {
    flex-direction: column;
  }

  .contact-form button {
    width: 100%;
  }
}

/* ANIMACIONES */
@keyframes bob {
  0%, 100% { transform: translateY(0); opacity: 0.95; }
  50% { transform: translateY(-3px); opacity: 1; }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
