:root {
  color-scheme: light;
  --bg: #f5f8fb;
  --surface: #ffffff;
  --surface-2: #edf4f8;
  --text: #172433;
  --muted: #5d6c7b;
  --line: #d8e4eb;
  --accent: #0089b9;
  --accent-2: #00bddd;
  --accent-soft: #dff6fb;
  --navy: #071421;
  --shadow: 0 18px 55px rgba(12, 42, 63, .11);
  --radius: 22px;
  --shell: 1180px;
}

[data-theme="night"] {
  color-scheme: dark;
  --bg: #06111b;
  --surface: #0b1b29;
  --surface-2: #0e2535;
  --text: #ecf7fb;
  --muted: #a6bcc8;
  --line: #19394c;
  --accent: #2bc9ec;
  --accent-2: #62ddf7;
  --accent-soft: #0b3447;
  --shadow: 0 20px 60px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); line-height: 1.58; transition: background .25s, color .25s; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; }
.shell { width: min(var(--shell), calc(100% - 40px)); margin-inline: auto; }
.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; }
.skip-link { position: fixed; z-index: 100; top: 12px; left: 12px; transform: translateY(-150%); background: var(--surface); padding: 10px 14px; border-radius: 10px; }
.skip-link:focus { transform: none; }

.top-banner { display: block; background: #020a12; border-bottom: 1px solid #0b688e; }
.top-banner img { width: 100%; aspect-ratio: 3 / 1; object-fit: cover; object-position: center; }

.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--surface) 90%, transparent); border-bottom: 1px solid var(--line); backdrop-filter: blur(18px); }
.header-inner { min-height: 74px; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand img { width: 42px; height: 42px; border-radius: 11px; }
.brand span { display: grid; line-height: 1.2; }
.brand strong { font-size: 14px; }
.brand small { color: var(--muted); font-size: 11px; margin-top: 3px; }
nav { display: flex; align-items: center; gap: 22px; }
nav a { text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 650; }
nav a:hover { color: var(--accent); }
.controls { display: flex; align-items: center; gap: 8px; }
.lang-switch { display: flex; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; }
.lang-switch button, .menu-button { border: 0; cursor: pointer; color: var(--text); }
.lang-switch button { padding: 5px 8px; background: transparent; border-radius: 999px; font-size: 11px; font-weight: 800; }
.lang-switch button.active { background: var(--surface); color: var(--accent); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.menu-button { display: none; background: transparent; font-size: 22px; }

.hero { padding: 92px 0 86px; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; width: 560px; height: 560px; right: -150px; top: -120px; background: radial-gradient(circle, color-mix(in srgb, var(--accent-2) 16%, transparent), transparent 68%); pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr); gap: 72px; align-items: center; }
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 850; margin: 0 0 13px; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 840px; margin-bottom: 24px; font-size: clamp(38px, 5vw, 70px); line-height: 1.03; letter-spacing: -.045em; }
h2 { font-size: clamp(30px, 3.8vw, 48px); line-height: 1.08; letter-spacing: -.035em; margin-bottom: 16px; }
h3 { font-size: 19px; line-height: 1.25; margin-bottom: 9px; }
.lead { max-width: 760px; color: var(--muted); font-size: clamp(18px, 2vw, 22px); margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button { display: inline-flex; min-height: 48px; padding: 11px 20px; border-radius: 12px; align-items: center; justify-content: center; text-decoration: none; font-weight: 780; transition: transform .18s, border-color .18s, background .18s; }
.button:hover { transform: translateY(-2px); }
.button.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #00131b; box-shadow: 0 12px 30px color-mix(in srgb, var(--accent) 30%, transparent); }
[data-theme="day"] .button.primary, :root:not([data-theme]) .button.primary { color: white; }
.button.secondary { border: 1px solid var(--line); background: var(--surface); }
.chips { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 28px; }
.chips span { background: var(--accent-soft); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--line)); padding: 7px 11px; border-radius: 999px; font-size: 12px; font-weight: 750; }
.hero-panel { background: linear-gradient(145deg, var(--surface), var(--surface-2)); border: 1px solid var(--line); border-radius: 28px; padding: 30px; box-shadow: var(--shadow); }
.panel-label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; margin-bottom: 18px; }
.metric { display: flex; gap: 16px; align-items: baseline; padding: 13px 0; border-bottom: 1px solid var(--line); }
.metric strong { min-width: 76px; color: var(--accent); font-size: 36px; letter-spacing: -.04em; }
.metric span { color: var(--muted); }
.formula { margin: 24px 0 0; padding: 14px; border-radius: 12px; color: var(--accent); background: var(--accent-soft); font: 700 13px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; text-align: center; }

.screens-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.screen-card { padding: 0; overflow: hidden; cursor: pointer; text-align: left; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .2s, border-color .2s; }
.screen-card:hover, .screen-card:focus-visible { transform: translateY(-4px); border-color: var(--accent); outline: none; }
.screen-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; background: #fff; }
.screen-card > span { display: grid; gap: 4px; padding: 20px 22px; border-top: 1px solid var(--line); }
.screen-card strong { font-size: 18px; }
.screen-card small { color: var(--muted); }

