/* ===========================================================
   MLINO — AI-native landing page (English V1)
   Character system + hero + product-story sections.
   Self-contained: does not share styles with the Persian
   clinic landing (landing.css) — this is a deliberately
   different, character-first experience.
   =========================================================== */

:root {
  --void: #050611;
  --deep: #090b18;
  --panel: #0e1122;
  --panel-2: #121531;
  --line: rgba(255,255,255,0.09);
  --line-soft: rgba(255,255,255,0.05);
  --ink-1: #f4f5fb;
  --ink-2: #a6abc9;
  --ink-3: #6d7296;
  --max: 1180px;

  /* mood color tokens — used only for aura / eye bloom / small accents */
  --mood-idle-a: #8a6bff;      --mood-idle-b: #4d8dff;
  --mood-curious-a: #4d8dff;   --mood-curious-b: #2fe3e3;
  --mood-thinking-a: #6a3fd6;  --mood-thinking-b: #402a8f;
  --mood-focused-a: #2f8bff;   --mood-focused-b: #00c2ff;
  --mood-happy-a: #2fe3e3;     --mood-happy-b: #3ddc8a;
  --mood-excited-a: #8a6bff;   --mood-excited-b: #ff6cc8;
  --mood-surprised-a: #2fe3e3; --mood-surprised-b: #4d8dff;
  --mood-concerned-a: #f5a742; --mood-concerned-b: #d6842a;
  --mood-warning-a: #ff6b6b;   --mood-warning-b: #d6483f;
  --mood-calm-a: #4d8dff;      --mood-calm-b: #2fe3c9;
}

