/* ============================================
   ZIFFI — Component Styles
   Buttons, section helpers, glass cards,
   demo video, bento, comparison, social proof,
   CTA, footer, animations, responsive
   ============================================ */

/* ---- Section basics ---- */
section {
  position: relative;
  z-index: 2
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px
}

.section-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9CA3AF;
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(32px, 4.5vw, 50px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 16px;
  color: #111827;
}

.section-sub {
  font-size: 18px;
  color: #6B7280;
  line-height: 1.6;
  max-width: 600px
}

/* ---- Section dividers ---- */
.section-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(17, 24, 39, 0.08) 50%, transparent 100%);
  margin: 80px 0;
}

/* ---- Glass card system ---- */
.glass-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border: 1px solid rgba(15, 15, 25, 0.08);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-sm);
}

.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(400px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(17, 24, 39, 0.03), transparent 50%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
  z-index: 1;
}

.glass-card:hover {
  border-color: rgba(17, 24, 39, 0.15);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.glass-card:hover::before {
  opacity: 1
}

/* ---- Demo Video ---- */
.demo-section {
  padding: 120px 0;
  text-align: center;
  position: relative
}

.demo-container-wrapper {
  margin: 48px auto 0;
  max-width: 1100px;
  perspective: 1500px;
  padding: 0 20px;
}

.demo-container {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.1s ease-out;
}

.video-container {
  margin: 0 auto;
  max-width: 100%;
  background: rgba(255, 255, 255, 0.9);
  border: 4px solid rgba(108, 108, 108, 0.3);
  border-radius: 30px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25),
    0 10px 20px -5px rgba(0, 0, 0, 0.15),
    inset 0 2px 4px rgba(255, 255, 255, 0.5);
  padding: 6px;
  background: #222222;
}

.video-container--wide {
  aspect-ratio: 1920/912;
}

.video-container video {
  border-radius: 24px;
}

/* ---- Bento ---- */
.bento {
  padding: 0 0 120px
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
  margin-top: 64px
}

.bento-card {
  padding: 30px;
  overflow: hidden;
  position: relative
}

.bc-1 {
  grid-column: span 3
}

.bc-2 {
  grid-column: span 3
}

.bc-3 {
  grid-column: span 2
}

.bc-4 {
  grid-column: span 2
}

.bc-5 {
  grid-column: span 2
}

.bc-6 {
  grid-column: span 4
}

.bc-7 {
  grid-column: span 2
}

.bento-icon {
  font-size: 30px;
  margin-bottom: 18px
}

.bento-card h3 {
  font-size: 17px;
  font-weight: 900;
  margin-bottom: 9px;
  letter-spacing: -0.3px;
  color: var(--text)
}

.bento-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  font-weight: 500
}

.bento-stat {
  font-size: 48px;
  font-weight: 900;
  letter-spacing: -0.04em;
  margin-bottom: 5px;
  color: var(--text)
}

.bento-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 14px
}

.tag-green {
  background: rgba(16, 185, 129, 0.08);
  color: var(--green)
}

.tag-violet {
  background: rgba(17, 24, 39, 0.06);
  color: #374151
}

.tag-blue {
  background: rgba(77, 124, 254, 0.08);
  color: var(--blue)
}

.int-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px
}

.int-chip {
  background: rgba(15, 15, 25, 0.04);
  border: 1px solid rgba(15, 15, 25, 0.08);
  padding: 9px 15px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 7px;
}

/* ---- Comparison ---- */
.compare {
  padding: 0 0 120px
}

.compare-table {
  margin-top: 48px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(15, 15, 25, 0.1);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.compare-header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  background: rgba(15, 15, 25, 0.02);
  border-bottom: 1px solid rgba(15, 15, 25, 0.06)
}

.compare-header div {
  padding: 18px 26px;
  font-size: 14px;
  font-weight: 800;
  border-right: 1px solid rgba(15, 15, 25, 0.04);
  color: var(--text)
}

