/* =========================================================
   Milal Technologies — shared styles
   Design: app-studio identity. Squircle "app icon" motif as
   the signature, ink + warm paper palette, electric indigo accent.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@500;600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
  --ink:        #15161C;
  --ink-soft:   #41434F;
  --ink-faint:  #6B6D7A;
  --paper:      #FBFAF6;
  --paper-2:    #F2F0E9;
  --line:       #E5E2D8;
  --accent:     #5546FF;
  --accent-2:   #FF6B4A;
  --accent-tint:#ECEAFF;
  --white:      #FFFFFF;

  --radius-sq:  22px;   /* squircle for app-icon motif */
  --radius:     14px;
  --radius-sm:  10px;

  --shadow-sm:  0 1px 2px rgba(21,22,28,.06), 0 4px 14px rgba(21,22,28,.05);
  --shadow-md:  0 10px 30px rgba(21,22,28,.10);
  --shadow-lg:  0 24px 60px rgba(85,70,255,.18);

  --font-display: 'Sora', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;

  --maxw: 1140px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
}

p { margin: 0; }

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

.eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .95rem;
  padding: .82rem 1.4rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}
.btn-primary {
  background: var(--accent);
  color: var(--white);
  box-shadow: var(--shadow-md);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251,250,246,.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: -.02em;
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #8b7dff);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: .95rem;
  box-shadow: var(--shadow-sm);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-links a {
  font-size: .94rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color .15s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 1rem; }

.menu-btn { display: none; background: none; border: 0; cursor: pointer; }

/* ---------- hero ---------- */
.hero {
  padding: 72px 0 80px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.4rem, 5.2vw, 3.9rem);
  margin: 18px 0 0;
}
.hero h1 .hl {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  font-size: 1.12rem;
  color: var(--ink-soft);
  max-width: 30rem;
  margin-top: 20px;
}
.hero-actions { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.hero-meta {
  display: flex;
  gap: 28px;
  margin-top: 38px;
  flex-wrap: wrap;
}
.hero-meta .stat { display: flex; flex-direction: column; }
.hero-meta .num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: -.02em;
}
.hero-meta .lbl { font-size: .82rem; color: var(--ink-faint); }

/* phone mockup signature */
.phone-wrap {
  display: grid;
  place-items: center;
  position: relative;
}
.glow {
  position: absolute;
  width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(85,70,255,.28), transparent 62%);
  filter: blur(8px);
  z-index: 0;
}
.phone {
  position: relative;
  z-index: 2;
  width: 248px;
  height: 510px;
  background: #0e0f15;
  border-radius: 42px;
  padding: 12px;
  box-shadow: 0 30px 70px rgba(21,22,28,.28);
  border: 1px solid #23242e;
}
.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 32px;
  background: linear-gradient(180deg, #6E63FF, #5546FF 46%, #4536e0);
  overflow: hidden;
  position: relative;
  color: #fff;
  padding: 24px 18px;
}
.notch {
  position: absolute;
  top: 12px; left: 50%; transform: translateX(-50%);
  width: 92px; height: 22px; border-radius: 999px;
  background: #0e0f15;
}
.screen-top { display: flex; justify-content: space-between; font-size: .7rem; opacity: .85; margin-top: 6px; }
.screen-h { font-family: var(--font-display); font-weight: 700; font-size: 1.45rem; margin-top: 46px; line-height: 1.1; }
.screen-p { font-size: .82rem; opacity: .85; margin-top: 8px; }
.app-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 28px;
}
.app-ico {
  aspect-ratio: 1;
  border-radius: 16px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.22);
}
.app-ico:nth-child(2) { background: rgba(255,255,255,.30); }
.app-ico:nth-child(5) { background: rgba(255,255,255,.30); }
.app-ico:nth-child(8) { background: rgba(255,255,255,.30); }
.screen-card {
  margin-top: 26px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 16px;
  padding: 14px;
}
.screen-card .bar { height: 8px; border-radius: 6px; background: rgba(255,255,255,.4); }
.screen-card .bar.short { width: 55%; margin-top: 9px; background: rgba(255,255,255,.25); }

/* floating squircle badges */
.float-ico {
  position: absolute;
  z-index: 3;
  width: 64px; height: 64px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-md);
  display: grid; place-items: center;
  font-size: 1.7rem;
}
.float-ico.a { top: 30px; left: 6px; }
.float-ico.b { bottom: 60px; right: 0px; }

/* ---------- generic section ---------- */
.section { padding: 84px 0; }
.section-tight { padding: 56px 0; }
.section-head { max-width: 38rem; margin-bottom: 48px; }
.section-head h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  margin-top: 12px;
}
.section-head p { color: var(--ink-soft); font-size: 1.05rem; margin-top: 14px; }
.bg-alt { background: var(--paper-2); }

/* platforms strip */
.platforms {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px 40px;
  flex-wrap: wrap;
  padding: 26px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.platforms span {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink-faint);
  font-size: 1.02rem;
}

/* services */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.card-ico {
  width: 52px; height: 52px;
  border-radius: var(--radius-sm);
  background: var(--accent-tint);
  color: var(--accent);
  display: grid; place-items: center;
  font-size: 1.5rem;
  margin-bottom: 18px;
}
.card h3 { font-size: 1.22rem; }
.card p { color: var(--ink-soft); margin-top: 10px; font-size: .96rem; }

