/* ==========================================================================
   Joly - 3D Bubble Glassmorphism Layout (Adapted from Ocean structure)
   ========================================================================== */

:root {
  --sky-start: #e9d5ff;
  --sky-mid: #f3e8ff;
  --sky-end: #faf5ff;
  --glass-bg: rgba(255, 255, 255, 0.35);
  --glass-border: rgba(255, 255, 255, 0.65);
  --glass-shadow: 0 8px 32px rgba(126, 34, 206, 0.15);
  --accent: #7e22ce;
  --accent-soft: #a855f7;
  --text-dark: #3b0764;
  --text-mid: #581c87;
  --text-soft: #9333ea;
  --line: rgba(126, 34, 206, 0.15);
  --shimmer: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0) 30%,
    rgba(255, 255, 255, 0.8) 50%,
    rgba(255, 255, 255, 0) 70%
  );
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text-dark);
  background: linear-gradient(180deg, var(--sky-start) 0%, var(--sky-mid) 40%, var(--sky-end) 100%);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }

/* Background Deco */
body::before, body::after {
  content: ''; position: fixed; border-radius: 50%; pointer-events: none; z-index: 0;
}
body::before {
  width: 320px; height: 320px; top: -80px; left: -100px;
  background: radial-gradient(circle at 35% 35%, rgba(255,255,255,0.9) 0%, rgba(200,220,255,0.5) 40%, rgba(160,190,240,0.2) 70%, transparent 100%);
  box-shadow: inset -10px -10px 30px rgba(120,160,220,0.3), 0 0 60px rgba(180,210,255,0.4);
}
body::after {
  width: 200px; height: 200px; top: 15%; right: 5%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.95) 0%, rgba(210,225,255,0.6) 45%, rgba(170,200,245,0.25) 70%, transparent 100%);
  box-shadow: inset -8px -8px 20px rgba(120,160,220,0.25), 0 0 40px rgba(180,210,255,0.3);
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
section { position: relative; z-index: 4; }

