/* ============================================================
   VN15 — DGPC Diseño Gráfico
   ============================================================ */

/* ── Scroll suave global ──────────────────── */
html { scroll-behavior: smooth; }

:root {
  /* Paleta base */
  --clr-bg:          #06080d;
  --clr-surface:     rgba(14, 19, 30, 0.82);
  --clr-surface-2:   rgba(20, 27, 42, 0.94);
  --clr-border:      rgba(38, 55, 80, 0.8);
  --clr-border-2:    rgba(55, 78, 110, 0.9);

  /* Acento principal — azul eléctrico */
  --clr-cyan:        #00d2ff;
  --clr-cyan-dim:    rgba(0, 210, 255, 0.12);
  --clr-cyan-glow:   rgba(0, 210, 255, 0.4);

  /* Acento secundario — violeta */
  --clr-violet:      #7b5ea7;
  --clr-violet-glow: rgba(123, 94, 167, 0.35);

  /* Texto */
  --clr-white:  #dde6f3;
  --clr-grey:   #7e8fa6;
  --clr-grey-2: #49596e;

  /* Tipografías */
  --font-display: 'Barlow Condensed', sans-serif;
  --font-ui:      'Rajdhani', sans-serif;
  --font-mono:    'Share Tech Mono', monospace;

  /* Layout */
  --topbar-h:   76px;
  --mx: 0px;
  --my: 0px;

  /* Transiciones */
  --t-fast: 0.14s ease;
  --t-mid:  0.28s ease;
  --t-slow: 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
.mono  { font-family: var(--font-mono); }
.micro { font-size: 0.63rem; letter-spacing: 0.09em; }

/* ── Cursor personalizado ─────────────────── */
*, *:hover { cursor: none !important; }

#cursor-outer,
#cursor-inner {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  will-change: transform;
  transition: opacity 0.2s ease;
}

#cursor-outer {
  width: 36px;
  height: 36px;
  top: -18px;
  left: -18px;
  transition: width 0.25s ease, height 0.25s ease, opacity 0.2s ease;
}
#cursor-outer svg {
  width: 100%;
  height: 100%;
  animation: cursorSpin 6s linear infinite;
}

#cursor-inner {
  width: 6px;
  height: 6px;
  top: -3px;
  left: -3px;
  background: var(--clr-cyan);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--clr-cyan);
  transition: width 0.15s ease, height 0.15s ease, border-radius 0.15s ease, opacity 0.2s ease;
}

#cursor-cross {
  position: fixed;
  pointer-events: none;
  z-index: 9998;
  top: 0; left: 0;
  width: 100%; height: 100%;
}
#cursor-cross::before,
#cursor-cross::after {
  content: '';
  position: fixed;
  background: rgba(0, 210, 255, 0.06);
  pointer-events: none;
  transition: opacity 0.2s;
}
#cursor-cross::before {
  width: 1px;
  height: 100vh;
  top: 0;
  left: var(--cursor-x, 50%);
  transform: translateX(-50%);
}
#cursor-cross::after {
  width: 100vw;
  height: 1px;
  left: 0;
  top: var(--cursor-y, 50%);
  transform: translateY(-50%);
}

body.cursor-hover #cursor-outer {
  width: 52px;
  height: 52px;
  top: -26px;
  left: -26px;
}
body.cursor-hover #cursor-inner {
  width: 10px;
  height: 10px;
  top: -5px;
  left: -5px;
  border-radius: 2px;
  background: #ffffff;
  box-shadow: 0 0 14px #ffffff;
}

@keyframes cursorSpin { to { transform: rotate(360deg); } }

@media (hover: none) {
  #cursor-outer, #cursor-inner, #cursor-cross { display: none; }
  *, *:hover { cursor: auto !important; }
}

/* ── Body ─────────────────────────────────── */
body {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse 68% 44% at 75% 18%, rgba(0, 210, 255, 0.09) 0%, transparent 60%),
    radial-gradient(ellipse 50% 36% at 18% 82%, rgba(123, 94, 167, 0.1) 0%, transparent 55%),
    radial-gradient(ellipse 40% 40% at 50% 50%, rgba(0, 210, 255, 0.03) 0%, transparent 70%),
    var(--clr-bg);
  color: var(--clr-white);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(255,255,255,0.013) 0 1px,
    transparent 1px 3px
  );
  mix-blend-mode: screen;
  opacity: 0.35;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 0%, rgba(0,210,255,0.035) 48%, transparent 52%);
  animation: lightSweep 11s linear infinite;
}
@keyframes lightSweep {
  from { transform: translateX(-130%) skewX(-12deg); }
  to   { transform: translateX(130%) skewX(-12deg); }
}

