/* Barsik Labs LTD — site styles. No external requests, no JS. */

:root {
  --bg: #fbfaf7;
  --bg-soft: #f4f1ea;
  --surface: #ffffff;
  --text: #17161c;
  --muted: #595864;
  --border: #e6e2d9;
  --accent: #f26b2a;
  --accent-2: #e0447f;
  --accent-3: #7a5cff;
  --link: #b3471a;
  --btn-bg: #17161c;
  --btn-text: #ffffff;
  --shadow: 0 1px 2px rgb(23 22 28 / 6%), 0 12px 32px -12px rgb(23 22 28 / 18%);
  --radius: 20px;
  --radius-sm: 12px;
  --max: 1120px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0f13;
    --bg-soft: #14161c;
    --surface: #171920;
    --text: #f3f2ee;
    --muted: #a6a5b0;
    --border: #272a33;
    --accent: #ff8a4c;
    --accent-2: #ff5c9a;
    --accent-3: #9a83ff;
    --link: #ffa776;
    --btn-bg: #f3f2ee;
    --btn-text: #0e0f13;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 16px 40px -16px rgb(0 0 0 / 60%);
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 750; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  padding: 10px 16px;
  background: var(--btn-bg);
  color: var(--btn-text);
  border-radius: 10px;
  z-index: 100;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.1rem; letter-spacing: -0.02em; }
.brand svg { width: 34px; height: 34px; flex: none; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 550;
  padding: 8px 12px;
  border-radius: 999px;
}
.nav a:hover { color: var(--text); background: var(--bg-soft); }
.nav a.nav-cta { color: var(--btn-text); background: var(--btn-bg); margin-left: 6px; }
.nav a.nav-cta:hover { opacity: 0.9; }

.menu { display: none; position: relative; }
.menu summary {
  list-style: none;
  cursor: pointer;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
}
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { background: var(--bg-soft); }
.menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 200px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  display: grid;
}
.menu-panel a { color: var(--text); text-decoration: none; padding: 10px 12px; border-radius: 8px; }
.menu-panel a:hover { background: var(--bg-soft); }

@media (max-width: 760px) {
  .nav { display: none; }
  .menu { display: block; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 650;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--btn-bg); color: var(--btn-text); }
.btn-ghost { color: var(--text); border-color: var(--border); background: var(--surface); }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 88px 0 96px; }
.hero::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 820px;
  height: 820px;
  background:
    radial-gradient(closest-side, color-mix(in srgb, var(--accent) 34%, transparent), transparent 70%),
    radial-gradient(closest-side at 30% 70%, color-mix(in srgb, var(--accent-3) 26%, transparent), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 22px;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

.gradient-text {
  background: linear-gradient(100deg, var(--accent) 0%, var(--accent-2) 55%, var(--accent-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead { font-size: clamp(1.08rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 36em; margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Decorative device */
.device {
  justify-self: center;
  width: min(300px, 100%);
  aspect-ratio: 9 / 18.5;
  padding: 12px;
  border-radius: 46px;
  background: linear-gradient(160deg, #2a2933, #121117);
  box-shadow: var(--shadow), inset 0 0 0 1.5px rgb(255 255 255 / 10%);
  transform: rotate(4deg);
}
.device-screen {
  position: relative;
  height: 100%;
  border-radius: 36px;
  overflow: hidden;
  background: linear-gradient(165deg, #ff9a5a 0%, #f2547f 52%, #7a5cff 100%);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-content: start;
  gap: 16px;
  padding: 56px 22px 22px;
}
.device-screen::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 50%;
  translate: -50% 0;
  width: 84px;
  height: 24px;
  border-radius: 999px;
  background: #121117;
}
.tile { aspect-ratio: 1; border-radius: 16px; background: rgb(255 255 255 / 22%); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 28%); }
.tile.solid { background: rgb(255 255 255 / 92%); }
.tile.big { grid-column: span 3; aspect-ratio: auto; height: 120px; display: grid; place-items: center; background: rgb(255 255 255 / 92%); }
.tile.big svg { width: 72px; height: 72px; }
.tile.wide { grid-column: span 2; aspect-ratio: auto; }

/* Sections */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-soft); border-block: 1px solid var(--border); }
.section-head { max-width: 44em; margin-bottom: 48px; }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.kicker { display: block; color: var(--link); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 12px; }

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.about-grid p { color: var(--muted); }
.about-grid p strong { color: var(--text); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.card p { color: var(--muted); margin: 0; }
.icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.icon svg { width: 24px; height: 24px; }
.icon.violet { background: linear-gradient(135deg, var(--accent-2), var(--accent-3)); }
.icon.ink { background: linear-gradient(135deg, var(--accent-3), #3b2f8f); }

.principles { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.principles li { display: grid; grid-template-columns: 28px 1fr; gap: 14px; }
.principles li::before {
  content: "";
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 18%, transparent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f26b2a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.principles strong { display: block; color: var(--text); }
.principles span { color: var(--muted); }

.apps-empty {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: center;
  padding: 32px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.apps-empty p { margin: 0; color: var(--muted); }
.apps-empty .icon { margin: 0; width: 56px; height: 56px; }

/* Contact */
.contact-card {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.contact-item { padding: 28px; border-right: 1px solid var(--border); }
.contact-item:last-child { border-right: 0; }
.contact-item dt { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.contact-item dd { margin: 0; font-weight: 600; font-style: normal; }
.contact-item address { font-style: normal; }
.contact-item a { overflow-wrap: anywhere; }
.contact-item .sub { font-weight: 400; color: var(--muted); }

/* Footer */
.site-footer { padding: 48px 0; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.92rem; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.footer-grid p { margin: 0 0 6px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; list-style: none; padding: 0; margin: 0; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text); }

/* Legal pages */
.legal { padding: 64px 0 96px; }
.legal .container { max-width: 780px; }
.legal h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); }
.legal h2 { font-size: 1.45rem; margin-top: 2.2em; }
.legal h3 { margin-top: 1.6em; }
.legal p, .legal li { color: var(--muted); }
.legal strong { color: var(--text); }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: 0.4em; }
.legal .meta { color: var(--muted); font-size: 0.95rem; }
.legal .summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 32px 0;
}
.legal .summary ul { margin: 0; }

.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 96px 0; }
.notfound p { color: var(--muted); }

/* Responsive */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .device { width: 240px; transform: rotate(3deg); }
  .cards { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 24px; }
  .contact-card { grid-template-columns: 1fr; }
  .contact-item { border-right: 0; border-bottom: 1px solid var(--border); }
  .contact-item:last-child { border-bottom: 0; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .hero { padding: 56px 0 64px; }
  .section { padding: 64px 0; }
  .cards { grid-template-columns: 1fr; }
  .device { display: none; }
  .apps-empty { grid-template-columns: 1fr; padding: 24px; }
  .card, .contact-item { padding: 22px; }
}