/* process — a real ordered sequence, so numbering earns its place */
.steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}
.step { position: relative; }
.step .n {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: .9rem;
  color: var(--accent);
  letter-spacing: .04em;
}
.step h4 { font-size: 1.08rem; margin-top: 12px; }
.step p { color: var(--ink-soft); font-size: .9rem; margin-top: 8px; }
.step::before {
  content: "";
  display: block;
  height: 3px; width: 30px;
  background: var(--accent);
  border-radius: 3px;
  margin-bottom: 14px;
}

/* CTA band */
.cta-band {
  background: var(--ink);
  color: var(--white);
  border-radius: 28px;
  padding: 64px 48px;
  display: grid;
  grid-template-columns: 1.4fr auto;
  align-items: center;
  gap: 30px;
  position: relative;
  overflow: hidden;
}
.cta-band::after {
  content: "";
  position: absolute;
  right: -60px; top: -60px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(85,70,255,.55), transparent 64%);
}
.cta-band h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); position: relative; z-index: 1; }
.cta-band p { color: #c9c9d4; margin-top: 12px; position: relative; z-index: 1; }
.cta-band .btn { position: relative; z-index: 1; }
.cta-band .btn-ghost { color: #fff; border-color: rgba(255,255,255,.35); }
.cta-band .btn-ghost:hover { border-color: #fff; }

/* ---------- footer ---------- */
.site-footer {
  background: var(--ink);
  color: #c9c9d4;
  padding: 60px 0 30px;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 36px;
}
.site-footer .brand { color: #fff; }
.site-footer .brand-mark { background: linear-gradient(135deg, var(--accent), #8b7dff); }
.foot-about { margin-top: 16px; font-size: .92rem; max-width: 22rem; }
.foot-col h5 {
  font-family: var(--font-display);
  font-weight: 600;
  color: #fff;
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin: 0 0 16px;
}
.foot-col a { display: block; font-size: .94rem; margin-bottom: 11px; color: #c9c9d4; transition: color .15s; }
.foot-col a:hover { color: #fff; }
.foot-bottom {
  margin-top: 46px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: .86rem;
}
.foot-bottom a { color: #c9c9d4; }
.foot-bottom a:hover { color: #fff; }

/* ---------- legal / content pages ---------- */
.legal-hero {
  padding: 60px 0 30px;
  border-bottom: 1px solid var(--line);
}
.legal-hero h1 { font-size: clamp(2rem, 4.4vw, 3rem); margin-top: 14px; }
.legal-hero .updated { color: var(--ink-faint); margin-top: 14px; font-size: .92rem; }
.legal-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 56px;
  padding: 56px 0 80px;
  align-items: start;
}
.toc {
  position: sticky;
  top: 96px;
  border-left: 2px solid var(--line);
  padding-left: 18px;
}
.toc h6 {
  font-family: var(--font-display);
  font-size: .74rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 14px;
}
.toc a {
  display: block;
  font-size: .9rem;
  color: var(--ink-soft);
  padding: 5px 0;
  transition: color .15s;
}
.toc a:hover { color: var(--accent); }
.legal-body { max-width: 44rem; }
.legal-body section { margin-bottom: 40px; scroll-margin-top: 96px; }
.legal-body h2 {
  font-size: 1.5rem;
  margin-bottom: 14px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.legal-body h2 .sn { color: var(--accent); font-size: 1rem; font-weight: 700; }
.legal-body h3 { font-size: 1.1rem; margin: 22px 0 8px; }
.legal-body p { color: var(--ink-soft); margin-bottom: 14px; }
.legal-body ul { color: var(--ink-soft); padding-left: 20px; margin: 0 0 14px; }
.legal-body li { margin-bottom: 8px; }
.legal-body a.inline { color: var(--accent); font-weight: 500; }
.callout {
  background: var(--accent-tint);
  border: 1px solid #d9d4ff;
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 22px 0;
  font-size: .95rem;
  color: var(--ink-soft);
}
.note {
  background: var(--paper-2);
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  padding: 14px 18px;
  margin: 18px 0;
  font-size: .92rem;
  color: var(--ink-soft);
}
.note strong { color: var(--ink); }

/* tables inside legal body */
.legal-table-wrap { overflow-x: auto; margin: 16px 0 20px; }
.legal-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  min-width: 460px;
}
.legal-body table th,
.legal-body table td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.legal-body table th {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  background: var(--paper-2);
  font-size: .82rem;
  letter-spacing: .02em;
}
.legal-body table td:first-child { font-weight: 600; color: var(--ink); white-space: nowrap; }
.legal-body table tr:last-child td { border-bottom: 0; }
.tbl-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  margin: 22px 0 4px;
}

/* ---------- responsive ---------- */
@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; }
  .phone-wrap { order: -1; margin-bottom: 20px; }
  .cards { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .legal-layout { grid-template-columns: 1fr; }
  .toc { position: static; border-left: 0; border-top: 1px solid var(--line); padding-left: 0; padding-top: 18px; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .menu-btn { display: block; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 72px; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 8px 24px 18px;
  }
  .nav-links.open a { padding: 12px 0; width: 100%; border-bottom: 1px solid var(--line); }
  .cta-band { grid-template-columns: 1fr; padding: 44px 28px; }
  .cards { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .foot-grid { grid-template-columns: 1fr; }
  .hero-meta { gap: 20px; }
}

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