/* ========== RESET & BASE ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0d0d0d;
  --bg2: #141414;
  --card: #181818;
  --card2: #1e1e1e;
  --lime: #009cd4;
  --lime2: #007aa7;
  --white: #f5f5f5;
  --muted: #9a9a9a;
  --border: #2a2a2a;
  --font-head: sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --rose: #C48A8A;
  --blush: #FCEBE5;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 40px; }

/* ========== UTILITY ========== */
.section-label {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-label::before { content: '⊕'; }

.section-heading {
  font-family: var(--font-head);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 16px;
}
.section-heading em { font-style: italic; color: var(--lime); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all .25s;
  border: none;
}
.btn-lime { background: var(--lime); color: #0d0d0d; }
.btn-lime:hover { background: var(--lime2); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--white); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--lime); color: var(--lime); }

/* ========== NAVBAR ========== */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 999;
  background: rgba(13,13,13,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 80px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo img { width: 80px; }

.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: color .2s;
}
.nav-back:hover { color: var(--lime); }
.nav-back span { font-size: 18px; }

/* ========== HERO ========== */
.case-hero {
  min-height: 70vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 70px;
  padding-left: 0;
  padding-right: 0;
}

.case-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 60% 40%, rgba(196,138,138,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.asterisk {
  position: absolute;
  font-family: var(--font-head);
  color: var(--lime);
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}
.hero-asterisk1 { font-size: 56px; top: 120px; right: 60px; animation: pulse 3s ease-in-out infinite; }
.hero-asterisk2 { font-size: 36px; bottom: 100px; left: 5%; animation: pulse 4.5s ease-in-out infinite; }
@keyframes pulse {
  0%,100% { opacity:.6; transform: scale(1) rotate(0deg); }
  50% { opacity:1; transform: scale(1.1) rotate(15deg); }
}

/* Single-column hero — content only, no visual panel */
.case-hero-grid {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  max-width: 600px;
  position: relative;
  z-index: 2;
  padding: 60px 0;
}

.case-hero-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 8px 18px;
  font-size: 13px;
  margin-bottom: 24px;
  color: var(--muted);
}

.case-hero-label .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--rose);
  flex-shrink: 0;
}

.case-hero h1 {
  font-family: var(--font-head);
  font-size: clamp(52px, 5vw, 88px);
  font-weight: 800;
  line-height: 1.0;
  margin-bottom: 20px;
}
.case-hero h1 em { font-style: italic; color: var(--lime); }

.case-hero-desc {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
  margin-bottom: 36px;
  max-width: 650px;
}

.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-btns img { width: 18px; aspect-ratio: 1 / 1; }

/* ========== META STRIP ========== */
.meta-strip {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 28px 0;
}
.meta-strip-inner {
  display: flex;
  align-items: stretch;
}
.meta-item {
  flex: 1;
  padding: 0 32px;
  border-right: 1px solid var(--border);
}
.meta-item:first-child { padding-left: 0; }
.meta-item:last-child { border-right: none; }
.meta-label {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.meta-value {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
}

/* ========== OVERVIEW ========== */
.overview {
  padding: 100px 0;
  position: relative;
}
.overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.overview-text p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 20px;
}

.challenge-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--lime);
  border-radius: 16px;
  padding: 28px;
  margin-top: 36px;
}
.challenge-box h4 {
  font-family: var(--font-head);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 12px;
}
.challenge-box p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

/* Outcome stats */
.outcome-stats {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.outcome-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: border-color .3s, transform .3s;
}
.outcome-card:hover { border-color: var(--lime); transform: translateX(4px); }
.outcome-icon {
  width: 48px; height: 48px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 22px;
  flex-shrink: 0;
}

.outcome-icon img {
  width: 30px;
}

.outcome-num {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 800;
  color: var(--lime);
  display: block;
  line-height: 1;
}
.outcome-desc {
  font-size: 13px;
  color: var(--muted);
  margin-top: 3px;
}