#grid-canvas {
  position: fixed;
  inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ── NAVBAR SUPERIOR ──────────────────────── */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  min-height: var(--topbar-h);
  z-index: 100;
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  gap: 24px;
  padding: 0 clamp(18px, 4vw, 52px);
  background: rgba(6, 8, 13, 0.88);
  border-bottom: 1px solid var(--clr-border);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.catedra-logo-img {
  height: clamp(26px, 3.2vw, 42px);
  width: auto;
  max-width: min(28vw, 210px);
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}
.logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.topbar::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--clr-violet) 20%,
    var(--clr-cyan) 50%,
    var(--clr-violet) 80%,
    transparent 100%
  );
  opacity: 0.4;
  pointer-events: none;
}

.topbar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: -28%;
  width: 28%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--clr-cyan), transparent);
  box-shadow: 0 0 20px var(--clr-cyan);
  animation: navScan 4.5s cubic-bezier(0.4,0,0.6,1) infinite;
  pointer-events: none;
}
@keyframes navScan { to { left: 128%; } }

.brand {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-areas:
    'prefix main'
    'status main';
  justify-content: start;
  align-items: center;
  column-gap: 10px;
  line-height: 1;
  transition: opacity var(--t-fast);
}
.brand:hover { opacity: 0.85; }
.brand-prefix {
  grid-area: prefix;
  color: var(--clr-cyan);
  font-size: 0.58rem;
  letter-spacing: 0.18em;
}
.brand-main {
  grid-area: main;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  background: linear-gradient(135deg, var(--clr-white) 40%, var(--clr-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 18px rgba(0,210,255,0.22));
}
.brand-status {
  grid-area: status;
  color: var(--clr-grey-2);
  font-size: 0.55rem;
  letter-spacing: 0.12em;
}

.topnav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid var(--clr-border);
  padding: 5px;
  background: rgba(11, 14, 21, 0.7);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--clr-grey);
  overflow: hidden;
  transition: color var(--t-fast), background var(--t-fast);
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}
.nav-link span {
  color: var(--clr-cyan);
  font-size: 0.6rem;
  opacity: 0.7;
}
.nav-link::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--clr-cyan-dim), transparent);
  transform: translateX(-130%);
  transition: transform var(--t-mid);
}
.nav-link:hover,
.nav-link:focus-visible {
  color: var(--clr-white);
  background: rgba(0,210,255,0.07);
  outline: none;
}
.nav-link:hover::after,
.nav-link:focus-visible::after { transform: translateX(130%); }

.header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  height: 100%;
}
.header-data {
  display: flex;
  flex-direction: column;
  align-items: end;
  color: var(--clr-grey-2);
  line-height: 1.5;
}
#live-time {
  color: var(--clr-cyan);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
}

/* ============================================================
   MAIN / IFRAME FULLSCREEN
   ============================================================ */

main {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 28px;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  min-height: 100vh;
  padding: calc(var(--topbar-h) + 28px) 40px 60px;
  overflow-x: auto;
}

/* main iframe: estilos aplicados via .prototype-card iframe */

.prototypes {
  display: grid;
  gap: 32px;
  padding: 40px;
}

.prototype-card {
  position: relative;
  flex: 0 0 330px;
  min-height: 774px;
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(10, 16, 25, 0.96), rgba(6, 9, 15, 0.98));
  border: 1px solid var(--clr-border-2);
  border-radius: 0;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
  box-shadow:
    0 0 0 1px rgba(0, 210, 255, 0.04),
    0 18px 48px rgba(0, 0, 0, 0.38),
    inset 0 0 24px rgba(0, 210, 255, 0.025);
  overflow: hidden;
}

.prototype-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 52%;
  height: 1px;
  background: linear-gradient(90deg, var(--clr-cyan), transparent);
  opacity: 0.7;
}

.prototype-card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0,210,255,0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(0,210,255,0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.22;
}

.prototype-card h2 {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: 1.45rem;
  line-height: 1;
  margin-bottom: 14px;
  letter-spacing: 0.03em;
  color: var(--clr-white);
}

.prototype-card iframe {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 690px;
  border: 1px solid rgba(0, 210, 255, 0.18) !important;
  border-radius: 0;
  display: block;
  background: #000;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
}

