/* bayztech.net shared site styles (homepage + legal pages). */
:root {
  --bg: oklch(14% 0.01 240);
  --surface: oklch(18% 0.015 240);
  --surface-2: oklch(22% 0.015 240);
  --fg: oklch(98% 0.005 240);
  --muted: oklch(72% 0.01 240);
  --border: oklch(28% 0.01 240);
  --accent: oklch(68% 0.19 250);
  --accent-hover: oklch(73% 0.19 250);
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'PingFang SC', 'PingFang TC', 'Inter', system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --nav-h: 64px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body { background: var(--bg); color: var(--fg); font-family: var(--font); line-height: 1.65; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Nav */
.navbar {
  position: fixed; inset: 0 0 auto 0; height: var(--nav-h); z-index: 100;
  background: oklch(14% 0.01 240 / 0.85); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border); display: flex; align-items: center;
}
.navbar-inner { display: flex; justify-content: space-between; align-items: center; width: 100%; gap: 16px; }
.logo { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px; }
.logo img { width: 28px; height: 28px; border-radius: 7px; }
.nav-right { display: flex; align-items: center; gap: 28px; }
.nav-links { display: flex; gap: 28px; }
.nav-links a { font-size: 14px; font-weight: 500; color: var(--muted); transition: color .2s; }
.nav-links a:hover { color: var(--fg); }

/* Language switcher (always visible, also on phones) */
.lang { position: relative; }
.lang-btn {
  background: transparent; border: 1px solid var(--border); color: var(--fg); padding: 6px 12px; border-radius: 8px;
  font: inherit; font-size: 13px; cursor: pointer; display: flex; align-items: center; gap: 6px;
}
.lang-btn:hover { border-color: var(--accent); }
.lang-btn svg { width: 14px; height: 14px; }
.lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 132px; padding: 6px; list-style: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgb(0 0 0 / .35);
}
.lang-menu[hidden] { display: none; }
.lang-menu button {
  display: block; width: 100%; text-align: left; background: none; border: 0; color: var(--muted);
  font: inherit; font-size: 14px; padding: 8px 12px; border-radius: 6px; cursor: pointer;
}
.lang-menu button:hover, .lang-menu button[aria-current="true"] { background: var(--surface-2); color: var(--fg); }
.lang-menu button[aria-current="true"] { color: var(--accent); }

/* Buttons, badges */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 24px;
  border-radius: 10px; font-size: 15px; font-weight: 600; transition: background .2s, border-color .2s, transform .2s; cursor: pointer;
}
.btn-primary { background: var(--accent); color: oklch(14% 0.01 240); }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-outline { background: var(--surface); color: var(--fg); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--accent); background: var(--surface-2); }
.btn-sm { height: 40px; font-size: 14px; padding: 0 16px; flex: 1; }
.badge {
  font-family: var(--mono); font-size: 11px; padding: 4px 8px; border-radius: 6px; letter-spacing: .04em; white-space: nowrap;
  background: oklch(68% 0.19 250 / 0.15); color: var(--accent);
}

/* Hero */
.hero { padding: calc(var(--nav-h) + 88px) 0 96px; position: relative; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 82% 18%, oklch(68% 0.19 250 / 0.16) 0%, transparent 50%);
}
.hero-content { position: relative; }
.hero-content > * { max-width: 720px; }
.eyebrow { font-family: var(--mono); color: var(--accent); font-size: 13px; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 20px; display: inline-flex; align-items: center; gap: 8px; }
.eyebrow::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.hero h1 { font-size: clamp(36px, 5vw, 60px); line-height: 1.15; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 20px; }
.hero p { font-size: 19px; color: var(--muted); max-width: 620px; margin-bottom: 40px; }
.btn-group { display: flex; gap: 14px; flex-wrap: wrap; }

/* Sections */
.section { padding: 96px 24px; border-top: 1px solid var(--border); }
.section + .section { border-top: 0; padding-top: 32px; }
#apps { border-top: 1px solid var(--border); }
.section-header { max-width: 680px; margin-bottom: 48px; }
.section-header.center { text-align: center; margin-left: auto; margin-right: auto; }
.section-title { font-size: clamp(26px, 3.2vw, 34px); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 12px; }
.section-desc { color: var(--muted); font-size: 17px; }

