/*
THE BEACH LAB CSS STYLE
CODED FROM SCRATCH AS I LEARN CSS
*/

/*---- fonts ----*/

@font-face {
  font-family: 'Univers Light';
  font-style: normal;
  font-weight: normal;
  src: url('../files/univers-light.woff2') format('woff2');
}

@font-face {
  font-family: 'Univers Thin';
  font-style: normal;
  font-weight: normal;
  src: url('../files/univers-thin.woff2') format('woff2');
}

html, body {
  margin: 0; /* no margins around the page */
  height: 100%; /* expand to browser height */
  width: 100%;
  font-family: 'Univers Thin';
  background-color: #f7f5ef;
  color: #0c0c0c;
}

:root {
  --tbl-scale: clamp(20px, 2.5vw, 40px);
}

body {
  overflow-x: hidden;
}

/* title */
.tbllogo {
  padding-top: 40px;
  padding-bottom: 40px;
}

.tbllogo-img {
  display: block;
  height: calc(var(--tbl-scale) * 4.5);
  width: auto;
}

.slogan {
  padding-top: 40px;
}

.motto-sub {
  display: inline-block;
  font-size: clamp(10px, 1.2vw, 0.75em);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.tex_big {
  font-size: var(--tbl-scale);
}

.tex_small {
  font-size: clamp(10px, 1.25vw, 20px);
}

/* subtitle */
h2 {  
  font-size: clamp(20px, 3vw, 40px);
  margin: 0;
}

p { /* paragraph */
  font-size: 25px;
  line-height: 1.2em;
}

a { /*link */
  color: inherit;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}

section {
}

.title {
  justify-content: center;
  align-items: center;
	height: 100vh;
  width: 100%;
}

.light-text{
  color: white;
}

.dark-text{
  color: black;
}

.gradient-violet {
  background-image: linear-gradient(to bottom,  #db38b5,#01b3e3);
}

.gradient-blue {
  background-image: linear-gradient(to bottom, #01b3e3,#25ce7b);
}

.gradient-cyan {
  background-image: linear-gradient(to bottom, #25ce7b,#fdc741);
}

.gradient-green {
  background-image: linear-gradient(to bottom, #fdc741,#ff6b01);
}

.gradient-yellow {
  flex-flow: column nowrap;
  justify-content: center;
  align-items: center;
  background-image: linear-gradient(to bottom,#ff6b01,#fc4236);
}

.wrap-reverse {
  flex-direction: row-reverse;
  flex-wrap: wrap;
}


.pad_sl {
  padding-left: 20px;
}

.align_bottom {
  align-items: flex-end;
}

/* images fx */
img.round { /* rounded images */
  border-radius: 50%;
}
img.bw { /* bw images */
  -webkit-filter: grayscale(100%); /* Safari 6.0 - 9.0 */
  filter: grayscale(100%);
}

.left {
  width: 50%;
  padding-right: 10px;
  padding-top: 40px;
  display: flex;
  justify-content: flex-end;
}

.leftfooter {
  width: 33.333%;
  padding-top: 40px;
  padding-bottom: 40px;
}

.centerfooter {
  width: 33.333%;
  padding-top: 40px;
  padding-bottom: 40px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.rightfooter {
  width: 33.333%;
  padding-top: 40px;
  padding-bottom: 40px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.right {
  width: 50%;
  padding-top: 40px;
}

.logo { /* logo row */
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 60%;
}

.flex-img {
  flex: 40%;
}

.flex-img img {
  max-width:100%;
  width:auto;
}

.flex-text {
  flex: 40%;
}

/* Responsive layout - makes a one column layout instead of a two-column layout */
@media (max-width: 800px) {
  .capsule {
    flex-flow: column nowrap;
    align-items: center;
    }
  .flex-img, .flex-text {
      flex: 100%;
    }
  .logo img {
    max-width: 100vw;
    width: auto;
  }
}

.panel {
  height: 100%;
  width: 100%;
}
.panel.green {
  margin-bottom: 400px
}

footer {
  padding: 0 40px;
  box-sizing: border-box;
}

header {
  width: 100%;
  padding: 10px 40px;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
  column-gap: 12px;
}

.header-row {
  display: contents;
}


.tex_left {
  text-align: left;
}

.tex_center {
  text-align: center;
}

.tex_right {
  text-align: right;
}

.border {
  border: 1px solid black;
}

.white_bg {
  background-color: #ffffff; 
}

.yellow_bg {
  background-color: #F9E231;
}

.font_light {
  font-family: 'Univers Light';
}

.font_thin {
  font-family: 'Univers Thin';
}

.flex {
  display: flex;
}

.wrap {
  flex-wrap: wrap;
}

.section {
  padding: 80px 6vw;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.section.no-pad {
  padding: 0;
  margin: 0;
  border-top: none;
  position: relative;
  touch-action: pan-y;
}

.section.no-pad iframe {
  width: 100%;
  height: 80vh;
  border: 0;
  display: block;
  pointer-events: none;
}

/* iOS Safari: capture gesture on top of iframe area so vertical drag scrolls the page */
.section.no-pad::after {
  content: '';
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: auto;
  touch-action: pan-y;
}

/* Telemetry dashboard (Dieter Rams inspired, 3-color palette) */
:root {
  --telemetry-bg: #f7f5ef;
  --telemetry-ink: #1a1a1a;
  --telemetry-accent: #17644c;
}

.telemetry {
  border: 0;
  background: transparent;
  color: var(--telemetry-ink);
  padding: 20px 0;
}

#stream.section {
  background: var(--telemetry-bg);
}

#stream.section.white_bg {
  background: var(--telemetry-bg);
}

.telemetry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-bottom: 8px;
  padding-left: 0;
}

.telemetry-host-wrap {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-left: 0;
  padding-left: 0;
}

.telemetry-title {
  margin: 0;
  margin-left: 0;
  padding-left: 0;
  font-family: 'Univers Thin', sans-serif;
  font-weight: 400;
  font-size: clamp(20px, 2.5vw, 40px);
  line-height: 1;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #9ab7ac;
}

.status-dot.live {
  background: #6ea893;
}

.status-dot.error {
  background: #7e847f;
}

.telemetry-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.telemetry-state-text {
  font-size: 14px;
}

.telemetry-retry {
  border: 1px solid var(--telemetry-ink);
  background: transparent;
  color: var(--telemetry-ink);
  font-family: inherit;
  font-size: 14px;
  line-height: 1;
  padding: 8px 10px;
  cursor: pointer;
}

.telemetry-retry:hover,
.telemetry-retry:focus-visible {
  background: var(--telemetry-accent);
  color: var(--telemetry-bg);
  outline: none;
}

.telemetry-message {
  margin-top: 12px;
  border: 1px solid var(--telemetry-ink);
  padding: 10px;
  font-size: 14px;
}

.telemetry-error {
  border-color: var(--telemetry-accent);
  color: var(--telemetry-accent);
}

.telemetry-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.telemetry-kpi {
  border: 1px solid var(--telemetry-ink);
  padding: 10px;
}

.telemetry-kpi h3 {
  margin: 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.telemetry-kpi p {
  margin: 6px 0 0;
  font-size: clamp(18px, 2vw, 30px);
  line-height: 1.1;
}

.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.telemetry-panel {
  border: 1px solid var(--telemetry-ink);
  padding: 10px;
}

.telemetry-panel h3 {
  margin: 0 0 8px;
  font-size: 13px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.telemetry-chart {
  min-height: 220px;
}

.telemetry-svg {
  width: 100%;
  height: 220px;
  display: block;
}

.telemetry-axis path,
.telemetry-axis line {
  stroke: var(--telemetry-ink);
  opacity: 0.35;
}

.telemetry-axis text {
  fill: var(--telemetry-ink);
  font-family: 'Univers Thin', sans-serif;
  font-size: 11px;
}

.telemetry-line-cpu {
  stroke: var(--telemetry-ink);
}

.telemetry-line-ram {
  stroke: var(--telemetry-ink);
  stroke-dasharray: 7 4;
}

.telemetry-line-disk {
  stroke: var(--telemetry-ink);
  stroke-linecap: round;
  stroke-dasharray: 1 4;
}

.telemetry-line-speed-down {
  stroke: var(--telemetry-ink);
}

.telemetry-line-speed-up {
  stroke: var(--telemetry-ink);
  stroke-dasharray: 7 4;
}

.telemetry-line-speed-ping {
  stroke: var(--telemetry-ink);
  stroke-linecap: round;
  stroke-dasharray: 1 4;
}

.telemetry-line {
  fill: none;
  stroke-width: 2;
}

.telemetry-legend {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  font-size: 11px;
  text-transform: uppercase;
}

.telemetry-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.telemetry-last-update {
  margin: 10px 0 0;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.telemetry-status-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.contact-links {
  display: inline-flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 10px;
}

.footer-social {
  margin-top: 10px;
  margin-bottom: 0;
  justify-content: center;
}

.contact-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  line-height: 1;
  color: #1a1a1a;
  text-decoration: none;
}

.contact-icon-link:hover,
.contact-icon-link:focus-visible {
  color: #17644c;
  outline: none;
}

.contact-address {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
}

.telemetry-legend-swatch {
  --swatch-color: var(--telemetry-ink);
  width: 16px;
  height: 0;
  border-top: 2px solid var(--swatch-color);
}

.telemetry-legend-swatch.solid {
  border-top-style: solid;
}

.telemetry-legend-swatch.dash {
  border-top-style: dashed;
}

.telemetry-legend-swatch.dot {
  border-top-style: dotted;
}

@media (max-width: 980px) {
  .telemetry-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .telemetry-grid {
    grid-template-columns: 1fr;
  }
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.grid {
  display: grid;
  gap: 20px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  padding: 24px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #ffffff;
  display: grid;
  gap: 12px;
  min-height: 160px;
}

.card.alt {
  background: #f7f5ef;
}

.card-title {
  font-size: clamp(18px, 2vw, 30px);
  font-family: 'Univers Light';
}

.card-meta {
  font-size: clamp(10px, 1.1vw, 16px);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.card-body {
  font-size: 18px;
  margin: 0;
}

.card-link {
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.image-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}

.image-strip img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
}

.stream-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  padding: 24px;
  background: #ffffff;
}

.stream-payload {
  grid-column: span 2;
  padding: 18px;
  background: #f3f0e8;
  border: 1px solid rgba(0, 0, 0, 0.12);
  font-size: 16px;
  min-height: 120px;
}

.language-switch {
  margin-top: 14px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  display: none;
}

.language-switch a {
  color: inherit;
  text-decoration: none;
  padding: 2px 6px;
  border: 1px solid rgba(0, 0, 0, 0.2);
}

.language-switch .divider {
  margin: 0 4px;
}

.flag-gap {
  margin-left: 18px;
}

/* Diseño para pantallas móviles */
@media (max-width: 767px) {

  header {
    display: grid;
    grid-template-columns: 1fr;
    row-gap: 10px;
    padding-bottom: 8px;
  }

  .header-row {
    display: grid;
    column-gap: 12px;
    align-items: center;
  }

  .header-row-top {
    grid-template-columns: 1fr 1fr;
  }

  .header-row-bottom {
    grid-template-columns: 36fr 33fr 31fr;
  }

  .item1,
  .item2,
  .item3,
  .item4,
  .item5 {
    padding-bottom: 0;
    display: flex;
    align-items: center;
    min-width: 0;
  }

  .item1 {
    justify-content: flex-start;
  }

  .item2 {
    justify-content: flex-end;
    text-align: right;
  }

  .item2 .slogan {
    text-align: right;
    width: auto;
    margin-left: auto;
    align-self: center;
  }

  .item3,
  .item4,
  .item5 {
    justify-content: center;
    padding-top: 0;
    padding-bottom: 4px;
    gap: 10px;
  }

  .item3 {
    justify-content: flex-start;
  }

  .item4 {
    justify-content: center;
  }

  .item5 {
    justify-content: flex-end;
  }

  .item3 .left,
  .item4 .left,
  .item5 .left {
    width: auto;
    padding-top: 0;
    padding-right: 0;
    display: flex;
    justify-content: flex-start;
  }

  .item3 .right,
  .item4 .right,
  .item5 .right {
    width: auto;
    padding-top: 0;
    text-align: left;
  }

  .item5 .right {
    text-align: right;
  }

  .tbllogo,
  .slogan {
    padding-top: 0;
    padding-bottom: 0;
    display: block;
    height: auto;
  }

  .tbllogo {
    align-self: auto;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .image-strip {
    grid-template-columns: 1fr;
  }

  .stream-card {
    grid-template-columns: 1fr;
  }

  .stream-payload {
    grid-column: span 1;
  }

  footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 0 10px;
  }

  .centerfooter,
  .leftfooter,
  .rightfooter {
    width: 100%;
    padding-top: 0;
    padding-bottom: 0;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .centerfooter {
    order: 1;
  }

  .leftfooter {
    order: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 1px;
    align-items: flex-start;
    justify-content: center;
  }

  .rightfooter {
    order: 3;
  }

  .centerfooter > .tex_center:first-child,
  .centerfooter > .tex_center:nth-child(2) {
    display: none;
  }

  .footer-social {
    margin-top: 0;
  }

  .leftfooter .tex_left {
    text-align: left;
    align-self: flex-start;
  }

  .leftfooter .pad_sl {
    padding-left: 8px;
  }

  .rightfooter .tex_right {
    text-align: center;
  }

  .flag-gap {
    margin-left: 40px;
  }
}

/* Diseño para pantallas grandes */
@media (min-width: 768px) {
  header {
    grid-template-columns: 15fr 28fr 20fr 21fr 16fr;
  }

  .item1 { 
    order: 1;
    grid-column: 1;
  }
  .item2 { 
    order: 5; 
    grid-column: 5;
  }
  .item3 { 
    order: 2; 
    grid-column: 2;
  }
  .item4 { 
    order: 3; 
    grid-column: 3;
  }
  .item5 { 
    order: 4;
    grid-column: 4;
  }
}
