/* Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");
/* Import Lexend for the h1 */
@import url("https://fonts.googleapis.com/css2?family=Lexend:wght@500;600;700&display=swap");

:root {
  color-scheme: light;
  --bg: #f7f9fc;
  --text: #1f2a36;
  --text-light: #4a5a6a;
  --accent: #2d7df4;
  --accent: #1a2f4f;
  --accent: linear-gradient(30deg, #1a2f4f, #2d7df4);
  --accent-hover: #1c5fcc;
  --card-bg: #ffffff;
  --radius: 14px;
  --max-width: 780px;
  --shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  --plasma_bg: linear-gradient(
    120deg,
    #0f1a2b,
    #2d7df4,
    #0d1a33,
    #1a2f4f,
    #0f1a2b
  );
  --courtain_height: 3.6em;

  --font: "Inter", system-ui, sans-serif;
  --scroll_width: 4px;
  --scroll_rail_color: #0000;
  --scroll_thumb_color: #1a2fff;
}

*{
  filter: invert(0) !important;
}

html {
  forced-color-adjust: none;
}

body {
  position: absolute;
  width: 100dvw;
  height: 100dvh;
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  display: flex;
  justify-content: center;
  background: #000;
  padding: 0.4em;
  box-sizing: border-box;
}

.container {
  position: relative;
  max-width: var(--max-width);
  width: 100svw;
  max-height: calc(100svh - 3rem);
  overflow: hidden;
  overflow-y: auto;
  padding: 40px 20px;
  border-radius: 4em 0em 4em 1em;
  z-index: 20;
  background: var(--bg);
  background-image: linear-gradient(0deg, var(--bg) , var(--bg)) !important;
}

.container {
  opacity: 0;
}

body.loaded .container {
  opacity: 1;
  transition: 0.8s opacity 0.2s ease;
}

.container {
  background: linear-gradient(
    180deg,
    #f8fafc 0%,
    #eef2f7 35%,
    #dce3ee 65%,
    #c7d1e0 100%
  );
}

/* HEADER */
header {
  position: fixed;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: start;
  z-index: 8;
  background: #f006;
}

.courtain {
  position: sticky;
  width: 110dvw;

  height: var(--courtain_height);
  margin-top: calc(-1 * var(--courtain_height));
  top: calc(-0.92 * var(--courtain_height));

  height: 4.8em;
  margin-top: -7em;
  top: -2.5em;

  margin-left: -3em;
  background: linear-gradient(0deg, #6666, #6006 10%);
  background: linear-gradient(0deg, transparent, transparent);
  background: linear-gradient(0deg, transparent, var(--bg) 10%);
  _backdrop-filter: blur(5px);
  z-index: 6;
  z-index: 9;
}

/* H1 refinado con personalidad */
h1 {
  font-family: "Lexend", system-ui, sans-serif;
  font-size: 1.6em;
  font-weight: 700;
  margin: 0;
  letter-spacing: -1px;
  color: #1a2530;
  color: #2b3641;
  position: relative;
  _display: inline-block;
  padding: 20px 1em 50px;
}

/* H1 con gradiente animado tipo plasma */
h1 {
  margin-top: 0em;
  left: 0;
  _font-weight: 500;
}

h1 span {
  display: none;
}

h1.sticky {
  position: sticky;
  left: 0px;
  z-index: 10;
}

h1.sticky.title_name {
  margin-left: 0.1ex;
  margin-top: 2em;
  top: -2em;
  font-size: 2em;
}

h1.sticky.title_extension {
  margin-left: 0.5ex;
  margin-top: -2em;
  top: -1.2em;
  margin-bottom: 0em;
  padding-bottom: 3em;
}

/* Línea de identidad sutil */
.bar,
h1::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 55%;
  width: 100%;
  height: 4px;
  border-radius: 4px 0 4px 0px;
}

.bar,
h1::after {
  --mask_: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 1) 0px,
    rgba(0, 0, 0, 1) 2px,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, 0) 3px
  );
  /* Máscara de líneas verticales */
  -webkit-mask-image: var(--mask);
  mask-image: var(--mask);
}
h1.sticky::after {
  content: none;
}