.section { padding: 92px 0; }
.section-tint { background: var(--surface-2); border-block: 1px solid var(--line); }
.section-heading { max-width: 720px; margin-bottom: 44px; }
.section-heading > p:last-child { color: var(--muted); font-size: 17px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.steps article, .feature-grid article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.steps article { position: relative; overflow: hidden; }
.steps article > span { display: block; color: var(--accent); font-size: 13px; font-weight: 850; letter-spacing: .1em; margin-bottom: 44px; }
.steps article > span::after { content: ""; position: absolute; left: 28px; right: 28px; top: 58px; height: 1px; background: linear-gradient(90deg, var(--accent), var(--line)); }
.steps p, .feature-grid p { color: var(--muted); margin-bottom: 0; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature-grid article { min-height: 230px; transition: transform .2s, border-color .2s; }
.feature-grid article:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.feature-icon { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 14px; background: var(--accent-soft); color: var(--accent); font-size: 24px; margin-bottom: 30px; }

.gallery-heading { display: flex; justify-content: space-between; gap: 40px; align-items: end; }
.gallery-heading .section-heading { margin-bottom: 26px; }
.search-box { min-width: 280px; margin-bottom: 32px; }
.search-box input { width: 100%; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 15px; outline: none; }
.search-box input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filters button { cursor: pointer; padding: 9px 14px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 999px; font-size: 13px; font-weight: 720; }
.filters button:hover, .filters button.active { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.gallery-card { cursor: pointer; padding: 0; overflow: hidden; text-align: left; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 17px; transition: transform .18s, border-color .18s, box-shadow .18s; }
.gallery-card:hover, .gallery-card:focus-visible { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow); outline: none; }
.gallery-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; padding: 12px; background: #f9fbfc; }
.gallery-card span { display: flex; padding: 13px 15px; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); }
.gallery-card strong { font-size: 14px; }
.gallery-card small { color: var(--accent); font-weight: 750; }
.empty-state { color: var(--muted); padding: 40px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); }

.related-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.related-card { display: flex; flex-direction: column; overflow: hidden; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: transform .2s, box-shadow .2s, border-color .2s; }
.related-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--accent); }
.related-card > img { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; background: #071421; }
.related-body { display: flex; flex: 1; flex-direction: column; padding: 22px; }
.related-body strong { font-size: 20px; margin-bottom: 9px; }
.related-body > span { color: var(--muted); }
.related-body em { color: var(--accent); font-style: normal; font-weight: 760; margin-top: 22px; }

footer { padding: 50px 0; color: #bed0d9; background: var(--navy); }
.footer-inner { display: flex; justify-content: space-between; gap: 40px; }
.footer-inner p { color: #7897a7; margin: 6px 0 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; align-items: center; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--accent-2); }

dialog { width: min(920px, calc(100% - 28px)); color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 18px; box-shadow: 0 30px 100px rgba(0,0,0,.45); }
dialog::backdrop { background: rgba(1, 8, 14, .78); backdrop-filter: blur(5px); }
dialog img { width: 100%; max-height: 68vh; object-fit: contain; background: #f9fbfc; border-radius: 14px; }
dialog > div { padding: 20px 8px 0; }
dialog h2 { margin-bottom: 0; }
.dialog-close { position: absolute; top: 28px; right: 28px; width: 42px; height: 42px; cursor: pointer; color: #fff; background: rgba(4, 15, 24, .75); border: 1px solid rgba(255,255,255,.25); border-radius: 50%; font-size: 25px; line-height: 1; }

@media (max-width: 980px) {
  nav { display: none; position: absolute; top: 74px; left: 0; right: 0; padding: 18px 20px 22px; background: var(--surface); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; }
  nav.open { display: flex; }
  .menu-button { display: block; order: 2; }
  .controls { order: 1; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-panel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .hero-panel .panel-label, .hero-panel .formula { grid-column: 1 / -1; }
  .metric { display: block; border: 0; padding: 0; }
  .metric strong { display: block; }
  .feature-grid, .related-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 700px) {
  .shell { width: min(100% - 28px, var(--shell)); }
  .top-banner img { min-height: 220px; object-fit: cover; object-position: center; }
  .header-inner { gap: 10px; }
  .brand strong { max-width: 150px; }
  .brand small { display: none; }
  .hero, .section { padding: 64px 0; }
  .hero-grid { gap: 30px; }
  .hero-panel { grid-template-columns: 1fr; padding: 24px; }
  .hero-panel .panel-label, .hero-panel .formula { grid-column: auto; }
  .metric { display: flex; border-bottom: 1px solid var(--line); padding: 10px 0; }
  .steps, .feature-grid, .related-grid { grid-template-columns: 1fr; }
  .screens-grid { grid-template-columns: 1fr; }
  .gallery-heading { display: block; }
  .search-box { display: block; min-width: 0; margin-bottom: 24px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .gallery-card span { padding: 10px; }
  .gallery-card small { display: none; }
  .footer-inner { flex-direction: column; }
}

@media (max-width: 430px) {
  .brand img { width: 36px; height: 36px; }
  .brand strong { max-width: 120px; font-size: 12px; }
  .lang-switch button { padding: 5px 6px; }
  h1 { font-size: 36px; }
}

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