/* App cards */
.app-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.app-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; }
.app-head { display: flex; align-items: center; gap: 18px; padding: 28px 28px 0; }
.app-head img { width: 76px; height: 76px; border-radius: 18px; box-shadow: 0 8px 24px rgb(0 0 0 / .4); flex: none; }
.app-head h3 { font-size: 22px; line-height: 1.3; margin-bottom: 6px; }
.app-head .badges { display: flex; gap: 6px; flex-wrap: wrap; }
.app-body { padding: 20px 28px 28px; display: flex; flex-direction: column; flex: 1; }
.app-desc { color: var(--muted); font-size: 15px; margin-bottom: 20px; }
.feature-list { list-style: none; display: grid; gap: 10px; margin-bottom: 24px; flex: 1; }
.feature-list li { font-size: 14.5px; display: flex; gap: 10px; align-items: flex-start; }
.feature-list li::before { content: '✓'; color: var(--accent); font-weight: 700; flex: none; }
.app-actions { display: flex; gap: 12px; border-top: 1px solid var(--border); padding-top: 20px; }
.app-note { color: var(--muted); font-size: 12.5px; margin-top: 12px; }

/* Feature tiles */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 26px; }
.tile-icon {
  width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
  background: oklch(68% 0.19 250 / 0.14); color: var(--accent);
}
.tile-icon svg { width: 22px; height: 22px; }
.tile h3 { font-size: 18px; margin-bottom: 6px; }
.tile p { color: var(--muted); font-size: 14.5px; }
.tile .apps { margin-top: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.tile .apps span { font-size: 12px; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 2px 10px; }

/* Gallery */
.gallery { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 28px; }
.gallery-tabs { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 22px; }
.gallery-tabs button {
  background: var(--bg); border: 1px solid var(--border); color: var(--muted); padding: 8px 16px; border-radius: 999px;
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.gallery-tabs button[aria-selected="true"] { background: var(--accent); border-color: transparent; color: var(--bg); }
.gallery-view { border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: #000; aspect-ratio: 16 / 9; }
.gallery-view img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gallery-caption { text-align: center; color: var(--muted); font-size: 14px; margin-top: 14px; min-height: 1.6em; }

/* Tutorials */
.tut-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; max-width: 920px; margin: 0 auto; }
.tut-card { display: flex; gap: 18px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 22px; transition: border-color .2s, transform .2s; }
.tut-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.tut-card img { width: 56px; height: 56px; border-radius: 13px; flex: none; }
.tut-card h3 { font-size: 17px; margin-bottom: 2px; }
.tut-card p { color: var(--muted); font-size: 14px; }
.tut-card .arrow { margin-left: auto; color: var(--accent); font-size: 20px; }

/* Notice */
.notice { max-width: 920px; margin: 40px auto 0; color: var(--muted); font-size: 13.5px; border: 1px dashed var(--border); border-radius: 12px; padding: 16px 18px; }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 64px 0 36px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer p { color: var(--muted); font-size: 14px; }
.footer .logo { margin-bottom: 14px; }
.footer-col-title { font-family: var(--mono); font-size: 12.5px; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 16px; }
.footer-links { list-style: none; display: grid; gap: 12px; }
.footer-links a, .legal-links a { color: var(--muted); font-size: 14px; }
.footer-links a:hover, .legal-links a:hover { color: var(--fg); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 24px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.legal-links { display: flex; gap: 8px 22px; flex-wrap: wrap; }

/* Legal pages */
.legal { max-width: 820px; margin: 0 auto; padding: calc(var(--nav-h) + 40px) 24px 80px; }
.legal h1 { font-size: clamp(26px, 4vw, 34px); line-height: 1.3; margin-bottom: 8px; }
.legal .meta { color: var(--muted); font-size: 14px; margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.legal h2 { font-size: 19px; margin: 32px 0 10px; }
.legal h3 { font-size: 16px; margin: 20px 0 8px; }
.legal p, .legal li { color: oklch(86% 0.008 240); font-size: 15.5px; }
.legal p { margin-bottom: 12px; }
.legal ul { padding-left: 22px; margin-bottom: 12px; }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--accent); text-decoration: underline; }
.legal table { width: 100%; border-collapse: collapse; margin: 8px 0 16px; font-size: 14.5px; }
.legal th, .legal td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; color: oklch(86% 0.008 240); }
.legal th { background: var(--surface); color: var(--fg); }
.legal .toc { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; margin-bottom: 24px; }
.legal .toc ol { padding-left: 20px; }
.legal .toc li { margin: 2px 0; font-size: 14.5px; }
.legal .callout { background: var(--surface); border-left: 3px solid var(--accent); border-radius: 8px; padding: 12px 16px; margin: 12px 0 16px; }

@media (max-width: 900px) {
  .app-grid, .tut-grid { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .hero { padding: calc(var(--nav-h) + 48px) 0 64px; }
  .hero p { font-size: 17px; }
  .btn-group .btn { flex: 1 1 100%; }
  .container { padding-left: 18px; padding-right: 18px; }
  .section { padding: 56px 18px; }
  .section + .section { padding-top: 24px; }
  .tiles { grid-template-columns: 1fr; }
  .app-head { padding: 22px 20px 0; }
  .app-body { padding: 16px 20px 22px; }
  .gallery { padding: 16px; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
