/* ============================================================
   SliteMES — Landing / Login
   Shared stylesheet
   ============================================================ */

:root {
  --bg:        #f4f3f2;
  --bg-2:      #ffffff;
  --ink:       #141416;
  --ink-2:     #3b3b41;
  --muted:     #8a8a91;
  --line:      rgba(20, 20, 22, .10);
  --line-2:    rgba(20, 20, 22, .06);

  --accent:    #ff5a1f;
  --accent-2:  #ff8a3d;
  --accent-3:  #ff3d00;
  --grad:      linear-gradient(135deg, #ff9a4d 0%, #ff5a1f 55%, #ff3d00 100%);
  --grad-soft: linear-gradient(135deg, rgba(255,138,61,.14), rgba(255,61,0,.10));

  --radius:    16px;
  --radius-lg: 26px;
  --shadow-sm: 0 1px 2px rgba(20,20,22,.05), 0 2px 8px rgba(20,20,22,.04);
  --shadow-md: 0 10px 30px rgba(20,20,22,.08), 0 2px 8px rgba(20,20,22,.05);
  --shadow-lg: 0 30px 70px rgba(20,20,22,.16);

  --font-latin: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font: 'Poppins', 'Noto Sans SC', system-ui, -apple-system, 'Segoe UI',
          'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', sans-serif;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { display: block; max-width: 100%; }

/* <picture> wrappers should not affect layout */
picture { display: contents; }

::selection { background: rgba(255,90,31,.22); }

/* ---------- brand ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 21px;
  letter-spacing: -.02em;
  color: var(--ink);
}
.brand .mark { width: 26px; height: 30px; flex: none; }
.brand b { font-weight: 800; letter-spacing: -.03em; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  font-size: 15.5px;
  font-weight: 500;
  letter-spacing: .01em;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease),
              background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }

.btn-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 10px 24px rgba(20,20,22,.22);
}
.btn-primary:hover { background: #000; box-shadow: 0 14px 30px rgba(20,20,22,.30); transform: translateY(-1px); }
.btn-primary .arrow { transition: transform .3s var(--ease); }
.btn-primary:hover .arrow { transform: translateX(4px); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: rgba(20,20,22,.28); background: rgba(255,255,255,.6); }

.btn-accent {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 12px 26px rgba(255,61,0,.28);
}
.btn-accent:hover { transform: translateY(-1px); box-shadow: 0 16px 34px rgba(255,61,0,.36); }

.btn-block { width: 100%; }

.play-dot {
  width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid currentColor;
  display: inline-grid; place-items: center;
  flex: none;
}
.play-dot svg { width: 8px; height: 8px; margin-left: 1px; }

/* ============================================================
   LANDING
   ============================================================ */
.site-head {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(20px, 5vw, 64px);
  transition: background .3s var(--ease), backdrop-filter .3s var(--ease), box-shadow .3s var(--ease);
}
.site-head.scrolled {
  background: rgba(244,243,242,.82);
  backdrop-filter: saturate(160%) blur(14px);
  box-shadow: 0 1px 0 var(--line-2);
}
.head-nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 34px); }
.head-nav .link {
  font-size: 14.5px; color: var(--ink-2); opacity: .82;
  transition: opacity .2s var(--ease), color .2s var(--ease);
}
.head-nav .link:hover { opacity: 1; color: var(--ink); }
.login-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 500;
}
.login-link .arrow { transition: transform .3s var(--ease); }
.login-link:hover .arrow { transform: translateX(4px); }

.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 78% 8%, #ffffff 0%, rgba(255,255,255,0) 55%),
    linear-gradient(180deg, #f1f0f0 0%, #f4f3f2 45%, #f6f5f4 100%);
}
.hero-copy {
  position: relative;
  z-index: 2;
  padding: 128px clamp(20px, 5vw, 64px) 80px;
  max-width: 720px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; color: var(--accent-3);
  background: var(--grad-soft);
  border: 1px solid rgba(255,90,31,.18);
  padding: 7px 14px; border-radius: 999px;
  margin-bottom: 26px;
}
.eyebrow .pip { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(255,90,31,.16); }

.hero h1 {
  margin: 0;
  font-size: clamp(38px, 4.6vw, 68px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -.035em;
  color: var(--ink);
}
.hero h1 .thin { font-weight: 350; color: var(--ink-2); }
.hero h1 .dot { color: var(--accent); }

.hero .sub {
  margin: 26px 0 0;
  font-size: clamp(15px, 1.3vw, 18px);
  letter-spacing: .18em;
  color: var(--muted);
  font-weight: 400;
}
.hero .cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }

.hero-stats {
  display: flex; flex-wrap: wrap; gap: clamp(22px, 3.4vw, 52px);
  margin-top: 60px; padding-top: 30px;
  border-top: 1px solid var(--line-2);
}
.hero-stats .stat .n {
  font-size: clamp(24px, 2.4vw, 32px); font-weight: 700; letter-spacing: -.03em;
}
.hero-stats .stat .n span { color: var(--accent); }
.hero-stats .stat .l { font-size: 13px; color: var(--muted); margin-top: 4px; }