/* Tarjeta de resumen */
.summary-card {
  background:
    radial-gradient(circle at 20% 0%, rgba(0, 210, 255, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(10, 16, 25, 0.98), rgba(6, 9, 15, 0.99));
}

.summary-kicker {
  position: relative;
  z-index: 1;
  display: block;
  margin-bottom: 8px;
  color: var(--clr-cyan);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
}

.summary-content {
  position: relative;
  z-index: 1;
  height: 690px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.flow-summary-block {
  position: relative;
  padding: 18px 16px 16px;
  background: rgba(0, 210, 255, 0.035);
  border: 1px solid rgba(0, 210, 255, 0.18);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
}

.flow-summary-block::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 42%;
  height: 1px;
  background: linear-gradient(90deg, var(--clr-cyan), transparent);
  opacity: 0.8;
}

.flow-summary-block--student {
  margin-top: 12px;
  background: rgba(123, 94, 167, 0.06);
  border-color: rgba(123, 94, 167, 0.24);
}

.flow-summary-block--student::before {
  background: linear-gradient(90deg, var(--clr-violet), transparent);
}

.flow-summary-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}

.flow-summary-index {
  color: var(--clr-cyan);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
}

.flow-summary-block--student .flow-summary-index {
  color: var(--clr-violet);
}

.flow-summary-head h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--clr-white);
}

.flow-summary-block p,
.summary-note p {
  color: #b2bfcd;
  font-size: 0.98rem;
  line-height: 1.65;
  font-weight: 500;
}

.summary-steps {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 210, 255, 0.14);
}

.summary-steps li {
  position: relative;
  padding-left: 15px;
  color: var(--clr-grey);
  font-size: 0.88rem;
  line-height: 1.35;
  font-weight: 600;
}

.summary-steps li::before {
  content: '›';
  position: absolute;
  left: 0;
  top: -1px;
  color: var(--clr-cyan);
  font-weight: 700;
}

.flow-summary-block--student .summary-steps {
  border-top-color: rgba(123, 94, 167, 0.22);
}

.flow-summary-block--student .summary-steps li::before {
  color: var(--clr-violet);
}

.summary-note {
  margin-top: auto;
  padding: 14px 16px;
  border-left: 2px solid var(--clr-cyan);
  background: linear-gradient(90deg, rgba(0, 210, 255, 0.08), transparent);
}

.summary-note span {
  display: block;
  margin-bottom: 6px;
  color: var(--clr-cyan);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 18px clamp(20px, 5vw, 72px);
  border-top: 1px solid var(--clr-border);
  background: rgba(6, 8, 13, 0.92);
  backdrop-filter: blur(10px);
}
.site-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--clr-violet-glow) 30%,
    var(--clr-cyan-glow) 60%,
    transparent 100%
  );
  opacity: 0.35;
}
.footer-left,
.footer-right { color: var(--clr-grey-2); letter-spacing: 0.08em; }
.footer-right  { text-align: right; }

/* ============================================================
   RESPONSIVE
   Breakpoints: 1024, 760, 480
   ============================================================ */

/* Tablet landscape */
@media (max-width: 1024px) {
  .topbar {
    grid-template-columns: auto 1fr auto;
    gap: 16px;
  }
  .header-data { display: none; }
}