.bar {
  position: sticky;
  bottom: auto;
  top: 1.8em;
  width: 16em;
  width: 18em;
  margin-left: 0;
  transform: translate3d(0em, 0em, 0);

  left: 0em;
  z-index: 10;
  transition: 0.4s all 0s ease;
}

body.folded .bar {
  width: 10em;
  transform: translate3d(3em, 0em, 0);
  transition: 0.4s all 0s ease;
}

.plasma {
  background: var(--plasma_bg);
  background-size: 300% 300%;

  -webkit-background-clip: border-box;
  -webkit-text-fill-color: transparent;
  animation: 18s plasmaFlow -2s ease-in-out infinite;
}

.plasma.text {
  -webkit-background-clip: text;
}

/* Animación del gradiente */
@keyframes plasmaFlow {
  0% {
    background-position: 100% 0;
  }
  50% {
    background-position: 0% 0%;
  }
  100% {
    background-position: -200% 0%;
  }
}
@keyframes plasmaFlow {
  0% {
    background-position: 100% 0;
  }
  50% {
    background-position: 0% 0%;
  }
  100% {
    background-position: -200% 0%;
  }
}

h2 {
  position: relative;
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text-light);
  margin-top: 140px;
  margin-bottom: 30px;
  margin-left: 33px;
  _text-indent: 4ex;
  z-index: 7;
  width: 100%;
  _text-align: center;
}

h2 {
  margin-bottom: -130px;
  z-index: 1;
  opacity: 0;
  transform: translate3d(-6em, 0, 0);
  transition:
    0.3s opacity 0s ease,
    0s transform 0.3s ease;
}

#contact {
  opacity: 0;
  transition: 0.3s opacity 0s ease;
  pointer-events: none;
}

body.folded h2,
body.folded #contact {
  opacity: 1;
  transition:
    0.2s opacity 0.1s ease,
    0.3s transform 0s ease;
  pointer-events: all;
}

body.folded h2 {
  transform: translate3d(0em, 0, 0);
  transition:
    0.2s opacity 0.2s ease,
    0.3s transform 0.1s ease;
}

/* SECTIONS (cards) */
.sections {
  position: relative;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  width: 100%;
}

.section {
  flex: 1 1 100%;
  min-width: 100%;
  box-sizing: border-box;
  position: relative;
  background: var(--card-bg);
  padding: 32px;
  border-radius: var(--radius);
  border-radius: 2em 0 var(--radius) 1em;
  _box-shadow: var(--shadow);
  margin-bottom: 40px;
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease;
  border: 1px solid #eef1f5;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  z-index: 3;
}

.section_title_highlight {
  position: relative;
  z-index: 7;
}

.section,
.section_title_highlight {
  opacity: 1;
  transform: translate3d(0dvw, 0, 0);
  transition:
    0.2s opacity 0.1s ease,
    0.4s transform 0.1s ease;
}

.section.first {
  transition:
    0.2s opacity 0s ease,
    0.4s transform 0s ease;
}

body.folded .section,
body.folded .section_title_highlight {
  opacity: 0;
  transform: translate3d(16dvw, 0, 0);
  transition:
    opacity 0.2s ease,
    0s transform 0.2s ease;
}

.section_ {
  box-shadow: 0.5em 0.5em 1em 0 #dfc;
  border: 0.3em solid var(--accent);
  border-right: 0.3em solid #002;
  border-bottom: 0.3em solid #002;

  border: 0.3em solid #002;
  border-right: 0.3em solid var(--accent);
  border-bottom: 0.6em solid var(--accent);
}

._section:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.section h3,
.section_title_highlight > h3 {
  margin-top: 0;
  font-size: 1.45rem;
  font-weight: 600;
  color: #555;
  color: var(--text);
  _text-indent: 0.3em;
}

