/* ============================================
   SMART IRRIGATION — Modern Website Styles
   Design: Scientific/Clean with deep teal palette
   Fonts: Syne (display) + Source Serif 4 (body)
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=Source+Serif+4:ital,wght@0,300;0,400;0,600;1,300;1,400&family=JetBrains+Mono:wght@400;500&display=swap');

/* ---- CSS Variables ---- */
:root {
  --teal:       #0a7e6e;
  --teal-light: #12a68f;
  --teal-dark:  #064e44;
  --sky:        #e0f5f2;
  --accent:     #f4a316;
  --accent2:    #e05a2b;
  --ink:        #0f1c1a;
  --ink-mid:    #2d4a45;
  --muted:      #6b8f8a;
  --rule:       #cce5e1;
  --bg:         #f7fcfb;
  --white:      #ffffff;
  --shadow-sm:  0 2px 8px rgba(10,126,110,0.10);
  --shadow-md:  0 8px 32px rgba(10,126,110,0.14);
  --shadow-lg:  0 20px 60px rgba(10,126,110,0.18);
  --radius:     12px;
  --radius-lg:  20px;
  --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Source Serif 4', Georgia, serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ---- NAVBAR ---- */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
  transition: box-shadow var(--transition);
}
.navbar.scrolled { box-shadow: var(--shadow-md); }
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem; height: 68px;
}
.nav-brand {
  display: flex; align-items: center; gap: 12px;
}
.nav-brand .brand-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--teal), var(--teal-light));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 1.1rem;
}
.nav-brand .brand-text {
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: 1.15rem;
  color: var(--teal-dark);
  letter-spacing: -0.01em;
}
.nav-brand .brand-text span { color: var(--teal); }
.nav-links {
  display: flex; align-items: center; gap: 0.25rem;
  list-style: none;
}
.nav-links li { position: relative; }
.nav-links a, .nav-links .nav-btn {
  font-family: 'Syne', sans-serif;
  font-weight: 500; font-size: 0.88rem;
  color: var(--ink-mid);
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  transition: background var(--transition), color var(--transition);
  display: block; cursor: pointer;
  background: none; border: none;
  letter-spacing: 0.01em;
}
.nav-links a:hover, .nav-links .nav-btn:hover,
.nav-links a.active { background: var(--sky); color: var(--teal); }
/* Dropdown */
.dropdown { position: relative; }
.dropdown-menu {
  display: none; position: absolute; top: calc(100% + 8px); left: 0;
  background: white; border-radius: var(--radius);
  box-shadow: var(--shadow-lg); border: 1px solid var(--rule);
  min-width: 200px; padding: 0.5rem; z-index: 100;
  animation: dropIn 0.2s ease;
}
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu { display: block; }
.dropdown-menu a {
  padding: 0.5rem 0.85rem; border-radius: 7px;
  font-size: 0.86rem; display: block;
  color: var(--ink-mid);
  transition: background var(--transition), color var(--transition);
}
.dropdown-menu a:hover { background: var(--sky); color: var(--teal); }
.dropdown-menu .sub-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem; color: var(--muted);
  padding: 0.35rem 0.85rem 0.1rem;
  text-transform: uppercase; letter-spacing: 0.06em;
}
/* Hamburger */
.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 0.5rem;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--teal-dark);
  border-radius: 2px; transition: all var(--transition);
}

/* ---- PAGE WRAPPER ---- */
.page-wrap { padding-top: 68px; }

/* ---- HERO ---- */
.hero {
  position: relative; overflow: hidden;
  min-height: 92vh;
  display: flex; align-items: center;
  background: linear-gradient(160deg, var(--teal-dark) 0%, var(--teal) 55%, var(--teal-light) 100%);
}
.hero-bg-pattern {
  position: absolute; inset: 0; opacity: 0.07;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(255,255,255,0.5) 40px),
    repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(255,255,255,0.5) 40px);
}
.hero-accent {
  position: absolute; right: -10%; bottom: -20%;
  width: 60vw; height: 60vw; max-width: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244,163,22,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  max-width: 1200px; margin: 0 auto; padding: 5rem 2rem;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
  position: relative; z-index: 1;
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.9);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem; letter-spacing: 0.08em;
  padding: 0.4rem 0.9rem; border-radius: 100px;
  margin-bottom: 1.5rem;
}
.hero-tag::before { content: ''; width: 7px; height: 7px; background: var(--accent); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.5;transform:scale(1.3)} }
.hero-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 800; color: white;
  line-height: 1.08; letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}
