/* ═══════════════════════════════════════════
   Codemi — Homepage Styles
   Hero composition (phone + dashboard cards),
   11 sections, responsive breakpoints.
   Depends on common.css for tokens.
   ═══════════════════════════════════════════ */

html { scroll-behavior: smooth; }
body.homepage { background: var(--bg); color: var(--text-primary); }
.homepage .container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* Buttons (homepage hero + CTA) */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px; font-family: inherit; font-size: 14px; font-weight: 600; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: transform 0.15s, box-shadow 0.2s, background 0.2s, border-color 0.2s; white-space: nowrap; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-soft); box-shadow: var(--shadow-md); }
.btn-secondary { background: transparent; color: var(--navy); border-color: rgba(15, 23, 42, 0.18); }
.btn-secondary:hover { border-color: var(--navy); background: rgba(15, 23, 42, 0.02); }
.btn-lg { padding: 16px 28px; font-size: 15px; }
.btn-arrow { transition: transform 0.2s; font-size: 16px; line-height: 1; }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* ═══════════════════════════════
   HERO
═══════════════════════════════ */
.hero { position: relative; padding: 72px 0 96px; overflow: hidden; background: radial-gradient(ellipse 1100px 600px at 50% -100px, rgba(22, 163, 74, 0.08), transparent 60%), radial-gradient(ellipse 700px 500px at 100% 60%, rgba(59, 130, 246, 0.05), transparent 60%), var(--bg); }
.hero::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(circle at 1px 1px, rgba(15, 23, 42, 0.05) 1px, transparent 0); background-size: 32px 32px; mask-image: radial-gradient(ellipse 70% 50% at 50% 30%, black 30%, transparent 100%); -webkit-mask-image: radial-gradient(ellipse 70% 50% at 50% 30%, black 30%, transparent 100%); pointer-events: none; }
.hero-inner { position: relative; z-index: 1; text-align: center; max-width: 920px; margin: 0 auto 64px; }
.hero-eyebrow { display: inline-block; background: rgba(15, 23, 42, 0.05); border: 1px solid rgba(15, 23, 42, 0.08); color: var(--text-secondary); font-size: 13px; font-weight: 600; padding: 7px 16px; border-radius: 999px; margin-bottom: 28px; letter-spacing: 0.01em; }
.hero h1 { font-size: clamp(40px, 6vw, 72px); font-weight: 800; line-height: 1.05; letter-spacing: -0.035em; color: var(--navy); margin-bottom: 28px; }
.hero h1 em { font-style: normal; color: var(--green); }
.hero-sub { font-size: clamp(17px, 1.5vw, 21px); color: var(--text-secondary); margin-bottom: 40px; line-height: 1.5; max-width: 720px; margin-left: auto; margin-right: auto; }
.hero-cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-visual {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  height: 720px;
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 40px;
  align-items: center;
}

/* PHONE — V1 CSS frame + screenshot inside */
.phone-stage { position: relative; width: 380px; height: 700px; margin: 0 auto; }
.phone-bg-glow {
  position: absolute; inset: -40px;
  background:
    radial-gradient(circle at 30% 40%, rgba(93, 179, 221, 0.32), transparent 60%),
    radial-gradient(circle at 70% 60%, rgba(34, 163, 63, 0.16), transparent 65%);
  filter: blur(40px); z-index: 0;
}
.phone-wrap {
  position: relative; width: 320px; height: 660px; margin: 0 auto;
  transform: perspective(1400px) rotateY(-6deg) rotateX(1deg);
  transform-style: preserve-3d;
  z-index: 2;
}
.phone-frame {
  position: absolute; inset: 0;
  background: #1A1A1F;
  border-radius: 48px;
  padding: 10px;
  box-shadow:
    0 60px 80px -20px rgba(15, 23, 42, 0.4),
    0 24px 48px -12px rgba(15, 23, 42, 0.25),
    0 0 0 1.5px rgba(255,255,255,0.08) inset;
}
.phone-screen {
  position: absolute;
  top: 10px; left: 10px; right: 10px; bottom: 10px;
  border-radius: 40px;
  overflow: hidden;
  background: #76C5E8;
}
.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.phone-notch {
  position: absolute;
  top: 14px; left: 50%;
  transform: translateX(-50%);
  width: 110px; height: 28px;
  background: #1A1A1F;
  border-radius: 0 0 18px 18px;
  z-index: 3;
}

