/* ============================================================
   Top Ideal — Omnichannel Messaging Platform
   Shared stylesheet
   ============================================================ */

:root {
  --ink: #14172B;
  --ink-soft: #262A42;
  --ink-line: rgba(255, 255, 255, 0.10);
  --paper: #FBF9F4;
  --paper-dim: #F1ECE2;
  --muted: #6C6F84;
  --muted-soft: #8A8D9E;
  --line: #E5E0D5;
  --signal: #FF5C42;        /* brand accent */
  --signal-deep: #E0432C;
  --c-whatsapp: #1FB257;
  --c-instagram: #DB3A7C;
  --c-messenger: #2E73F5;
  --maxw: 1120px;
  --radius: 14px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: "Bricolage Grotesque", "Inter", sans-serif;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
}

a { color: inherit; }

p { margin: 0 0 1.1em; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}

.eyebrow {
  font-family: "Space Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--signal);
  margin: 0 0 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--signal);
  display: inline-block;
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 249, 244, 0.82);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark {
  width: 30px; height: 30px;
  flex: 0 0 30px;
}
.topnav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.topnav a {
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--muted);
  transition: color .2s var(--ease);
}
.topnav a:hover { color: var(--ink); }
.topnav .nav-cta {
  color: var(--ink);
  border: 1px solid var(--ink);
  padding: 8px 16px;
  border-radius: 999px;
}
.topnav .nav-cta:hover { background: var(--ink); color: var(--paper); }

/* ---------- Hero ---------- */
.hero {
  background: var(--ink);
  color: var(--paper);
  position: relative;
  overflow: hidden;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
  padding-top: 96px;
  padding-bottom: 104px;
}
.hero .eyebrow { color: #FF8366; }
.hero .eyebrow::before { background: #FF8366; }
.hero h1 {
  font-size: clamp(40px, 6vw, 68px);
  font-weight: 800;
  color: #FDFBF6;
}
.hero h1 .accent { color: var(--signal); }
.hero .lede {
  font-size: 19px;
  color: #B9BCD0;
  max-width: 30ch;
  margin-top: 26px;
}
.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 34px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  padding: 13px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform .15s var(--ease), background .2s var(--ease);
}
.btn-primary { background: var(--signal); color: #fff; }
.btn-primary:hover { background: var(--signal-deep); transform: translateY(-1px); }
.btn-ghost { border-color: rgba(255,255,255,0.28); color: #EDEFF7; }
.btn-ghost:hover { border-color: #fff; }

.hero-status {
  margin-top: 40px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #9FA2B8;
  font-family: "Space Mono", monospace;
}
.dot-pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: #FFC24A;
  box-shadow: 0 0 0 0 rgba(255,194,74,0.6);
  animation: pulse 2.4s infinite var(--ease);
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,194,74,0.55); }
  70% { box-shadow: 0 0 0 9px rgba(255,194,74,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,194,74,0); }
}

/* convergence diagram */
.converge { width: 100%; height: auto; }
.converge .strand { fill: none; stroke-width: 2.5; opacity: 0; animation: draw 1.1s var(--ease) forwards; }
.converge .s1 { stroke: var(--c-whatsapp);  animation-delay: .15s; }
.converge .s2 { stroke: var(--c-instagram); animation-delay: .30s; }
.converge .s3 { stroke: var(--c-messenger); animation-delay: .45s; }
@keyframes draw { to { opacity: 1; } }
.converge .node-label {
  font-family: "Space Mono", monospace;
  font-size: 11px;
  fill: #C4C7DA;
  letter-spacing: 0.04em;
}
.converge .inbox-box { fill: var(--ink-soft); stroke: var(--signal); stroke-width: 1.5; }
.converge .inbox-label { font-family: "Bricolage Grotesque", sans-serif; font-weight: 700; fill: #fff; font-size: 15px; }
.converge .chan-dot { animation: blip 3s infinite var(--ease); }
.converge .d2 { animation-delay: .6s; }
.converge .d3 { animation-delay: 1.2s; }
@keyframes blip { 0%,100% { opacity: .55; } 50% { opacity: 1; } }

/* ---------- Section base ---------- */
.section { padding: 96px 0; }
.section-tight { padding: 72px 0; }
.section h2 {
  font-size: clamp(28px, 3.6vw, 40px);
  max-width: 18ch;
}
.section .sub {
  color: var(--muted);
  font-size: 18px;
  max-width: 54ch;
  margin-top: 18px;
}

/* feature grid */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 54px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.card:hover { border-color: var(--ink); transform: translateY(-2px); }
.card .ic {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: grid; place-items: center;
  margin-bottom: 20px;
  background: rgba(255,92,66,0.10);
  color: var(--signal);
}
.card h3 { font-size: 19px; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 15.5px; margin: 0; }

/* channels strip */
.channels {
  background: var(--paper-dim);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.channels .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 30px; padding-top: 40px; padding-bottom: 40px; flex-wrap: wrap;
}
.channels .ch-label { font-family: "Space Mono", monospace; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.channels .ch-list { display: flex; gap: 34px; flex-wrap: wrap; }
.channels .ch {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 16px;
}
.channels .ch .pin { width: 11px; height: 11px; border-radius: 50%; }

/* contact */
.contact { background: var(--ink); color: var(--paper); }
.contact .wrap { padding-top: 88px; padding-bottom: 88px; }
.contact .eyebrow { color: #FF8366; }
.contact .eyebrow::before { background: #FF8366; }
.contact h2 { color: #FDFBF6; }
.contact-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 22px; margin-top: 48px;
}
.contact-card {
  border: 1px solid var(--ink-line);
  border-radius: var(--radius);
  padding: 28px 26px;
  background: rgba(255,255,255,0.02);
}
.contact-card .k {
  font-family: "Space Mono", monospace; font-size: 11px;
  letter-spacing: .16em; text-transform: uppercase; color: #FF8366;
  margin-bottom: 14px;
}
.contact-card .v { font-size: 16.5px; color: #EDEFF7; font-weight: 500; }
.contact-card a { color: #EDEFF7; text-decoration: none; }
.contact-card a:hover { color: #fff; text-decoration: underline; }

/* ---------- Footer ---------- */
.footer {
  background: var(--paper);
  border-top: 1px solid var(--line);
}
.footer .wrap { padding-top: 52px; padding-bottom: 40px; }
.footer-top {
  display: flex; justify-content: space-between; gap: 40px;
  flex-wrap: wrap; padding-bottom: 36px; border-bottom: 1px solid var(--line);
}
.footer .brand { font-size: 17px; }
.footer .legal-name { color: var(--muted); font-size: 13.5px; margin-top: 12px; max-width: 40ch; }
.footer-links { display: flex; gap: 28px; flex-wrap: wrap; }
.footer-links a {
  text-decoration: none; color: var(--muted); font-size: 14.5px; font-weight: 500;
  transition: color .2s var(--ease);
}
.footer-links a:hover { color: var(--ink); }
.footer-base {
  display: flex; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; padding-top: 26px;
  font-size: 13px; color: var(--muted-soft);
}
.footer-base .notice {
  font-family: "Space Mono", monospace; font-size: 11.5px;
  color: var(--signal); letter-spacing: .02em;
}

/* ---------- Legal / content pages ---------- */
.doc {
  background: var(--paper);
  padding: 64px 0 88px;
}
.doc .wrap { max-width: 820px; }
.doc-head { border-bottom: 1px solid var(--line); padding-bottom: 30px; margin-bottom: 44px; }
.doc-head h1 { font-size: clamp(32px, 5vw, 48px); font-weight: 800; }
.doc-head .updated {
  font-family: "Space Mono", monospace; font-size: 12.5px;
  color: var(--muted); margin-top: 18px; letter-spacing: .03em;
}
.doc h2 {
  font-size: 22px; margin: 44px 0 14px;
  padding-top: 6px;
}
.doc h2 .num { color: var(--signal); font-family: "Space Mono", monospace; font-size: 15px; margin-right: 10px; }
.doc h3 { font-size: 17px; margin: 26px 0 10px; font-weight: 700; }
.doc p, .doc li { color: #34384C; font-size: 16px; line-height: 1.7; }
.doc ul, .doc ol { padding-left: 22px; margin: 0 0 1.2em; }
.doc li { margin-bottom: 8px; }
.doc a.inline { color: var(--signal-deep); text-decoration: underline; font-weight: 500; }
.doc strong { color: var(--ink); }
.callout {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid var(--signal);
  border-radius: 10px;
  padding: 20px 24px;
  margin: 28px 0;
}
.callout p:last-child { margin-bottom: 0; }
.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: "Space Mono", monospace; font-size: 12.5px;
  letter-spacing: .08em; text-transform: uppercase;
  text-decoration: none; color: var(--muted); margin-bottom: 30px;
}
.back-link:hover { color: var(--signal); }

/* table for data summary */
.data-table {
  width: 100%; border-collapse: collapse; margin: 22px 0 28px;
  font-size: 15px;
}
.data-table th, .data-table td {
  text-align: left; padding: 13px 16px; border: 1px solid var(--line);
  vertical-align: top;
}
.data-table th { background: var(--paper-dim); font-weight: 600; color: var(--ink); }
.data-table td { color: #34384C; }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 44px; padding-top: 72px; padding-bottom: 80px; }
  .features { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .topnav { gap: 16px; }
  .topnav a:not(.nav-cta) { display: none; }
  .section { padding: 72px 0; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding: 0 20px; }
  .channels .wrap { flex-direction: column; align-items: flex-start; gap: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; transition: none !important; }
  .converge .strand { opacity: 1; }
}

:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 4px; }