.hero-title em { font-style: normal; color: var(--accent); }
.hero-subtitle {
  font-family: 'Source Serif 4', serif;
  font-size: 1.05rem; color: rgba(255,255,255,0.78);
  font-weight: 300; line-height: 1.75;
  max-width: 480px; margin-bottom: 2.5rem;
}
.hero-cta {
  display: flex; flex-wrap: wrap; gap: 1rem;
}
.btn {
  font-family: 'Syne', sans-serif;
  font-weight: 600; font-size: 0.9rem;
  padding: 0.8rem 1.8rem;
  border-radius: 100px; border: 2px solid transparent;
  cursor: pointer; transition: all var(--transition);
  display: inline-flex; align-items: center; gap: 8px;
  letter-spacing: 0.01em; text-decoration: none;
}
.btn-primary {
  background: var(--accent); color: var(--ink);
  border-color: var(--accent);
}
.btn-primary:hover { background: #e09210; border-color: #e09210; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(244,163,22,0.35); }
.btn-outline {
  background: transparent; color: white;
  border-color: rgba(255,255,255,0.45);
}
.btn-outline:hover { background: rgba(255,255,255,0.12); border-color: white; transform: translateY(-2px); }
.btn-teal {
  background: var(--teal); color: white; border-color: var(--teal);
}
.btn-teal:hover { background: var(--teal-dark); border-color: var(--teal-dark); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-ghost {
  background: transparent; color: var(--teal); border-color: var(--rule);
}
.btn-ghost:hover { background: var(--sky); border-color: var(--teal); }

/* Hero stats */
.hero-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
}
.stat-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius); padding: 1.4rem 1rem;
  text-align: center; backdrop-filter: blur(8px);
  transition: transform var(--transition);
}
.stat-card:hover { transform: translateY(-4px); background: rgba(255,255,255,0.13); }
.stat-card .stat-num {
  font-family: 'Syne', sans-serif; font-weight: 800;
  font-size: 2rem; color: white; line-height: 1;
}
.stat-card .stat-num span { color: var(--accent); font-size: 1.2rem; }
.stat-card .stat-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem; color: rgba(255,255,255,0.6);
  letter-spacing: 0.06em; text-transform: uppercase; margin-top: 0.35rem;
}

/* ---- SECTION PATTERNS ---- */
.section {
  padding: 5rem 2rem;
}
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-alt { background: white; }
.section-dark {
  background: linear-gradient(160deg, var(--teal-dark), var(--ink));
  color: white;
}
.section-header { text-align: center; margin-bottom: 3.5rem; }
.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--teal); margin-bottom: 0.75rem; display: block;
}
.section-dark .eyebrow { color: var(--accent); }
.section-title {
  font-family: 'Syne', sans-serif; font-weight: 800;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  color: var(--ink); letter-spacing: -0.03em; line-height: 1.15;
}
.section-dark .section-title { color: white; }
.section-desc {
  font-size: 1.05rem; color: var(--muted);
  max-width: 560px; margin: 1rem auto 0; font-weight: 300;
}
.section-dark .section-desc { color: rgba(255,255,255,0.65); }

/* ---- CARDS ---- */
.card {
  background: white; border-radius: var(--radius-lg);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  overflow: hidden;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card-body { padding: 1.8rem; }
.card-icon {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--sky), var(--rule));
  border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin-bottom: 1.2rem;
}
.card-title {
  font-family: 'Syne', sans-serif; font-weight: 700;
  font-size: 1.1rem; color: var(--ink); margin-bottom: 0.6rem;
}
.card-text { font-size: 0.93rem; color: var(--muted); line-height: 1.65; }