.compare-header div:last-child {
  border-right: none
}

.compare-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border-bottom: 1px solid rgba(15, 15, 25, 0.04)
}

.compare-row:last-child {
  border-bottom: none
}

.compare-cell {
  padding: 18px 26px;
  font-size: 14px;
  border-right: 1px solid rgba(15, 15, 25, 0.04);
  font-weight: 500
}

.compare-cell:last-child {
  border-right: none
}

.compare-row .compare-cell:first-child {
  color: var(--text-secondary);
  font-weight: 700
}

.bad {
  color: var(--red)
}

.good {
  color: var(--green);
  font-weight: 700
}

.highlight-col {
  background: rgba(17, 24, 39, 0.02)
}

/* ---- For Finance Teams ---- */
.for-teams {
  padding: 120px 0;
  position: relative
}

.teams-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 64px
}

.team-card {
  padding: 34px;
  position: relative
}

.team-card-accent {
  position: absolute;
  top: 0;
  left: 26px;
  right: 26px;
  height: 3px;
  border-radius: 0 0 2px 2px
}

.accent-green {
  background: linear-gradient(90deg, transparent, var(--green), transparent)
}

.accent-blue {
  background: linear-gradient(90deg, transparent, var(--blue), transparent)
}

.accent-violet {
  background: linear-gradient(90deg, transparent, #374151, transparent)
}

.team-card-icon {
  font-size: 34px;
  margin-bottom: 22px
}

.team-card h3 {
  font-size: 21px;
  font-weight: 900;
  margin-bottom: 11px;
  letter-spacing: -0.3px;
  color: var(--text)
}

.team-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 18px;
  font-weight: 500
}

.team-card-agent {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase
}

.teams-cta {
  text-align: center;
  margin-top: 48px
}

/* ---- Works Where You Are — Side-by-side Phones + Text ---- */
.works-where {
  padding: 100px 0 100px;
  overflow: hidden;
}

.ww-layout {
  max-width: 1260px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 40px;
}

/* ── LEFT: Three phones side-by-side, spaced — 65% ── */
.ww-phones {
  position: relative;
  flex: 0 0 65%;
  height: 540px;
  perspective: 1400px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-top: 28px;
}

.ww-phone-card {
  position: relative;
  width: 230px;
  height: 499px;
  overflow: hidden;
  border-radius: 4px;
  will-change: transform;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1),
              z-index 0s;
}

.ww-phone-card iframe {
  width: 393px;
  height: 852px;
  transform: scale(0.585);
  transform-origin: top left;
  border: none;
  display: block;
  pointer-events: none;
}

/* Label above each phone */
.ww-phone-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 0 8px 6px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #6B7280;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: color 0.4s ease;
}

.ww-phone-label svg { flex-shrink: 0; }

/* Default z-index layering + idle floating */
.ww-phone-card[data-idx="0"] { z-index: 3; animation: wwFloat0 4s ease-in-out infinite; }
.ww-phone-card[data-idx="1"] { z-index: 4; animation: wwFloat1 4.5s ease-in-out infinite; }
.ww-phone-card[data-idx="2"] { z-index: 2; animation: wwFloat2 5s ease-in-out infinite; }

@keyframes wwFloat0 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes wwFloat1 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
@keyframes wwFloat2 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* The front card gets emphasis */
.ww-phone-card.ww-front {
  z-index: 10 !important;
}

.ww-phone-card.ww-front .ww-phone-label {
  color: #111827;
}

/* ── RIGHT: Text + features ── */
.ww-text {
  flex: 1;
  min-width: 0;
  padding-top: 8px;
}

.ww-heading {
  font-family: 'Inter', sans-serif;
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
  color: #111827;
  margin: 0 0 14px;
}

.ww-sub {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: #6B7280;
  line-height: 1.65;
  margin: 0 0 36px;
  max-width: 380px;
}

