/* ===== فتلة ويرو — landing page =====
   Reuses the design tokens defined in app.css (colors, radii, shadow, dark
   mode) so the marketing page and the product never drift apart.

   Structure borrows the floating-card hero + pill nav from the Gradia
   Framer template the client pointed at, but the palette is the factory's
   own material colors instead of the template's purple/blue: cotton
   (--primary, orange), denim and linen below. The one bold move is the
   hero wash + swatch chips; every section after it stays quiet. */

:root{
  --lp-denim:#3B5B7A; --lp-denim-soft:#E8EEF3;
  --lp-linen:#D89A3E; --lp-linen-soft:#FBF0DE;
  --lp-wash:radial-gradient(120% 100% at 50% 0%,
    color-mix(in srgb,var(--primary) 14%,transparent) 0%,
    color-mix(in srgb,var(--lp-denim) 8%,transparent) 46%,
    transparent 72%);
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --lp-denim:#7FA8CC; --lp-denim-soft:#16232E;
    --lp-linen:#E8B563; --lp-linen-soft:#2A2010;
  }
}
:root[data-theme="dark"]{
  --lp-denim:#7FA8CC; --lp-denim-soft:#16232E;
  --lp-linen:#E8B563; --lp-linen-soft:#2A2010;
}

body.lp{background:var(--page)}
.lp .brand{padding:0;display:flex;flex-direction:column;align-items:flex-start;gap:1px;text-decoration:none}

/* ---- nav: a real floating pill — solid, shadowed, hugging its own
   content instead of stretching edge to edge — that fully disappears
   under 900px in favor of one round floating menu button ---- */
.lp-nav-wrap{position:sticky;top:14px;z-index:30;display:flex;justify-content:center;margin:0 clamp(12px,3vw,32px);pointer-events:none}
.lp-nav-wrap>*{pointer-events:auto}
.lp-nav{
  display:flex;align-items:center;gap:18px;
  width:fit-content;max-width:100%;margin-top:14px;
  padding:8px 8px 8px clamp(16px,3vw,22px);
  background:var(--card);
  border:1px solid var(--line);border-radius:999px;
  box-shadow:0 14px 34px -14px rgba(20,20,24,.28),0 2px 8px rgba(20,20,24,.06);
}
.lp-nav-links{display:flex;gap:4px;font-size:13px;white-space:nowrap}
.lp-nav-links a{color:var(--muted);text-decoration:none;transition:color .15s,background .15s;padding:8px 13px;border-radius:999px}
.lp-nav-links a:hover{color:var(--head);background:var(--chip)}
.lp-nav-cta{display:flex;align-items:center;gap:8px}
.lp-nav .btn{border-radius:999px;white-space:nowrap}

/* the mobile stand-in: a single round floating button, not a bar that
   just goes blank */
.lp-fab{
  display:none;position:fixed;z-index:40;inset-inline-start:14px;top:14px;
  width:54px;height:54px;border-radius:50%;border:0;
  background:var(--head);color:var(--page);
  align-items:center;justify-content:center;
  box-shadow:0 14px 30px -10px rgba(20,20,24,.4);
}
.lp-fab svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:1.8;display:block}
.lp-fab[aria-expanded="true"] .i-menu{display:none}
.lp-fab:not([aria-expanded="true"]) .i-close{display:none}

/* Same fixed-chrome treatment as the fab, opposite corner — visible and
   usable on their own, the same way they already are on desktop, instead
   of only reachable by opening the full menu first. */
.lp-compact-tools{display:none;position:fixed;z-index:40;inset-inline-end:14px;top:14px;align-items:center;gap:8px}
.lp-compact-tools .iconbtn,.lp-compact-tools .lang{background:var(--card);box-shadow:0 14px 30px -14px rgba(20,20,24,.35)}