@property --a { syntax: '<color>'; inherits: true; initial-value: #8a6bff; }
@property --b { syntax: '<color>'; inherits: true; initial-value: #4d8dff; }

.mp * { box-sizing: border-box; }
.mp {
  background: var(--void);
  color: var(--ink-1);
  font-family: "Inter", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.mp a { color: inherit; text-decoration: none; }
.mp .container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- Nav ---------- */
.mp-nav {
  position: sticky; top: 0; z-index: 90;
  background: rgba(5,6,17,0.72); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.mp-nav .container { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.mp-logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 17px; letter-spacing: 0.01em; }
.mp-logo-img { height: 34px; width: auto; display: block; }
.mp-nav-links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.mp-nav-links a { font-size: 14px; color: var(--ink-2); }
.mp-nav-links a:hover { color: var(--ink-1); }
.mp-nav-actions { display: flex; gap: 12px; align-items: center; }
.mp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: 10px; font-size: 14px; font-weight: 700;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.mp-btn-primary { background: linear-gradient(135deg,#8a6bff,#4d8dff); color: #05060f; box-shadow: 0 10px 26px -10px rgba(138,107,255,.6); }
.mp-btn-primary:hover { transform: translateY(-1px); }
.mp-btn-ghost { background: transparent; border-color: var(--line); color: var(--ink-1); }
.mp-btn-ghost:hover { border-color: rgba(255,255,255,.28); }
.mp-nav-actions { flex-shrink: 0; }
@media (max-width: 760px) { .mp-nav-links { display: none; } }
@media (max-width: 480px) {
  .mp-nav .container { padding: 0 14px; }
  .mp-nav-actions { gap: 6px; }
  .mp-nav-actions .mp-btn { padding: 8px 12px; font-size: 12.5px; }
  .mp-nav-actions a[data-lang-set] { display: none; }
}

/* ---------- Hero stage ---------- */
.mp-hero {
  position: relative;
  min-height: 92vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 70px 20px 60px;
  text-align: center;
  background:
    radial-gradient(900px 600px at 50% 18%, rgba(138,107,255,0.14), transparent 60%),
    radial-gradient(700px 500px at 80% 80%, rgba(47,227,227,0.07), transparent 60%);
}
.mp-hero-headline { max-width: 720px; opacity: 0; transform: translateY(10px); transition: opacity 1s ease, transform 1s ease; }
.mp-hero-headline.mp-in { opacity: 1; transform: translateY(0); }
.mp-hero h1 { font-size: 42px; line-height: 1.24; font-weight: 800; letter-spacing: -0.01em; margin: 28px 0 16px; }
.mp-hero h1 .grad { background: linear-gradient(120deg,#8a6bff,#4d8dff 60%,#2fe3e3); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mp-hero .lead { color: var(--ink-2); font-size: 17px; max-width: 560px; margin: 0 auto 30px; }
.mp-hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 6px; }
.mp-hero-actions.mp-hidden { display: none; }

/* ---------- Character system ----------
   #mc-live is ONE persistent element that is reparented between two
   in-flow "slots" (hero, final CTA) and a fixed "docked" corner position.
   A FLIP transform (computed in JS) makes every reparent look like a
   smooth morph instead of a jump — there is only ever one character. */
.mc-slot { position: relative; width: 100%; margin: 6px auto 8px; aspect-ratio: 1/1; }
.mc-slot-hero { max-width: 420px; }
.mc-slot-final { max-width: 180px; margin: 0 auto 18px; }

.mc-core {
  position: relative; width: 100%; height: 100%;
  --a: #8a6bff; --b: #4d8dff;
  transition: --a .6s ease, --b .6s ease, transform .5s cubic-bezier(.22,.8,.2,1);
  cursor: default;
}
/* Toggled briefly by JS during a FLIP reparent so the very first (large,
   pre-animation) transform applies instantly with no transition — the
   mood-color transition above is left alone so it keeps working after. */
.mc-core.mc-flip-lock { transition: --a .6s ease, --b .6s ease; }
.mc-core.mc-docked {
  position: fixed; inset-inline-end: 22px; bottom: 22px; z-index: 70;
  width: 84px; height: 84px; margin: 0; cursor: pointer;
}
@media (max-width: 640px) {
  .mc-core.mc-docked { inset-inline-end: 16px; bottom: 16px; width: 64px; height: 64px; }
}
.mc-core.mc-docked:focus-visible { outline: 2px solid #8a6bff; outline-offset: 4px; border-radius: 50%; }
.mc-aura {
  position: absolute; inset: -18%; border-radius: 50%; opacity: .85;
  background: radial-gradient(closest-side, var(--a) 0%, var(--b) 45%, transparent 72%);
  pointer-events: none;
  will-change: opacity;
}
.mp.mp-anim .mc-aura { animation: mc-aura-pulse 4.5s ease-in-out infinite; }
@keyframes mc-aura-pulse { 0%,100% { transform: scale(1); opacity: .8; } 50% { transform: scale(1.045); opacity: 1; } }

.mc-float { position: absolute; inset: 6%; }
.mp.mp-anim .mc-float { animation: mc-bob 6s ease-in-out infinite; }
@keyframes mc-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.mc-base { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; pointer-events: none; }

.mc-eye {
  position: absolute; width: 9.5%; height: 9.5%; margin: -4.75% 0 0 -4.75%;
  transition: transform .05s linear;
}
.mc-eye img { width: 100%; height: 100%; object-fit: contain; display: block; }
.mc-eye-l { left: 35%; top: 53%; }
.mc-eye-r { left: 65%; top: 53%; }
.mc-eye .mc-eye-png { opacity: 1; transition: opacity .35s ease, transform .35s ease; }
.mc-eye .mc-eye-shape { position: absolute; inset: -35%; opacity: 0; transition: opacity .35s ease; }
.mc-eye .mc-eye-shape svg { width: 100%; height: 100%; }

/* mood → which eye representation shows, and micro shape adjustments */
.mood-idle .mc-eye-png,
.mood-curious .mc-eye-png,
.mood-thinking .mc-eye-png,
.mood-focused .mc-eye-png,
.mood-surprised .mc-eye-png { opacity: 1; }
.mood-happy .mc-eye-png, .mood-excited .mc-eye-png,
.mood-concerned .mc-eye-png, .mood-warning .mc-eye-png, .mood-calm .mc-eye-png { opacity: 0; }

.mood-happy .mc-eye-shape.shape-happy,
.mood-excited .mc-eye-shape.shape-excited,
.mood-concerned .mc-eye-shape.shape-concerned,
.mood-warning .mc-eye-shape.shape-warning,
.mood-calm .mc-eye-shape.shape-calm { opacity: 1; }

.mood-curious .mc-eye-png { transform: scaleY(1.05); }
.mood-thinking .mc-eye-png { transform: scaleY(.88); }
.mood-focused .mc-eye-png { transform: scale(.92,.8); }
.mood-surprised .mc-eye-png { transform: scale(1.18,1.32); }
.mood-warning .mc-eye-png { transform: scaleY(.55); }

.mc-shape-tint { fill: var(--a); filter: drop-shadow(0 0 6px var(--a)); }

/* ---------- Proactive bubble ---------- */
.mc-bubble-wrap { position: relative; width: 100%; max-width: 480px; margin: 0 auto; min-height: 1px; }
.mc-bubble {
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity .5s ease, transform .5s ease;
  background: rgba(255,255,255,0.045); border: 1px solid var(--line); border-radius: 18px;
  padding: 18px 22px; backdrop-filter: blur(10px);
  box-shadow: 0 24px 60px -24px rgba(0,0,0,.7);
}
.mc-bubble.mp-in { opacity: 1; transform: translateY(0); pointer-events: auto; }
.mc-bubble p { margin: 0 0 6px; font-size: 15.5px; color: var(--ink-1); }
.mc-bubble .mc-hint { font-size: 12.5px; color: var(--ink-3); margin-top: 8px; }
.mc-quick-replies { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; justify-content: center; }
.mc-qr {
  font-family: inherit; font-size: 13.5px; color: var(--ink-1); cursor: pointer;
  background: rgba(255,255,255,0.06); border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 16px; transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.mc-qr:hover, .mc-qr:focus-visible { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,.3); transform: translateY(-1px); }
.mc-qr:focus-visible { outline: 2px solid #8a6bff; outline-offset: 2px; }
.mc-cta-inline { margin-top: 14px; display: flex; gap: 10px; justify-content: center; }

/* ---------- Docked guide's contextual bubble ----------
   #mc-live itself becomes the docked corner guide (see .mc-core.mc-docked
   above) — this is just the small click-to-open speech bubble anchored
   next to it, not a second character. */
.mc-thinking-note { color: var(--ink-3); font-size: 13px; margin-top: 8px; font-style: italic; }
.mc-mini-bubble {
  position: fixed; bottom: 116px; inset-inline-end: 22px; width: 260px; z-index: 71;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px;
  font-size: 13.5px; color: var(--ink-2); opacity: 0; transform: translateY(6px); pointer-events: none;
  transition: opacity .3s ease, transform .3s ease; box-shadow: 0 20px 50px -20px rgba(0,0,0,.7);
}
.mc-mini-bubble.mp-in { opacity: 1; transform: translateY(0); pointer-events: auto; }
.mc-mini-bubble a { color: #8a6bff; text-decoration: underline; }
.mc-mini-bubble p { margin: 0 0 8px; }
.mc-mini-bubble p:last-child { margin-bottom: 0; }
@media (max-width: 640px) { .mc-mini-bubble { inset-inline-end: 16px; bottom: 88px; width: 220px; } }

/* ---------- Sections ---------- */
.mp-section { padding: 100px 0; border-top: 1px solid var(--line-soft); }
.mp-section-head { max-width: 660px; margin: 0 auto 52px; text-align: center; }
.mp-tag { font-size: 12.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: #8a6bff; margin-bottom: 14px; }
.mp-section-head h2 { font-size: 32px; margin: 0 0 14px; letter-spacing: -0.01em; }
.mp-section-head p { color: var(--ink-2); font-size: 16px; margin: 0; }
.mp-reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.mp-reveal.mp-in { opacity: 1; transform: translateY(0); }

/* One core / capability rows */
.mp-cap-row { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 44px; align-items: center; padding: 46px 0; border-top: 1px solid var(--line-soft); }
.mp-cap-row:first-child { border-top: none; padding-top: 0; }
.mp-cap-row.rev { grid-template-columns: 1.15fr 0.85fr; }
.mp-cap-row.rev .mp-cap-visual { order: -1; }
.mp-cap-text .badge { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; margin-bottom: 14px; }
.badge-live { background: rgba(47,227,138,.12); color: #3ddc8a; }
.badge-soon { background: rgba(245,167,66,.14); color: #f5a742; }
.badge-vision { background: rgba(138,107,255,.14); color: #a996ff; }
.mp-cap-text h3 { font-size: 22px; margin: 0 0 12px; }
.mp-cap-text p { color: var(--ink-2); font-size: 15px; margin: 0; }
.mp-cap-visual {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px;
  display: flex; flex-direction: column; gap: 10px;
}
.mp-cap-visual .row { display: flex; justify-content: space-between; align-items: center; background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: 10px; padding: 11px 14px; font-size: 13px; color: var(--ink-2); }
.mp-cap-visual .row b { color: var(--ink-1); }
@media (max-width: 860px) {
  .mp-cap-row, .mp-cap-row.rev { grid-template-columns: 1fr; }
  .mp-cap-row.rev .mp-cap-visual { order: 0; }
}

/* Intent personalization: light emphasis, never DOM reordering */
.mp-cap-row { transition: border-color .4s ease, background .4s ease; border-radius: 14px; }
.mp-cap-row.mp-cap-emphasis { background: rgba(138,107,255,0.05); border-top-color: rgba(138,107,255,0.35); }
.mp-cap-row.mp-cap-emphasis .mp-cap-visual { border-color: rgba(138,107,255,0.4); box-shadow: 0 0 0 1px rgba(138,107,255,0.12); }
.mp-context-line { margin-top: 14px; color: #a996ff; font-size: 14.5px; font-weight: 600; }

/* Intelligence loop */
.mp-loop { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; }
.mp-loop-step { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 20px; font-size: 14px; font-weight: 700; text-align: center; }
.mp-loop-arrow { color: var(--ink-3); font-size: 16px; }
@media (max-width: 720px) { .mp-loop { flex-direction: column; } .mp-loop-arrow { transform: rotate(90deg); } }

/* One brain, many capabilities — modular network */
.mp-network { display: flex; flex-direction: column; align-items: center; gap: 26px; }
.mp-network-core { padding: 12px 26px; border-radius: 999px; background: linear-gradient(135deg,#8a6bff,#4d8dff); color: #05060f; font-weight: 800; font-size: 14px; box-shadow: 0 10px 30px -10px rgba(138,107,255,.6); }
.mp-network-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; width: 100%; max-width: 780px; }
.mp-network-col h4 { text-align: center; font-size: 12.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 16px; }
.mp-network-list { display: flex; flex-direction: column; gap: 10px; }
.mp-node { text-align: center; padding: 11px 14px; border-radius: 10px; font-size: 13.5px; border: 1px solid var(--line); }
.mp-node.live { background: rgba(47,227,138,.08); border-color: rgba(47,227,138,.3); color: #bdf2d8; }
.mp-node.vision { background: rgba(138,107,255,.06); border-color: rgba(138,107,255,.25); color: #cfc3ff; }
@media (max-width: 700px) { .mp-network-cols { grid-template-columns: 1fr; } }

/* Clinics chips */
.mp-chip-grid { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.mp-chip { padding: 11px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font-size: 13.5px; }
.mp-example { max-width: 640px; margin: 34px auto 0; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px 24px; text-align: center; }
.mp-example .from { color: var(--ink-3); font-size: 13px; margin-bottom: 8px; }
.mp-example .to { color: var(--ink-1); font-size: 15px; }

/* Human control */
.mp-control-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.mp-control-item { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px; font-size: 14px; color: var(--ink-2); }
@media (max-width: 860px) { .mp-control-grid { grid-template-columns: 1fr; } }

/* Final CTA */
.mp-final { text-align: center; padding: 100px 0 120px; }
.mp-final .mc-stage { max-width: 180px; margin-bottom: 18px; }
.mp-final h2 { font-size: 30px; margin: 0 0 12px; max-width: 640px; margin-inline: auto; }
.mp-final p { color: var(--ink-2); margin: 0 0 30px; }
.mp-final-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* Footer */
.mp-footer { border-top: 1px solid var(--line-soft); padding: 40px 0; text-align: center; }
.mp-footer .links { display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.mp-footer a { font-size: 13.5px; color: var(--ink-2); }
.mp-footer a:hover { color: var(--ink-1); }
.mp-footer .note { color: var(--ink-3); font-size: 12.5px; }

@media (max-width: 640px) {
  .mp-hero h1 { font-size: 30px; }
  .mp-section { padding: 64px 0; }
  .mp-section-head h2 { font-size: 24px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .mp.mp-anim .mc-aura-layer.active, .mp.mp-anim .mc-float { animation: none !important; }
  .mp-reveal, .mp-hero-headline, .mc-bubble, .mc-mini, .mc-mini-bubble { transition-duration: .01ms !important; }
}
