/* ═══════════════════════════════════════════════
   hiwar.ai — Documentation Website Stylesheet
   ═══════════════════════════════════════════════ */

/* ─── Tokens ─────────────────────────────────── */
:root {
  --bg:          #07111a;
  --bg2:         #0c1c28;
  --bg3:         #0f2030;
  --card:        #101e2b;
  --card-hover:  #152536;
  --border:      rgba(0,200,130,.15);
  --border2:     rgba(0,200,130,.08);
  --green:       #00c882;
  --green-dim:   #00a06a;
  --green-glow:  rgba(0,200,130,.18);
  --teal:        #00b4d8;
  --text:        #e2eef6;
  --text-muted:  #7fa8c0;
  --text-dim:    #3d6478;
  --font:        'Inter', system-ui, sans-serif;
  --mono:        'JetBrains Mono', monospace;
  --radius:      14px;
  --radius-sm:   8px;
  --shadow:      0 4px 32px rgba(0,0,0,.5);
  --shadow-card: 0 2px 16px rgba(0,0,0,.4);
}

/* ─── Reset ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { background: var(--bg); color: var(--text); font-family: var(--font); line-height: 1.6; overflow-x: hidden; }
a { color: var(--green); text-decoration: none; transition: color .2s; }
a:hover { color: #00ffaa; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

/* ─── Scrollbar ──────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--green-dim); border-radius: 3px; }

/* ─── Navigation ─────────────────────────────── */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(7,17,26,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-logo {
  font-size: 1.35rem; font-weight: 800; color: var(--text);
  letter-spacing: -0.5px;
}
.nav-logo span { color: var(--green); }
.nav-links { display: flex; gap: 2rem; }
.nav-links a {
  font-size: .875rem; font-weight: 500; color: var(--text-muted);
  transition: color .2s;
}
.nav-links a:hover { color: var(--green); }
.nav-hamburger {
  display: none; background: none; border: none;
  color: var(--text); font-size: 1.4rem; cursor: pointer;
}

/* ─── Hero ───────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  text-align: center; padding: 6rem 2rem 4rem;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(0,200,130,.12) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 80% 60%, rgba(0,180,216,.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 20% 80%, rgba(0,200,130,.06) 0%, transparent 60%);
}
.hero-content { position: relative; z-index: 1; max-width: 800px; }

.hero-badge {
  display: inline-block;
  background: rgba(0,200,130,.1);
  border: 1px solid rgba(0,200,130,.3);
  color: var(--green);
  font-size: .8rem; font-weight: 600; letter-spacing: 1px;
  padding: .35rem 1rem; border-radius: 999px;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.hero-title {
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: normal;
  background: linear-gradient(135deg, #ffffff 0%, #00c882 50%, #00b4d8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.5rem;
}

.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .75rem 1.75rem; border-radius: var(--radius-sm);
  font-size: .9rem; font-weight: 600;
  transition: all .25s; cursor: pointer;
}
.btn-primary {
  background: var(--green); color: #061410;
  box-shadow: 0 0 24px rgba(0,200,130,.35);
}
.btn-primary:hover {
  background: #00ffaa; color: #061410;
  box-shadow: 0 0 36px rgba(0,255,170,.5);
  transform: translateY(-2px);
}
.btn-outline {
  border: 1.5px solid var(--green); color: var(--green);
}
.btn-outline:hover {
  background: rgba(0,200,130,.1); transform: translateY(-2px);
}
.btn-ghost {
  border: 1.5px solid var(--border); color: var(--text-muted);
}
.btn-ghost:hover { border-color: var(--green); color: var(--green); transform: translateY(-2px); }

.hero-scroll-hint {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  color: var(--text-dim); font-size: .75rem; letter-spacing: 1px;
  text-transform: uppercase;
}
.scroll-arrow {
  width: 1.5px; height: 40px;
  background: linear-gradient(to bottom, var(--green), transparent);
  animation: scrollPulse 1.8s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%,100% { opacity: .2; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.2); }
}

/* ─── Sections ───────────────────────────────── */
.section { padding: 6rem 2rem; }
.section-dark { background: var(--bg2); }
.container { max-width: 1100px; margin: 0 auto; }

.section-label {
  font-size: .75rem; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--green);
  margin-bottom: .75rem;
}
.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800; line-height: 1.15; letter-spacing: -1px;
  color: var(--text); margin-bottom: 1rem;
}
.section-desc {
  font-size: 1.05rem; color: var(--text-muted);
  max-width: 600px; margin-bottom: 3rem; line-height: 1.75;
}