/* Trait list — minimal, left-accented */
.ww-traits {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ww-trait {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(17, 24, 39, 0.06);
}

.ww-trait:last-child {
  border-bottom: none;
}

.ww-trait-accent {
  flex-shrink: 0;
  width: 3px;
  height: 100%;
  min-height: 36px;
  border-radius: 2px;
  background: linear-gradient(180deg, #6366F1 0%, #818CF8 100%);
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.ww-trait:hover .ww-trait-accent {
  opacity: 1;
}

.ww-trait strong {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.01em;
  display: block;
  margin-bottom: 2px;
}

.ww-trait span:not(.ww-trait-accent) {
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  color: #6B7280;
  line-height: 1.55;
}

/* ── Responsive ── */
@media (max-width: 1100px) {
  .ww-phones { flex: 0 0 60%; }

  .ww-phone-card {
    width: 200px;
    height: 434px;
  }

  .ww-phone-card iframe {
    transform: scale(0.509);
  }
}

@media (max-width: 900px) {
  .ww-layout {
    flex-direction: column;
    gap: 48px;
    align-items: center;
  }

  .ww-phones {
    flex: none;
    width: 100%;
    max-width: 620px;
    height: 460px;
  }

  .ww-phone-card {
    width: 180px;
    height: 390px;
  }

  .ww-phone-card iframe {
    transform: scale(0.458);
  }

  .ww-text {
    text-align: center;
    padding-top: 0;
  }

  .ww-sub {
    margin-left: auto;
    margin-right: auto;
  }

  .ww-traits {
    max-width: 400px;
    margin: 0 auto;
  }
}

@media (max-width: 640px) {
  .works-where {
    padding: 72px 0 56px;
  }

  .ww-layout { padding: 0 16px; gap: 36px; }

  .ww-phones { height: 400px; max-width: 360px; }

  .ww-phone-card {
    width: 150px;
    height: 325px;
  }

  .ww-phone-card iframe {
    transform: scale(0.381);
  }

}

/* ---- Social Proof ---- */
.proof {
  padding: 0 0 120px;
  overflow: hidden
}

.tweets-marquee {
  display: flex;
  gap: 20px;
  margin-top: 48px;
  animation: marquee 45s linear infinite;
  width: max-content;
}

.tweets-marquee:hover {
  animation-play-state: paused
}

@keyframes marquee {
  0% {
    transform: translateX(0)
  }

  100% {
    transform: translateX(-50%)
  }
}

.tweet {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(15, 15, 25, 0.08);
  border-radius: var(--radius-md);
  padding: 26px;
  min-width: 380px;
  max-width: 420px;
  flex-shrink: 0;
  transition: all 0.3s;
  box-shadow: var(--shadow-sm);
}

.tweet:hover {
  border-color: rgba(17, 24, 39, 0.15);
  box-shadow: var(--shadow-md)
}

.tweet-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px
}

.tweet-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #111827, #374151);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.tweet-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--text)
}

.tweet-handle {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600
}

.tweet-text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  font-weight: 500
}

.tweet-text strong {
  color: var(--text);
  font-weight: 800
}

.proof-stat {
  text-align: center;
  margin-top: 72px
}

/* ---- Final CTA ---- */
.final-cta {
  padding: 0 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 88vh;
}

/* Subtle animated radial glow */
.final-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(255, 255, 255, 0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Dot grid texture */
.final-cta::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
}

.cta-content {
  position: relative;
  z-index: 2;
  font-family: 'Inter', sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  gap: 0;
  padding: 64px 0 56px;
}

