/* openapps.lt — one stylesheet, two themes (PLAT-004). System fonts only: nothing to download. */

:root {
  --brand-900: #0b3a78;
  --brand-700: #0f5bb5;
  --brand-500: #1e88e5;
  --brand-300: #2ec5e6;
  --radius: 16px;
  --radius-sm: 10px;
  --wrap: 1120px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

:root,
[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f9fc;
  --bg-alt: #eef3fa;
  --surface: #ffffff;
  --border: #dde5f0;
  --text: #0e1a2b;
  --muted: #52617a;
  --accent: var(--brand-700);
  --accent-text: #ffffff;
  --glow: rgba(46, 197, 230, .22);
  --shadow: 0 1px 2px rgba(14, 26, 43, .06), 0 8px 24px rgba(14, 26, 43, .06);
  --shadow-hover: 0 2px 4px rgba(14, 26, 43, .08), 0 18px 40px rgba(15, 91, 181, .14);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1220;
  --bg-alt: #0f1829;
  --surface: #121d31;
  --border: #22314b;
  --text: #e6edf7;
  --muted: #9aa9c2;
  --accent: #4fb3ff;
  --accent-text: #06111f;
  --glow: rgba(46, 197, 230, .16);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  --shadow-hover: 0 2px 4px rgba(0, 0, 0, .35), 0 18px 40px rgba(30, 136, 229, .18);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--text); min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 750; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--brand-300); outline-offset: 2px; border-radius: 6px; }

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

/* --- header --- */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
.top-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--muted); font-weight: 550; }
.nav a:hover { color: var(--text); text-decoration: none; }
.tools { display: flex; align-items: center; gap: 12px; }
.langs { display: flex; border: 1px solid var(--border); border-radius: 999px; padding: 2px; font-size: .8rem; font-weight: 650; }
.langs a, .langs span { padding: 3px 9px; border-radius: 999px; color: var(--muted); }
.langs a:hover { color: var(--text); text-decoration: none; }
.lang-current { background: var(--surface); color: var(--text) !important; box-shadow: var(--shadow); }

.icon-btn {
  display: grid; place-items: center; width: 38px; height: 38px; padding: 0;
  border: 1px solid var(--border); border-radius: 50%; background: var(--surface); color: var(--text); cursor: pointer;
  transition: transform .2s var(--ease), border-color .2s;
}
.icon-btn:hover { transform: rotate(-15deg); border-color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[data-theme="light"] .when-dark, [data-theme="dark"] .when-light { display: none; }

/* --- hero --- */
.hero { position: relative; overflow: hidden; padding: clamp(56px, 10vw, 120px) 0 clamp(48px, 8vw, 96px); }
.hero::before {
  content: ""; position: absolute; inset: -30% -10% auto auto; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  background: radial-gradient(closest-side, var(--glow), transparent 70%); pointer-events: none;
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.3fr 1fr; align-items: center; gap: 48px; }
.kicker { display: inline-block; font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); margin-bottom: 1rem; }
.hero h1 {
  background: linear-gradient(120deg, var(--text) 30%, var(--brand-500) 75%, var(--brand-300));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { font-size: 1.2rem; color: var(--muted); max-width: 36em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2rem; }
.hero-art { display: grid; place-items: center; }
.hero-art img { width: min(320px, 70vw); height: auto; filter: drop-shadow(0 20px 40px rgba(30, 136, 229, .25)); animation: float 8s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px) rotate(2deg); } }

.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px; border-radius: 999px;
  font-weight: 650; border: 1px solid transparent; transition: transform .2s var(--ease), box-shadow .2s, background .2s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary { background: linear-gradient(135deg, var(--brand-700), var(--brand-500)); color: #fff; box-shadow: 0 8px 24px rgba(15, 91, 181, .3); }
.btn-ghost { border-color: var(--border); color: var(--text); background: var(--surface); }
.btn-ghost:hover { border-color: var(--accent); }

/* --- sections --- */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
.section-lead { color: var(--muted); font-size: 1.1rem; max-width: 40em; margin-bottom: 2.5rem; }
.grid { display: grid; gap: 24px; }
.apps { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.principles { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 2rem; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px;
  box-shadow: var(--shadow); transition: transform .25s var(--ease), box-shadow .25s, border-color .25s;
}
.app { display: flex; flex-direction: column; }
.app:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.app p { color: var(--muted); }
.app-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.app-icon {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px;
  background: linear-gradient(135deg, var(--brand-700), var(--brand-300)); color: #fff;
}
.app-icon svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.app-icon .fill { fill: currentColor; stroke: none; }
.app-icon .accent { stroke: #b9f3ff; }
.badge { font-size: .75rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .06em; }
.badge-testing { background: color-mix(in srgb, #16a34a 15%, transparent); color: #16a34a; }
.badge-development { background: color-mix(in srgb, #d97706 15%, transparent); color: #d97706; }
[data-theme="dark"] .badge-testing { color: #4ade80; }
[data-theme="dark"] .badge-development { color: #fbbf24; }
.tags { font-size: .85rem; font-weight: 600; letter-spacing: .02em; margin-top: auto; }
.link { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; margin-top: 8px; }
.link .host { color: var(--muted); font-weight: 500; }
.link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s var(--ease); }
.link:hover { text-decoration: none; }
.link:hover svg { transform: translateX(4px); }

.principle p { color: var(--muted); margin: 0; }
.p-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; margin-bottom: 14px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.p-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.contact { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: clamp(28px, 5vw, 48px); }
.contact p { color: var(--muted); margin: 0; }

/* --- footer --- */
.foot { border-top: 1px solid var(--border); padding: 28px 0; color: var(--muted); font-size: .9rem; }
.foot-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* --- 404 --- */
.notfound .code { font-size: clamp(4rem, 14vw, 9rem); font-weight: 900; line-height: 1; margin: 0 0 .2em;
  background: linear-gradient(120deg, var(--brand-700), var(--brand-300)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.notfound h1 { font-size: 1.6rem; }
.notfound [lang] + [lang] { margin-top: 1.5rem; }

/* --- small screens --- */
@media (max-width: 820px) {
  .nav { display: none; }
  .tools { margin-left: auto; }
  .hero-inner { grid-template-columns: 1fr; text-align: left; }
  .hero-art { order: -1; justify-items: start; }
  .hero-art img { width: 140px; }
}

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

@media print {
  .top, .actions, .icon-btn { display: none; }
}