/* DASHBOARD CARDS */
.dashboard-side { position: relative; height: 100%; padding: 0 30px; }
.dash-card {
  background: var(--bg-pure); border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 20px 40px -8px rgba(15, 23, 42, 0.10), 0 8px 16px -4px rgba(15, 23, 42, 0.05);
  position: absolute;
}
.dash-eyebrow { font-size: 10px; font-weight: 700; color: var(--text-tertiary); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 8px; }
.dash-title { font-size: 14px; font-weight: 700; color: var(--navy); letter-spacing: -0.01em; margin-bottom: 18px; }

.card-readiness { top: 50px; left: 30px; width: 320px; padding: 22px 26px; }
.readiness-row { display: flex; align-items: center; gap: 20px; }
.readiness-donut { width: 90px; height: 90px; flex-shrink: 0; }
.readiness-meta { flex: 1; }
.readiness-meta-label { font-size: 11px; color: var(--text-secondary); margin-top: 4px; font-weight: 600; }
.readiness-trend { font-size: 11px; color: var(--green-deep); font-weight: 700; margin-top: 6px; display: flex; align-items: center; gap: 4px; }

.card-activity { top: 270px; right: 30px; width: 320px; padding: 22px 24px; }
.activity-list { display: flex; flex-direction: column; gap: 14px; }
.activity-row { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: #3FBC5B; color: var(--navy-deep);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; flex-shrink: 0;
}
.avatar.b { background: #BFDBFE; }
.avatar.c { background: #FDE68A; }
.activity-text { flex: 1; min-width: 0; }
.activity-name { font-size: 12.5px; font-weight: 700; color: var(--navy); }
.activity-detail { font-size: 11px; color: var(--text-secondary); margin-top: 1px; }
.activity-badge {
  background: rgba(34, 163, 63, 0.12); color: var(--green-deep);
  font-size: 10px; font-weight: 800; padding: 3px 7px; border-radius: 6px; flex-shrink: 0;
}

.card-stat { bottom: 50px; left: 80px; width: 240px; padding: 22px 26px; }
.stat-num { font-size: 38px; font-weight: 800; color: var(--navy); letter-spacing: -0.025em; line-height: 1; }
.stat-num .pct { color: var(--green); font-size: 24px; margin-left: 2px; }
.stat-label { font-size: 11px; color: var(--text-secondary); margin-top: 8px; line-height: 1.45; }
.stat-spark { margin-top: 12px; display: flex; gap: 4px; align-items: flex-end; height: 26px; }
.spark-bar { flex: 1; background: var(--green); opacity: 0.35; border-radius: 2px; }
.spark-bar.active { opacity: 1; }

/* Floating */
@keyframes float-1 { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes float-2 { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes float-3 { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.card-readiness { animation: float-1 6s ease-in-out infinite; }
.card-activity { animation: float-2 7s ease-in-out infinite 1s; }
.card-stat { animation: float-3 8s ease-in-out infinite 2s; }

/* Layer labels */
.layer-label { position: absolute; font-size: 11px; font-weight: 700; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.12em; z-index: 3; }
.label-user { top: -28px; left: 30px; }
.label-leadership { top: -28px; right: 50%; }

/* ═══════════════════════════════
   TRUST
═══════════════════════════════ */
.trust { padding: 96px 0 80px; border-top: 1px solid var(--border-soft); }
.trust-headline { text-align: center; margin-bottom: 48px; }
.trust-headline h3 { font-size: clamp(20px, 2vw, 26px); font-weight: 700; color: var(--navy); letter-spacing: -0.02em; margin-bottom: 8px; }
.trust-headline p { font-size: 15px; color: var(--text-secondary); }
.client-logo-strip { display: flex; align-items: center; justify-content: center; gap: 56px; flex-wrap: wrap; padding: 16px 0; }
.client-logo {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.55;
  transition: opacity 0.2s;
  font-family: var(--font);
  white-space: nowrap;
}
.client-logo:hover { opacity: 1; }
.trust-meta { text-align: center; margin-top: 40px; font-size: 13px; color: var(--text-tertiary); }
.trust-meta strong { color: var(--text-primary); font-weight: 700; }

/* ═══════════════════════════════
   SECTION BASE
═══════════════════════════════ */
.section { padding: 112px 0; position: relative; }
.section-eyebrow { display: inline-block; font-size: 13px; font-weight: 700; color: var(--green); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 20px; }
.section-title { font-size: clamp(32px, 4.2vw, 52px); font-weight: 800; line-height: 1.08; letter-spacing: -0.03em; color: var(--navy); margin-bottom: 20px; }
.section-title em { font-style: normal; color: var(--green); }
.section-sub { font-size: clamp(17px, 1.4vw, 19px); color: var(--text-secondary); line-height: 1.55; max-width: 680px; }
.section-header { margin-bottom: 64px; max-width: 820px; }
.section-header.center { text-align: center; margin-left: auto; margin-right: auto; }
.section-header.center .section-sub { margin-left: auto; margin-right: auto; }

/* POV */
.pov { background: var(--bg-alt); }
.shift-flow { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.shift-item { background: var(--bg-pure); border: 1px solid var(--border-soft); border-radius: var(--radius-md); padding: 28px 32px; display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: center; transition: border-color 0.2s, transform 0.2s; }
.shift-item:hover { border-color: var(--green); transform: translateY(-2px); }
.shift-from-label { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--text-tertiary); letter-spacing: 0.05em; margin-bottom: 6px; }
.shift-from-text { font-size: 16px; font-weight: 500; color: var(--text-tertiary); line-height: 1.3; }
.shift-to-label { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--green); letter-spacing: 0.05em; margin-bottom: 6px; text-align: right; }
.shift-to-text { font-size: 17px; font-weight: 700; color: var(--navy); letter-spacing: -0.01em; line-height: 1.3; text-align: right; }
.shift-arrow { width: 32px; height: 32px; border-radius: 50%; background: rgba(22, 163, 74, 0.1); display: flex; align-items: center; justify-content: center; color: var(--green); font-size: 14px; flex-shrink: 0; }

/* ECOSYSTEM */
.ecosystem-section { background: var(--bg); }
.ecosystem-flow { background: var(--bg-alt); border-radius: var(--radius-lg); padding: 56px 48px; margin-bottom: 56px; border: 1px solid var(--border-soft); }
.ecosystem-flow-title { text-align: center; font-size: 18px; font-weight: 700; color: var(--navy); margin-bottom: 40px; letter-spacing: -0.01em; }
.flow-track { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; gap: 16px; align-items: center; }
.flow-step { text-align: center; padding: 20px 16px; background: var(--bg-pure); border-radius: 12px; border: 1px solid var(--border); }
.flow-step-num { display: inline-block; background: var(--green); color: #fff; font-size: 11px; font-weight: 800; padding: 4px 9px; border-radius: 999px; margin-bottom: 12px; letter-spacing: 0.03em; }
.flow-step-title { font-size: 17px; font-weight: 700; color: var(--navy); margin-bottom: 6px; letter-spacing: -0.01em; }
.flow-step-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
.flow-connector { color: var(--text-tertiary); font-size: 18px; font-weight: 500; }

/* PRODUCT GRID */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.product-card { background: var(--bg-pure); border: 1px solid var(--border-soft); border-radius: var(--radius-md); padding: 32px 28px; transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; display: flex; flex-direction: column; position: relative; overflow: hidden; text-decoration: none; color: inherit; }
.product-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--accent); }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--accent); }
.product-card[data-product="learn"] { --accent: var(--blue); }
.product-card[data-product="kapabel"] { --accent: var(--green); }
.product-card[data-product="ops"] { --accent: var(--teal); }
.product-card[data-product="chat"] { --accent: var(--green); }
.product-icon-wrap { width: 44px; height: 44px; border-radius: 10px; background: var(--accent); display: flex; align-items: center; justify-content: center; margin-bottom: 24px; }
.product-icon-wrap svg { width: 22px; height: 22px; color: #fff; }
.product-name { font-size: 19px; font-weight: 800; color: var(--navy); margin-bottom: 6px; letter-spacing: -0.015em; }
.product-role { font-size: 12px; font-weight: 600; color: var(--accent); margin-bottom: 16px; letter-spacing: 0.01em; }
.product-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.55; margin-bottom: 24px; flex: 1; }
.product-cta { color: var(--accent); text-decoration: none; font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; transition: gap 0.2s; }
.product-cta:hover { gap: 10px; }

/* ROUTE */
.route { background: var(--bg-alt); }
.route-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.route-card { background: var(--bg-pure); border: 1px solid var(--border-soft); border-radius: var(--radius-md); padding: 24px 28px; cursor: pointer; transition: all 0.2s; text-decoration: none; color: inherit; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.route-card:hover { border-color: var(--navy); transform: translateX(4px); box-shadow: var(--shadow-sm); }
.route-card-num { font-size: 12px; font-weight: 700; color: var(--green); letter-spacing: 0.05em; margin-bottom: 4px; }
.route-question { font-size: 17px; font-weight: 700; color: var(--navy); line-height: 1.35; letter-spacing: -0.01em; }
.route-product { font-size: 12px; color: var(--text-tertiary); font-weight: 500; margin-top: 6px; }
.route-arrow { color: var(--text-tertiary); font-size: 18px; transition: color 0.2s, transform 0.2s; flex-shrink: 0; }
.route-card:hover .route-arrow { color: var(--green); transform: translateX(4px); }

/* INDUSTRY */
.industry { background: var(--bg); }
.industry-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.industry-card { background: var(--bg-pure); border: 1px solid var(--border-soft); border-radius: var(--radius-md); padding: 32px; transition: border-color 0.2s, transform 0.2s; text-decoration: none; color: inherit; display: block; }
.industry-card:hover { border-color: var(--navy); transform: translateY(-2px); }
.industry-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--border-soft); }
.industry-icon { width: 44px; height: 44px; border-radius: 10px; background: rgba(22, 163, 74, 0.08); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.industry-icon svg { width: 22px; height: 22px; color: var(--green); }
.industry-name { font-size: 19px; font-weight: 800; color: var(--navy); letter-spacing: -0.015em; }
.industry-pain-label, .industry-solution-label { font-size: 11px; font-weight: 700; color: var(--text-primary); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }
.industry-solution-label { color: var(--green); margin-top: 16px; }
.industry-pain, .industry-solution { font-size: 14px; color: var(--text-secondary); margin-bottom: 8px; line-height: 1.55; }
.industry-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border-soft); }
.industry-tag { font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 6px; background: var(--bg-alt); color: var(--text-secondary); }

