/* ALISA Studio — High-Contrast Editorial System (WCAG AA, Mobile 390px Zero-Overflow) */
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --ink: #0f172a;
  --ink-muted: #475569;
  --border: #cbd5e1;
  --border-soft: #e2e8f0;
  --hero-bg: #070d1a;
  --hero-surface: #0f172a;
  --hero-ink: #f8fafc;
  --hero-muted: #cbd5e1;
  --accent: #0369a1;
  --accent-hover: #075985;
  --accent-light: #e0f2fe;
  --sky: #38bdf8;
  --ok-bg: #dcfce7;
  --ok-ink: #14532d;
  --bad-bg: #fee2e2;
  --bad-ink: #7f1d1d;
  --warn-bg: #fef3c7;
  --warn-ink: #78350f;
  --radius: 14px;
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { max-width: 100%; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid #0284c7; outline-offset: 2px; border-radius: 4px; }

.skip-link {
  position: absolute; left: -9999px; top: 8px;
  background: #0284c7; color: #fff; padding: 10px 16px;
  font-weight: 700; border-radius: 8px; z-index: 300;
}
.skip-link:focus { left: 16px; }

.wrap { max-width: 1140px; width: 100%; margin: 0 auto; padding: 0 22px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: #ffffff;
  border-bottom: 1px solid var(--border-soft);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; min-height: 64px; flex-wrap: wrap; padding: 8px 0;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); font-weight: 800; font-size: 16px; letter-spacing: 0.03em;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand-badge {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  background: var(--hero-bg); color: var(--sky);
  display: grid; place-items: center;
  font-family: var(--font-mono); font-weight: 800; font-size: 13px;
}

.main-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.main-nav a {
  color: var(--ink-muted); font-size: 14px; font-weight: 600;
  padding: 6px 10px; border-radius: 8px; white-space: nowrap;
}
.main-nav a:hover { color: var(--ink); background: var(--surface-alt); text-decoration: none; }

.header-actions { display: flex; align-items: center; gap: 8px; }
.lang-toggle {
  display: inline-flex; border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden; background: var(--surface-alt); flex-shrink: 0;
}
.lang-btn {
  border: 0; background: transparent; color: var(--ink-muted);
  padding: 6px 11px; font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  cursor: pointer;
}
.lang-btn[aria-pressed="true"] { background: var(--hero-bg); color: #fff; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 10px; font-weight: 600; font-size: 14px;
  cursor: pointer; border: 1px solid transparent; font-family: inherit;
  transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease;
  text-decoration: none; max-width: 100%;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-sky { background: var(--sky); color: #04121d; font-weight: 700; }
.btn-sky:hover { background: #7dd3fc; }
.btn-outline-dark { background: transparent; color: #f8fafc; border-color: rgba(248, 250, 252, 0.35); }
.btn-outline-dark:hover { background: rgba(255, 255, 255, 0.08); }
.btn-outline { background: var(--surface); color: var(--ink); border-color: var(--border); }
.btn-outline:hover { border-color: var(--ink); }
.btn-sm { padding: 7px 13px; font-size: 13px; }

/* Hero */
.hero {
  background: radial-gradient(900px 460px at 85% 0%, rgba(56, 189, 248, 0.16), transparent 60%), var(--hero-bg);
  color: var(--hero-ink);
  padding: 54px 0 48px;
  border-bottom: 1px solid #1e293b;
}
.hero-grid { display: grid; grid-template-columns: 1.18fr 0.82fr; gap: 28px; align-items: center; }
.hero-grid > *, .doc-grid > *, .two-col > *, .tr-grid > *, .gallery-grid > *, .player-grid > *, .coming-grid > * {
  min-width: 0;
}
.kicker {
  display: inline-block; font-family: var(--font-mono); font-size: 12px;
  color: #7dd3fc; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 12px;
}
.hero h1 {
  font-size: clamp(26px, 4vw, 42px); line-height: 1.15;
  margin: 0 0 16px; letter-spacing: -0.02em; color: #fff;
}
.hero-lead { font-size: 17px; color: var(--hero-muted); margin: 0 0 24px; max-width: 58ch; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }

.who-card {
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid #334155;
  border-radius: var(--radius);
  padding: 22px;
}
.who-card h2 {
  font-size: 13px; font-family: var(--font-mono); text-transform: uppercase;
  letter-spacing: 0.08em; color: #7dd3fc; margin: 0 0 10px;
}
.who-quote { font-size: 16px; font-weight: 600; color: #fff; margin: 0 0 10px; }
.who-note { font-size: 14px; color: var(--hero-muted); margin: 0 0 14px; }
.who-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  font-family: var(--font-mono); font-size: 11.5px; padding: 4px 10px;
  border-radius: 999px; background: rgba(56, 189, 248, 0.14); color: #bae6fd;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

/* Quick index */
.service-index {
  background: var(--surface); border-bottom: 1px solid var(--border-soft); padding: 14px 0;
}
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip {
  font-size: 13px; font-weight: 600; color: var(--ink);
  background: var(--surface-alt); border: 1px solid var(--border-soft);
  padding: 6px 12px; border-radius: 999px;
}
.chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* Sections & Service Cards */
.services-section { padding: 44px 0 24px; }
.section-head { margin-bottom: 26px; }
.section-head h2 { font-size: clamp(23px, 3vw, 31px); margin: 0 0 8px; color: var(--ink); }
.section-head p { margin: 0; color: var(--ink-muted); max-width: 66ch; }

.service-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
  margin-bottom: 26px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
  max-width: 100%;
}
.service-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 14px; flex-wrap: wrap; margin-bottom: 16px;
  padding-bottom: 14px; border-bottom: 1px solid var(--border-soft);
}
.service-num {
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 700;
  color: var(--accent); background: var(--accent-light);
  padding: 4px 10px; border-radius: 999px; display: inline-block; margin-bottom: 8px;
}
.service-header h3 { font-size: 21px; margin: 0 0 6px; color: var(--ink); }
.service-header p { margin: 0; color: var(--ink-muted); max-width: 66ch; }
.header-badges { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.badge-demo {
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 700;
  background: var(--accent-light); color: #075985;
  padding: 5px 11px; border-radius: 999px; white-space: nowrap;
}
.badge-preview {
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 700;
  background: var(--warn-bg); color: var(--warn-ink);
  padding: 5px 11px; border-radius: 999px; white-space: nowrap;
}
.price-line {
  font-size: 13.5px; font-weight: 700; color: var(--ink);
  background: var(--surface-alt); border: 1px solid var(--border-soft);
  padding: 6px 12px; border-radius: 8px; display: inline-block; margin-top: 10px;
}

.sample-box {
  background: var(--surface-alt);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 18px;
  max-width: 100%;
}
.sample-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; margin-bottom: 14px;
}
.sample-label {
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 700;
  color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.04em;
}

.tab-group { display: inline-flex; gap: 6px; flex-wrap: wrap; max-width: 100%; }
.tab-btn {
  background: var(--surface); color: var(--ink-muted); border: 1px solid var(--border);
  border-radius: 8px; padding: 7px 12px; font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: inherit;
}
.tab-btn[aria-selected="true"], .tab-btn[aria-pressed="true"] {
  background: var(--hero-bg); color: #fff; border-color: var(--hero-bg);
}

/* Service 1: Doc preview */
.doc-grid { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 16px; align-items: start; }
.doc-sheet {
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 18px; box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
  max-width: 100%; overflow-wrap: anywhere;
}
.doc-raw {
  background: #0f172a; color: #e2e8f0; border-radius: 10px; padding: 16px;
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.6;
  white-space: pre-wrap; word-break: break-word; overflow-x: auto; max-width: 100%; margin: 0;
}
.doc-sheet h4 { margin: 0 0 6px; font-size: 17px; color: #0f172a; border-bottom: 2px solid #0284c7; padding-bottom: 6px; }
.doc-callout {
  background: #eff6ff; border-left: 4px solid #0284c7; padding: 10px 12px;
  font-size: 13.5px; margin: 12px 0; color: #1e293b; max-width: 100%; overflow-wrap: anywhere;
}
.table-scroll { width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.mini-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
.mini-table th, .mini-table td { border: 1px solid #cbd5e1; padding: 7px 9px; text-align: left; }
.mini-table th { background: #0f172a; color: #fff; font-size: 12px; }
.meta-card { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 16px; max-width: 100%; }

/* Discrete technical specifications details */
.tech-details {
  margin-top: 12px; font-size: 13px; color: var(--ink-muted);
  border-top: 1px solid var(--border-soft); padding-top: 10px;
}
.tech-details summary {
  cursor: pointer; font-weight: 600; color: var(--ink);
  font-size: 13px; user-select: none;
}
.tech-details-body { margin-top: 8px; font-size: 12.5px; line-height: 1.55; }
.hash-code {
  display: block; word-break: break-all; font-family: var(--font-mono); font-size: 11px;
  background: var(--surface-alt); padding: 7px; border-radius: 6px; color: var(--ink);
  margin: 6px 0 0; border: 1px solid var(--border-soft);
}

/* Service 2: Web & Startup demo */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.feature-panel {
  background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 18px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 14px;
}
.feature-panel.dark {
  background: var(--hero-bg); color: #f8fafc; border-color: #1e293b;
}
.feature-panel.dark p { color: #cbd5e1; }
.feature-panel h4 { margin: 0 0 8px; font-size: 17px; }
.feature-panel p { margin: 0; font-size: 14px; color: var(--ink-muted); }
.mini-console {
  background: #0f172a; border: 1px solid #334155; border-radius: 9px; padding: 12px;
  font-family: var(--font-mono); font-size: 12px; color: #93c5fd; overflow-wrap: anywhere;
}

/* Service 3: Translation */
.tr-card { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 16px; max-width: 100%; overflow-wrap: anywhere; }
.tr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.img-frame {
  background: #fff; border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
}
.img-frame img { width: 100%; height: auto; display: block; }
.img-cap {
  padding: 10px 12px; font-size: 13px; color: var(--ink-muted);
  border-top: 1px solid var(--border-soft); background: #fff;
}

/* Service 4: Course & Quiz */
.quiz-opt {
  display: block; width: 100%; text-align: left;
  background: #fff; border: 1px solid var(--border); border-radius: 9px;
  padding: 10px 14px; margin-bottom: 8px; cursor: pointer; font-family: inherit; font-size: 14px;
  color: var(--ink);
}
.quiz-opt:hover { border-color: var(--accent); }
.quiz-opt.is-correct { background: var(--ok-bg); border-color: #16a34a; color: var(--ok-ink); font-weight: 600; }
.quiz-opt.is-wrong { background: var(--bad-bg); border-color: #dc2626; color: var(--bad-ink); }
.quiz-feedback {
  margin-top: 10px; padding: 12px 14px; border-radius: 9px; font-size: 13.5px;
  background: #eff6ff; border: 1px solid #93c5fd; color: #1e293b;
}

/* Service 5: Graphics gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gallery-item {
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden; cursor: pointer; text-align: left; padding: 0; font-family: inherit;
  width: 100%;
}
.gallery-item:hover { border-color: var(--accent); }
.gallery-item img { width: 100%; height: 170px; object-fit: cover; display: block; }
.gallery-item .g-meta { padding: 10px 12px; }
.gallery-item .g-title { font-size: 13.5px; font-weight: 700; color: var(--ink); display: block; }
.gallery-item .g-type { font-size: 12px; color: var(--ink-muted); }

/* Service 6: Storyboard Preview Player */
.player-grid { display: grid; grid-template-columns: 1.35fr 0.65fr; gap: 16px; align-items: start; }
.stage-wrap {
  background: #0f172a; border-radius: 12px; overflow: hidden; border: 1px solid #334155;
}
.stage-wrap img { width: 100%; height: auto; display: block; }
.stage-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; color: #e2e8f0; font-family: var(--font-mono); font-size: 12.5px;
  flex-wrap: wrap;
}
.frame-list { display: flex; flex-direction: column; gap: 8px; }
.frame-btn {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--border); border-radius: 9px;
  padding: 9px 12px; cursor: pointer; text-align: left; font-family: inherit; font-size: 13px;
  color: var(--ink); width: 100%;
}
.frame-btn[aria-current="true"] {
  background: var(--hero-bg); color: #fff; border-color: var(--hero-bg);
}
.frame-btn code { font-family: var(--font-mono); font-size: 11.5px; opacity: 0.85; flex-shrink: 0; }

/* Coming soon section */
.coming-section { padding: 10px 0 48px; }
.coming-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.coming-card {
  background: var(--surface); border: 1px dashed var(--border); border-radius: 14px;
  padding: 20px; color: var(--ink-muted);
}
.coming-tag {
  display: inline-block; font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  color: var(--ink-muted); background: var(--surface-alt); padding: 3px 9px; border-radius: 999px;
  margin-bottom: 10px;
}
.coming-card h3 { margin: 0 0 6px; font-size: 16.5px; color: var(--ink); }
.coming-card p { margin: 0; font-size: 13.5px; }

/* Contact */
.contact-band {
  background: var(--hero-bg); color: #f8fafc; padding: 48px 0;
  border-top: 1px solid #1e293b;
}
.contact-card {
  background: var(--hero-surface); border: 1px solid #334155; border-radius: 16px;
  padding: 26px; display: flex; justify-content: space-between; align-items: center;
  gap: 20px; flex-wrap: wrap;
}
.contact-card h2 { margin: 0 0 8px; color: #fff; font-size: 25px; }
.contact-card p { margin: 0; color: #cbd5e1; max-width: 58ch; }
.contact-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; background: rgba(2, 6, 23, 0.86);
  display: grid; place-items: center; padding: 16px; z-index: 400;
}
.lightbox[hidden] { display: none; }
.lightbox-inner {
  max-width: 960px; width: 100%; background: #0f172a;
  border: 1px solid #334155; border-radius: 14px; overflow: hidden;
}
.lightbox-inner img { width: 100%; height: auto; display: block; }
.lightbox-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; color: #f8fafc; gap: 12px;
}

footer {
  background: #030712; color: #94a3b8; padding: 24px 0; font-size: 13px;
  border-top: 1px solid #1e293b;
}
.foot-row { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; align-items: center; }

@media (max-width: 900px) {
  .hero-grid, .doc-grid, .two-col, .tr-grid, .gallery-grid, .player-grid, .coming-grid {
    grid-template-columns: 1fr;
  }
  .header-badges { align-items: flex-start; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 14px; }
  .header-inner { min-height: 52px; padding: 6px 0; gap: 8px; }
  .brand { font-size: 14.5px; }
  .main-nav {
    order: 3; width: 100%; gap: 4px; flex-wrap: nowrap;
    overflow-x: auto; padding-bottom: 2px;
    border-top: 1px solid var(--border-soft); padding-top: 6px;
  }
  .main-nav a { font-size: 12.5px; padding: 4px 8px; }
  .hero { padding: 34px 0 32px; }
  .service-block { padding: 18px 14px; }
  .sample-box { padding: 14px 12px; }
  .doc-sheet { padding: 14px; }
  .contact-card { padding: 20px 16px; }
}