/* ========== FEATURES ========== */
.features {
  padding: 100px 0;
  background: var(--bg2);
}
.features-header { text-align: center; margin-bottom: 60px; }
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  transition: border-color .3s, transform .3s;
  cursor: default;
  position: relative;
  overflow: hidden;
}
.feature-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,156,212,0.04) 0%, transparent 60%);
  opacity: 0;
  transition: opacity .3s;
}
.feature-card:hover { border-color: var(--lime); transform: translateY(-4px); }
.feature-card:hover::after { opacity: 1; }
.feature-icon {
  width: 44px; height: 44px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  font-size: 20px;
}
.feature-card h3 {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
}
.feature-card p { font-size: 13px; color: var(--muted); line-height: 1.65; }

/* ========== TECH STACK ========== */
.tech-stack {
  padding: 100px 0;
}

/* Single-column layout — no right panel */
.tech-stack-grid {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 680px;
}

.tech-list { display: flex; flex-direction: column; gap: 16px; margin-top: 32px; }
.tech-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 20px;
  transition: border-color .2s, transform .2s;
}
.tech-item:hover { border-color: var(--lime); transform: translateX(6px); }
.tech-badge {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  color: var(--lime);
  flex-shrink: 0;
  min-width: 80px;
  text-align: center;
}
.tech-info-name { font-size: 14px; font-weight: 600; }
.tech-info-desc { font-size: 12px; color: var(--muted); }

/* ========== LINKS CTA ========== */
.project-links {
  padding: 100px 0;
  background: var(--bg2);
}
.features-header { text-align: center; margin-bottom: 60px; }

.links-inner {
  display: flex;
  justify-content: center;
}

.link-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  transition: border-color .3s, transform .3s;
  width: 100%;
  max-width: 540px;
}
.link-card:hover { border-color: var(--lime); transform: translateY(-4px); }
.link-card-icon { font-size: 36px; }
.link-card-icon img { width: 48px; margin: 0 auto; }
.link-card h3 {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 800;
}
.link-card p { font-size: 13px; color: var(--muted); line-height: 1.6; max-width: 360px; }
.link-card .btn { margin-top: 4px; margin: auto;}

/* ========== BACK CTA ========== */
.back-cta {
  padding: 80px 0;
  text-align: center;
  border-top: 1px solid var(--border);
}
.back-cta p { color: var(--muted); font-size: 14px; margin-bottom: 24px; }

/* ========== FOOTER ========== */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 32px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
footer p { font-size: 13px; color: var(--muted); }
.footer-socials { display: flex; gap: 12px; }
.social-link {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 14px;
  transition: transform .2s;
}
.social-link:hover { transform: scale(1.08); }

/* ========== SCROLL REVEAL ========== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
  nav { padding: 0 24px; }

  .case-hero-grid {
    width: 100%;
    max-width: 100%;
    padding: 40px 0;
  }

  .case-hero h1 {
    font-size: clamp(36px, 10vw, 60px);
  }

  .case-hero-desc {
    font-size: 14px;
    max-width: 100%;   /* ← this is key, was 650px which overflows */
  }

  .overview-grid { grid-template-columns: 1fr; gap: 48px; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .meta-strip-inner { flex-wrap: wrap; gap: 24px; }
  .meta-item { border-right: none; padding: 0; min-width: 45%; }
  .link-card { padding: 36px 28px; }
  footer { flex-direction: column; gap: 16px; text-align: center; }
}

@media (max-width: 600px) {
  .container { padding: 0 20px; }
  .features-grid { grid-template-columns: 1fr; }
  .case-hero h1 { font-size: clamp(44px, 12vw, 64px); }
  .link-card { padding: 32px 20px; }
}

@media (max-width: 480px) {

  .case-hero {
    padding: 40px 20px;
    min-height: auto;
    padding-bottom: 48px;
  }

  .case-hero-grid {
    padding: 40px 0 0;
  }

  .case-hero h1 {
    font-size: 38px;
    line-height: 1.05;
  }

  .case-hero-desc {
    font-size: 14px;
    margin-bottom: 28px;
  }

  .hero-btns {
    flex-direction: column;
    width: 60%;
  }

  .hero-btns .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-asterisk1,
  .hero-asterisk2 { display: none; }
}