.hero-visual {
  position: relative;
  align-self: stretch;
  min-height: 540px;
}
.hero-visual img {
  position: absolute;
  right: 0; top: 0;
  height: min(100%, 962px);
  width: auto;
  max-width: none;
  object-fit: contain;
  object-position: top right;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.scroll-hint {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted);
  z-index: 3;
}
.scroll-hint .rail { width: 1px; height: 34px; background: linear-gradient(var(--muted), transparent); animation: rail 2.2s var(--ease) infinite; }
@keyframes rail { 0%,100% { opacity:.3; transform: scaleY(.6); } 50% { opacity:1; transform: scaleY(1); } }

/* ---------- features ---------- */
.section { padding: clamp(70px, 9vw, 130px) clamp(20px, 5vw, 64px); }
.section-head { max-width: 760px; margin-bottom: clamp(38px, 5vw, 64px); }
.section-head .kicker {
  font-size: 12.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent-3); margin-bottom: 16px;
}
.section-head h2 {
  margin: 0; font-size: clamp(28px, 3.2vw, 46px); line-height: 1.14;
  font-weight: 750; letter-spacing: -.03em;
}
.section-head p { margin: 18px 0 0; font-size: 16.5px; line-height: 1.7; color: var(--ink-2); max-width: 620px; }

.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; }
.card {
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  padding: 30px 28px 32px;
  box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: rgba(20,20,22,.12); }
.card .ico {
  width: 48px; height: 48px; border-radius: 14px;
  display: grid; place-items: center; margin-bottom: 20px;
  background: var(--grad-soft); color: var(--accent-3);
  border: 1px solid rgba(255,90,31,.16);
}
.card .ico svg { width: 22px; height: 22px; }
.card h3 { margin: 0 0 10px; font-size: 18.5px; font-weight: 650; letter-spacing: -.01em; }
.card p { margin: 0; font-size: 14.5px; line-height: 1.68; color: var(--ink-2); }

.feature-band {
  margin-top: 22px;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 22px;
}
.band-visual {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  background: linear-gradient(160deg, #17171a, #26262b);
  min-height: 340px; padding: 34px;
  color: #fff;
  display: flex; flex-direction: column; justify-content: space-between;
}
.band-visual h3 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.band-visual p { margin: 12px 0 0; color: rgba(255,255,255,.66); font-size: 14.5px; line-height: 1.7; max-width: 360px; }
.band-visual .glow {
  position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,90,31,.55), transparent 65%); filter: blur(10px);
}
.band-list { display: grid; gap: 14px; }
.band-item {
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 20px 22px; display: flex; gap: 16px; align-items: flex-start;
  box-shadow: var(--shadow-sm);
}
.band-item .num {
  font-size: 13px; font-weight: 700; color: var(--accent-3);
  background: var(--grad-soft); border-radius: 9px; padding: 6px 10px; flex: none;
}
.band-item h4 { margin: 0 0 4px; font-size: 15.5px; font-weight: 650; }
.band-item p { margin: 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.6; }

/* ---------- footer ---------- */
.site-foot {
  border-top: 1px solid var(--line-2);
  padding: 46px clamp(20px, 5vw, 64px) 40px;
  display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between;
  color: var(--muted); font-size: 13.5px;
}
.site-foot .links { display: flex; gap: 26px; flex-wrap: wrap; }
.site-foot .links a:hover { color: var(--ink); }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- modal ---------- */
.modal-back {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(16,16,18,.55); backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 24px;
  opacity: 0; visibility: hidden; transition: opacity .3s var(--ease), visibility .3s var(--ease);
}
.modal-back.open { opacity: 1; visibility: visible; }
.modal {
  width: min(880px, 100%);
  background: #0f0f11; border-radius: 22px; overflow: hidden;
  box-shadow: var(--shadow-lg); transform: translateY(14px) scale(.98);
  transition: transform .35s var(--ease);
}
.modal-back.open .modal { transform: none; }
.modal .frame { position: relative; aspect-ratio: 16 / 10; background: #000; }
.modal .frame img { width: 100%; height: 100%; object-fit: cover; }
.modal .cap { padding: 18px 22px; color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.modal .cap strong { font-weight: 600; font-size: 15px; }
.modal .cap span { color: rgba(255,255,255,.55); font-size: 13px; }
.modal .x { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 50%; background: rgba(0,0,0,.5); color: #fff; display: grid; place-items: center; backdrop-filter: blur(4px); }
.modal .x:hover { background: rgba(0,0,0,.75); }

/* ============================================================
   LOGIN
   ============================================================ */
.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.02fr .98fr;
}
.auth-aside {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #f1f0f0, #f6f5f4);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 40px clamp(28px, 4vw, 56px);
}
.auth-aside .art {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 40%;
  opacity: .98; pointer-events: none;
}
.auth-aside::before {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg,
    rgba(244,243,242,.60) 0%,
    rgba(244,243,242,.18) 26%,
    rgba(244,243,242,.55) 62%,
    rgba(244,243,242,.92) 88%,
    rgba(244,243,242,.98) 100%);
}
.auth-aside .aside-copy { position: relative; z-index: 2; margin-top: auto; max-width: 460px; }
.auth-aside .aside-copy h2 { margin: 0; font-size: clamp(26px, 2.6vw, 38px); font-weight: 800; letter-spacing: -.03em; line-height: 1.16; }
.auth-aside .aside-copy p { margin: 16px 0 0; color: var(--ink-2); font-size: 15px; line-height: 1.7; }
.auth-aside .quote {
  position: relative; z-index: 2; margin-top: 34px;
  border-left: 2px solid var(--accent); padding-left: 16px;
  color: var(--muted); font-size: 13.5px; line-height: 1.7;
}

.auth-main {
  display: grid; place-items: center;
  padding: 40px clamp(24px, 4vw, 64px);
  background: var(--bg-2);
}
.auth-card { width: min(420px, 100%); }
.auth-card .back { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); margin-bottom: 34px; }
.auth-card .back:hover { color: var(--ink); }
.auth-card h1 { margin: 0 0 8px; font-size: 30px; font-weight: 750; letter-spacing: -.03em; }
.auth-card .lead { margin: 0 0 32px; color: var(--muted); font-size: 14.5px; }

