/* Team Inbox homepage — motion inspired by Kinetics + animated button libraries
   (spring-ish reveals, shine-sweep CTA, lift cards). Respects prefers-reduced-motion. */
:root {
  --brand: #5b5ce2;
  --brand-2: #4f46e5;
  --brand-deep: #3730a3;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --surface: #ffffff;
  --radius: 18px;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.12), 0 8px 16px rgba(15, 23, 42, 0.06);
  --shadow-lift: 0 28px 60px rgba(15, 23, 42, 0.16), 0 10px 20px rgba(91, 92, 226, 0.12);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --ease-spring: cubic-bezier(0.22, 1.2, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: #f8fafc;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

.bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 90% 55% at 15% -10%, rgba(91, 92, 226, 0.28), transparent 55%),
    radial-gradient(ellipse 70% 45% at 100% 0%, rgba(79, 70, 229, 0.16), transparent 50%),
    linear-gradient(180deg, #eef2ff 0%, #f8fafc 40%, #fff 100%);
  animation: bgDrift 18s ease-in-out infinite alternate;
}
@keyframes bgDrift {
  from { filter: hue-rotate(0deg); transform: scale(1); }
  to { filter: hue-rotate(8deg); transform: scale(1.03); }
}

.top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 1rem 1.25rem;
  max-width: 1100px; margin: 0 auto;
}
.logo {
  display: flex; align-items: center; gap: 0.65rem;
  text-decoration: none; color: inherit; font-weight: 800;
}
.mark {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; color: #fff; font-size: 0.95rem;
  background: linear-gradient(145deg, var(--brand), var(--brand-2));
  box-shadow: 0 10px 28px rgba(91, 92, 226, 0.35);
  transition: transform 0.45s var(--ease-spring), box-shadow 0.35s var(--ease-out);
}
.logo:hover .mark {
  transform: translateY(-2px) scale(1.06) rotate(-3deg);
  box-shadow: 0 14px 34px rgba(91, 92, 226, 0.45);
}
.name { letter-spacing: -0.03em; font-size: 1.05rem; }
.nav {
  display: flex; align-items: center; gap: 0.85rem; flex-wrap: wrap; justify-content: flex-end;
}
.nav a {
  text-decoration: none; color: var(--muted); font-size: 0.88rem; font-weight: 650;
  transition: color 0.2s;
}
.nav a:hover { color: var(--ink); }

.hero {
  max-width: 1100px; margin: 0 auto;
  padding: 2rem 1.25rem 1.5rem;
  text-align: center;
}
.hero-split {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 1.5rem;
  align-items: center;
  text-align: left;
}
.hero-copy .lede { margin-left: 0; }
.hero-art {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-lift);
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #eef2ff;
}
.hero-art img { display: block; width: 100%; height: auto; }
.channel-row {
  display: flex; flex-wrap: wrap; gap: 0.45rem;
  margin-top: 1.15rem;
}
.chip {
  font-size: 0.72rem; font-weight: 750;
  padding: 0.35rem 0.7rem; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); color: var(--muted);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.section {
  max-width: 1100px; margin: 0 auto;
  padding: 1.5rem 1.25rem 2rem;
}
.section-alt {
  background: rgba(255, 255, 255, 0.55);
  border-block: 1px solid rgba(226, 232, 240, 0.8);
  max-width: none;
  padding: 2rem 1.25rem;
}
.section-alt > * { max-width: 1100px; margin-left: auto; margin-right: auto; }
.section-head { text-align: center; margin-bottom: 1.35rem; }
.section-head h2 {
  margin: 0 0 0.45rem; font-size: clamp(1.35rem, 3vw, 1.85rem);
  letter-spacing: -0.03em; font-weight: 800;
}
.section-head p {
  margin: 0 auto; max-width: 36rem;
  color: var(--muted); font-size: 0.95rem; line-height: 1.5;
}
.feature-grid {
  display: grid; gap: 0.85rem;
  grid-template-columns: repeat(3, 1fr);
}
.feature {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.2rem 1.1rem;
  box-shadow: var(--shadow);
  transition: transform 0.45s var(--ease-spring), box-shadow 0.3s;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.feature-icon { width: 56px; height: 56px; margin-bottom: 0.75rem; }
.feature h3 { margin: 0 0 0.4rem; font-size: 1.05rem; letter-spacing: -0.02em; }
.feature p { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.45; }

.custom-grid {
  display: grid; gap: 0.85rem;
  grid-template-columns: repeat(3, 1fr);
}
.custom-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.2rem 1.15rem;
  box-shadow: var(--shadow);
}
.custom-card h3 { margin: 0 0 0.65rem; font-size: 1rem; }
.custom-card ul {
  margin: 0; padding-left: 1.1rem;
  color: var(--muted); font-size: 0.88rem; line-height: 1.65;
}