/* PROOF */
.proof { background: var(--bg-alt); }
.proof-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.proof-card { background: var(--bg-pure); border: 1px solid var(--border-soft); border-radius: var(--radius-md); padding: 32px 28px; transition: border-color 0.2s, transform 0.2s; }
.proof-card:hover { border-color: var(--green); transform: translateY(-2px); }
.proof-client { font-size: 17px; font-weight: 800; color: var(--navy); letter-spacing: -0.015em; margin-bottom: 4px; }
.proof-industry { font-size: 11px; color: var(--text-tertiary); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 20px; }
.proof-usecase-label { font-size: 10px; font-weight: 700; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.proof-usecase { font-size: 14px; color: var(--text-primary); line-height: 1.55; margin-bottom: 16px; }
.proof-products { padding-top: 16px; border-top: 1px solid var(--border-soft); display: flex; flex-wrap: wrap; gap: 6px; }
.proof-product-tag { font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 6px; background: rgba(22, 163, 74, 0.08); color: var(--green-deep); }

/* ENTERPRISE */
.enterprise { background: var(--navy); color: #fff; position: relative; overflow: hidden; }
.enterprise::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 700px 400px at 15% 30%, rgba(22, 163, 74, 0.15), transparent 50%), radial-gradient(ellipse 500px 400px at 95% 70%, rgba(59, 130, 246, 0.1), transparent 50%); }
.enterprise .container { position: relative; z-index: 1; }
.enterprise .section-title { color: #fff; }
.enterprise .section-eyebrow { color: var(--green-light); }
.enterprise .section-sub { color: rgba(255, 255, 255, 0.7); }
.ent-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.ent-item { background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: var(--radius-md); padding: 28px; transition: border-color 0.2s, background 0.2s; }
.ent-item:hover { border-color: rgba(74, 222, 128, 0.4); background: rgba(255, 255, 255, 0.05); }
.ent-icon { width: 40px; height: 40px; border-radius: 10px; background: rgba(74, 222, 128, 0.12); display: flex; align-items: center; justify-content: center; margin-bottom: 20px; }
.ent-icon svg { width: 20px; height: 20px; color: var(--green-light); }
.ent-title { font-size: 16px; font-weight: 700; color: #fff; margin-bottom: 10px; letter-spacing: -0.01em; }
.ent-desc { font-size: 13.5px; color: rgba(255, 255, 255, 0.65); line-height: 1.55; }

/* FINAL CTA */
.final-cta { padding: 120px 0; background: var(--bg-alt); text-align: center; }
.final-cta-inner { max-width: 760px; margin: 0 auto; }
.final-cta h2 { font-size: clamp(32px, 4.5vw, 56px); font-weight: 800; line-height: 1.1; letter-spacing: -0.03em; color: var(--navy); margin-bottom: 24px; }
.final-cta-sub { font-size: 18px; color: var(--text-secondary); margin-bottom: 36px; line-height: 1.55; }
.final-cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ═══════════════════════════════
   RESPONSIVE
═══════════════════════════════ */
@media (max-width: 1100px) {
  .flow-track { grid-template-columns: 1fr 1fr; gap: 16px; }
  .flow-connector { display: none; }
  .ent-grid { grid-template-columns: repeat(2, 1fr); }
  .proof-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .industry-grid, .shift-flow, .route-grid, .proof-grid { grid-template-columns: 1fr; }
  .section { padding: 80px 0; }
  .phone-wrap { transform: none; }
  .ecosystem-flow { padding: 32px 24px; }
  .flow-track { grid-template-columns: 1fr; }
  .ent-grid { grid-template-columns: 1fr; }
  .client-logo-strip { gap: 28px; }
  .client-logo { font-size: 13px; }
}
@media (max-width: 540px) {
  .product-grid { grid-template-columns: 1fr; }
  .hero-visual { grid-template-columns: 1fr; height: auto; gap: 24px; }
  /* Phone: scale down to fit mobile viewport */
  .phone-stage { width: 220px; height: 460px; margin: 0 auto; }
  .phone-wrap { width: 200px; height: 420px; transform: none; }
  /* Dashboard cards: constrain to container width */
  .dashboard-side { padding: 0; height: 400px; }
  .card-readiness, .card-activity, .card-stat { width: calc(100% - 20px); left: 10px; right: auto; }
  .card-activity { right: 10px; left: auto; }
  /* CTA rows: stack vertically, full-width buttons */
  .hero-cta-row, .final-cta-row { flex-direction: column; align-items: stretch; }
  .hero-cta-row .btn, .final-cta-row .btn { width: 100%; justify-content: center; }
  .client-logo-strip { gap: 16px; }
  .client-logo { font-size: 12px; }
  .shift-item { grid-template-columns: 1fr; text-align: center; }
  .shift-from-text, .shift-to-text, .shift-from-label, .shift-to-label { text-align: center; }
  .shift-arrow { margin: 0 auto; transform: rotate(90deg); }
}

@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.hero-eyebrow, .hero h1, .hero-sub, .hero-cta-row, .hero-visual { animation: fadeUp 0.7s ease-out both; }
.hero h1 { animation-delay: 0.1s; }
.hero-sub { animation-delay: 0.2s; }
.hero-cta-row { animation-delay: 0.3s; }
.hero-visual { animation-delay: 0.4s; }
