/* ============================================================
   Kamal Muhamed Ahmed — Voice AI Engineer
   Design system: warm paper, near-black ink, one signal accent.
   No gradients. Grotesque display + clean sans body.
   ============================================================ */

/* ---------- Design Tokens ---------- */
:root {
  --paper: #f6f4ef;        /* warm light background */
  --paper-2: #efece4;      /* alt section band */
  --card: #ffffff;         /* raised surfaces */
  --ink: #17181b;          /* headings / near-black text */
  --ink-2: #34363d;        /* strong body */
  --ink-soft: #5c5f68;     /* muted body */
  --line: #e3ddd1;         /* hairline on paper */
  --line-2: #d6cfc0;       /* stronger hairline */

  --accent: #d23a17;       /* signal orange (CTA only) */
  --accent-press: #b32f11; /* hover / active */
  --accent-tint: #f7e7e0;  /* soft accent wash */

  --ink-panel: #17181b;    /* dark editorial blocks */
  --on-ink: #f3efe7;       /* text on dark */
  --on-ink-soft: #a7a69f;  /* muted text on dark */

  --maxw: 1160px;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 0 var(--line-2);
  --shadow: 0 20px 40px -28px rgba(23, 24, 27, 0.45);

  --display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  font-family: var(--body);
  background: var(--paper);
  color: var(--ink-2);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }
ul, ol { list-style: none; }
h1, h2, h3, h4 { font-family: var(--display); color: var(--ink); font-weight: 700; letter-spacing: -0.02em; line-height: 1.08; }
strong { color: var(--ink); font-weight: 600; }
::selection { background: var(--accent); color: #fff; }

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

/* ---------- Eyebrow / structural label ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-soft);
}
.eyebrow::before {
  content: ""; width: 22px; height: 2px; background: var(--accent); display: inline-block;
}
.eyebrow--center { justify-content: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--body); font-weight: 600; font-size: 0.96rem;
  padding: 13px 22px; border-radius: 10px;
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn svg { flex: 0 0 auto; }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-press); transform: translateY(-1px); }
.btn--primary:active { transform: translateY(0); }
.btn--outline { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn--outline:hover { border-color: var(--ink); transform: translateY(-1px); }
.btn--on-ink { background: var(--accent); color: #fff; }
.btn--on-ink:hover { background: var(--accent-press); transform: translateY(-1px); }
.btn--lg { padding: 16px 28px; font-size: 1.02rem; }
.btn--sm { padding: 10px 16px; font-size: 0.9rem; }

/* small text link with arrow */
.arrowlink {
  display: inline-flex; align-items: center; gap: 7px;
  font-weight: 600; color: var(--ink); font-size: 0.95rem;
  border-bottom: 1.5px solid transparent; transition: border-color 0.15s ease, color 0.15s ease;
}
.arrowlink svg { transition: transform 0.18s ease; }
.arrowlink:hover { color: var(--accent); }
.arrowlink:hover svg { transform: translateX(3px); }

/* ---------- Navbar ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(246, 244, 239, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 74px; gap: 24px; }

.brand { display: flex; align-items: center; gap: 11px; font-family: var(--display); font-weight: 700; font-size: 1.12rem; color: var(--ink); }
.brand__mark {
  width: 34px; height: 34px; border-radius: 9px; background: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; color: var(--paper);
  flex: 0 0 auto;
}
.brand__mark svg { width: 18px; height: 18px; }

.nav__links { display: flex; align-items: center; gap: 30px; }
.nav__links a { color: var(--ink-2); font-size: 0.95rem; font-weight: 500; transition: color 0.15s ease; }
.nav__links a:not(.btn):hover { color: var(--accent); }
.nav__spacer { flex: 1; }

.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav__toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.3s ease, opacity 0.3s ease; }
.nav__toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.open span:nth-child(2) { opacity: 0; }
.nav__toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding: 150px 0 84px; }
.hero__inner { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 64px; align-items: center; }
.hero__status { margin-bottom: 22px; }
.hero__status .dot { width: 8px; height: 8px; border-radius: 50%; background: #2fa96b; box-shadow: 0 0 0 0 rgba(47, 169, 107, 0.5); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(47, 169, 107, 0.45); } 70% { box-shadow: 0 0 0 8px rgba(47, 169, 107, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 169, 107, 0); } }

.hero__title { font-size: clamp(2.3rem, 5vw, 3.55rem); font-weight: 800; margin-bottom: 22px; color: var(--ink); }
.hero__title .u { color: var(--accent); }
.hero__sub { font-size: clamp(1.02rem, 1.5vw, 1.16rem); color: var(--ink-soft); max-width: 540px; margin-bottom: 30px; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-bottom: 30px; }
.hero__trust { font-size: 0.88rem; color: var(--ink-soft); }
.hero__trust b { color: var(--ink-2); font-weight: 600; }

/* Hero signature: live call panel */
.callcard {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow); padding: 20px; position: relative;
}
.callcard__bar { display: flex; align-items: center; justify-content: space-between; padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.callcard__who { display: flex; align-items: center; gap: 11px; }
.callcard__ava { width: 40px; height: 40px; border-radius: 11px; background: var(--ink); color: var(--paper); display: flex; align-items: center; justify-content: center; }
.callcard__ava svg { width: 20px; height: 20px; }
.callcard__name { font-family: var(--display); font-weight: 700; color: var(--ink); font-size: 0.98rem; }
.callcard__meta { font-size: 0.8rem; color: var(--ink-soft); }
.callcard__live { display: inline-flex; align-items: center; gap: 7px; font-size: 0.76rem; font-weight: 600; color: var(--accent); background: var(--accent-tint); padding: 5px 11px; border-radius: 999px; }
.callcard__live .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse-acc 1.6s infinite; }
@keyframes pulse-acc { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.chat { display: flex; flex-direction: column; gap: 12px; }
.chat__row { display: flex; }
.chat__row--in { justify-content: flex-start; }
.chat__row--out { justify-content: flex-end; }
.bubble { max-width: 84%; font-size: 0.9rem; line-height: 1.5; padding: 11px 14px; border-radius: 14px; }
.bubble--in { background: var(--paper-2); color: var(--ink-2); border-bottom-left-radius: 5px; }
.bubble--out { background: var(--ink); color: var(--on-ink); border-bottom-right-radius: 5px; }
.bubble small { display: block; font-size: 0.7rem; opacity: 0.6; margin-top: 4px; font-weight: 500; }

.callcard__done {
  margin-top: 16px; display: flex; align-items: center; gap: 11px;
  background: #eef7f1; border: 1px solid #cfe9da; border-radius: 12px; padding: 12px 14px;
}
.callcard__done .tick { width: 26px; height: 26px; border-radius: 50%; background: #2fa96b; color: #fff; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.callcard__done .tick svg { width: 15px; height: 15px; }
.callcard__done p { font-size: 0.86rem; color: #1f6e4d; }
.callcard__done b { color: #145238; }

.wave { display: inline-flex; align-items: center; gap: 3px; height: 16px; }
.wave span { width: 3px; height: 6px; background: currentColor; border-radius: 3px; animation: eq 1s ease-in-out infinite; }
.wave span:nth-child(2){ animation-delay: .15s } .wave span:nth-child(3){ animation-delay: .3s }
.wave span:nth-child(4){ animation-delay: .45s } .wave span:nth-child(5){ animation-delay: .6s }
@keyframes eq { 0%,100%{ height:5px } 50%{ height:15px } }

/* ---------- Stats ---------- */
.stats { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper-2); }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 34px 26px; text-align: left; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat__num { font-family: var(--display); font-size: clamp(1.9rem, 3.4vw, 2.5rem); font-weight: 800; color: var(--ink); line-height: 1; }
.stat__label { margin-top: 9px; color: var(--ink-soft); font-size: 0.9rem; }

/* ---------- Section shell ---------- */
.section { padding: 96px 0; }
.section--alt { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section--ink { background: var(--ink-panel); }
.section__head { max-width: 720px; margin: 0 0 52px; }
.section__head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section__title { font-size: clamp(1.8rem, 3.4vw, 2.5rem); margin: 16px 0 14px; }
.section__lead { color: var(--ink-soft); font-size: 1.06rem; max-width: 620px; }
.section__head--center .section__lead { margin-left: auto; margin-right: auto; }

/* ---------- Projects ---------- */
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.project {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.project:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-2); }

.project__media { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--paper-2); }
.project__thumb { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.project:hover .project__thumb { transform: scale(1.04); }
.project__play {
  position: absolute; inset: 0; margin: auto; width: 58px; height: 58px; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff; border-radius: 50%;
  box-shadow: 0 10px 24px -6px rgba(210, 58, 23, 0.6); transition: transform 0.2s ease;
}
.project:hover .project__play { transform: scale(1.08); }
.project__media-fallback {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  color: #fff; font-family: var(--display); font-weight: 700; font-size: 1.05rem; background: #128c7e;
}

.project__body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.project__kicker { font-size: 0.76rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.project__title { font-size: 1.24rem; margin-bottom: 11px; }
.project__desc { color: var(--ink-soft); font-size: 0.96rem; margin-bottom: 16px; }
.project__stack { font-size: 0.84rem; color: var(--ink-soft); margin-bottom: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.project__stack b { color: var(--ink-2); font-weight: 600; }
.project__links { margin-top: auto; display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.link { display: inline-flex; align-items: center; gap: 7px; font-size: 0.9rem; font-weight: 600; color: var(--ink); transition: color 0.15s ease; }
.link:hover { color: var(--accent); }
.link--muted { color: var(--ink-soft); font-weight: 500; }
.link--muted:hover { color: var(--ink-soft); }

/* ---------- Use Cases ---------- */
.uc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.uc {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; display: flex; flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.uc:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-2); }
.uc__ic { width: 46px; height: 46px; border-radius: 11px; background: var(--accent-tint); color: var(--accent); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.uc__ic svg { width: 24px; height: 24px; }
.uc__title { font-size: 1.16rem; margin-bottom: 10px; }
.uc__desc { color: var(--ink-soft); font-size: 0.94rem; margin-bottom: 16px; }
.uc__points { margin-top: auto; display: flex; flex-direction: column; gap: 9px; }
.uc__points li { position: relative; padding-left: 22px; color: var(--ink-2); font-size: 0.9rem; line-height: 1.45; }
.uc__points li::before {
  content: ""; position: absolute; left: 0; top: 7px; width: 8px; height: 8px;
  border: 2px solid var(--accent); border-radius: 50%;
}

/* ---------- Channels ---------- */
.channels { margin-top: 60px; padding-top: 44px; border-top: 1px solid var(--line); }
.channels__head { text-align: center; margin-bottom: 30px; }
.channels__title { font-size: clamp(1.3rem, 2.4vw, 1.7rem); margin-top: 14px; }
.channels__row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.channel {
  text-align: center; padding: 26px 20px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.channel:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-2); }
.channel__ic {
  width: 58px; height: 58px; border-radius: 14px; margin: 0 auto 16px;
  background: var(--accent-tint); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.channel__ic svg { width: 30px; height: 30px; }
.channel h4 { font-size: 1.06rem; margin-bottom: 7px; }
.channel p { color: var(--ink-soft); font-size: 0.88rem; line-height: 1.45; }

/* ---------- How it works (roadmap) ---------- */
.road { display: flex; flex-direction: column; gap: 0; }
.step { display: grid; grid-template-columns: 64px 1fr 1fr; gap: 34px; align-items: center; padding: 40px 0; border-top: 1px solid rgba(243, 239, 231, 0.14); }
.step:first-child { border-top: 0; }
.step__n { font-family: var(--display); font-size: 1.5rem; font-weight: 800; color: var(--accent); }
.step__body h3 { color: var(--on-ink); font-size: 1.35rem; margin-bottom: 10px; }
.step__body p { color: var(--on-ink-soft); font-size: 0.98rem; max-width: 420px; }
.step__art {
  background: rgba(255,255,255,0.03); border: 1px solid rgba(243, 239, 231, 0.12); border-radius: var(--radius);
  aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; padding: 22px;
}
.step__art svg { width: 100%; height: 100%; color: var(--on-ink); }
.step__n { grid-column: 1; }
.step__body { grid-column: 2; }
.step__art { grid-column: 3; }
.step:nth-child(even) .step__body { grid-column: 3; text-align: right; }
.step:nth-child(even) .step__body p { margin-left: auto; }
.step:nth-child(even) .step__art { grid-column: 2; }

.section--ink .section__title, .section--ink .section__head h2 { color: var(--on-ink); }
.section--ink .section__lead { color: var(--on-ink-soft); }
.section--ink .eyebrow { color: var(--on-ink-soft); }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: start; }
.about__text p { color: var(--ink-soft); margin-bottom: 18px; max-width: 560px; }
.about__creds { display: flex; flex-direction: column; gap: 13px; margin: 26px 0 30px; }
.about__creds li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-2); font-size: 0.96rem; }
.about__creds .ic { color: var(--accent); flex: 0 0 auto; margin-top: 2px; }
.about__creds .ic svg { width: 18px; height: 18px; }

.about__card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.about__card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.about__card > p { color: var(--ink-soft); font-size: 0.94rem; margin-bottom: 22px; }
.about__list { display: flex; flex-direction: column; gap: 16px; }
.about__list li { display: flex; gap: 13px; align-items: flex-start; }
.about__list .k { font-family: var(--display); font-weight: 700; color: var(--accent); font-size: 0.95rem; min-width: 20px; }
.about__list h4 { font-size: 0.98rem; margin-bottom: 3px; }
.about__list p { color: var(--ink-soft); font-size: 0.88rem; }

/* ---------- CTA strip (after every section) ---------- */
.cta-strip { padding: 34px 0; }
.cta-strip__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 30px;
}
.cta-strip__text { font-family: var(--display); font-weight: 700; color: var(--ink); font-size: 1.16rem; }
.cta-strip__text span { display: block; font-family: var(--body); font-weight: 400; color: var(--ink-soft); font-size: 0.92rem; margin-top: 3px; }
.section--ink .cta-strip__inner { background: rgba(255,255,255,0.04); border-color: rgba(243,239,231,0.14); }
.section--ink .cta-strip__text { color: var(--on-ink); }
.section--ink .cta-strip__text span { color: var(--on-ink-soft); }

/* ---------- Final CTA ---------- */
.finalcta { background: var(--ink-panel); text-align: center; }
.finalcta__inner { max-width: 700px; margin: 0 auto; }
.finalcta h2 { color: var(--on-ink); font-size: clamp(2rem, 4vw, 3rem); margin: 16px 0 16px; }
.finalcta p { color: var(--on-ink-soft); font-size: 1.08rem; margin-bottom: 32px; }
.finalcta__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.finalcta .btn--outline { color: var(--on-ink); border-color: rgba(243,239,231,0.3); }
.finalcta .btn--outline:hover { border-color: var(--on-ink); }
.finalcta__note { margin-top: 22px; color: var(--on-ink-soft); font-size: 0.86rem; }
.finalcta__note a { color: var(--on-ink); border-bottom: 1px solid rgba(243,239,231,0.35); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 28px 0; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.footer__brand { font-family: var(--display); font-weight: 700; color: var(--ink); font-size: 0.95rem; }
.footer__copy { color: var(--ink-soft); font-size: 0.85rem; }

/* ---------- Inline video embed ---------- */
button.project__media { font: inherit; color: inherit; text-align: left; padding: 0; margin: 0; border: 0; cursor: pointer; width: 100%; }
.project__media iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 3; }
.project__media.is-playing { cursor: default; }
.project__media.is-playing .project__thumb, .project__media.is-playing .project__play { display: none; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Focus visibility ---------- */
a:focus-visible, button:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .hero__inner { grid-template-columns: 1fr; gap: 44px; }
  .about { grid-template-columns: 1fr; gap: 34px; }
  .uc-grid { grid-template-columns: 1fr 1fr; }
  .stats__grid { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; }
  .stat { border-top: 1px solid var(--line); }
  .stat:nth-child(1), .stat:nth-child(2) { border-top: 0; }
}
@media (max-width: 760px) {
  .nav__links {
    position: fixed; top: 74px; right: 0; left: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--paper); padding: 18px 24px 26px; border-bottom: 1px solid var(--line);
    transform: translateY(-160%); transition: transform 0.32s ease; z-index: 90;
  }
  .nav__links.open { transform: translateY(0); }
  .nav__links a:not(.btn) { padding: 11px 0; font-size: 1.02rem; border-bottom: 1px solid var(--line); }
  .nav__links .btn { margin-top: 10px; }
  .nav__toggle { display: flex; }
  .nav__spacer { display: none; }

  .projects, .uc-grid { grid-template-columns: 1fr; }
  .channels__row { grid-template-columns: 1fr 1fr; gap: 14px; }
  .channel { padding: 20px 14px; }
  .step { grid-template-columns: 40px 1fr; gap: 16px; padding: 30px 0; }
  .step__body, .step:nth-child(even) .step__body { grid-column: 2; text-align: left; }
  .step:nth-child(even) .step__body p { margin-left: 0; }
  .step__art, .step:nth-child(even) .step__art { grid-column: 1 / -1; }
  .section { padding: 68px 0; }
  .hero { padding: 120px 0 60px; }
  .cta-strip__inner { flex-direction: column; align-items: flex-start; }
  .footer__inner { flex-direction: column; text-align: center; }
}

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