/* ─── About Cards ────────────────────────────── */
.cards-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem;
}
.card {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  transition: all .3s;
}
.card:hover {
  background: var(--card-hover);
  border-color: var(--border);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,200,130,.12);
}
.card-icon { font-size: 2.25rem; margin-bottom: 1rem; }
.card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: .5rem; }
.card p { font-size: .9rem; color: var(--text-muted); line-height: 1.65; }

/* ─── Team ───────────────────────────────────── */
.team-grid {
  display: flex; flex-wrap: wrap; gap: 2rem; justify-content: center;
}
.team-card {
  display: flex; flex-direction: column; align-items: center; gap: .75rem;
  text-align: center; width: 180px;
}
.team-photo-wrap {
  width: 140px; height: 140px; border-radius: 50%;
  overflow: hidden;
  border: 2.5px solid var(--border);
  transition: border-color .3s, transform .3s;
}
.team-photo-wrap:hover { border-color: var(--green); transform: scale(1.05); }
.team-photo-placeholder {
  width: 100%; height: 100%;
  background: var(--card);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: .25rem;
}
.team-photo-placeholder svg { width: 72px; height: 72px; opacity: .5; }
.placeholder-label {
  font-size: .65rem; font-weight: 600; letter-spacing: 1px;
  text-transform: uppercase; color: var(--text-dim);
}
.supervisor-ph { background: var(--bg3); }
.supervisor .team-photo-wrap {
  border-color: rgba(0,200,130,.4);
  width: 160px; height: 160px;
}
.supervisor .team-photo-wrap div { width: 100%; height: 100%; }
.team-photo { width: 100%; height: 100%; object-fit: cover; }
.team-name { font-size: 1rem; font-weight: 700; color: var(--text); }
.team-role { font-size: .8rem; color: var(--green); font-weight: 500; }

/* ─── Video ──────────────────────────────────── */
.video-wrapper {
  width: 100%; max-width: 800px; margin: 0 auto;
  aspect-ratio: 16/9; border-radius: var(--radius);
  overflow: hidden;
  border: 1.5px solid var(--border);
}
.video-placeholder {
  width: 100%; height: 100%;
  background: var(--card);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 1.5rem; text-align: center; padding: 2rem;
}
.video-play-icon svg { width: 80px; height: 80px; }
.video-hint { color: var(--text-muted); font-size: .95rem; line-height: 1.8; }
.video-hint code { font-family: var(--mono); font-size: .8rem; color: var(--green); }

/* ─── Gallery ────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 220px 220px;
  gap: 1rem;
}
.gallery-item { border-radius: var(--radius); overflow: hidden; }
.gallery-item.tall { grid-row: span 2; }
.gallery-item.wide { grid-column: span 2; }

.img-placeholder {
  width: 100%; height: 100%;
  min-height: 140px;
  background: var(--card);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim); font-size: .8rem; font-weight: 600;
  letter-spacing: 1px; text-transform: uppercase;
  transition: border-color .3s;
}
.img-placeholder:hover { border-color: var(--green); }

/* ─── Documentation ──────────────────────────── */
.docs-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.5rem;
}
.doc-block {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 2rem;
  transition: border-color .3s;
}
.doc-block:hover { border-color: var(--border); }
.doc-block h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem; }
.doc-block p { font-size: .9rem; color: var(--text-muted); line-height: 1.75; margin-bottom: .75rem; }
.doc-block ul, .doc-block ol { padding-left: 1.25rem; color: var(--text-muted); font-size: .9rem; line-height: 1.9; }
.doc-block li::marker { color: var(--green); }
.doc-block strong { color: var(--text); }

