*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  overflow: hidden;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Film grain */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99;
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px;
}

.page {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* Background */
.bg {
  position: absolute;
  inset: 0;
}

.bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 20% center;
}

/* Overlay — dark enough for text, fades to show illustration */
.overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to left,
    rgba(10, 10, 10, 0.92) 0%,
    rgba(10, 10, 10, 0.82) 35%,
    rgba(10, 10, 10, 0.5) 55%,
    rgba(10, 10, 10, 0.15) 75%,
    rgba(10, 10, 10, 0.05) 100%
  );
}

/* Content — wider column, more breathing room */
.content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 4vw;
  max-width: 640px;
  margin-left: auto;
  gap: 1.25rem;
}

/* Brand block */
.brand {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}


/* Headline */
.headline {
  font-size: clamp(1.75rem, 4.5vw, 2.5rem);
  font-weight: 700;
  color: #f0ebe3;
  line-height: 1.15;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.4);
}

/* Origin */
.origin {
  font-size: 0.9rem;
  color: #aaa;
  line-height: 1.6;
}

/* Mobile-only elements — hidden on desktop */
.mobile-tagline {
  display: none;
}

/* Location badge */
.location-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  color: #c9a96e;
  border: 1px solid rgba(201, 169, 110, 0.3);
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Accordion */
.accordion-toggle {
  background: none;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #c9a96e;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.5rem 0;
  width: 100%;
  text-align: left;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

.accordion-toggle::after {
  content: '+';
  float: right;
  font-weight: 400;
  font-size: 1rem;
  color: #666;
  transition: transform 0.3s;
}

.accordion-toggle.open::after {
  content: '−';
  color: #c9a96e;
}

.accordion-toggle:hover {
  color: #dbb97c;
}

.accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.accordion-panel p {
  font-size: 0.8rem;
  color: #b5ada4;
  line-height: 1.5;
  padding: 0.4rem 0 0.2rem;
}

/* What I do */
.what-i-do {
  font-size: 0.9rem;
  font-weight: 500;
  color: #c4bdb4;
  line-height: 1.6;
}


/* ---- Chat window ---- */
.chat-window {
  background: rgba(14, 14, 14, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  overflow: hidden;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(18, 18, 18, 0.8);
}

.chat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  flex-shrink: 0;
}

.chat-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #d4cfc8;
}

.chat-status {
  font-size: 0.6875rem;
  color: #4ade80;
  margin-left: auto;
}

/* Stats bar inside chat window */
.chat-stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding: 0.35rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(16, 16, 16, 0.6);
}

.stat {
  font-size: 0.6875rem;
  color: #777;
}

.stat-number {
  font-weight: 700;
  color: #c9a96e;
  font-variant-numeric: tabular-nums;
  transition: text-shadow 0.6s ease;
}

.stat-number.done {
  text-shadow: 0 0 12px rgba(201, 169, 110, 0.4);
}

.stat-sep {
  font-size: 0.5rem;
  color: #444;
}

.chat-body {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  height: 195px;
  overflow: hidden;
}

/* Bubbles */
.bubble {
  max-width: 92%;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  font-size: 0.875rem;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.bubble.visible {
  opacity: 1;
  transform: translateY(0);
}

.bubble-user {
  align-self: flex-end;
  background: #2b5278;
  color: #d8e4ef;
  border-bottom-right-radius: 3px;
}

.bubble-dalam {
  align-self: flex-start;
  background: #1a1a1a;
  color: #c4bfb6;
  border-bottom-left-radius: 3px;
  overflow-y: auto;
  max-height: 155px;
}

/* Message lines */
.msg-line {
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  margin-bottom: 0.15rem;
}

.msg-line.visible {
  opacity: 1;
  transform: translateY(0);
}

.msg-line strong {
  color: #e0dbd4;
}

/* Typing dots */
.typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0.15rem 0;
}

.typing-dots span {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #666;
  animation: dotBounce 1.2s ease-in-out infinite;
}

.typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.typing-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes dotBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-3px); opacity: 1; }
}

/* CTA */
.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 380px;
  padding: 1rem 2rem;
  margin: 0 auto;
  background: #c9a96e;
  color: #111;
  font-family: inherit;
  font-size: 1.125rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 14px;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  gap: 0.5rem;
  box-shadow: 0 0 0 1px rgba(201, 169, 110, 0.3), 0 6px 24px rgba(201, 169, 110, 0.3);
  letter-spacing: 0.01em;
}

.cta:hover {
  background: #dbb97c;
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(201, 169, 110, 0.4), 0 8px 32px rgba(201, 169, 110, 0.4);
}

.tg-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* Dictionary entry — floating bottom-left */
.dict-float {
  position: absolute;
  z-index: 2;
  bottom: 2rem;
  left: 3vw;
  background: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-left: 2px solid #c9a96e;
  padding: 0.6rem 1rem 0.6rem 0.75rem;
  border-radius: 0 8px 8px 0;
}

.dict-line {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
  margin-bottom: 0.1rem;
}

.dict-word {
  font-size: 1.4rem;
  font-weight: 700;
  font-style: italic;
  color: #c9a96e;
}

.dict-pron {
  font-size: 0.75rem;
  color: #888;
  font-style: italic;
}

.dict-pos {
  font-size: 0.625rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

.dict-def {
  font-size: 0.8125rem;
  color: #bbb;
  font-style: italic;
  line-height: 1.4;
}

/* Top nav */
.top-nav {
  position: absolute;
  top: 1rem;
  right: 2rem;
  z-index: 3;
}

.partner-link {
  font-size: 0.75rem;
  color: #c9a96e;
  text-decoration: none;
  letter-spacing: 0.04em;
  font-weight: 500;
  border: 1px solid rgba(201, 169, 110, 0.25);
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}

.partner-link:hover {
  background: rgba(201, 169, 110, 0.1);
  color: #dbb97c;
}

/* ---- Mobile ---- */
@media (max-width: 768px) {
  .overlay {
    background: linear-gradient(
      to top,
      rgba(10, 10, 10, 0.98) 0%,
      rgba(10, 10, 10, 0.96) 38%,
      rgba(10, 10, 10, 0.8) 50%,
      rgba(10, 10, 10, 0.2) 62%,
      rgba(10, 10, 10, 0.0) 75%
    );
  }

  .bg img {
    object-position: 35% top;
  }

  .content {
    justify-content: flex-end;
    padding: 0 1.25rem 1.5rem;
    max-width: 100%;
    margin-left: 0;
    gap: 0.6rem;
  }

  .brand {
    position: absolute;
    top: 26%;
    right: 1.25rem;
    width: 50%;
    text-align: right;
  }

  .mobile-tagline {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #f0ebe3;
    line-height: 1.45;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 1), 0 0 20px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 0, 0, 0.5);
  }

  .headline {
    font-size: clamp(1.2rem, 5vw, 1.5rem);
    line-height: 1.2;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.9), 0 0 40px rgba(0, 0, 0, 0.5);
  }

  .chat-window {
    margin-top: 0;
  }

  .chat-body {
    height: 175px;
    padding: 0.6rem;
  }

  .chat-header {
    padding: 0.4rem 0.75rem;
  }

  .chat-label {
    font-size: 0.75rem;
  }

  .chat-status {
    font-size: 0.625rem;
  }

  .chat-stats {
    padding: 0.25rem 0.75rem;
  }

  .stat {
    font-size: 0.625rem;
  }

  .bubble {
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem;
    line-height: 1.45;
  }

  .bubble-dalam {
    max-height: 130px;
  }

  .cta {
    max-width: 100%;
    font-size: 1rem;
    padding: 0.85rem 1.5rem;
    border-radius: 12px;
  }

  .dict-float {
    display: none;
  }

  .top-nav {
    right: 1.25rem;
    top: 0.75rem;
  }

  .partner-link {
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }

  .accordions {
    display: none;
  }
}
