@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

/* ==========================================
   TRÓPICO — Official Website
   ========================================== */

:root {
  --navy: #071a2b;
  --navy-light: #102f45;
  --blue: #174b70;
  --teal: #19a8b4;

  --text: #34495e;
  --white: #ffffff;
  --light: #f4f8fa;
  --border: #e3ebef;
}


/* ==========================================
   General
   ========================================== */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: "DM Sans", sans-serif;
  line-height: 1.7;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  color: var(--teal);
}

h1, h2, h3, h4 {
  font-family: "Manrope", sans-serif;
  line-height: 1.25;
}

img {
  max-width: 100%;
}


/* ==========================================
   Header
   ========================================== */

.site-header {
  position: relative;
  z-index: 10;

  display: flex;
  justify-content: space-between;
  align-items: center;

  gap: 30px;
  padding: 14px 6%;

  background: var(--white);
  border-bottom: 1px solid var(--border);
}

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

  color: var(--navy);
  font-family: "Manrope", sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  white-space: nowrap;
}

.brand:hover {
  color: var(--navy);
}

.brand img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.site-header nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 25px;
}

.site-header nav a {
  color: var(--navy);
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.2s;
}

.site-header nav a:hover {
  color: var(--teal);
}


/* ==========================================
   Hero
   ========================================== */

.hero {
  position: relative;

  display: flex;
  align-items: center;

  min-height: 660px;
  overflow: hidden;

  padding: 100px 8% 130px;

  color: white;
  background: var(--navy);
}

.hero-video {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center;

  z-index: 0;
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;

  z-index: 1;

  background: linear-gradient(
    90deg,
    rgba(3, 17, 32, 0.96) 0%,
    rgba(3, 17, 32, 0.88) 25%,
    rgba(3, 17, 32, 0.55) 52%,
    rgba(3, 17, 32, 0.15) 100%
  );

  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.eyebrow {
  margin: 0 0 20px;
  color: #8ce2e1;

  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 3px;
}

.hero h1 {
  margin: 0 0 28px;

  color: white;
  font-size: clamp(2.8rem, 5.4vw, 5.3rem);
  font-weight: 800;
  line-height: 1.13;
  letter-spacing: -2px;
}

.hero h1 span {
  display: block;
  color: #a4e7e5;
}

.hero-description {
  max-width: 580px;
  margin-bottom: 32px;

  color: #d9e9ee;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.8;
}

.button-primary {
  display: inline-flex;
  align-items: center;
  gap: 20px;

  padding: 14px 25px;

  background: white;
  color: var(--navy);

  border-radius: 5px;
  font-size: 0.95rem;
  font-weight: 700;

  transition:
    background 0.2s,
    transform 0.2s;
}

.button-primary:hover {
  background: #dff5f5;
  color: var(--navy);
  transform: translateY(-2px);
}

.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 8%;

  z-index: 2;

  display: flex;
  align-items: center;
  gap: 16px;

  color: #d5e8ee;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 2px;
}

.scroll-indicator:hover {
  color: white;
}

.scroll-arrow {
  font-size: 1.5rem;
  line-height: 1;
}


/* ==========================================
   Sections
   ========================================== */

.section {
  padding: 100px 8%;
}

.section-alt {
  background: var(--light);
}

.container {
  max-width: 1120px;
  margin: 0 auto;
}

.section-label {
  margin: 0 0 15px;

  color: #087f8c;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2.5px;
}

.section h2 {
  margin: 0 0 30px;

  color: var(--navy);
  font-size: clamp(2rem, 3vw, 2.8rem);
  font-weight: 800;
}

.section p {
  max-width: 820px;
}

.intro-text {
  margin-bottom: 30px;

  color: var(--navy-light);
  font-family: "Manrope", sans-serif;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  font-weight: 600;
  line-height: 1.6;
}

.section-description {
  margin-bottom: 40px;
}

.coming-soon {
  color: #758c9e;
  font-style: italic;
}


