/* ============================================================
   BangunHitung — Landing Page Stylesheet
   ============================================================ */

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --accent: #3b82f6;
  --bg-landing: #f8fafc;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --card-bg: rgba(255, 255, 255, 0.8);
  --card-border: rgba(226, 232, 240, 0.8);
  --glow: rgba(37, 99, 235, 0.2);
}

.dark {
  --bg-landing: #0b0f19;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --card-bg: rgba(15, 23, 42, 0.8);
  --card-border: rgba(51, 65, 85, 0.8);
  --glow: rgba(37, 99, 235, 0.4);
}

/* ── Base ── */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-landing);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}

/* ── Glow / Background Lights ── */
.blur-glow {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37,99,235,0.15) 0%, rgba(37,99,235,0) 70%);
  filter: blur(40px);
  z-index: -1;
  pointer-events: none;
}

.glow-1 { top: 10%; left: -5%; }
.glow-2 { top: 50%; right: -5%; }

/* ── Container ── */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Glassmorphism Card ── */
.glass-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 20px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.04);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px 0 rgba(37, 99, 235, 0.1);
  border-color: var(--primary);
}

/* ── Header / Navbar ── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 250, 252, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
  transition: background 0.3s;
}

.dark header {
  background: rgba(11, 15, 25, 0.8);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.logo > span {
  color: var(--text-main);
}

.logo > span > span {
  color: var(--primary);
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 4px 12px rgba(37,99,235,0.3);
  color: #ffffff !important;
}

.logo-icon i,
.logo-icon svg {
  color: #ffffff !important;
  stroke: #ffffff !important;
}

/* ── Hero Section ── */
.hero {
  padding: 4.5rem 0;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(0.95rem, 2.5vw, 1.125rem);
  color: var(--text-muted);
  margin-bottom: 2.25rem;
  max-width: 540px;
}

/* ── Buttons ── */
.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 10px 25px var(--glow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px var(--glow);
}

.btn-cta:active {
  transform: translateY(1px);
}

/* ── Interactive 3D Isometric SVG Animation ── */
.interactive-house-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  aspect-ratio: 1;
}

.interactive-house {
  width: 100%;
  max-width: 420px;
  filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.08));
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.interactive-house:hover {
  transform: rotateX(5deg) rotateY(-5deg);
}

/* Isometric Components */
.iso-part {
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.3s;
}

.iso-part:hover {
  filter: brightness(1.1) drop-shadow(0 10px 20px rgba(37, 99, 235, 0.25));
}

/* Specific component translates for explode effect on hover */
#iso-atap:hover {
  transform: translate(0, -30px);
}

#iso-dinding:hover {
  transform: translate(0, -18px);
}
#iso-dinding:hover ~ #iso-atap {
  transform: translate(0, -18px);
}

#iso-lantai:hover {
  transform: translate(0, -10px);
}
#iso-lantai:hover ~ #iso-dinding,
#iso-lantai:hover ~ #iso-atap {
  transform: translate(0, -10px);
}

#iso-halaman:hover {
  transform: translate(0, 10px);
}

/* Status Hover Box on Hero */
.info-bubble {
  position: absolute;
  bottom: 0px;
  right: 0px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 1rem;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
  max-width: 260px;
  opacity: 0;
  transform: scale(0.9) translateY(10px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}

.info-bubble.show {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.info-bubble h4 {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.info-bubble p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── Features Section ── */
.features {
  padding: 5rem 0;
}

.section-head {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 3.5rem;
}

.section-head h2 {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.section-head p {
  color: var(--text-muted);
}

/* ── Interactive Headline Icon Badge ── */
.headline-icon-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12) 0%, rgba(59, 130, 246, 0.06) 100%);
  border: 1.5px solid rgba(37, 99, 235, 0.2);
  color: var(--primary);
  margin: 0 auto 1.25rem;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.08), inset 0 1px 0 rgba(255,255,255,0.6);
}

.headline-icon-badge .lucide {
  width: 28px;
  height: 28px;
  stroke-width: 2px;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.section-head:hover .headline-icon-badge {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border-color: transparent;
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.4), 0 4px 12px rgba(37, 99, 235, 0.2);
  transform: translateY(-3px);
}

.section-head:hover .headline-icon-badge .lucide {
  transform: scale(1.15) rotate(10deg);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature-card {
  padding: 2rem;
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(37, 99, 235, 0.05) 100%);
  border: 1px solid rgba(37, 99, 235, 0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--primary);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.05);
}

