/* ============================================================
   your.mn · SCS hub
   Vibe: Figma "SCS · Color options (blur + noise)"
   Font: Inter (бүх текст) · Ө Ү шалгасан
   ============================================================ */


@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url(../fonts/inter-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+2190-21FF, U+20AE; }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url(../fonts/inter-cyrillic-400-normal.woff2) format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1; }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url(../fonts/inter-cyrillic-ext-400-normal.woff2) format("woff2"); unicode-range: U+0460-052F; }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url(../fonts/inter-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+2190-21FF, U+20AE; }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url(../fonts/inter-cyrillic-500-normal.woff2) format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1; }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url(../fonts/inter-cyrillic-ext-500-normal.woff2) format("woff2"); unicode-range: U+0460-052F; }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url(../fonts/inter-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+2190-21FF, U+20AE; }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url(../fonts/inter-cyrillic-600-normal.woff2) format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1; }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url(../fonts/inter-cyrillic-ext-600-normal.woff2) format("woff2"); unicode-range: U+0460-052F; }
@font-face { font-family: "Inter"; font-weight: 800; font-display: swap; src: url(../fonts/inter-latin-800-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+2190-21FF, U+20AE; }
@font-face { font-family: "Inter"; font-weight: 800; font-display: swap; src: url(../fonts/inter-cyrillic-800-normal.woff2) format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1; }
@font-face { font-family: "Inter"; font-weight: 800; font-display: swap; src: url(../fonts/inter-cyrillic-ext-800-normal.woff2) format("woff2"); unicode-range: U+0460-052F; }

:root {
  --night: #070A1F;
  --white: #FFFFFF;
  --soft: rgba(255, 255, 255, 0.7);
  --faint: rgba(255, 255, 255, 0.45);
  --glass: rgba(255, 255, 255, 0.08);
  --glass-line: rgba(255, 255, 255, 0.16);
  --lime: #C6FF1A;
  --f-display: "Inter", system-ui, sans-serif;
  --f-body: "Inter", system-ui, sans-serif;
  --f-mono: "Inter", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --noise: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--night);
  color: var(--white);
  font-family: var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }
.mono { font-family: var(--f-mono); font-weight: 500; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; font-feature-settings: "tnum"; }