/* ==========================================
   Research
   ========================================== */

.research-grid {
  display: grid;

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

  gap: 24px;
  margin-top: 40px;
}

.research-card {
  padding: 32px;

  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;

  transition:
    transform 0.25s,
    box-shadow 0.25s,
    border-color 0.25s;
}

.research-card:hover {
  transform: translateY(-5px);
  border-color: #bedfe5;
  box-shadow: 0 12px 30px rgba(7, 26, 43, 0.07);
}

.card-number {
  display: block;
  margin-bottom: 22px;

  color: #0997a4;
  font-family: "Manrope", sans-serif;
  font-size: 0.85rem;
  font-weight: 800;
}

.research-card h3 {
  margin: 0 0 16px;

  color: var(--navy);
  font-size: 1.14rem;
  font-weight: 700;
}

.research-card p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.75;
}


/* ==========================================
   People — Horizontal Cards
   ========================================== */

.people-heading {
  margin: 55px 0 25px;
  color: var(--navy);
  font-size: 1.35rem;
  font-weight: 700;
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  max-width: 1120px;
}

.person-card {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.person-photo {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 190px;
  object-fit: cover;
  object-position: center;
  background: #e8eff2;
}

.person-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  padding: 20px 22px;
}

.person-info h4 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.4;
}

.person-role {
  margin: 0 0 10px;
  color: #087f8c;
  font-size: 0.86rem;
  font-weight: 700;
}

.person-affiliation {
  margin: 0 0 15px;
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.55;
}

.person-email {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.person-email:hover {
  color: var(--teal);
  text-decoration: underline;
}

/* Email and ORCID links for researchers and students */
.person-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  margin-top: auto;
}

.person-links a {
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.person-links a:hover {
  color: var(--teal);
  text-decoration: underline;
}

.person-links a:focus-visible,
.person-email:focus-visible,
.opportunity-card a:focus-visible,
.newsletter-button:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}


/* ==========================================
   Language Switch — English / Español
   ========================================== */

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  white-space: nowrap;
  font-family: "Manrope", sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
}

.language-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 35px;
  padding: 5px 7px;
  color: var(--blue);
  border-radius: 4px;
}

.language-switch a:hover,
.language-switch a:focus-visible {
  background: var(--light);
  color: var(--navy);
}

.language-switch a[aria-current="page"] {
  color: var(--white);
  background: var(--navy);
}

.language-switch .language-separator {
  color: #9cb1be;
}


/* ==========================================
   Research Opportunities
   ========================================== */

.opportunity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 32px;
}

.opportunity-card {
  padding: 27px 30px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.opportunity-card h3 {
  margin: 0 0 9px;
  color: var(--navy);
  font-size: 1.15rem;
}

.opportunity-card p {
  margin: 0 0 20px;
  color: var(--text);
  font-size: 0.87rem;
}

.opportunity-card a {
  display: inline-flex;
  align-items: center;
  min-height: 43px;
  padding: 10px 17px;
  color: var(--white);
  background: var(--blue);
  border-radius: 5px;
  font-size: 0.88rem;
  font-weight: 700;
}

.opportunity-card a:hover {
  color: var(--white);
  background: var(--navy-light);
}

.opportunity-note {
  margin-top: 22px;
  color: var(--text);
  font-size: 0.89rem;
}


/* ==========================================
   Newsletter
   ========================================== */

.newsletter-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(230px, 0.8fr);
  align-items: center;
  gap: 40px;
}

.newsletter-note {
  color: #63798a;
  font-size: 0.88rem;
}

.newsletter-action {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.newsletter-button {
  display: inline-flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 15px 22px;
  color: var(--white);
  background: var(--navy);
  border-radius: 5px;
  font-weight: 700;
}

.newsletter-button:hover {
  color: var(--white);
  background: var(--blue);
}

.newsletter-action > span {
  color: #6a8090;
  font-size: 0.8rem;
}


/* ==========================================
    Contact
    ========================================== */

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 28px;
}