/* ---- GRID LAYOUTS ---- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* ---- TIMELINE / PHASE ---- */
.phases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.phase-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-lg); padding: 2rem;
  position: relative; overflow: hidden;
}
.phase-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--teal-light));
}
.phase-num {
  font-family: 'Syne', sans-serif; font-weight: 800;
  font-size: 3rem; color: rgba(255,255,255,0.08); line-height: 1;
  margin-bottom: 0.5rem;
}
.phase-title {
  font-family: 'Syne', sans-serif; font-weight: 700;
  font-size: 1rem; color: var(--accent); margin-bottom: 0.6rem;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.phase-text { font-size: 0.93rem; color: rgba(255,255,255,0.7); line-height: 1.7; }

/* ---- TEAM GRID ---- */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1.5rem; }
.team-card {
  background: white; border-radius: var(--radius-lg);
  border: 1px solid var(--rule);
  overflow: hidden; text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-sm);
}
.team-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.team-card .team-photo {
  width: 100%; aspect-ratio: 3/4; object-fit: cover;
  background: var(--sky);
}
.team-card .team-info { padding: 1rem 0.75rem; }
.team-card .team-name {
  font-family: 'Syne', sans-serif; font-weight: 700;
  font-size: 0.85rem; color: var(--ink); line-height: 1.3;
}
.team-card .team-role {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem; color: var(--teal); margin-top: 0.25rem;
  letter-spacing: 0.04em;
}
.team-card a.team-card-link { display: block; text-decoration: none; color: inherit; }

/* ---- STATION CARDS ---- */
.station-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.station-card {
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); border: 1px solid var(--rule);
  transition: transform var(--transition), box-shadow var(--transition);
  background: white;
}
.station-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.station-card .station-img {
  width: 100%; height: 200px; object-fit: cover; background: var(--sky);
}
.station-card .station-body { padding: 1.25rem 1.4rem 1.4rem; }
.station-card .station-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem; color: var(--teal); letter-spacing: 0.08em;
  text-transform: uppercase; margin-bottom: 0.3rem;
}
.station-card .station-title {
  font-family: 'Syne', sans-serif; font-weight: 700;
  font-size: 1rem; color: var(--ink); margin-bottom: 0.6rem;
}
.station-card .station-meta {
  font-size: 0.82rem; color: var(--muted);
  display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem;
}
.station-card .meta-tag {
  background: var(--sky); color: var(--teal-dark);
  border-radius: 100px; padding: 0.2rem 0.6rem;
  font-family: 'JetBrains Mono', monospace; font-size: 0.7rem;
}

/* ---- CONTACT INFO ---- */
.contact-wrap { display: grid; grid-template-columns: 1fr 1.5fr; gap: 4rem; align-items: start; }
.contact-photo { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); }
.contact-photo img { width: 100%; object-fit: cover; }
.contact-name {
  font-family: 'Syne', sans-serif; font-weight: 800;
  font-size: 1.8rem; color: var(--ink); line-height: 1.1; margin-bottom: 0.4rem;
}
.contact-uni {
  font-family: 'JetBrains Mono', monospace; font-size: 0.8rem;
  color: var(--teal); letter-spacing: 0.05em; text-transform: uppercase;
  margin-bottom: 1.5rem; display: block;
}
.contact-detail {
  display: flex; align-items: flex-start; gap: 1rem;
  margin-bottom: 1rem; font-size: 0.95rem; color: var(--ink-mid);
}
.contact-detail .ci {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--sky); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}

/* ---- DIVIDER ---- */
.divider { border: none; height: 1px; background: var(--rule); margin: 3rem 0; }

/* ---- FOOTER ---- */
footer {
  background: var(--ink); color: rgba(255,255,255,0.7);
  padding: 3rem 2rem;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; flex-wrap: wrap; justify-content: space-between;
  align-items: flex-start; gap: 2rem;
}
.footer-brand .brand-text { color: white; font-family: 'Syne', sans-serif; font-weight: 800; font-size: 1.1rem; }
.footer-brand p { font-size: 0.84rem; margin-top: 0.5rem; max-width: 280px; line-height: 1.6; }
.footer-links { display: flex; flex-direction: column; gap: 0.4rem; }
.footer-links a { font-size: 0.88rem; transition: color var(--transition); }
.footer-links a:hover { color: var(--teal-light); }
.footer-bottom {
  max-width: 1200px; margin: 2rem auto 0;
  padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.1);
  display: flex; flex-wrap: wrap; justify-content: space-between;
  font-size: 0.8rem; gap: 0.5rem;
}
.footer-bottom span { opacity: 0.5; }