.doc-table { width: 100%; border-collapse: collapse; margin-top: .75rem; font-size: .85rem; }
.doc-table th, .doc-table td { padding: .6rem .75rem; text-align: left; border-bottom: 1px solid var(--border2); }
.doc-table th { color: var(--green); font-weight: 600; font-size: .78rem; letter-spacing: .5px; text-transform: uppercase; }
.doc-table td { color: var(--text-muted); }
.doc-table tr:last-child td { border-bottom: none; }

/* ─── How to Run ─────────────────────────────── */
.steps { display: flex; flex-direction: column; gap: 0; }
.step {
  display: flex; gap: 2rem; align-items: flex-start;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border2);
}
.step:last-child { border-bottom: none; }
.step-num {
  font-size: 3rem; font-weight: 800; line-height: 1;
  color: var(--border);
  font-variant-numeric: tabular-nums;
  min-width: 56px;
  background: linear-gradient(135deg, var(--green-dim), var(--teal));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.step-content { flex: 1; }
.step-content h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: .75rem; }
.step-note { font-size: .85rem; color: var(--text-muted); margin-top: .75rem; }
.step-note code { font-family: var(--mono); font-size: .8rem; color: var(--green); }

pre {
  background: #050d14;
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin-bottom: .5rem;
}
code {
  font-family: var(--mono);
  font-size: .85rem;
  color: #a8d8c0;
  line-height: 1.7;
}

/* ─── What's Next ────────────────────────────── */
.next-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem;
}
.next-card {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all .3s;
}
.next-card:hover { border-color: var(--border); transform: translateY(-4px); box-shadow: var(--shadow-card); }
.next-img-wrap { height: 180px; }
.next-ph { border-radius: 0; border: none; min-height: 100%; }
.next-body { padding: 1.5rem; }
.next-tag {
  display: inline-block;
  background: rgba(0,200,130,.1);
  color: var(--green); font-size: .7rem; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  padding: .25rem .75rem; border-radius: 999px;
  margin-bottom: .75rem;
}
.next-body h3 { font-size: 1rem; font-weight: 700; margin-bottom: .5rem; }
.next-body p { font-size: .85rem; color: var(--text-muted); line-height: 1.65; }

/* ─── Thanks ─────────────────────────────────── */
.thanks-container { text-align: center; }
.thanks-container .section-desc { margin-left: auto; margin-right: auto; }
.thanks-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem;
  margin-bottom: 3rem;
}
.thanks-card {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
}
.thanks-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.thanks-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: .5rem; }
.thanks-card p { font-size: .875rem; color: var(--text-muted); line-height: 1.65; }

.final-note { color: var(--text-muted); line-height: 2; }
.final-year { color: var(--text-dim); font-size: .85rem; margin-top: .25rem; }

/* ─── Footer ─────────────────────────────────── */
footer {
  border-top: 1px solid var(--border2);
  padding: 1.5rem 2rem;
}
.footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
}
.footer-logo { font-size: 1.1rem; font-weight: 800; color: var(--text-muted); }
.footer-logo span { color: var(--green); }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { font-size: .85rem; color: var(--text-dim); }
.footer-links a:hover { color: var(--green); }

/* ─── Responsive ─────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: block; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--bg2); padding: 1.5rem;
    border-bottom: 1px solid var(--border); gap: 1rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }
  .gallery-item.tall, .gallery-item.wide { grid-column: span 1; grid-row: span 1; }

  .step { flex-direction: column; gap: 1rem; }
  .step-num { font-size: 2rem; }

  .team-grid { gap: 1.5rem; }
  .team-card { width: 150px; }
  .team-photo-wrap { width: 120px; height: 120px; }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; align-items: center; }
}

/* ─── Animations ─────────────────────────────── */
.fade-up {
  opacity: 0; transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }
