/* ==========================================================================
   Loopion — design system
   Grounded in the actual product: a conversation. Chat bubbles, phone
   chrome and a process spine carry the visual weight instead of icon
   tiles and gradients.
   ========================================================================== */

@font-face {
  font-family: "Aloevera";
  src: url("../fonts/Aloevera-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Aloevera";
  src: url("../fonts/Aloevera-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Aloevera";
  src: url("../fonts/Aloevera-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* Commuters Sans (brand spec for headings) is only available to us as an
   unlicensed Fontspring demo that corrupts glyphs (digits, "&"). Bricolage
   Grotesque stands in for it — see README for how to swap once licensed. */

:root {
  --ink: #0b1b30;
  --navy: #0f2f5e;
  --teal: #139999;
  --teal-deep: #0d7a7a;
  --signal: #4fe4c9;

  --paper: #ffffff;
  --paper-dim: #eef1f4;
  --line: #dbe2e8;
  --muted: #566579;

  --font-display: "Bricolage Grotesque", "Aloevera", system-ui, sans-serif;
  --font-body: "Aloevera", system-ui, sans-serif;
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --container: 1180px;
  --radius: 10px;
  --radius-lg: 22px;
}

* , *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, p, dl, dd, figure { margin: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font: inherit; cursor: pointer; background: none; border: none; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  font-size: 17px;
  line-height: 1.65;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.015em;
}

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.measure { max-width: 62ch; }

.section { padding-block: clamp(56px, 8vw, 108px); }
.section-head { max-width: 40ch; margin-bottom: clamp(32px, 5vw, 52px); }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.35rem); line-height: 1.1; }
.section-head p { color: var(--muted); font-size: 1.05rem; margin-top: 14px; max-width: 52ch; }
.section--dim { background: var(--paper-dim); }

/* ---- Buttons & links ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.96rem;
  border: 1.5px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-solid { background: var(--teal); color: #fff; }
.btn-solid:hover { background: var(--teal-deep); }
.btn-line { border-color: var(--line); color: var(--ink); }
.btn-line:hover { border-color: var(--ink); }
.btn-line-invert { border-color: rgba(255,255,255,0.35); color: #fff; }
.btn-line-invert:hover { border-color: #fff; }

.text-link {
  font-weight: 600;
  color: var(--teal-deep);
  border-bottom: 1.5px solid rgba(19,153,153,0.35);
  padding-bottom: 1px;
  transition: border-color 0.15s ease;
}
.text-link:hover { border-color: var(--teal-deep); }

/* ---- Header ---- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 74px; }
.brand { display: flex; align-items: center; height: 100%; }
.brand img { height: 48px; width: auto; }

.nav-desktop { display: flex; align-items: center; gap: 30px; }
.nav-desktop a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  padding-bottom: 3px;
  white-space: nowrap;
  border-bottom: 1.5px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.nav-desktop a:hover, .nav-desktop a.is-active { border-color: var(--teal); }

.header-actions { display: flex; align-items: center; gap: 14px; }
.header-actions .btn { white-space: nowrap; }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 16px; height: 1.5px; background: var(--ink); position: relative;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle span::before { position: absolute; top: -5px; }
.nav-toggle span::after { position: absolute; top: 5px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-5px) rotate(-45deg); }

.nav-mobile { display: none; flex-direction: column; border-top: 1px solid var(--line); background: var(--paper); }
.nav-mobile a {
  padding: 16px 24px; border-bottom: 1px solid var(--line);
  font-family: var(--font-display); font-weight: 600; color: var(--ink);
}
.nav-mobile .btn { margin: 16px 24px; }
.site-header.nav-open .nav-mobile { display: flex; }

/* ---- Hero ---- */
.hero { padding-block: clamp(48px, 8vw, 88px) clamp(64px, 8vw, 104px); }
.hero .container {
  display: grid;
  grid-template-columns: 1.05fr 0.85fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}
.hero-copy h1 {
  font-size: clamp(2.5rem, 4.6vw, 3.7rem);
  line-height: 1.04;
  max-width: 13ch;
}
.hero-copy .lead {
  margin-top: 22px;
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 42ch;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* ---- Phone mockup ---- */
.phone {
  width: min(320px, 100%);
  margin-inline: auto;
  background: var(--ink);
  border-radius: 38px;
  padding: 9px;
  box-shadow: 0 36px 70px -24px rgba(11, 27, 48, 0.4);
}
.phone__screen {
  background: var(--paper);
  border-radius: 30px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.phone__status { display: flex; justify-content: space-between; padding: 10px 18px 0; font: 600 12px var(--font-ui); color: var(--ink); }
.phone__head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
}
.phone__head img { width: 30px; height: 30px; border-radius: 50%; }
.phone__head .who { font: 700 13.5px var(--font-ui); color: var(--ink); }
.phone__head .status { display: flex; align-items: center; gap: 5px; font: 400 11.5px var(--font-ui); color: var(--muted); }
.phone__head .status .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--signal); }

.phone__messages { flex: 1; padding: 16px; display: flex; flex-direction: column; gap: 9px; background: var(--paper-dim); }
.bubble {
  max-width: 82%;
  padding: 9px 13px;
  border-radius: 15px;
  font: 400 13.5px/1.42 var(--font-ui);
  opacity: 0;
  transform: translateY(6px);
  animation: bubbleIn 0.5s ease forwards;
}
.bubble--in { align-self: flex-start; background: #fff; color: var(--ink); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bubble--out { align-self: flex-end; background: var(--teal); color: #fff; border-bottom-right-radius: 4px; }
.bubble time { display: block; margin-top: 4px; font-size: 10px; opacity: 0.6; }
@keyframes bubbleIn { to { opacity: 1; transform: translateY(0); } }
.phone .bubble:nth-child(1) { animation-delay: .15s; }
.phone .bubble:nth-child(2) { animation-delay: .55s; }
.phone .bubble:nth-child(3) { animation-delay: .95s; }
.phone .bubble:nth-child(4) { animation-delay: 1.35s; }

.phone__input {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-top: 1px solid var(--line);
}
.phone__input .field { flex: 1; height: 32px; border-radius: 16px; background: var(--paper-dim); }
.phone__input .send { width: 32px; height: 32px; border-radius: 50%; background: var(--teal); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.phone__input .send svg { width: 15px; height: 15px; color: #fff; }

/* ---- Solutions (definition list + visual) ---- */
.solutions-grid { display: grid; grid-template-columns: 1fr 0.85fr; gap: clamp(32px, 6vw, 64px); align-items: start; }
.solutions-list { border-top: 1px solid var(--line); }
.solutions-item {
  display: grid;
  grid-template-columns: minmax(0, 220px) 1fr;
  gap: 24px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}
.solutions-item dt { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.solutions-item dd { color: var(--muted); }

.notif-panel { position: sticky; top: 100px; background: var(--navy); border-radius: var(--radius-lg); padding: 22px 26px 10px; }
.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255,255,255,0.16);
}
.panel-head .who { font: 600 13px var(--font-ui); color: #fff; }
.panel-head .live { display: flex; align-items: center; gap: 6px; font: 400 11.5px var(--font-ui); color: rgba(255,255,255,0.5); }
.panel-head .live .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--signal); animation: livePulse 2.4s ease-in-out infinite; }
@keyframes livePulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.feed { list-style: none; margin: 0; padding: 0; }
.feed-item {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 14px;
  padding: 15px 0;
  border-bottom: 1px solid rgba(255,255,255,0.09);
}
.feed-item:last-child { border-bottom: 0; }
.feed-item time { font: 400 11.5px var(--font-ui); color: rgba(255,255,255,0.4); padding-top: 2px; white-space: nowrap; }
.feed-item .what { display: flex; align-items: center; gap: 7px; font: 600 13.5px var(--font-ui); color: rgba(255,255,255,0.92); }
.feed-item .detail { font: 400 12.5px/1.5 var(--font-ui); color: rgba(255,255,255,0.55); margin-top: 3px; }

/* Only the event that needs the owner carries the accent. */
.feed-item--action .what::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--signal); flex-shrink: 0; }
.feed-item--action .detail { color: rgba(255,255,255,0.78); }
.feed-item .cue {
  display: inline-block;
  margin-top: 9px;
  font: 600 12px var(--font-ui);
  color: var(--signal);
  border-bottom: 1px solid rgba(79, 228, 201, 0.35);
  padding-bottom: 2px;
}

/* ---- Segments (editorial rows) ---- */
.segment-row {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(28px, 5vw, 60px);
  align-items: center;
  padding-block: 44px;
  border-top: 1px solid var(--line);
}
.segment-row:last-child { border-bottom: 1px solid var(--line); }
.segment-row:nth-child(even) .segment-copy { order: 2; }
.segment-copy .kicker { font-family: var(--font-display); font-weight: 700; color: var(--teal-deep); font-size: 0.92rem; margin-bottom: 8px; }
.segment-copy h3 { font-size: 1.5rem; margin-bottom: 10px; }
.segment-copy p { color: var(--muted); max-width: 46ch; }
.segment-copy .text-link { display: inline-block; margin-top: 14px; }

.snippet { background: var(--paper-dim); border-radius: var(--radius-lg); padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.snippet .bubble { animation: none; opacity: 1; transform: none; max-width: 88%; }

/* ---- Process spine ---- */
.process { position: relative; padding-left: 34px; max-width: 56ch; }
.process::before { content: ""; position: absolute; left: 6px; top: 4px; bottom: 4px; width: 2px; background: var(--line); }
.process-step { position: relative; padding-bottom: 42px; }
.process-step:last-child { padding-bottom: 0; }
.process-step::before {
  content: ""; position: absolute; left: -34px; top: 2px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--teal);
}
.process-step .num { font-family: var(--font-display); font-weight: 700; font-size: 0.85rem; color: var(--teal-deep); }
.process-step h3 { font-size: 1.18rem; margin-top: 6px; margin-bottom: 6px; }
.process-step p { color: var(--muted); max-width: 48ch; }

/* ---- CTA band ---- */
.cta-band { background: var(--ink); color: #fff; padding-block: clamp(56px, 8vw, 92px); }
.cta-band h2 { color: #fff; font-size: clamp(1.7rem, 3.4vw, 2.5rem); max-width: 16ch; }
.cta-band .row { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; justify-content: space-between; margin-top: 8px; }

.send-row {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 999px;
  padding: 8px 8px 8px 22px;
  max-width: 420px;
}
.send-row span { font: 400 15px var(--font-ui); color: rgba(255,255,255,0.55); flex: 1; }
.send-row button, .send-row a.send-btn {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--teal); display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.send-row a.send-btn svg { width: 18px; height: 18px; color: #fff; }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--line); padding-block: 48px 28px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.1fr; gap: 40px; padding-bottom: 36px; }
.footer-brand img { height: 26px; margin-bottom: 14px; }
.footer-brand p { font-size: 0.92rem; color: var(--muted); max-width: 30ch; }
.footer-col h4 { font-family: var(--font-display); font-size: 0.88rem; font-weight: 700; margin-bottom: 14px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 0.94rem; color: var(--muted); }
.footer-col a:hover { color: var(--ink); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 0.84rem; color: var(--muted); }

/* ---- WhatsApp floating button ---- */
.whatsapp-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  width: 54px; height: 54px; border-radius: 50%;
  background: #25D366; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px rgba(0,0,0,0.24);
}
.whatsapp-float svg { width: 26px; height: 26px; color: #fff; }

/* ---- About page ---- */
.page-hero { padding-block: clamp(52px, 9vw, 92px) clamp(48px, 7vw, 72px); }
.page-hero h1 { font-size: clamp(2.1rem, 4vw, 3.1rem); max-width: 15ch; }
.page-hero p { margin-top: 18px; font-size: 1.12rem; color: var(--muted); max-width: 54ch; }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 64px); }
.pair h3 { font-size: 1.2rem; margin-bottom: 10px; }
.pair p { color: var(--muted); }

.glossary { border-top: 1px solid var(--line); }
.glossary-item { display: grid; grid-template-columns: minmax(0,220px) 1fr; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.glossary-item dt { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; }
.glossary-item dd { color: var(--muted); max-width: 52ch; }

.story { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(36px, 6vw, 76px); align-items: center; }
.story-mark { position: relative; display: flex; align-items: center; justify-content: center; }
.story-mark svg { position: absolute; width: 260px; height: 260px; opacity: 0.5; }
.story-mark img { width: 128px; position: relative; z-index: 1; }
.story-copy p { color: var(--muted); margin-top: 14px; max-width: 54ch; }
.story-copy p strong { color: var(--ink); }

/* ---- Responsive ---- */
@media (max-width: 980px) {
  .nav-desktop { display: none; }
  .nav-toggle { display: flex; }
  .header-actions .btn.header-cta { display: none; }
  .hero .container { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .solutions-grid { grid-template-columns: 1fr; }
  .notif-panel { position: static; }
  .segment-row, .segment-row:nth-child(even) .segment-copy { grid-template-columns: 1fr; order: 0; }
  .segment-row .snippet { order: -1; max-width: 420px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .pair { grid-template-columns: 1fr; }
  .story { grid-template-columns: 1fr; }
  .story-mark { margin-bottom: 8px; }
  .glossary-item { grid-template-columns: 1fr; gap: 6px; }
}

@media (max-width: 720px) {
  .solutions-item { grid-template-columns: 1fr; gap: 6px; }
  .cta-band .row { flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr; }
}