.feature-icon .lucide {
  width: 26px;
  height: 26px;
  stroke-width: 2.2px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover effects on the card triggers icon animation */
.feature-card:hover .feature-icon {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
  transform: translateY(-2px) scale(1.05);
}

.feature-card:hover .feature-icon .lucide {
  transform: scale(1.1) rotate(8deg);
}

.feature-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ── SEO Artikel / Kamus Bangunan Section ── */
.articles {
  padding: 5rem 0;
  background: rgba(37, 99, 235, 0.02);
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.article-card {
  padding: 1.75rem;
  border-radius: 16px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
}

.article-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 99px;
  margin-bottom: 1rem;
}

.dark .article-tag {
  background: rgba(37, 99, 235, 0.2);
  color: #93c5fd;
}

.article-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.article-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.article-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.875rem;
}

.article-link:hover {
  text-decoration: underline;
}

/* ── FAQ Section ── */
.faq {
  padding: 5rem 0;
}

.faq-list {
  max-width: 760px;
  margin: 0 auto;
}

.faq-item {
  margin-bottom: 1rem;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  overflow: hidden;
  background: var(--card-bg);
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  background: none;
  border: none;
  text-align: left;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  outline: none;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-top: 1px solid transparent;
}

.faq-item.open .faq-answer {
  max-height: 200px;
  padding: 1.25rem 1.5rem;
  border-top-color: var(--card-border);
}

.faq-toggle {
  font-size: 1.25rem;
  transition: transform 0.3s;
}

.faq-item.open .faq-toggle {
  transform: rotate(45deg);
}

/* ── Footer ── */
footer {
  padding: 3rem 0;
  border-top: 1px solid var(--card-border);
  text-align: center;
  background: var(--bg-landing);
}

/* ── Footer Premium ── */
.footer-premium {
  background: var(--bg-landing);
  border-top: 1px solid var(--card-border);
  padding: 5rem 0 0;
  transition: background 0.3s, border-color 0.3s;
  text-align: left;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

.footer-brand-card {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: white;
  padding: 2.5rem;
  border-radius: 24px;
  box-shadow: 0 12px 30px var(--glow);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.25rem;
  color: white;
  margin-bottom: 1.25rem;
}

.footer-logo span span {
  color: #eff6ff;
}

.footer-brand-desc {
  font-size: 0.875rem;
  line-height: 1.6;
  opacity: 0.9;
  margin-bottom: 2rem;
}

.footer-socials {
  display: flex;
  gap: 0.75rem;
}

.social-icon {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}

.social-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
}

.social-icon svg[fill="currentColor"] {
  fill: currentColor;
  stroke: none;
}

.social-icon:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

.footer-column h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-main);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  align-items: flex-start;
  text-align: left;
}

.footer-links li {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid var(--card-border);
  padding: 1.5rem 0;
  background: rgba(0, 0, 0, 0.02);
}

.dark .footer-bottom {
  background: rgba(0, 0, 0, 0.2);
}

.footer-bottom-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

@media (max-width: 600px) {
  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
    justify-content: center;
  }
}

.footer-bottom p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.footer-attribution {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.heart-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ef4444;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.heart-icon svg {
  width: 14px;
  height: 14px;
  fill: #ef4444;
  stroke: #ef4444;
  display: block;
}

.heart-icon:hover {
  transform: scale(1.3);
  animation: heartBeat 0.8s infinite alternate ease-in-out;
}

@keyframes heartBeat {
  0% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1.35);
  }
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 3rem;
  }
  .footer-brand-card {
    grid-column: span 2;
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-brand-card {
    grid-column: span 1;
  }
}

/* ── Responsive ── */
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

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

  .interactive-house-wrapper {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
  }

  .info-bubble {
    bottom: -20px;
    right: 50%;
    transform: translate(50%, 0) scale(0.9);
  }

  .info-bubble.show {
    transform: translate(50%, 0) scale(1);
  }
}

@media (max-width: 600px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }
  .nav-container {
    height: 60px;
  }
  .logo {
    font-size: 1.1rem;
  }
  .logo-icon {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }
  header .btn {
    display: none !important;
  }
  .hero {
    padding: 2.5rem 0;
  }
  .hero-title {
    font-size: 1.65rem !important;
  }
  .footer-brand-card {
    padding: 1.5rem;
  }
}

/* ── FAQ Grid Pattern ── */
.faq {
  position: relative;
  overflow: hidden;
}

.faq-grid-pattern {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, var(--card-border) 1.2px, transparent 1.2px),
    linear-gradient(to bottom, var(--card-border) 1.2px, transparent 1.2px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at center, black 30%, transparent 75%);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}

.faq .container {
  position: relative;
  z-index: 1;
}
