:root {
  --navy: #0b2845;
  --navy-deep: #071c31;
  --cyan: #00a6c8;
  --orange: #ff6b2c;
  --text: #112a43;
  --muted: #60738a;
  --border: #cbd9e6;
  --line: #dfe8f0;
  --surface: #ffffff;
  --shadow: 0 16px 35px rgba(11, 40, 69, 0.1);
  --radius: 18px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background: #fff;
  font-family: "Manrope", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }

.site-header {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 16px clamp(24px, 5vw, 76px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--navy-deep);
  text-decoration: none;
  font-size: clamp(18px, 2vw, 25px);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.brand img { width: 54px; height: 54px; object-fit: contain; }

.clock {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 22px;
  color: var(--navy-deep);
}

.clock__meta { display: grid; justify-items: end; gap: 3px; }
.clock__date { max-width: 150px; text-align: right; font-size: 12px; line-height: 1.4; }
.network-status { display: inline-flex; align-items: center; gap: 6px; max-width: 210px; color: var(--muted); font-size: 10px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.network-status::before { content: ""; width: 6px; height: 6px; background: #93a3b3; border-radius: 50%; }
.network-status[data-network="local"]::before { background: var(--cyan); }
.network-status[data-network="remote"]::before { background: var(--orange); }
.clock__time { display: flex; align-items: baseline; gap: 8px; padding-left: 22px; border-left: 1px solid var(--border); }
.clock__time strong { font-size: 32px; line-height: 1; letter-spacing: -0.05em; }
.clock__time small { font-size: 11px; font-weight: 700; }

main { overflow: hidden; }

.hero {
  position: relative;
  max-width: 1500px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(350px, 0.82fr);
  align-items: center;
  min-height: 405px;
  padding: 44px clamp(24px, 5vw, 76px) 32px;
}

.hero__content { position: relative; z-index: 2; }

h1 {
  max-width: 780px;
  margin: 0;
  color: var(--navy-deep);
  font-size: clamp(42px, 5.2vw, 74px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.06em;
}

h1 span { display: block; color: var(--cyan); }

.hero__content > p {
  max-width: 670px;
  margin: 20px 0 26px;
  color: var(--muted);
  font-size: clamp(16px, 1.45vw, 20px);
  line-height: 1.6;
}

.search {
  width: min(100%, 750px);
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 18px;
  background: var(--surface);
  border: 1.5px solid #aebfd0;
  border-radius: 13px;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.search:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(0, 166, 200, .12); }
.search svg { width: 25px; color: var(--navy); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.search input { flex: 1; min-width: 0; height: 58px; padding: 0; color: var(--text); background: transparent; border: 0; outline: 0; font-size: 17px; }
.search input::placeholder { color: #718398; opacity: 1; }
.search kbd { padding: 3px 8px; color: #75879a; background: #f3f6f9; border: 1px solid #d7e0e8; border-radius: 6px; font-size: 12px; box-shadow: 0 1px 0 #c9d3dc; }

.hero__art { position: relative; min-height: 330px; display: grid; place-items: center; }
.portal-visual { position: relative; width: min(100%, 455px); aspect-ratio: 1; display: grid; place-items: center; isolation: isolate; }
.portal-visual::after { content: ""; position: absolute; z-index: -2; inset: 24%; background: radial-gradient(circle, rgba(0,166,200,.12), rgba(255,255,255,0) 68%); border-radius: 50%; animation: portal-breathe 4.8s ease-in-out infinite; }
.portal-visual__image { position: relative; z-index: 2; display: block; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; animation: portal-float 6s ease-in-out infinite; }
.portal-visual__orbit { position: absolute; z-index: -1; inset: 17%; border: 1px dashed rgba(0,166,200,.3); border-radius: 50%; animation: portal-orbit 22s linear infinite; }
.portal-visual__orbit::before, .portal-visual__orbit::after { content: ""; position: absolute; width: 7px; height: 7px; background: var(--cyan); border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0,166,200,.3); }
.portal-visual__orbit::before { top: 11%; left: 10%; }
.portal-visual__orbit::after { right: 6%; bottom: 18%; background: var(--orange); box-shadow: 0 0 0 1px rgba(255,107,44,.3); }
.portal-visual__orbit--inner { inset: 27%; border-style: solid; border-color: rgba(11,40,69,.18); animation-duration: 16s; animation-direction: reverse; }

@keyframes portal-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes portal-orbit {
  to { transform: rotate(360deg); }
}

@keyframes portal-breathe {
  0%, 100% { opacity: .45; transform: scale(.94); }
  50% { opacity: 1; transform: scale(1.08); }
}

.apps { max-width: 1500px; margin: 0 auto; padding: 0 clamp(24px, 5vw, 76px) 52px; }
.app-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }

.app-card {
  --accent: var(--navy);
  position: relative;
  grid-column: span 2;
  min-height: 210px;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  padding: 32px;
  color: inherit;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  overflow: hidden;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.app-card:nth-child(n+4) { grid-column: span 3; min-height: 180px; }
.app-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 7px; background: var(--accent); }
.app-card:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--accent) 52%, #fff); box-shadow: var(--shadow); }
.app-card:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, #fff); outline-offset: 4px; }
.app-card[data-accent="orange"] { --accent: var(--orange); }
.app-card[data-accent="cyan"] { --accent: var(--cyan); }

.app-card__icon { width: 82px; height: 82px; display: grid; place-items: center; color: var(--navy); }
.app-card__icon svg { width: 72px; height: 72px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.app-card[data-accent="orange"] .app-card__icon .accent { color: var(--orange); }
.app-card[data-accent="cyan"] .app-card__icon .accent { color: var(--cyan); }
.app-card__body { align-self: stretch; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.app-card h3 { margin: 0; color: var(--navy-deep); font-size: clamp(19px, 1.6vw, 25px); line-height: 1.25; letter-spacing: -.035em; }
.app-card p { margin: 10px 0 16px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.app-card__action { display: inline-flex; align-items: center; gap: 9px; margin-top: auto; color: var(--accent); font-size: 14px; font-weight: 800; }
.app-card__action svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .2s ease; }
.app-card:hover .app-card__action svg { transform: translateX(5px); }

.empty-state { max-width: 580px; margin: 32px auto 0; padding: 46px 24px; text-align: center; border: 1px dashed var(--border); border-radius: var(--radius); }
.empty-state svg { width: 40px; fill: none; stroke: var(--cyan); stroke-width: 1.7; }
.empty-state h3 { margin: 12px 0 4px; font-size: 21px; }
.empty-state p { margin: 0 0 18px; color: var(--muted); }
.empty-state button { padding: 10px 16px; color: #fff; background: var(--navy); border: 0; border-radius: 9px; font-size: 13px; font-weight: 700; cursor: pointer; }

.site-footer { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding: 26px clamp(24px, 5vw, 76px) 30px; border-top: 1px solid var(--line); }
.site-footer div { display: grid; gap: 2px; }
.site-footer strong { font-size: 14px; }
.site-footer span { color: #7b8b9c; font-size: 12px; }
.site-footer p { margin: 0; color: #4d7895; font-size: 9px; font-weight: 700; letter-spacing: .34em; text-transform: uppercase; }

.toast { position: fixed; right: 24px; bottom: 24px; z-index: 10; max-width: min(390px, calc(100vw - 48px)); padding: 14px 17px; color: #fff; background: var(--navy-deep); border-left: 4px solid var(--orange); border-radius: 10px; box-shadow: 0 18px 42px rgba(4,20,34,.26); font-size: 13px; line-height: 1.45; opacity: 0; transform: translateY(14px); pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 1050px) {
  .hero { grid-template-columns: 1fr 310px; min-height: 380px; }
  .app-card { grid-column: span 3; }
  .app-card:nth-child(3) { grid-column: span 6; }
}

@media (max-width: 760px) {
  .site-header { min-height: 78px; padding: 13px 20px; }
  .brand { gap: 10px; font-size: 16px; }
  .brand img { width: 42px; height: 42px; }
  .clock { display: block; text-align: right; }
  .clock__meta { justify-items: end; }
  .clock__date { display: block; font-size: 10px; }
  .network-status { font-size: 9px; }
  .clock__time { justify-content: flex-end; padding: 0; border: 0; }
  .clock__time strong { font-size: 21px; }
  .hero { display: block; min-height: auto; padding: 42px 20px 28px; }
  .hero__content > p { margin: 16px 0 23px; }
  .hero__art { position: absolute; right: -12px; top: 88px; width: 210px; min-height: 210px; opacity: .12; pointer-events: none; overflow: hidden; }
  .portal-visual { width: 210px; }
  .search { min-height: 58px; }
  .apps { padding: 0 20px 36px; }
  .app-grid { display: block; }
  .app-card, .app-card:nth-child(n+4), .app-card:nth-child(3) { min-height: 0; margin-bottom: 14px; grid-template-columns: 66px 1fr; gap: 16px; padding: 25px 22px; }
  .app-card__icon { width: 62px; height: 62px; }
  .app-card__icon svg { width: 56px; height: 56px; }
  .site-footer { align-items: flex-start; padding: 24px 20px 28px; }
  .site-footer p { display: none; }
}

@media (max-width: 430px) {
  .brand span { max-width: 150px; line-height: 1.18; }
  .clock__date { display: none; }
  h1 { font-size: 39px; }
  .search kbd { display: none; }
  .app-card { grid-template-columns: 52px 1fr !important; align-items: start; padding: 24px 18px; }
  .app-card__icon, .app-card__icon svg { width: 48px; height: 48px; }
  .app-card p { margin-top: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
