/**
 * Proyectos Técnicos Sostenibles - Stylesheet
 * Archivo: styles.css
 * Descripción: Estilos principales del sitio web
 */

/* ====================================
   VARIABLES CSS
   ==================================== */
:root {
  --bg: #0b1220;          /* blue-black */
  --card: #0f172a;        /* slate-900 */
  --muted: #94a3b8;       /* slate-400 */
  --text: #e5e7eb;        /* gray-200 */
  --brand: #38bdf8;       /* sky-400 */
  --accent: #22d3ee;      /* cyan-400 */
  --ok: #34d399;          /* emerald */
  --warn: #f59e0b;        /* amber */
}

/* ====================================
   RESET Y BASE
   ==================================== */
* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  background: radial-gradient(1200px 700px at 80% -10%, rgba(56, 189, 248, .15), transparent 60%), 
              linear-gradient(180deg, #0b1220, #0b1220);
  color: var(--text);
}

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

/* ====================================
   LAYOUT
   ==================================== */
.container {
  inline-size: clamp(320px, 80vw, 1320px);
  margin: 0 auto;
  padding: 0 20px;
}

/* ====================================
   HEADER Y NAVEGACIÓN
   ==================================== */
header {
  position: sticky;
  top: 0;
  backdrop-filter: saturate(140%) blur(8px);
  background: rgba(11, 18, 32, .75);
  border-bottom: 1px solid rgba(148, 163, 184, .1);
  z-index: 50;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
}

.logo {
  inline-size: 36px;
  block-size: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #fff;
}

.logoimg {
  inline-size: 36px;
  block-size: 36px;
  object-fit: contain;
  display: block;
}

.brand h1 {
  font-size: 16px;
  margin: 0;
  font-weight: 700;
}

.navlinks {
  display: flex;
  gap: 18px;
}

/* ====================================
   BOTONES
   ==================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, .18);
  transition: .2s ease;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: rgba(56, 189, 248, .6);
}

.btn.primary {
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #00131b;
  border-color: transparent;
  font-weight: 700;
}

/* ====================================
   HERO SECTION
   ==================================== */
.hero {
  padding: 80px 0 40px;
}

.hero h2 {
  font-size: clamp(28px, 5vw, 48px);
  line-height: 1.05;
  margin: 0 0 16px;
  font-weight: 900;
}

.hero p {
  font-size: clamp(16px, 2.4vw, 20px);
  color: var(--muted);
  max-width: 780px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(56, 189, 248, .12);
  color: #8be9ff;
  border: 1px solid rgba(56, 189, 248, .25);
  font-weight: 600;
  margin-bottom: 16px;
}

/* ====================================
   GRID Y CARDS
   ==================================== */
.grid {
  display: grid;
  gap: 20px;
}

.cards {
  grid-template-columns: repeat(12, 1fr);
}

.card {
  grid-column: span 4;
  background: var(--card);
  border: 1px solid rgba(148, 163, 184, .15);
  border-radius: 18px;
  padding: 20px;
  min-height: 180px;
  position: relative;
  overflow: hidden;
}

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

.card p {
  margin: 0;
  color: var(--muted);
}

.card .kicker {
  display: inline-block;
  font-size: 12px;
  color: #9decff;
  margin-bottom: 6px;
}

.card:after {
  content: "";
  position: absolute;
  inset: auto -20% -60% auto;
  width: 240px;
  height: 240px;
  background: radial-gradient(120px 120px at 50% 50%, rgba(34, 211, 238, .18), transparent 60%);
}

.card .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 28px;
  block-size: 28px;
  border-radius: 999px;
  background: rgba(56, 189, 248, .12);
  border: 1px solid rgba(56, 189, 248, .25);
  margin-bottom: 6px;
  font-size: 16px;
}

.ico {
  inline-size: 18px;
  block-size: 18px;
  stroke: var(--brand);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ====================================
   SECTIONS
   ==================================== */
.section {
  padding: 60px 0;
}

.section h2 {
  font-size: 28px;
  margin: 0 0 14px;
}

.section p.lead {
  color: var(--muted);
  max-width: 760px;
}

.list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 12px;
}

.list li {
  list-style: none;
  padding: 10px 12px;
  border: 1px dashed rgba(148, 163, 184, .25);
  border-radius: 12px;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 18px;
}

.note {
  font-size: 14px;
  color: var(--muted);
}

/* ====================================
   TAGS Y PILLS
   ==================================== */
.tag {
  display: inline-block;
  font-size: 12px;
  color: #0b1220;
  background: linear-gradient(135deg, var(--ok), #7af0cf);
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 700;
}

.pill {
  display: inline-block;
  font-size: 12px;
  color: #0b1220;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 700;
}

/* ====================================
   FORMULARIOS
   ==================================== */
.form {
  background: var(--card);
  border: 1px solid rgba(148, 163, 184, .15);
  border-radius: 18px;
  padding: 20px;
}

.form .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 14px;
  color: var(--muted);
}

.input,
.textarea,
select {
  appearance: none;
  border: 1px solid rgba(148, 163, 184, .25);
  background: rgba(2, 6, 23, .25);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  outline: none;
  font-family: inherit;
  font-size: inherit;
}

.input:focus,
.textarea:focus {
  border-color: rgba(56, 189, 248, .6);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, .15);
}

.help {
  font-size: 12px;
  color: var(--muted);
}

.alert {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, .25);
  display: none;
}

.alert.ok {
  border-color: rgba(52, 211, 153, .45);
  background: rgba(52, 211, 153, .08);
}

.alert.err {
  border-color: rgba(245, 158, 11, .45);
  background: rgba(245, 158, 11, .08);
}

/* ====================================
   FOOTER
   ==================================== */
footer {
  padding: 40px 0;
  border-top: 1px solid rgba(148, 163, 184, .12);
  background: rgba(2, 6, 23, .4);
}

.footgrid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 20px;
}

ul.clean {
  margin: 8px 0 0;
  padding: 0;
}

ul.clean li {
  list-style: none;
  margin: 6px 0;
}

/* ====================================
   COOKIE BANNER
   ==================================== */
#cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
  display: none;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  background: rgba(11, 18, 32, .96);
  border-top: 1px solid rgba(148, 163, 184, .2);
}

#cookie-banner p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  flex: 1;
}

.cookie-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cookie-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, .25);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
}

.cookie-btn.primary {
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #00131b;
  border-color: transparent;
  font-weight: 700;
}

.cookie-link {
  color: var(--brand);
  text-decoration: underline;
}

.cookie-prefs {
  display: none;
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

#cookie-banner.open .cookie-prefs {
  display: block;
}

/* ====================================
   RESPONSIVE
   ==================================== */
@media (max-width: 960px) {
  .card {
    grid-column: span 6;
  }
  
  .footgrid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .card {
    grid-column: span 12;
  }
  
  nav .navlinks {
    display: none;
  }
  
  .list {
    grid-template-columns: 1fr;
  }
  
  .form .row {
    grid-template-columns: 1fr;
  }
}

