/* ============================================================
   LC COMMERCE v3 — Light Minimal Theme
   ============================================================ */

:root {
  --bg: #fafafa;
  --text: #1a1a1a;
  --text-muted: #6b6b6b;
  --text-light: #777;
  --border: rgba(0, 0, 0, 0.06);
  --card-border: rgba(255, 255, 255, 0.2);
  --font-display: 'Space Mono', monospace;
  --font-body: 'Sora', sans-serif;
}

/* --- Reset --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body { background: var(--bg); color: var(--text); font-family: var(--font-body); overflow-x: hidden; }
a { color: inherit; text-decoration: none; }

/* --- Three.js Container --- */
#particle-container {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
}
#particle-container canvas { display: block; }

/* --- Header --- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100; padding: 1.5rem 3rem;
}
.site-header nav {
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.25em; color: var(--text);
}
.nav-links { display: flex; align-items: center; gap: 2.5rem; }
.nav-links a {
  font-family: var(--font-body);
  font-size: 0.85rem; font-weight: 400;
  color: var(--text-muted); transition: color 0.3s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  color: var(--text) !important;
  font-weight: 600 !important;
  background: rgba(0, 0, 0, 0.05);
  padding: 0.5rem 1.2rem;
  border-radius: 100px;
  transition: background 0.3s ease;
}
.nav-cta:hover { background: rgba(0, 0, 0, 0.1); }

/* --- Hero --- */
#hero {
  position: relative; z-index: 10;
  width: 100%; height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 2rem;
}
.hero-inner { max-width: 800px; }
.hero-heading {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  font-weight: 700; line-height: 1.1;
  letter-spacing: -0.03em; color: var(--text);
  margin-bottom: 1.5rem;
}
.hero-heading .line {
  display: block; opacity: 0; transform: translateY(20px);
  animation: fadeUp 0.7s ease forwards;
}
.hero-heading .line:nth-child(1) { animation-delay: 0.1s; }
.hero-heading .line:nth-child(2) { animation-delay: 0.25s; }

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.hero-sub {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 1.3vw, 1.2rem);
  font-weight: 300; color: var(--text-muted);
  opacity: 0; animation: fadeUp 0.7s ease 0.45s forwards;
}

/* --- Scroll Container ---
   Desktop: 600vh gives ~5 screen-heights of scroll
   Each card gets ~15% of scroll = ~0.9 screens of visibility
   Gap between cards ~2-3% = comfortable breathing room
   ============================================================ */
#scroll-container {
  position: relative; width: 100%; height: 140vh; z-index: 5;
}

/* --- Scroll Sections --- */
.scroll-section {
  position: absolute; top: 0; left: 0; width: 100%;
  display: flex; align-items: center;
}

/* --- Card --- */
.card {
  background: linear-gradient(145deg, #d4d4d4, #a8a8a8);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 16px;
  padding: 2.5rem 3rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* --- Services: 3 cards side by side --- */
.section-services {
  justify-content: center;
  padding: 0 4vw;
}
.services-inner {
  width: 100%; max-width: 1200px;
  display: flex; flex-direction: column; align-items: center;
}
.services-inner .section-label { margin-bottom: 2rem; }
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  width: 100%;
}
.service-card {
  display: flex; flex-direction: column; gap: 1rem;
  transition: transform 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
}
.service-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.15);
}
.service-title {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  font-weight: 700; line-height: 1.2;
  letter-spacing: -0.01em; color: #1a1a1a;
}
.service-card .section-body { color: #2a2a2a; }
.card-link {
  font-family: var(--font-display);
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: #3a3a3a;
  margin-top: auto;
  transition: color 0.3s ease;
}
.service-card:hover .card-link { color: #1a1a1a; }

/* --- Section Typography --- */
.section-label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.65rem; font-weight: 400;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--text-light); margin-bottom: 1.25rem;
}
.section-body {
  font-family: var(--font-body);
  font-size: clamp(0.9rem, 1vw, 1.05rem);
  font-weight: 300; line-height: 1.75;
  color: var(--text-muted);
}

/* --- CTA Overlay --- */
#cta-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  z-index: 50;
  pointer-events: none;
  padding: 2rem;
}
#cta-overlay.active { pointer-events: auto; }
.cta-wrapper {
  display: flex; flex-direction: column; align-items: center; gap: 1.5rem;
  transform: scale(0);
  opacity: 0;
  width: 100%;
  max-width: 520px;
  max-height: 80vh;
}
.cta-input-wrap {
  position: relative; width: 100%;
}
#chat-input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem; font-weight: 400;
  color: var(--text);
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 24px;
  padding: 16px 56px 16px 24px;
  resize: none; overflow: hidden;
  min-height: 56px; max-height: 160px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