.section_title_highlight > h3 {
  position: absolute;
  top: 0;
  padding-top: 33px;
  font-size: 1.45rem;
  color: var(--text);
  _text-indent: 1.7em;
  text-indent: 1.4em;
}

.title_highlight_void {
  visibility: hidden;
}

.section p {
  margin: 12px 0;
  color: var(--text-light);
  font-size: 1.05rem;
}

/* CTA */
.cta {
  position: relative;
  text-align: center;
  margin-top: 50px;
}

.cta a {
  display: inline-block;
  background: var(--accent);
  -webkit-text-fill-color: #fff;
  color: white;
  padding: 10px 28px;
  border-radius: var(--radius);
  border-radius: 1em 0 1em 0.6em;
  box-sizing: border-box;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

._cta a {
  border: 0.2em solid #eef;
  border-right: 0.3em solid #ddf;
  border-bottom: 0.3em solid #ddf;
}

.cta a:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

#contact {
  position: fixed;
  bottom: 5em;
  right: 5em;
  right: 53px;
  _width: 100%;
  _transform: translateX(-50%);
  z-index: 10;
}

#container a {
  _display: block;
  _width: 100%;
  font-size: 1.3em;
}

/* FOOTER */
footer {
  text-align: center;
  margin-top: 60px;
  font-size: 0.9rem;
  color: var(--text-light);
}

.container {
  overflow-y: auto;
}

._container::after {
  content: "";
  position: fixed;
  bottom: 0;
  right: 0;
  width: 10px; /* scrollbar width */
  height: 3.5em; /* how much to hide */
  background: #000; /* same as background */
  pointer-events: none;
  border-radius: 10px 0 0 0;
}

/* Chrome, Edge, Safari */
.container::-webkit-scrollbar {
  width: var(--scroll_width); /* ancho de la barra */
}

.container::-webkit-scrollbar-track {
  background: var(--scroll_rail_color); /* rail transparente */
}

.container::-webkit-scrollbar-thumb {
  background: #999; /* color de la barra */
  border-radius: 0; /* rectangular, sin bordes redondeados */
  border: none; /* sin bordes */
  box-shadow: none; /* sin sombras */
  _border-radius: 0 0 var(--scroll_width) 0;
  background: var(--scroll_thumb_color);
}

/* Firefox */
.container {
  scrollbar-width: var(--scroll_width); /* o auto, según prefieras */
  scrollbar-color: #999 var(--scroll_rail_color); /* barra / rail */
}

@media (max-width: 420px) {
  html {
    font-size: 14px;
  }
  h2 {
    font-weight: 500;
  }
  .section {
    font-size: 0.2em;
  }
}

@media (min-width: 719px) {
  :root {
    --scroll_width: 1em;
  }
  .container {
    max-width: unset;
    --side: calc((100dvw - 720px) / 2);
    padding-right: var(--side);
    padding-left: var(--side);
  }
  .bar {
    width: 100%;
  }
  h1,
  h2 {
    opacity: 1;
    width: 100%;
    transform: none;
  }
  h1 span {
    display: unset;
  }
  h1#main_title {
    top: -1.5em;
  }
  h1.title_extension {
    display: none;
  }
  h2 {
    margin-top: 40px;
    margin-bottom: 60px;
  }
  .section {
    min-width: unset;
    box-sizing: unset;
  }
  .section.first {
    _border-radius: 2em 2em var(--radius) 1em;
  }
  .section:not(.last) {
    flex: 0 1 37%;
  }
}

@media (prefers-color-scheme: _dark) {
  :root {
    --plasma_bg: linear-gradient(
      120deg,
      #0f1a2b,
      #2d7df4,
      #0d1a33,
      #1a2f4f,
      #0f1a2b
    );
    --plasma_bg: linear-gradient(120deg, #c0caff, #dadfff, #c0caff);
    --accent: linear-gradient(30deg, #ddddff, #ccccff);
  }
  .cta a {
    -webkit-text-fill-color: #000;
  }
}