.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; font-weight: 550; color: var(--ink-2); margin-bottom: 8px; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .lead-ico { position: absolute; left: 16px; color: var(--muted); display: grid; place-items: center; pointer-events: none; }
.input-wrap .lead-ico svg { width: 17px; height: 17px; }
.input-wrap .trail { position: absolute; right: 8px; }
.input-wrap .trail button { color: var(--muted); padding: 8px; border-radius: 8px; display: grid; place-items: center; }
.input-wrap .trail button:hover { color: var(--ink); background: rgba(20,20,22,.05); }

.input {
  width: 100%; height: 54px;
  padding: 0 16px 0 46px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fbfbfa;
  font-size: 15px; color: var(--ink);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.input::placeholder { color: #b3b3b8; }
.input:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 4px rgba(255,90,31,.13); }
.input.no-ico { padding-left: 16px; }

.row-between { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 24px; }
.check { display: inline-flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--ink-2); cursor: pointer; user-select: none; }
.check input { appearance: none; width: 18px; height: 18px; border: 1.5px solid var(--line); border-radius: 6px; background: #fff; position: relative; transition: all .2s var(--ease); }
.check input:checked { background: var(--ink); border-color: var(--ink); }
.check input:checked::after { content: ""; position: absolute; left: 5px; top: 2px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.link-accent { font-size: 13.5px; color: var(--accent-3); font-weight: 550; }
.link-accent:hover { text-decoration: underline; }

.divider { display: flex; align-items: center; gap: 14px; margin: 26px 0; color: var(--muted); font-size: 12.5px; }
.divider::before, .divider::after { content: ""; height: 1px; background: var(--line-2); flex: 1; }

.sso { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sso button {
  height: 50px; border: 1px solid var(--line); border-radius: 12px; background: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-size: 14px; font-weight: 500; color: var(--ink-2);
  transition: border-color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease);
}
.sso button:hover { border-color: rgba(20,20,22,.24); background: #fafafa; transform: translateY(-1px); }
.sso svg { width: 18px; height: 18px; }

.auth-foot { margin-top: 30px; text-align: center; font-size: 13.5px; color: var(--muted); }
.auth-foot a { color: var(--accent-3); font-weight: 550; }

.form-error {
  display: none; margin: 0 0 18px; padding: 12px 14px; border-radius: 11px;
  background: rgba(255,61,0,.08); border: 1px solid rgba(255,61,0,.22);
  color: #c62f00; font-size: 13.5px;
}
.form-error.show { display: block; }

.demo-note {
  margin-top: 22px; padding: 13px 15px; border-radius: 12px;
  background: #f7f7f6; border: 1px dashed var(--line);
  font-size: 12.5px; color: var(--muted); line-height: 1.6;
}
.demo-note b { color: var(--ink-2); font-weight: 600; }

/* loading overlay */
.loader { position: fixed; inset: 0; z-index: 120; background: var(--bg-2); display: none; place-items: center; }
.loader.show { display: grid; }
.loader .ring { width: 46px; height: 46px; border-radius: 50%; border: 3px solid rgba(20,20,22,.10); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loader .txt { margin-top: 18px; color: var(--muted); font-size: 14px; letter-spacing: .02em; }
.loader .stack { display: grid; place-items: center; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .hero-copy { padding-top: 108px; padding-bottom: 0; max-width: none; }
  .hero-visual { min-height: 46vh; order: 2; }
  .hero-visual img { position: relative; height: auto; width: min(560px, 92%); margin: 0 auto; }
  .scroll-hint { display: none; }
  .grid-3 { grid-template-columns: 1fr; }
  .feature-band { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
}
@media (max-width: 720px) {
  .head-nav .link { display: none; }
  .hero-stats { gap: 24px; }
}