#chat-input::placeholder { color: var(--text-light); }
#chat-input:focus {
  border-color: rgba(0, 0, 0, 0.15);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.03);
}
.cta-submit {
  position: absolute; right: 8px; top: 50%;
  transform: translateY(-50%);
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: var(--text); color: var(--bg);
  border: none; border-radius: 50%; cursor: pointer;
  opacity: 0; transform: translateY(-50%) scale(0.9);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.cta-submit.visible {
  opacity: 1; transform: translateY(-50%) scale(1);
}
.cta-submit:hover { background: #333; }
.cta-book {
  font-family: var(--font-display);
  font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--text); padding: 0.75rem 2rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 100px;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.cta-book:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.2);
}
/* --- Chat Messages --- */
.chat-messages {
  width: 100%;
  max-height: 50vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
}
.chat-messages:empty { display: none; }

.chat-msg {
  max-width: 85%;
  padding: 0.75rem 1rem;
  border-radius: 16px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.6;
  font-weight: 300;
  opacity: 0;
  animation: fadeUp 0.3s ease forwards;
}
.chat-msg-text { white-space: pre-wrap; word-break: break-word; }

.chat-msg--user {
  align-self: flex-end;
  background: var(--text);
  color: var(--bg);
  border-bottom-right-radius: 4px;
}
.chat-msg--assistant {
  align-self: flex-start;
  background: rgba(0, 0, 0, 0.06);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.chat-msg--assistant .cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--text);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 0.8s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.chat-loading {
  align-self: flex-start;
  display: flex;
  gap: 4px;
  padding: 0.75rem 1rem;
}
.chat-loading span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: bounce 1.2s ease-in-out infinite;
}
.chat-loading span:nth-child(2) { animation-delay: 0.15s; }
.chat-loading span:nth-child(3) { animation-delay: 0.3s; }
@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}

/* --- Footer --- */
.site-footer {
  position: relative; z-index: 10;
  padding: 1.5rem; text-align: center;
}
.footer-inner {
  display: flex; flex-direction: column;
  align-items: center; gap: 0.4rem;
}
.footer-brand {
  font-family: var(--font-display);
  font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.25em; color: var(--text-light);
}
.footer-copy {
  font-family: var(--font-body);
  font-size: 0.7rem; color: var(--text-light);
}

/* ============================================================
   Service Pages — Normal document flow, no Three.js
   ============================================================ */
.service-page { background: var(--bg); }

.service-page .site-header {
  position: relative;
  background: var(--bg);
}

.sp-hero {
  padding: 6rem 2rem 4rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}
.sp-hero-heading {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700; line-height: 1.15;
  letter-spacing: -0.02em; color: var(--text);
  margin-bottom: 1.5rem;
}
.sp-hero-sub {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 1.2vw, 1.15rem);
  font-weight: 300; color: var(--text-muted);
  line-height: 1.7;
}

.sp-problem {
  padding: 4rem 2rem;
  max-width: 700px;
  margin: 0 auto;
}
.sp-section-heading {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 700; line-height: 1.2;
  color: var(--text);
  margin-bottom: 1.5rem;
}
.sp-section-body {
  font-family: var(--font-body);
  font-size: clamp(0.9rem, 1vw, 1.05rem);
  font-weight: 300; line-height: 1.8;
  color: var(--text-muted);
}
.sp-section-body + .sp-section-body { margin-top: 1.5rem; }

.sp-services {
  padding: 2rem 4vw 4rem;
  max-width: 1200px;
  margin: 0 auto;
}
.sp-services .section-label {
  text-align: center;
  display: block;
  margin-bottom: 2rem;
}
.sp-services .services-grid {
  grid-template-columns: repeat(2, 1fr);
}

.sp-audience {
  padding: 4rem 2rem;
  max-width: 700px;
  margin: 0 auto;
}

.sp-cta {
  padding: 6rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.sp-cta .cta-wrapper {
  transform: none;
  opacity: 1;
  position: relative;
}

/* --- Responsive: Tablet --- */
@media (max-width: 768px) {
  .site-header { padding: 1rem 1.5rem; }
  .nav-links { gap: 1.5rem; }
  .hero-heading { font-size: clamp(2rem, 9vw, 3.5rem); }

  #scroll-container { height: 120vh; }

  .section-services { padding: 0 1.5rem; }
  .services-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .card { padding: 2rem 1.5rem; }
  .cta-wrapper { max-width: 100%; }

  .sp-hero { padding: 4rem 1.5rem 3rem; }
  .sp-problem { padding: 3rem 1.5rem; }
  .sp-services { padding: 2rem 1.5rem 3rem; }
  .sp-audience { padding: 3rem 1.5rem; }
  .sp-cta { padding: 4rem 1.5rem; }
}

/* --- Responsive: Phone --- */
@media (max-width: 480px) {
  .nav-links a:not(.nav-cta) { display: none; }
  .hero-heading { font-size: clamp(1.8rem, 10vw, 2.8rem); }

  #scroll-container { height: 140vh; }

  .card { padding: 1.75rem 1.25rem; border-radius: 12px; }
}