/* Components */
.navbar {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  width: calc(100% - 48px); max-width: 1080px;
  background: rgba(255, 255, 255, 0.55); backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border); border-radius: 20px;
  box-shadow: 0 4px 32px rgba(100, 140, 200, 0.18); z-index: 1000;
}
.nav-content { display: flex; justify-content: space-between; align-items: center; height: 60px; padding: 0 28px; }
.logo-text { font-size: 1.4rem; font-weight: 800; background: linear-gradient(135deg, var(--accent) 0%, #9b8ef8 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.nav-links { display: flex; gap: 34px; }
.nav-links a { font-size: .92rem; font-weight: 500; color: var(--text-mid); transition: color .2s; }
.nav-links a:hover { color: var(--accent); }

.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 28px; font-size: .94rem; font-weight: 700; border: none; border-radius: 14px; cursor: pointer; transition: all .25s; }
.btn-dark { background: linear-gradient(135deg, var(--accent), var(--accent-soft)); color: #fff; box-shadow: 0 4px 16px rgba(91,94,244,0.35); }
.btn-dark:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(91,94,244,0.45); }
.btn-lg { padding: 16px 34px; font-size: 1rem; border-radius: 16px; }
.btn-xl { padding: 18px 38px; font-size: 1.1rem; border-radius: 18px; }
.outline-btn { background: rgba(255,255,255,.5); color: var(--text-mid); border: 1px solid var(--glass-border); backdrop-filter: blur(8px); }
.outline-btn:hover { background: rgba(255,255,255,.75); transform: translateY(-2px); }

/* Layout Grid Structure */
.hero-section { min-height: 100vh; display: flex; align-items: center; padding: 120px 0 80px; }
.hero-grid { display: grid; grid-template-columns: .92fr 1.08fr; gap: 34px; align-items: center; }
.hero-side { display: grid; grid-template-columns: 150px 1fr; gap: 16px; align-items: stretch; }

.hero-badge {
  display: inline-block; background: rgba(255,255,255,0.6); border: 1px solid rgba(255,255,255,0.8);
  color: var(--accent); font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: 6px 18px; border-radius: 100px; margin-bottom: 20px;
}
.hero-title { font-size: clamp(2.4rem, 5vw, 3.8rem); font-weight: 800; line-height: 1.15; letter-spacing: -0.03em; color: var(--text-dark); margin-bottom: 20px; }
.hero-subtitle { font-size: 1.05rem; color: var(--text-mid); line-height: 1.7; max-width: 520px; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-panel, .section-panel, .email-card {
  background: var(--glass-bg); backdrop-filter: blur(24px); border: 1px solid var(--glass-border); border-radius: 26px; box-shadow: var(--glass-shadow);
}
.hero-panel { padding: 0; overflow: hidden; position: relative; }
.hero-chat-header {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.3); font-size: .82rem;
}
.hero-chat-dots { display: flex; gap: 6px; }
.hero-chat-dots span { width: 9px; height: 9px; border-radius: 50%; background: rgba(91,94,244,0.2); }
.hero-chat-dots span:nth-child(1) { background: #ff6b6b; }
.hero-chat-dots span:nth-child(2) { background: #ffd166; }
.hero-chat-dots span:nth-child(3) { background: #4ade80; }
.hero-chat-meta { display: flex; flex-direction: column; gap: 2px; }
.hcl { font-weight: 700; color: var(--text-dark); }
.hcl:hover { color: var(--accent); }
.hcm { font-size: .72rem; color: var(--text-soft); }
.hcs { margin-left: auto; font-size: .72rem; color: var(--accent); background: rgba(91,94,244,0.1); padding: 4px 10px; border-radius: 12px; border: 1px solid rgba(91,94,244,0.2); }
.hero-chat-body { padding: 18px; background: rgba(255,255,255,0.15); }
.hero-chat-messages { display: flex; flex-direction: column; gap: 12px; }
.hm-wrap { display: flex; align-items: flex-end; gap: 10px; }
.hm-wrap.user { justify-content: flex-end; }
.hm-wrap.ai { justify-content: flex-start; }
.hm { max-width: 85%; padding: 12px 16px; border-radius: 18px; font-size: .88rem; line-height: 1.5; }
.hm.u { background: linear-gradient(135deg, var(--accent), var(--accent-soft)); color: #fff; border-bottom-right-radius: 4px; }
.hm.a { background: rgba(255,255,255,0.6); color: var(--text-dark); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.hm-label { display: block; font-size: .65rem; font-weight: 800; text-transform: uppercase; opacity: .6; margin-bottom: 4px; }

.hero-chat-input { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 10px; border-radius: 16px; background: rgba(255,255,255,0.25); border: 1px solid var(--line); }
.hero-input-box { flex: 1; font-size: .85rem; color: var(--text-soft); padding-left: 8px; }
.hero-send-btn { padding: 10px 16px; border: none; border-radius: 12px; background: var(--accent); color: #fff; font-weight: 700; cursor: pointer; }

.hero-stats { display: flex; flex-direction: column; gap: 12px; }
.stat { background: rgba(255,255,255,0.4); border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; justify-content: center; min-height: 82px; }
.stat strong { display: block; font-size: 1.4rem; color: var(--accent); line-height: 1.1; }
.stat span { display: block; margin-top: 4px; font-size: .7rem; font-weight: 700; text-transform: uppercase; color: var(--text-soft); letter-spacing: .05em; }

.section-panel { padding: 48px; margin-top: 80px; }
.section-top { text-align: center; max-width: 760px; margin: 0 auto 40px; }
.section-badge { display: inline-block; font-size: .78rem; font-weight: 700; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.section-title { font-size: 2.8rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 16px; }
.section-subtitle { font-size: 1.05rem; color: var(--text-soft); line-height: 1.7; }

.solution-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.solution-img-box {
  width: 100%; aspect-ratio: 1/1; background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(8px); border: 1px solid var(--glass-border);
  border-radius: 16px; margin-bottom: 20px; display: flex;
  align-items: center; justify-content: center; overflow: hidden;
}
.solution-img-box img {
  width: 90%; height: 90%; object-fit: contain;
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.solution-card:hover .solution-img-box img { transform: scale(1.1) translateY(-5px); }

.solution-card {
  background: rgba(255,255,255,0.3); border: 1px solid var(--glass-border); border-radius: 20px;
  padding: 24px; transition: all .3s; display: flex; flex-direction: column;
}
.solution-card:hover { transform: translateY(-8px); background: rgba(255,255,255,0.5); box-shadow: 0 12px 40px rgba(91,94,244,0.15); }
.solution-kicker { display: inline-block; font-size: .7rem; font-weight: 800; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.solution-card h4 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.solution-card p { font-size: .88rem; color: var(--text-soft); line-height: 1.5; }

.solution-proof {
  margin-top: 32px; background: rgba(255,255,255,0.4); border: 1px solid var(--line);
  border-radius: 20px; padding: 24px 32px; display: flex; justify-content: space-between; align-items: center;
}
.solution-proof p { font-size: 1rem; color: var(--text-mid); max-width: 600px; }
.solution-proof strong { font-size: 2.8rem; font-weight: 800; color: var(--accent); }
.solution-proof span { display: block; filter: grayscale(1); opacity: .5; margin-top: 4px; font-size: .7rem; font-weight: 800; }

.email-card { max-width: 760px; margin: 0 auto; padding: 40px; text-align: center; }
.email-form { display: grid; grid-template-columns: 1fr auto; gap: 14px; margin-top: 24px; }
.email-input { width: 100%; padding: 16px 20px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255,255,255,0.6); color: var(--text-dark); font: inherit; outline: none; }
.email-note { margin-top: 14px; font-size: .85rem; color: var(--text-soft); }

.footer-dark { background: rgba(232, 238, 248, 0.5); padding: 40px 0; border-top: 1px solid var(--line); text-align: center; }
.footer-bottom { font-size: .82rem; color: var(--text-soft); }

/* Decoration Elements */
.bubble { position: absolute; border-radius: 50%; pointer-events: none; z-index: 0; animation: floatBubble var(--duration, 6s) ease-in-out infinite alternate; }
.bubble::after { content: ''; position: absolute; top: 12%; left: 15%; width: 35%; height: 25%; background: rgba(255,255,255,0.8); border-radius: 50%; filter: blur(4px); }
@keyframes floatBubble { from { transform: translateY(0); } to { transform: translateY(-16px); } }

.terrain-wrapper { position: absolute; bottom: 0; left: 0; width: 100%; height: 45%; pointer-events: none; z-index: 1; overflow: hidden; }
.hill { position: absolute; border-radius: 50%; background: linear-gradient(180deg, #dde9f6, #ccdaee); box-shadow: inset 0 -4px 12px rgba(160,190,230,0.2); }
.hill-1 { width: 700px; height: 350px; bottom: -150px; left: -100px; animation: floatHill 20s ease-in-out infinite alternate; }
.hill-2 { width: 600px; height: 300px; bottom: -120px; left: 150px; animation: floatHill 25s ease-in-out infinite alternate-reverse; }
.hill-3 { width: 800px; height: 380px; bottom: -180px; right: -150px; animation: floatHill 22s ease-in-out infinite alternate; }

@keyframes floatHill {
  from { transform: translate(0, 0) rotate(0deg); }
  to { transform: translate(20px, 10px) rotate(1deg); }
}

/* Scroll Reveal */
.reveal { opacity: 1; transform: translateY(0); filter: none; transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.active {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* Hover Shimmer */
.solution-card, .hero-panel, .email-card {
  position: relative;
  overflow: hidden;
}
.solution-card::before, .hero-panel::before, .email-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 100%;
  height: 100%;
  background: var(--shimmer);
  transition: 0.6s;
  pointer-events: none;
  z-index: 2;
}
.solution-card:hover::before, .hero-panel:hover::before, .email-card:hover::after {
  left: 150%;
}

/* Hero Title Animation */
.hero-title {
  animation: heroEntry 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes heroEntry {
  from { opacity: 0; transform: translateY(40px); filter: blur(20px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* Global Responsive Adjustments applied to all pages */
@media (max-width: 900px) {
  .hero-grid, .solution-grid, .email-form, .hero-side, .features-grid, .pricing-grid, .stats-grid { 
      grid-template-columns: 1fr !important; 
      gap: 24px !important; 
  }
  .nav-links { display: none !important; }
  .hero-title { font-size: 2.2rem !important; line-height: 1.2 !important; }
  .section-title { font-size: 1.8rem !important; line-height: 1.3 !important; }
  .hero-desc { font-size: 1.05rem !important; }
  .container { padding: 0 20px !important; }
  .hero-section { padding-top: 120px !important; padding-bottom: 60px !important; }
  .section { padding: 60px 0 !important; }
  .footer-bottom { flex-direction: column !important; text-align: center !important; gap: 16px !important; align-items: center !important; }
  .footer-bottom div:nth-child(2) { margin-left: 0 !important; }
  .nav-actions { margin-left: auto !important; }
  .btn { padding: 12px 24px !important; font-size: 0.95rem !important; }
  .email-input { padding: 14px 20px !important; }
  body { overflow-x: hidden; }
}