/* ---------- Aurora + noise (01 Midnight Aurora) ---------- */
.aurora { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: var(--night); }
.aurora i { position: absolute; border-radius: 50%; filter: blur(110px); will-change: transform; }
.aurora i:nth-child(1) { width: 75vmax; height: 64vmax; left: -22vmax; top: -12vmax; background: #2F3BFF; opacity: .95; animation: drift1 26s ease-in-out infinite alternate; }
.aurora i:nth-child(2) { width: 80vmax; height: 68vmax; right: -30vmax; bottom: -30vmax; background: #00C2FF; opacity: .7; animation: drift2 30s ease-in-out infinite alternate; }
.aurora i:nth-child(3) { width: 35vmax; height: 30vmax; right: 6vmax; top: -4vmax; background: #C6FF1A; opacity: .35; animation: drift1 22s ease-in-out infinite alternate-reverse; }
@keyframes drift1 { to { transform: translate(6vmax, 4vmax) scale(1.08); } }
@keyframes drift2 { to { transform: translate(-5vmax, -6vmax) scale(1.05); } }
.noise { position: fixed; inset: 0; z-index: 1; pointer-events: none; background-image: var(--noise); opacity: .16; mix-blend-mode: overlay; }

/* ---------- Login ---------- */
.login {
  position: relative; z-index: 2;
  min-height: 100svh;
  display: grid; place-items: center;
  padding: 24px 16px;
}
.login__card {
  width: min(100%, 440px);
  display: grid; justify-items: center; gap: 28px;
  padding: 48px 32px 36px;
  border-radius: 36px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  backdrop-filter: blur(24px) saturate(1.3);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  box-shadow: 0 40px 120px -40px rgba(0, 0, 0, .6);
}
.login__logo { width: min(100%, 300px); height: auto; }
.login__hint { color: var(--soft); text-align: center; margin: -8px 0 0; }
.login form { width: 100%; display: grid; gap: 12px; }
.field { position: relative; }
.field input {
  width: 100%; height: 60px;
  padding: 0 56px 0 24px;
  border-radius: 999px;
  background: rgba(7, 10, 31, .45);
  border: 1px solid var(--glass-line);
  font-size: 17px; letter-spacing: .02em;
  transition: border-color .2s, background .2s;
}
.field input::placeholder { color: var(--faint); }
.field input:focus { outline: none; border-color: var(--lime); background: rgba(7, 10, 31, .65); }
.field button {
  position: absolute; right: 8px; top: 8px;
  width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: transparent; color: var(--soft); cursor: pointer;
  display: grid; place-items: center;
}
.field button:hover { color: var(--white); }
.go {
  height: 60px; border: 0; border-radius: 999px;
  background: var(--lime); color: var(--night);
  font-family: var(--f-body); font-weight: 600; font-size: 17px; letter-spacing: -.01em;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.go:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -12px rgba(198, 255, 26, .6); }
.go:active { transform: translateY(1px); }
.error { min-height: 20px; margin: 0; color: #FF8FA3; font-size: 14px; text-align: center; }
.login__foot { color: var(--faint); }

/* ---------- Hub ---------- */
.hub {
  position: relative; z-index: 2;
  min-height: 100svh;
  display: grid; grid-template-rows: auto 1fr;
  gap: clamp(14px, 2vw, 22px);
  padding: clamp(16px, 2.4vw, 32px);
}
.hub__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.hub__logo { width: clamp(120px, 12vw, 170px); height: auto; display: block; }
.hub__right { display: flex; align-items: center; gap: 14px; }
.hub__clock { color: var(--soft); }
.out {
  height: 40px; padding: 0 16px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--glass); border: 1px solid var(--glass-line);
  font-size: 14px; font-weight: 500;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: background .2s;
}
.out:hover { background: rgba(255, 255, 255, .16); }

.tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 20px);
  min-height: 0;
}
/* товчны тооноос хамаарсан grid */
.tiles[data-count="1"] { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.tiles[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: 1fr; }
.tiles[data-count="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: 1fr; }
.tiles[data-count="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); }
.tiles[data-count="1"] .tile__label, .tiles[data-count="2"] .tile__label { font-size: clamp(44px, 7vw, 128px); }

.tile {
  position: relative; isolation: isolate;
  min-height: 200px;
  border-radius: clamp(24px, 2.6vw, 36px);
  overflow: hidden;
  padding: clamp(18px, 2vw, 28px);
  display: flex; flex-direction: column; justify-content: space-between;
  background: var(--base);
  border: 1px solid rgba(255, 255, 255, .1);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
  animation: rise .7s var(--ease) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.tile::before {
  content: ""; position: absolute; inset: -10%; z-index: -2;
  background: var(--glow);
  filter: blur(36px);
  transition: transform .8s var(--ease);
}
.tile::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: var(--noise); opacity: .22; mix-blend-mode: overlay; }
.tile:hover { transform: translateY(-4px); box-shadow: 0 30px 80px -30px var(--shadow); }
.tile:hover::before { transform: scale(1.12) rotate(4deg); }
.tile__top { display: flex; justify-content: space-between; align-items: flex-start; }
.tile__no { color: rgba(255, 255, 255, .75); }
.tile__go {
  width: clamp(40px, 3.6vw, 52px); height: clamp(40px, 3.6vw, 52px);
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25);
  font-size: 20px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: background .25s, color .25s, transform .45s var(--ease);
}
.tile:hover .tile__go { background: var(--white); color: var(--night); transform: rotate(45deg); }
.tile__label {
  margin: 0;
  font-family: var(--f-display); font-weight: 800;
  font-size: clamp(30px, 4.4vw, 72px);
  line-height: .95; letter-spacing: -.045em;
  overflow-wrap: break-word;
}
.tile__sub { margin: 10px 0 0; color: rgba(255, 255, 255, .78); font-size: clamp(13px, 1.1vw, 16px); }
.tile.is-empty { cursor: default; }
.tile.is-empty .tile__go { opacity: .35; }
.tile.is-empty:hover { transform: none; box-shadow: none; }
.tile.is-empty .tile__sub { color: rgba(255, 255, 255, .5); }

/* Light-ink tiles (Lime Flash glow is bright) */
.tile[data-theme="lime"] .tile__label { color: var(--white); }

/* ---------- Colorways (Figma 02 to 07) ---------- */
[data-theme="plasma"] { --base: #1B0B5A; --shadow: #7B2FF7;
  --glow: radial-gradient(60% 55% at 80% 20%, rgba(123,47,247,1) 0%, transparent 70%), radial-gradient(58% 52% at 20% 82%, rgba(255,46,126,.85) 0%, transparent 70%), radial-gradient(34% 30% at 55% 55%, rgba(47,59,255,.9) 0%, transparent 70%); }
[data-theme="lime"] { --base: #0B0B0C; --shadow: #C6FF1A;
  --glow: radial-gradient(60% 55% at 20% 80%, rgba(198,255,26,.8) 0%, transparent 70%), radial-gradient(50% 45% at 85% 25%, rgba(24,217,160,.6) 0%, transparent 70%), radial-gradient(34% 30% at 50% 8%, rgba(47,59,255,.35) 0%, transparent 70%); }
[data-theme="sunset"] { --base: #2A0A0A; --shadow: #FF7A1A;
  --glow: radial-gradient(58% 52% at 15% 20%, rgba(255,122,26,1) 0%, transparent 70%), radial-gradient(60% 55% at 85% 78%, rgba(255,46,126,.9) 0%, transparent 70%), radial-gradient(30% 27% at 70% 15%, rgba(255,193,77,.7) 0%, transparent 70%); }
[data-theme="ocean"] { --base: #021B2E; --shadow: #00C6FF;
  --glow: radial-gradient(60% 55% at 80% 20%, rgba(0,198,255,.9) 0%, transparent 70%), radial-gradient(58% 52% at 20% 82%, rgba(0,64,255,1) 0%, transparent 70%), radial-gradient(34% 30% at 55% 55%, rgba(127,255,212,.45) 0%, transparent 70%); }
[data-theme="cherry"] { --base: #12000A; --shadow: #C1121F;
  --glow: radial-gradient(60% 55% at 20% 80%, rgba(193,18,31,1) 0%, transparent 70%), radial-gradient(50% 45% at 85% 25%, rgba(255,77,109,.7) 0%, transparent 70%), radial-gradient(34% 30% at 50% 8%, rgba(90,0,32,.9) 0%, transparent 70%); }
[data-theme="forest"] { --base: #04140E; --shadow: #1F7A4D;
  --glow: radial-gradient(58% 52% at 15% 20%, rgba(31,122,77,1) 0%, transparent 70%), radial-gradient(60% 55% at 85% 78%, rgba(11,93,59,.9) 0%, transparent 70%), radial-gradient(30% 27% at 70% 15%, rgba(198,255,26,.3) 0%, transparent 70%); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); }
  .tiles[data-count="1"], .tiles[data-count="2"], .tiles[data-count="3"] { grid-template-columns: 1fr; grid-template-rows: repeat(var(--rows, 2), minmax(0, 1fr)); }
  .tiles[data-count="1"] { --rows: 1; }
  .tiles[data-count="3"] { --rows: 3; }
  .tiles[data-count="1"] .tile__label, .tiles[data-count="2"] .tile__label, .tiles[data-count="3"] .tile__label { font-size: clamp(40px, 12vw, 64px); }
  .tile { min-height: 150px; }
  .tile__label { font-size: clamp(22px, 6.6vw, 44px); }
  .hub__clock { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