/* ---- PAGE HERO (inner pages) ---- */
.page-hero {
  background: linear-gradient(135deg, var(--teal-dark) 0%, var(--teal) 100%);
  padding: 4.5rem 2rem 3.5rem;
  position: relative; overflow: hidden;
}
.page-hero-bg {
  position: absolute; inset: 0; opacity: 0.05;
  background-image: radial-gradient(circle at 70% 50%, white 1px, transparent 1px);
  background-size: 32px 32px;
}
.page-hero-inner { max-width: 1200px; margin: 0 auto; position: relative; z-index: 1; }
.page-hero h1 {
  font-family: 'Syne', sans-serif; font-weight: 800;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  color: white; letter-spacing: -0.03em; line-height: 1.1;
  margin-bottom: 0.75rem;
}
.page-hero p {
  color: rgba(255,255,255,0.72); font-size: 1.05rem;
  font-weight: 300; max-width: 540px; line-height: 1.7;
}
.breadcrumb {
  display: flex; align-items: center; gap: 0.4rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem; color: rgba(255,255,255,0.5);
  letter-spacing: 0.04em; text-transform: uppercase;
  margin-bottom: 1.2rem;
}
.breadcrumb a { transition: color var(--transition); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { opacity: 0.4; }

/* ---- ABOUT PAGE ---- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.about-images { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.about-images img { border-radius: var(--radius); box-shadow: var(--shadow-md); width: 100%; }
.about-images img:first-child { grid-column: 1 / -1; }
.info-list { display: flex; flex-direction: column; gap: 0.6rem; margin: 1.5rem 0; }
.info-item {
  display: flex; align-items: center; gap: 0.75rem;
  font-size: 0.94rem; color: var(--ink-mid);
}
.info-item::before { content: '▸'; color: var(--teal); font-size: 0.75rem; flex-shrink: 0; }

/* ---- MAP PAGE ---- */
#map { width: 100%; height: 500px; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.map-legend {
  background: white; border-radius: var(--radius); border: 1px solid var(--rule);
  padding: 1.5rem; margin-top: 1.5rem;
}
.legend-grid { display: flex; flex-wrap: wrap; gap: 1rem; }
.legend-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: var(--ink-mid); }
.legend-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }

/* ---- TWI MAP WRAPPER ---- */
.twi-wrap { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); }
.twi-wrap iframe { width: 100%; height: 600px; border: none; }

/* ---- DOWNLOAD BUTTONS ---- */
.download-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.dl-btn {
  display: flex; flex-direction: column; align-items: center;
  gap: 0.6rem; padding: 1.5rem 1rem;
  background: white; border: 2px solid var(--rule);
  border-radius: var(--radius-lg);
  font-family: 'Syne', sans-serif; font-weight: 700;
  font-size: 0.9rem; color: var(--teal-dark);
  text-align: center; cursor: pointer;
  transition: all var(--transition); text-decoration: none;
}
.dl-btn:hover { border-color: var(--teal); background: var(--sky); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.dl-btn .dl-icon { font-size: 2rem; }
.dl-btn .dl-sub { font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; color: var(--muted); font-weight: 400; }

/* ---- UTILITY ---- */
.text-center { text-align: center; }
.text-teal { color: var(--teal); }
.text-accent { color: var(--accent); }
.mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; } .mb-2 { margin-bottom: 2rem; }
.fw-bold { font-weight: 700; }
.font-mono { font-family: 'JetBrains Mono', monospace; }

/* ---- SCROLL ANIMATIONS ---- */
.fade-up { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 3rem; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); }
  .grid-3, .phases { grid-template-columns: 1fr 1fr; }
  .station-grid { grid-template-columns: 1fr 1fr; }
  .about-grid, .contact-wrap { grid-template-columns: 1fr; }
  .download-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .nav-links { display: none; position: fixed; top: 68px; left: 0; right: 0;
    background: white; flex-direction: column; padding: 1rem;
    border-bottom: 1px solid var(--rule); box-shadow: var(--shadow-md);
    gap: 0.25rem; z-index: 999; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .dropdown-menu { position: static; box-shadow: none; border: none; padding-left: 1rem; display: block; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .grid-3, .grid-4, .phases, .station-grid, .grid-2 { grid-template-columns: 1fr; }
  .download-grid { grid-template-columns: 1fr 1fr; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { flex-direction: column; }
}