/* Tablet portrait */
@media (max-width: 760px) {
  :root {
    --topbar-h: 114px;
  }
  
  main {
    flex-direction: column;
    align-items: center;
    padding: calc(var(--topbar-h) + 20px) 20px 40px;
  }
  
  .prototype-card {
    flex: 0 0 auto;
    width: 100%;
    max-width: 380px;
    min-height: auto;
  }

  .summary-content {
    height: auto;
    min-height: 620px;
  }

  .topbar {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      'brand header'
      'nav   nav';
    gap: 8px 12px;
    padding: 10px 16px;
  }
  .brand        { grid-area: brand; }
  .brand-main   { font-size: 1.9rem; }
  .brand-status,
  .brand-prefix { display: none; }
  .topnav {
    grid-area: nav;
    width: 100%;
    justify-content: space-between;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .topnav::-webkit-scrollbar { display: none; }
  .nav-link {
    flex: 1;
    justify-content: center;
    padding: 8px 10px;
    font-size: 0.84rem;
  }
  .header-right { grid-area: header; gap: 8px; }

  .site-footer {
    flex-direction: column;
    text-align: center;
    gap: 6px;
  }
  .footer-right { text-align: center; }
}

/* Mobile portrait */
@media (max-width: 480px) {
  .nav-link span { display: none; }
  .nav-link { font-size: 0.82rem; padding: 7px 8px; }
}

/* ── Reduced motion ───────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
  #cursor-outer svg { animation: none !important; }
}

/* ============================================================
   AJUSTE: MAIN COMPLETA PANTALLA SIN SCROLL INNECESARIO
   ============================================================ */

html,
body {
  min-height: 100%;
}

body {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 1 auto;
  min-height: 0;
}

.site-footer {
  flex: 0 0 auto;
}

/* En escritorio/tablet horizontal: nav + main + footer entran en la pantalla */
@media (min-width: 761px) {
  body {
    overflow-y: hidden;
  }

  main {
    min-height: 0;
    align-items: stretch;
    padding:
      calc(var(--topbar-h) + clamp(14px, 2vw, 24px))
      clamp(18px, 3vw, 40px)
      clamp(12px, 2vw, 22px);
    overflow-x: auto;
    overflow-y: hidden;
  }

  .prototype-card {
    flex: 0 0 clamp(300px, 27vw, 360px);
    min-height: 0;
    height: auto;
    display: flex;
    flex-direction: column;
    padding: clamp(14px, 1.6vw, 20px);
  }

  .prototype-card h2 {
    flex: 0 0 auto;
    margin-bottom: clamp(8px, 1.2vh, 14px);
  }

  .prototype-card iframe {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
  }

  .summary-card {
    overflow-y: auto;
    scrollbar-width: thin;
  }

  .flow-summary-block {
    padding: clamp(12px, 1.5vh, 18px) clamp(12px, 1.2vw, 16px);
  }

  .flow-summary-block p,
  .summary-note p {
    font-size: clamp(0.84rem, 1.35vh, 0.98rem);
    line-height: 1.5;
  }

  .summary-steps {
    gap: 5px;
    margin-top: 10px;
    padding-top: 10px;
  }

  .summary-steps li {
    font-size: 0.82rem;
    line-height: 1.25;
  }

  .site-footer {
    padding: 12px clamp(20px, 5vw, 72px);
  }

  .footer-left {
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

/* En mobile queda con scroll normal porque las cards se apilan */
@media (max-width: 760px) {
  body {
    overflow-y: auto;
  }

  main {
    flex: 1 1 auto;
  }
}

/* ============================================================
   AJUSTE: SUMMARY CARD DISTRIBUIDA EN TODO EL ALTO
   ============================================================ */

.summary-card {
  display: flex;
  flex-direction: column;
}

.summary-card .summary-kicker,
.summary-card h2 {
  flex: 0 0 auto;
}

.summary-card h2 {
  margin-bottom: 0;
}

.summary-content {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  height: auto;

  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(18px, 3vh, 34px);

  padding-top: clamp(18px, 2.4vh, 28px);
}

.flow-summary-block {
  flex: 1 1 0;
  min-height: 0;

  display: flex;
  flex-direction: column;
  justify-content: center;

  padding:
    clamp(18px, 2.3vh, 28px)
    clamp(16px, 1.6vw, 22px);
}

.flow-summary-block--student {
  margin-top: 0;
}

.flow-summary-head {
  margin-bottom: clamp(10px, 1.4vh, 16px);
}

.flow-summary-block p,
.summary-note p {
  line-height: 1.58;
}

.summary-steps {
  margin-top: clamp(14px, 1.8vh, 22px);
  padding-top: clamp(12px, 1.6vh, 18px);
  gap: clamp(6px, 0.9vh, 10px);
}

/* En pantallas muy bajas, se compacta un poco para evitar scroll innecesario */
@media (min-width: 761px) and (max-height: 760px) {
  .summary-content {
    gap: 16px;
    padding-top: 16px;
  }

  .flow-summary-block {
    justify-content: flex-start;
    padding: 16px 14px;
  }

  .flow-summary-head {
    margin-bottom: 8px;
  }

  .summary-steps {
    margin-top: 10px;
    padding-top: 10px;
    gap: 5px;
  }
}

/* En mobile las cards vuelven a su tamaño natural porque se apilan */
@media (max-width: 760px) {
  .summary-content {
    height: auto;
    min-height: 0;
    gap: 16px;
    padding-top: 16px;
  }

  .flow-summary-block {
    flex: 0 0 auto;
    justify-content: flex-start;
  }
}