.lp-mobile-panel{
  display:none;position:fixed;z-index:39;inset-inline-start:14px;top:78px;
  width:min(78vw,300px);max-height:min(70vh,480px);overflow:auto;
  background:var(--card);border:1px solid var(--line);border-radius:20px;
  box-shadow:0 24px 50px -16px rgba(20,20,24,.4);
  padding:10px;flex-direction:column;gap:2px;
}
.lp-mobile-panel.open{display:flex}
.lp-mobile-panel a,.lp-mobile-panel button{
  display:flex;align-items:center;gap:10px;width:100%;text-align:start;
  padding:11px 12px;border-radius:12px;border:0;background:none;
  color:var(--head);font:inherit;font-size:13.5px;text-decoration:none;
}
.lp-mobile-panel a:hover,.lp-mobile-panel button:hover{background:var(--chip)}
.lp-mobile-panel svg{width:17px;height:17px;stroke:currentColor;fill:none;stroke-width:1.8;flex:none}
.lp-mobile-panel hr{border:0;border-top:1px solid var(--line);margin:6px 4px}
.lp-mobile-panel .btn{justify-content:center;border-radius:12px;border:1px solid var(--line)}
.lp-mobile-panel .btn.primary{background:var(--primary);border-color:var(--primary);color:#fff}

@media (max-width:900px){
  .lp-nav-wrap{display:none}
  .lp-fab{display:flex}
  .lp-compact-tools{display:flex}
}

/* ---- hero: centered headline over a soft material wash, then a floating
   proof-of-life card wearing three fabric-swatch chips ---- */
.lp-hero{
  position:relative;overflow:hidden;
  padding:clamp(48px,9vw,104px) clamp(16px,4vw,48px) clamp(40px,7vw,84px);
  background-image:var(--lp-wash);
}
.lp-hero-text{max-width:760px;margin:0 auto;text-align:center}
.lp-eyebrow{
  display:inline-block;font-size:12.5px;font-weight:500;color:var(--primary);
  background:var(--primary-soft);border:1px solid var(--primary-line);
  padding:6px 14px;border-radius:999px;margin-bottom:22px;
}
.lp-hero h1{font-size:clamp(28px,5vw,50px);line-height:1.22;letter-spacing:-.02em;font-weight:700;text-wrap:balance}
.lp-hero-text>p{margin:18px auto 0;font-size:clamp(14.5px,1.6vw,17px);line-height:1.9;color:var(--muted);max-width:58ch}
.lp-hero-cta{display:flex;gap:10px;flex-wrap:wrap;margin-top:28px;justify-content:center}
.btn.lg{padding:13px 26px;font-size:14px;border-radius:999px}
.lp-note{margin-top:18px;font-size:12.5px;color:var(--muted)}

.lp-hero-panel{
  position:relative;overflow:visible;max-width:640px;margin:clamp(36px,6vw,56px) auto 0;
  border-radius:20px;
}
.lp-hero-panel .card-h{padding:16px 18px 12px}
.lp-lines{padding:0 16px 16px;display:flex;flex-direction:column;gap:10px}
.lp-line{
  display:flex;align-items:center;justify-content:space-between;gap:14px;
  border:1px solid var(--line);border-radius:11px;padding:12px 14px;
}
.lp-line b{display:block;font-size:13px;font-weight:600}
.lp-line small{display:block;font-size:11.5px;color:var(--muted);margin-top:2px}
.lp-line-pct{display:flex;align-items:center;gap:10px;min-width:130px;flex:none}
.lp-line-pct .meter{flex:1}
.lp-line-pct b{font-size:14px;font-weight:700}

/* the swatch chips: cotton / denim / linen, pinned to the panel's corners */
.lp-swatch{
  position:absolute;width:52px;height:52px;box-shadow:var(--shadow);
  border:1px solid rgba(0,0,0,.06);pointer-events:none;
}
.lp-swatch.cotton{background:var(--primary-soft);border-radius:16px;inset-inline-start:-22px;top:-20px;transform:rotate(-10deg)}
.lp-swatch.cotton::after{content:"";position:absolute;inset:14px;border-radius:6px;background:var(--primary)}
.lp-swatch.denim{background:var(--lp-denim-soft);width:40px;height:40px;border-radius:11px;inset-inline-end:-16px;top:38%;transform:rotate(20deg)}
.lp-swatch.denim::after{content:"";position:absolute;inset:10px;border-radius:5px;background:var(--lp-denim)}
.lp-swatch.linen{background:var(--lp-linen-soft);width:44px;height:44px;border-radius:50%;inset-inline-start:6%;bottom:-22px;transform:rotate(6deg)}
.lp-swatch.linen::after{content:"";position:absolute;inset:12px;border-radius:50%;background:var(--lp-linen)}
@media (max-width:720px){.lp-swatch{display:none}}

/* a slow, tiny drift — just enough to read as alive, never distracting */
@keyframes lp-float{0%,100%{transform:translateY(0) rotate(var(--r,0))}50%{transform:translateY(-7px) rotate(var(--r,0))}}
.lp-swatch.cotton{--r:-10deg;animation:lp-float 6.5s ease-in-out infinite}
.lp-swatch.denim{--r:20deg;animation:lp-float 5.5s ease-in-out infinite .4s}
.lp-swatch.linen{--r:6deg;animation:lp-float 7.5s ease-in-out infinite .8s}

/* ---- stats: three honest numbers pulled from the product itself —
   module count, feature count, the signup-to-data promise already made
   in the hero — not fabricated customer/usage figures ---- */
.lp-stats{padding:0 clamp(16px,4vw,48px) clamp(44px,6vw,80px)}
.lp-stats-grid{
  max-width:900px;margin:0 auto;
  display:grid;grid-template-columns:repeat(3,1fr);
  border:1px solid var(--line);border-radius:18px;background:var(--card);
  box-shadow:var(--shadow);overflow:hidden;
}
.lp-stat{
  padding:26px 18px;text-align:center;border-inline-start:1px solid var(--line);
  display:flex;flex-direction:column;gap:6px;
}
.lp-stat:first-child{border-inline-start:0}
.lp-stat b{font-size:clamp(26px,4vw,36px);font-weight:700;color:var(--primary);line-height:1}
.lp-stat span{font-size:12.5px;color:var(--muted);line-height:1.6}
@media (max-width:640px){
  .lp-stats-grid{grid-template-columns:1fr}
  .lp-stat{border-inline-start:0;border-top:1px solid var(--line)}
  .lp-stat:first-child{border-top:0}
}

/* ---- sections ---- */
.lp-section{padding:clamp(44px,6vw,80px) clamp(16px,4vw,48px)}
.lp-section.alt{background:var(--card);border-block:1px solid var(--line)}
.lp-head{max-width:640px;margin:0 auto clamp(28px,3.5vw,44px);text-align:center}
.lp-eyebrow-text{display:block;font-size:13px;font-weight:600;color:var(--primary);margin-bottom:10px}
.lp-head h2{font-size:clamp(22px,3.2vw,33px);letter-spacing:-.01em;font-weight:700;line-height:1.35;text-wrap:balance}
.lp-head>p{margin:14px auto 0;max-width:56ch;color:var(--muted);font-size:14px;line-height:1.85}

.lp-grid-3{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:16px;max-width:1180px;margin:0 auto;
}
.lp-card{
  background:var(--card);border:1px solid var(--line);border-radius:16px;
  padding:24px;
}
.lp-section.alt .lp-card{background:var(--page)}
.lp-ic{
  width:40px;height:40px;border-radius:11px;display:grid;place-items:center;
  background:var(--primary-soft);margin-bottom:16px;
}
.lp-ic svg{width:19px;height:19px;stroke:var(--primary);fill:none;stroke-width:1.7}
.lp-ic.danger{background:var(--danger-bg)}
.lp-ic.danger svg{stroke:var(--danger)}
.lp-card h3{font-size:15px;margin-bottom:8px;font-weight:600}
.lp-card p{margin:0;font-size:13.5px;line-height:1.85;color:var(--muted)}

/* ---- steps: a real 3-step sequence, so the numbers earn their place ---- */
.lp-steps{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
  gap:0;max-width:1000px;margin:0 auto;counter-reset:step;
}
.lp-step{position:relative;padding:0 22px}
.lp-step:first-child{padding-inline-start:0}
.lp-step:last-child{padding-inline-end:0}
.lp-step-n{
  width:36px;height:36px;border-radius:50%;background:var(--primary);color:#fff;
  display:grid;place-items:center;font-size:15px;font-weight:700;margin-bottom:16px;
  position:relative;z-index:1;
}
.lp-step:not(:last-child)::after{
  content:"";position:absolute;top:18px;inset-inline-start:calc(50% + 34px);width:calc(100% - 34px);
  height:1px;background:var(--line);
}
.lp-step h3{font-size:15px;margin-bottom:8px;font-weight:600}
.lp-step p{margin:0;font-size:13.5px;line-height:1.85;color:var(--muted)}
@media (max-width:720px){
  .lp-steps{grid-template-columns:1fr;gap:28px}
  .lp-step,.lp-step:first-child,.lp-step:last-child{padding-inline:0}
  .lp-step:not(:last-child)::after{display:none}
}

/* ---- modules ---- */
.lp-modules{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;max-width:960px;margin:0 auto}
.lp-module{
  display:inline-flex;align-items:center;gap:8px;
  background:var(--page);border:1px solid var(--line);border-radius:999px;
  padding:10px 16px;font-size:13px;
}
.lp-section.alt .lp-module{background:var(--card)}
.lp-module svg{width:16px;height:16px;stroke:var(--primary);fill:none;stroke-width:1.7;flex:none}

/* ---- closing cta + footer ---- */
.lp-cta{
  position:relative;overflow:hidden;text-align:center;
  padding:clamp(48px,7vw,88px) clamp(16px,4vw,48px);
  background-image:var(--lp-wash);border-block:1px solid var(--line);
}
.lp-cta h2{font-size:clamp(21px,2.8vw,29px);font-weight:700}
.lp-cta p{margin:12px auto 0;max-width:52ch;color:var(--muted);font-size:14px}
.lp-cta .lp-hero-cta{justify-content:center}
.lp-footer{
  display:flex;justify-content:space-between;flex-wrap:wrap;gap:10px;
  padding:24px clamp(16px,4vw,48px);font-size:12.5px;color:var(--muted);
}

/* ---- motion: one entrance for the hero on load, one reveal system for
   everything below it as it's scrolled to, and the meters filling in
   instead of appearing pre-drawn ---- */
.lp-hero-text,.lp-hero-panel{opacity:0;animation:lp-rise .7s cubic-bezier(.16,1,.3,1) forwards}
.lp-hero-panel{animation-delay:.15s}

.reveal{opacity:0;transform:translateY(16px);transition:opacity .6s cubic-bezier(.16,1,.3,1),transform .6s cubic-bezier(.16,1,.3,1)}
.reveal.in{opacity:1;transform:none}
.lp-grid-3 .reveal,.lp-steps .reveal,.lp-stats-grid .reveal{transition-delay:calc(var(--i,0) * 90ms)}

.reveal-meter{width:0;transition:width 1s cubic-bezier(.16,1,.3,1)}
.reveal-meter.in{width:var(--pct)}

@keyframes lp-rise{from{opacity:0;transform:translateY(18px)}to{opacity:1;transform:translateY(0)}}

@media (prefers-reduced-motion:reduce){
  .lp-hero-text,.lp-hero-panel{animation:none!important;opacity:1!important}
  .reveal,.reveal-meter{transition:none!important}
  .lp-swatch{animation:none!important}
}

/* ===== auth pages ===== */
.auth-page{min-height:100vh;display:grid;place-items:center;padding:32px 16px}
.auth-wrap{width:100%;max-width:420px;display:flex;flex-direction:column;align-items:center;gap:20px}
.auth-brand{align-items:center!important}
.auth-card{width:100%;padding-bottom:20px}
.auth-card .card-h{text-align:center;padding:22px 20px 8px}
.auth-form{display:flex;flex-direction:column;padding:6px 20px 0}
.auth-form label{font-size:12px;color:var(--muted);margin:12px 0 6px}
.auth-form input{
  padding:11px 13px;border-radius:10px;border:1px solid var(--line);
  background:var(--page);color:var(--head);font:inherit;font-size:13px;
}
.auth-form input:focus{outline:none;border-color:var(--primary)}
.auth-form .btn{margin-top:20px;justify-content:center;padding:12px}
.auth-hint{font-size:11px;color:var(--muted);margin-top:5px}
.google-btn{margin:14px 20px 0;justify-content:center;padding:11px;width:calc(100% - 40px)}
.google-btn svg{stroke:none;fill:var(--head)}
.auth-or{display:flex;align-items:center;gap:12px;padding:16px 20px 0;color:var(--muted);font-size:12px}
.auth-or::before,.auth-or::after{content:"";flex:1;height:1px;background:var(--line)}
.auth-error{
  display:flex;align-items:center;gap:8px;margin:4px 20px 0;padding:10px 12px;
  border-radius:10px;background:var(--danger-bg);color:var(--danger);font-size:12.5px;
}
.auth-error svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.8;flex:none}
.auth-foot{font-size:12.5px;color:var(--muted);text-align:center;margin:0}
.auth-foot a{color:var(--primary)}

/* show/hide password */
.pwfield{position:relative;display:block}
.pwfield input{width:100%;padding-inline-end:40px}
.pwtoggle{
  position:absolute;inset-inline-end:4px;top:50%;transform:translateY(-50%);
  width:30px;height:30px;border:0;background:transparent;border-radius:7px;
  display:grid;place-items:center;color:var(--muted);
}
.pwtoggle:hover{background:var(--chip)}
.pwtoggle svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.8}
.pwtoggle.on{color:var(--primary)}