.eyebrow {
  display: inline-block; margin: 0 0 0.85rem;
  padding: 0.35rem 0.75rem; border-radius: 999px;
  background: rgba(91, 92, 226, 0.1); color: var(--brand-deep);
  font-size: 0.75rem; font-weight: 750; letter-spacing: 0.02em;
}
html[data-ti-mode="phone"] .eyebrow { background: rgba(5, 150, 105, 0.12); color: #047857; }
html[data-ti-mode="desktop"] .eyebrow { background: rgba(91, 92, 226, 0.1); color: var(--brand-deep); }
.hero h1 {
  margin: 0 0 0.85rem; font-size: clamp(1.85rem, 5vw, 3rem);
  line-height: 1.1; letter-spacing: -0.04em; font-weight: 800;
}
.lede {
  margin: 0 auto 1.5rem; max-width: 36rem;
  color: var(--muted); font-size: 1.05rem; line-height: 1.55;
}
.cta {
  display: flex; flex-wrap: wrap; gap: 0.65rem; justify-content: center;
}

/* —— Animated buttons (Shine Sweep + Lift / Shadow Grow) —— */
.btn {
  --bink: var(--brand);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.85rem 1.25rem; border-radius: 14px;
  font-weight: 750; font-size: 0.95rem; text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  transition:
    transform 0.45s var(--ease-spring),
    box-shadow 0.35s var(--ease-out),
    background 0.25s,
    border-color 0.25s,
    color 0.25s;
}
.btn:active { transform: scale(0.97); }
.btn-sm { padding: 0.5rem 0.9rem; font-size: 0.82rem; border-radius: 12px; }

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  box-shadow: 0 12px 32px rgba(91, 92, 226, 0.35);
}
.btn-primary::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 65%
  );
  transform: translateX(-120%);
  transition: transform 0.7s var(--ease-out);
  z-index: 0;
  pointer-events: none;
}
.btn-primary > * , .btn-primary { position: relative; z-index: 1; }
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(91, 92, 226, 0.45), 0 0 0 4px rgba(91, 92, 226, 0.12);
}
.btn-primary:hover::before { transform: translateX(120%); }

.btn-ghost {
  background: #fff; color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}
.btn-ghost:hover {
  transform: translateY(-2px);
  border-color: #c7d2fe;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
  color: var(--brand-deep);
}

.hint {
  margin: 1.15rem 0 0; color: var(--muted); font-size: 0.82rem; line-height: 1.45;
}

.cards {
  max-width: 1100px; margin: 0.5rem auto 0;
  padding: 0 1.25rem 2rem;
  display: grid; gap: 0.85rem;
  grid-template-columns: repeat(3, 1fr);
}
.card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: var(--radius);
  padding: 1.25rem 1.15rem;
  box-shadow: var(--shadow);
  text-align: left;
  transition:
    transform 0.5s var(--ease-spring),
    box-shadow 0.35s var(--ease-out),
    border-color 0.25s;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lift);
  border-color: #c7d2fe;
}
.card .icon {
  width: 42px; height: 42px; border-radius: 12px; margin-bottom: 0.85rem;
  display: grid; place-items: center; font-weight: 800; font-size: 0.8rem; color: #fff;
  background: linear-gradient(145deg, var(--brand), var(--brand-2));
  box-shadow: 0 8px 20px rgba(91, 92, 226, 0.3);
  transition: transform 0.45s var(--ease-spring);
}
.card:hover .icon { transform: scale(1.08) rotate(-4deg); }
.card h2 { margin: 0 0 0.4rem; font-size: 1.05rem; letter-spacing: -0.02em; }
.card p { margin: 0 0 0.85rem; color: var(--muted); font-size: 0.9rem; line-height: 1.45; }
.card a {
  color: var(--brand); font-weight: 700; text-decoration: none; font-size: 0.88rem;
  transition: letter-spacing 0.25s var(--ease-out);
}
.card:hover a { letter-spacing: 0.02em; }

.login-strip {
  max-width: 720px; margin: 0 auto 2.5rem; padding: 0 1.25rem;
}
.login-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1.75rem 1.35rem;
  box-shadow: var(--shadow);
  text-align: center;
  transition: box-shadow 0.35s var(--ease-out), transform 0.5s var(--ease-spring);
}
.login-panel:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}
.login-panel h2 { margin: 0 0 0.4rem; font-size: 1.35rem; letter-spacing: -0.03em; }
.login-panel p { margin: 0; color: var(--muted); font-size: 0.95rem; line-height: 1.5; }

.foot {
  display: flex; flex-wrap: wrap; gap: 0.45rem; justify-content: center; align-items: center;
  padding: 1.5rem 1rem 2.5rem;
  color: var(--muted); font-size: 0.8rem; font-weight: 600;
}
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--brand); }
.sep { opacity: 0.5; }

/* —— Kinetics-style staggered entrance —— */
.reveal {
  opacity: 0;
  transform: translateY(18px) scale(0.98);
  animation: riseIn 0.7s var(--ease-spring) forwards;
}
.reveal-d1 { animation-delay: 0.05s; }
.reveal-d2 { animation-delay: 0.12s; }
.reveal-d3 { animation-delay: 0.2s; }
.reveal-d4 { animation-delay: 0.28s; }
.reveal-d5 { animation-delay: 0.36s; }
.reveal-d6 { animation-delay: 0.44s; }
.reveal-d7 { animation-delay: 0.52s; }
@keyframes riseIn {
  to { opacity: 1; transform: none; }
}

@media (max-width: 860px) {
  .cards { grid-template-columns: 1fr; }
  .feature-grid, .custom-grid { grid-template-columns: 1fr; }
  .hero-split { grid-template-columns: 1fr; text-align: center; }
  .hero-copy .lede { margin-left: auto; margin-right: auto; }
  .channel-row { justify-content: center; }
  .nav a:not(.btn) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .bg { animation: none; }
  .reveal, .reveal-d1, .reveal-d2, .reveal-d3, .reveal-d4, .reveal-d5, .reveal-d6, .reveal-d7 {
    animation: none; opacity: 1; transform: none;
  }
  .btn, .card, .mark, .login-panel { transition: none; }
  .btn-primary::before { display: none; }
  .btn-primary:hover, .btn-ghost:hover, .card:hover, .login-panel:hover { transform: none; }
}