.social-links a {
  display: inline-flex;
  align-items: center;

  padding: 11px 22px;

  background: white;
  color: var(--navy);

  border: 1px solid #ccdce4;
  border-radius: 5px;

  font-weight: 700;
}

.social-links a:hover {
  border-color: var(--teal);
  color: var(--teal);
}


/* ==========================================
   Footer
   ========================================== */

.site-footer {
  padding: 65px 8% 35px;

  background: var(--navy);
  color: #b9cedb;

  text-align: center;
}

.footer-content {
  max-width: 800px;
  margin: 0 auto;
}

.footer-brand {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;

  margin-bottom: 24px;

  color: white;
  font-family: "Manrope", sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
}

.footer-brand img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.site-footer p {
  margin: 8px 0;
  font-size: 0.9rem;
}

.footer-credit {
  margin-top: 28px !important;

  color: #819eaf;
  font-size: 0.78rem !important;
}

.copyright {
  margin-top: 28px !important;
  font-size: 0.78rem !important;
}


/* ==========================================
   Tablet
   ========================================== */

@media (max-width: 950px) {

  .site-header {
    flex-direction: column;
    gap: 12px;
  }

  .site-header nav {
    justify-content: center;
    gap: 12px 22px;
  }

  .hero {
    min-height: 600px;
  }

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

  .people-grid {
    grid-template-columns: 1fr;
    max-width: 650px;
  }

  .person-card {
    grid-template-columns: 135px minmax(0, 1fr);
  }

  .newsletter-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

}


/* ==========================================
   Mobile
   ========================================== */

@media (max-width: 600px) {

  .site-header {
    padding: 15px 5%;
  }

  .brand img {
    width: 48px;
    height: 48px;
  }

  .site-header nav {
    gap: 10px 15px;
  }

  .site-header nav a {
    font-size: 0.8rem;
  }

  .hero {
    min-height: 610px;
    padding: 85px 7% 110px;
  }

  .hero-overlay {
    background: linear-gradient(
      90deg,
      rgba(3, 17, 32, 0.94),
      rgba(3, 17, 32, 0.65)
    );
  }

  .hero h1 {
    font-size: clamp(2.4rem, 9vw, 3.5rem);
    letter-spacing: -1px;
  }

  .hero-description {
    font-size: 1.05rem;
  }

  .scroll-indicator {
    left: 7%;
  }

  .section {
    padding: 70px 7%;
  }

  .research-grid,
  .people-grid,
  .opportunity-grid {
    grid-template-columns: 1fr;
  }

  .opportunity-card {
    padding: 22px;
  }

  .research-card {
    padding: 28px;
  }

  .people-heading {
    margin-top: 40px;
  }

  .people-grid {
    gap: 16px;
  }

  .person-card {
    grid-template-columns: 110px minmax(0, 1fr);
  }

  .person-photo {
    min-height: 170px;
  }

  .person-info {
    padding: 16px;
  }

  .person-info h4 {
    font-size: 0.95rem;
  }

  .person-role {
    font-size: 0.82rem;
  }

  .person-affiliation,
  .person-email,
  .person-links a {
    font-size: 0.78rem;
  }

}


/* ==========================================
   Reduced Motion
   ========================================== */

@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }

  .hero-video {
    display: none;
  }

  .hero {
    background:
      linear-gradient(
        rgba(7, 26, 43, 0.45),
        rgba(7, 26, 43, 0.45)
      ),
      url("../climate/tropico_sst_poster.webp")
      center / cover no-repeat,
      var(--navy);
  }

  .button-primary,
  .research-card {
    transition: none;
  }

}


/* ==========================================
   Scientific Platforms — Featured Showcase
   ========================================== */

.section-platforms {
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at 78% 8%, #16475f 0%, #0d3047 34%, #071a2b 77%);
  color: #d7e8f0;
}