.final-cta h2 {
  font-size: clamp(34px, 5vw, 50px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 0;
  color: #ffffff;
  width: 100%;
}

.cta-sub {
  font-size: 13px !important;
  color: rgba(255, 255, 255, 0.32) !important;
  margin-top: 8px !important;
  line-height: 1.5 !important;
  letter-spacing: 0.01em;
  font-weight: 400 !important;
}

.final-cta p {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0;
  line-height: 1.65;
  font-weight: 400;
  margin-top: 16px;
  width: 100%;
}

.final-cta .section-eyebrow {
  color: rgba(255, 255, 255, 0.2);
  margin-bottom: 0;
  font-size: 10px;
  letter-spacing: 0.2em;
  width: 100%;
  font-weight: 600;
}

.user-type-toggle {
  display: inline-flex;
  gap: 2px;
  justify-content: center;
  width: auto;
  margin: 24px auto 0;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.user-type-option {
  padding: 7px 18px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.4);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.user-type-option:hover {
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.06);
}

.user-type-option.active {
  background: rgba(255, 255, 255, 1);
  color: #000000;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}

.cta-form {
  display: flex;
  flex-direction: column;
  gap: 9px;
  width: 100%;
  max-width: 400px;
  margin-top: 18px;
}

.cta-input-row {
  display: flex;
  gap: 8px;
  width: 100%;
}

.cta-input-row .cta-input {
  flex: 1;
  min-width: 0;
}

.cta-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  font-weight: 400;
}

.cta-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.cta-input:focus {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

.final-cta .btn-primary {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 100px;
  width: 100%;
  margin-top: 8px;
}

.final-cta .btn-primary:hover {
  background: #f3f4f6;
  border-color: #f3f4f6;
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.2);
}

.error-message {
  max-width: 460px;
  margin: 12px auto;
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  font-size: 14px;
  font-weight: 500;
}

.cta-note {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.3);
  font-weight: 500;
  margin-top: 14px;
  letter-spacing: 0.01em;
}

.cta-note span {
  color: var(--green);
  font-weight: 700
}

.success-state {
  display: none;
  color: var(--green);
  font-size: 17px;
  font-weight: 700;
  padding: 20px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  max-width: 460px;
  margin: 0 auto;
}

/* ---- Footer ---- */
footer {
  padding: 48px 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  position: relative;
  z-index: 2;
  background: #000;
  color: #fff;
}

footer .nav-logo {
  font-size: 20px;
  color: #fff;
  background: none;
  -webkit-text-fill-color: #fff;
}

.footer-links {
  display: flex;
  gap: 28px
}

.footer-link {
  color: #9CA3AF;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
  font-weight: 600
}

.footer-link:hover {
  color: #F3F4F6;
}

.footer-right {
  font-size: 14px;
  color: #9CA3AF;
  font-weight: 600
}

/* ---- Animations ---- */
.fade-in {
  opacity: 0;
  transform: translateY(32px)
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-40px)
}

.fade-in-right {
  opacity: 0;
  transform: translateX(40px)
}

.scale-in {
  opacity: 0;
  transform: scale(0.96)
}

/* ---- Responsive ---- */
@media(max-width:900px) {
  nav {
    padding: 0 20px;
    height: 64px
  }

  .nav-links .nav-link {
    display: none
  }

  .pain-layout,
  .chat-layout {
    grid-template-columns: 1fr
  }

  .tweets-marquee {
    animation-duration: 30s
  }

  .tweet {
    min-width: 320px
  }

  .bento-grid {
    grid-template-columns: 1fr 1fr
  }

  .bc-1,
  .bc-2,
  .bc-3,
  .bc-4,
  .bc-5,
  .bc-6,
  .bc-7 {
    grid-column: span 1
  }

  .teams-grid {
    grid-template-columns: 1fr
  }

  footer {
    flex-direction: column;
    text-align: center
  }

  .journey-step {
    flex-direction: column;
    gap: 40px;
    padding: 0 24px
  }

  .journey-step-text {
    flex: 0 0 auto;
    text-align: center
  }

  .screenshot-frame {
    max-width: 100%
  }

  .compare-table {
    overflow-x: auto
  }
}

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

  .hero-actions,
  .cta-form {
    flex-direction: column;
    width: 100%
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    justify-content: center
  }

  .user-type-toggle {
    max-width: 100%;
  }

  .user-type-option {
    font-size: 14px;
    padding: 10px 16px;
  }
}