*{
  box-sizing:border-box;
}

html{
  scroll-behavior:smooth;
}

body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial;
  color:#172033;
  background:#f7f9fc;
}

a{
  color:inherit;
  text-decoration:none;
}

.wrap{
  width:min(1120px,calc(100% - 32px));
  margin:auto;
}

/* HEADER */

.topbar{
  position:sticky;
  top:0;
  z-index:20;
  background:rgba(255,255,255,.94);
  border-bottom:1px solid #e8edf5;
}

.nav{
  min-height:68px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  font-weight:850;
}

.site-logo{
  width:48px;
  height:48px;
  object-fit:cover;
  border-radius:50%;
  display:block;
  flex-shrink:0;
}

.nav nav{
  display:flex;
  gap:20px;
  font-size:14px;
}

/* HERO */

.hero{
  background:linear-gradient(
    135deg,
    #10213d,
    #0b4a78 60%,
    #0d7fb3
  );
  color:#fff;
  padding:76px 0;
}

.hero-grid{
  display:grid;
  grid-template-columns:1.25fr .75fr;
  gap:44px;
  align-items:center;
}

.hero h1{
  font-size:clamp(38px,6vw,70px);
  line-height:.98;
  margin:10px 0 20px;
}

.hero p{
  font-size:18px;
  line-height:1.65;
  color:#d9e7f5;
}

.eyebrow{
  font-size:12px;
  letter-spacing:.15em;
  font-weight:800;
  color:#2797cf;
}

.hero .eyebrow{
  color:#9edcff;
}

.hero-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:26px;
}

/* BOTONES */

.btn{
  border:0;
  border-radius:12px;
  padding:12px 17px;
  font:inherit;
  font-weight:750;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.btn.primary{
  background:#1ea6e8;
  color:white;
}

.btn.ghost{
  background:rgba(255,255,255,.12);
  color:white;
  border:1px solid rgba(255,255,255,.25);
}

.btn.small{
  padding:9px 13px;
  background:#eaf3f8;
  color:#0f5c82;
}

/* TARJETA HERO */

.hero-card{
  background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.18);
  border-radius:24px;
  padding:26px;
}

.hero-temp{
  font-size:68px;
  font-weight:850;
}

.hero-meta{
  display:flex;
  gap:16px;
  margin-top:16px;
  font-size:13px;
}

/* SECCIONES */

.section{
  padding:62px 0;
}

.section.soft{
  background:#eef4f8;
}

.section-head{
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:18px;
  margin-bottom:24px;
}

.section h2{
  font-size:34px;
  margin:5px 0;
}

/* TABS CIUDADES */

.city-tabs{
  display:flex;
  gap:8px;
  margin-bottom:16px;
}

.tab{
  border:1px solid #d8e2ec;
  background:#fff;
  border-radius:999px;
  padding:9px 14px;
  cursor:pointer;
}

.tab.active{
  background:#172033;
  color:#fff;
}

/* CLIMA */

.weather-grid{
  display:grid;
  grid-template-columns:1.2fr .8fr;
  gap:18px;
}

.card{
  background:#fff;
  border:1px solid #e3eaf1;
  border-radius:20px;
  padding:22px;
}

.weather-main{
  background:linear-gradient(
    145deg,
    #132a49,
    #1b5f8f
  );
  color:white;
  border:none;
}

.weather-top{
  display:flex;
  justify-content:space-between;
  gap:20px;
}

.big-temp{
  font-size:72px;
  font-weight:850;
}

.weather-icon{
  font-size:58px;
}

.metrics{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:10px;
  margin-top:28px;
}

.metrics div{
  background:rgba(255,255,255,.10);
  border-radius:14px;
  padding:12px;
}

.metrics span,
.metrics strong{
  display:block;
}

.metrics span{
  font-size:11px;
  opacity:.7;
}

.forecast-row{
  display:grid;
  grid-template-columns:1fr auto auto;
  gap:12px;
  padding:12px 0;
  border-bottom:1px solid #edf1f5;
}

.tiny,
.source-note{
  font-size:12px;
  color:#6f7b89;
}

.weather-main .tiny{
  color:#bcd2e4;
}

/* REPORTES */

.reports-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:16px;
}

.report-card{
  background:#fff;
  border-radius:18px;
  padding:20px;
  border:1px solid #dfe7ee;
}

.report-card p{
  color:#586575;
  line-height:1.55;
}

/* GENERADOR WIDGET */

.builder-grid{
  display:grid;
  grid-template-columns:.8fr 1.2fr;
  gap:20px;
}

.form-card{
  display:grid;
  gap:16px;
  align-content:start;
}

.form-card label{
  display:grid;
  gap:7px;
  font-weight:700;
  font-size:14px;
}

.form-card select{
  padding:12px;
  border:1px solid #d7e0e8;
  border-radius:12px;
  background:#fff;
  font-size:16px;
}

.form-card .check{
  display:flex;
  align-items:center;
  gap:9px;
}

.widget-preview{
  width:100%;
  height:265px;
  border:0;
  border-radius:18px;
}

.code-label{
  display:block;
  font-size:13px;
  font-weight:700;
  margin:12px 0 6px;
}

.embed-code{
  width:100%;
  height:92px;
  padding:12px;
  border:1px solid #d7e0e8;
  border-radius:12px;
  resize:vertical;
}

/* ALERTAS */

.alert{
  border-radius:15px;
  padding:16px 18px;
  font-weight:700;
}

.alert.info{
  background:#e9f4ff;
  color:#0b4f7a;
}

.alert.warning{
  background:#fff5da;
  color:#745106;
}

.alert.danger{
  background:#ffe5e5;
  color:#8a1717;
}

.hidden{
  display:none;
}

/* FOOTER */

footer{
  background:#101826;
  color:#dce7f2;
  padding:34px 0;
}

.footer-grid{
  display:flex;
  justify-content:space-between;
  gap:20px;
}

.footer-grid p{
  color:#91a1b2;
}

.footer-grid a{
  color:#dce7f2;
}

.footer-grid a:hover{
  text-decoration:underline;
}

.footer-grid > div:last-child{
  display:grid;
  gap:8px;
}

/* RESPONSIVE */

@media(max-width:800px){

  .nav nav{
    display:none;
  }

  .hero-grid,
  .weather-grid,
  .builder-grid{
    grid-template-columns:1fr;
  }

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

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

  .site-logo{
    width:42px;
    height:42px;
  }

  .brand{
    gap:9px;
    font-size:14px;
  }

  .hero{
    padding:54px 0;
  }

  .section{
    padding:44px 0;
  }
}