.section-platforms::before {
  content: "";
  position: absolute;
  width: 600px;
  height: 600px;
  right: -350px;
  top: -380px;
  border-radius: 50%;
  border: 1px solid rgba(124, 213, 224, .15);
  box-shadow: 0 0 0 85px rgba(124, 213, 224, .025), 0 0 0 170px rgba(124, 213, 224, .017);
  pointer-events: none;
}

.section-platforms .container { position: relative; z-index: 1; }
.section-platforms .section-label { color: #8fe6e5; }
.section-platforms h2 { color: #ffffff; }

.platforms-intro {
  max-width: 780px;
  margin: -5px 0 36px;
  color: #c2d5e0;
  font-size: 1.04rem;
  line-height: 1.8;
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.platform-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(190, 231, 240, .22);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(0, 8, 20, .19);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.platform-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 25px 60px rgba(0, 8, 20, .36);
  border-color: rgba(154, 225, 235, .7);
}

.platform-art {
  position: relative;
  height: 228px;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.platform-art-global {
  background: radial-gradient(ellipse at 47% 43%, #1d5377 0%, #103451 42%, #061a30 100%);
}

.platform-art-tropical {
  background: radial-gradient(ellipse at 60% 50%, #24687b 0%, #123e54 48%, #071c31 100%);
}

.platform-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.platform-visual-label {
  position: absolute;
  left: 19px;
  bottom: 17px;
  padding: 7px 11px;
  border: 1px solid rgba(214, 244, 250, .3);
  border-radius: 99px;
  background: rgba(5, 24, 43, .76);
  color: #d8f4f7;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: 1.3px;
}

.platform-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1;
  padding: 28px 29px 30px;
}

.platform-eyebrow {
  margin: 0 0 12px;
  color: #008b98;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: 1.5px;
}

.platform-content h3 {
  margin: 0 0 14px;
  color: var(--navy);
  font-size: clamp(1.22rem, 1.6vw, 1.5rem);
  font-weight: 800;
  line-height: 1.35;
}

.platform-content p:not(.platform-eyebrow) {
  margin: 0 0 25px;
  max-width: none;
  color: var(--text);
  font-size: .93rem;
  line-height: 1.75;
}

.platform-link {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  margin-top: auto;
  padding: 11px 17px;
  color: white;
  background: var(--navy);
  border: 1px solid var(--navy);
  border-radius: 6px;
  font-size: .86rem;
  font-weight: 700;
  transition: background .2s, border-color .2s;
}

.platform-link:hover,
.platform-link:focus-visible {
  color: white;
  background: var(--blue);
  border-color: var(--blue);
}

.platform-disclaimer {
  max-width: none !important;
  margin: 18px 0 0;
  color: #98b7c6;
  font-size: .75rem;
}

/* ==========================================
   Social Media &amp; Footer Attribution
   ========================================== */

.social-section .section-description { margin-bottom: 0; }
.social-links a { gap: 18px; }

.footer-maintainer {
  margin-top: 12px !important;
  color: #7895a8;
  font-size: .72rem !important;
}

.footer-maintainer a {
  color: #b7d3e4;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer-maintainer a:hover { color: #ffffff; }

@media (max-width: 950px) {
  .platform-art { height: 205px; }
  .platform-content { padding: 22px 23px 25px; }
}
@media (max-width: 700px) {
  .platform-grid { grid-template-columns: 1fr; }
  .platform-art { height: 230px; }
}
@media (max-width: 420px) {
  .platform-art { height: 195px; }
  .platform-content { padding: 21px; }
  .platform-visual-label { font-size: .57rem; }
}
@media (prefers-reduced-motion: reduce) {
  .platform-card, .platform-link { transition: none; }
  .platform-card:hover { transform: none; }
}

/* Accessible keyboard focus for interactive links. */
a:focus-visible {
  outline: 3px solid #25bdc5;
  outline-offset: 3px;
}
