/* ============================================================
   SHUKA Technologies — app pages layer (scripts/build_apps.py)
   Loaded only on /apps pages, on top of style.css.
   ============================================================ */

.apps-page {
  --night: #0B1A12;
  --night-2: #10261A;
  --night-3: #173523;
  --cream: #F4EFDF;
  --cream-soft: #D9D3BE;   /* 11:1 on --night */
  --gold: #E3B062;
  --link-dark: #9ccbff;    /* rule 49 */
  --link-dark-visited: #c9b3f0;
  --card: #FFFFFF;
  --shadow-lg: 0 30px 60px -20px rgba(11, 26, 18, .35), 0 12px 24px -12px rgba(11, 26, 18, .25);
  --shadow-sm: 0 6px 18px -8px rgba(11, 26, 18, .25);
}

/* ---------- Dark hero ---------- */
.ax-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(1100px 520px at 85% -10%, color-mix(in srgb, var(--accent, #4FA857) 45%, transparent), transparent 60%),
    radial-gradient(800px 480px at -5% 110%, rgba(185, 112, 47, .35), transparent 60%),
    linear-gradient(160deg, var(--night) 0%, var(--night-2) 55%, var(--night-3) 100%);
  color: var(--cream);
  padding: clamp(56px, 9vw, 112px) 0 clamp(56px, 8vw, 96px);
}
.ax-hero::before {               /* circuit grid */
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(244, 239, 223, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 239, 223, .06) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000 10%, transparent 70%);
          mask-image: radial-gradient(ellipse at 70% 30%, #000 10%, transparent 70%);
}
.ax-hero::after {                /* slow aurora */
  content: "";
  position: absolute; z-index: -1;
  width: 640px; height: 640px; right: -160px; top: -220px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent, #4FA857), var(--accent-2, #B9702F), transparent 60%, var(--accent, #4FA857));
  filter: blur(90px);
  opacity: .35;
  animation: ax-spin 28s linear infinite;
}
@keyframes ax-spin { to { transform: rotate(360deg); } }

.ax-hero h1, .ax-hero h2 { color: var(--cream); }
.ax-hero p { color: var(--cream-soft); }
.ax-hero a:not(.ax-btn) { color: var(--link-dark); }
.ax-hero a:not(.ax-btn):visited { color: var(--link-dark-visited); }

.ax-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 22px;
}
.ax-eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }

.ax-title {
  font-size: clamp(2.6rem, 6.4vw, 5.2rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -.025em;
  margin: 0 0 .3em;
}
.ax-title em {
  font-style: italic;
  background: linear-gradient(100deg, var(--gold), #F6D9A6 45%, var(--accent-light, #9FD9A5));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ax-lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.55; max-width: 52ch; }

.ax-hero-grid {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 5vw, 72px); align-items: center;
}
@media (max-width: 900px) { .ax-hero-grid { grid-template-columns: 1fr; } }

/* ---------- Stats strip ---------- */
.ax-stats { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.ax-stat {
  border: 1px solid rgba(244, 239, 223, .18);
  background: rgba(244, 239, 223, .05);
  backdrop-filter: blur(8px);
  border-radius: 16px;
  padding: 14px 20px;
  min-width: 128px;
}
.ax-stat b { display: block; font-family: var(--font-display); font-weight: 500; font-size: 2rem; color: var(--cream); line-height: 1.1; }
.ax-stat span { font-size: .85rem; color: var(--cream-soft); }

/* ---------- Buttons ---------- */
.ax-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px; border-radius: 999px;
  font-weight: 600; font-size: .98rem;
  border: 1px solid transparent;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.ax-btn:hover { transform: translateY(-2px); border-bottom-color: transparent; }
.ax-btn-glow {
  background: linear-gradient(135deg, var(--accent, #4FA857), var(--accent-2, #B9702F));
  color: #fff;
  box-shadow: 0 10px 30px -8px var(--accent, #4FA857);
}
.ax-btn-glow:hover { box-shadow: 0 16px 40px -8px var(--accent, #4FA857); }
.ax-btn-ghost { border-color: rgba(244, 239, 223, .35); color: var(--cream); background: rgba(244, 239, 223, .04); }
.ax-btn-ghost:hover { background: rgba(244, 239, 223, .12); }
.ax-btn-ink { background: var(--night); color: var(--cream); }
.ax-btn-ink:hover { box-shadow: var(--shadow-sm); }
.ax-btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

/* ---------- Pills ---------- */
.ax-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .82rem; font-weight: 500;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(79, 168, 87, .14); color: #1C4A24;
}
.ax-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.ax-pill.live::before { background: #2FB344; box-shadow: 0 0 0 0 rgba(47, 179, 68, .6); animation: ax-pulse 2s infinite; }
.ax-pill.dev { background: rgba(227, 176, 98, .2); color: #7A4B12; }
.ax-pill.pre { background: rgba(110, 140, 255, .16); color: #2B3E8F; }
.ax-hero .ax-pill { background: rgba(244, 239, 223, .1); color: var(--cream); }
.ax-hero .ax-pill.dev::before { background: var(--gold); }
.ax-hero .ax-pill.pre::before { background: #9DB0FF; }
@keyframes ax-pulse { 70% { box-shadow: 0 0 0 8px rgba(47, 179, 68, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 179, 68, 0); } }

.ax-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.ax-chip {
  font-family: var(--font-mono); font-size: .75rem;
  padding: 4px 10px; border-radius: 6px;
  border: 1px solid var(--line); color: var(--ink-soft); background: var(--white);
}
.ax-hero .ax-chip { border-color: rgba(244, 239, 223, .2); color: var(--cream-soft); background: transparent; }

/* ---------- App icon tile ---------- */
.ax-icon {
  --s: 64px;
  width: var(--s); height: var(--s); flex: none;
  border-radius: calc(var(--s) * .26);
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  color: #fff;
  font-family: var(--font-display); font-weight: 600; font-size: calc(var(--s) * .42); letter-spacing: -.02em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 12px 24px -10px var(--accent);
  position: relative; overflow: hidden;
}
.ax-icon::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(255, 255, 255, .35), transparent 45%);
}
.ax-icon.xl { --s: 96px; margin-bottom: 26px; }

/* ---------- Device mock-ups ---------- */
.ax-device { justify-self: center; position: relative; }
.ax-phone {
  width: min(280px, 72vw); aspect-ratio: 9 / 18.5;
  border-radius: 44px; padding: 12px;
  background: linear-gradient(145deg, #2a2f2c, #0d100e);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, .08), 0 40px 120px -30px var(--accent);
  transform: rotate(-4deg);
  animation: ax-float 7s ease-in-out infinite;
}
.ax-browser {
  width: min(420px, 86vw);
  border-radius: 14px; overflow: hidden;
  background: #0d100e;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, .08), 0 40px 120px -30px var(--accent);
  transform: perspective(1200px) rotateY(-10deg) rotateX(4deg);
  animation: ax-float 8s ease-in-out infinite;
}
.ax-browser-bar { display: flex; gap: 6px; align-items: center; padding: 10px 14px; background: #1b201d; }
.ax-browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; }
.ax-browser-bar i:nth-child(2) { background: #febc2e; }
.ax-browser-bar i:nth-child(3) { background: #28c840; }
.ax-browser-bar span {
  margin-left: 10px; flex: 1; font-family: var(--font-mono); font-size: .72rem; color: #9aa59d;
  background: #0d100e; border-radius: 6px; padding: 4px 10px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
@keyframes ax-float { 50% { translate: 0 -12px; } }

.ax-screen {
  height: 100%;
  border-radius: 34px;
  background:
    radial-gradient(120% 60% at 50% 0%, color-mix(in srgb, var(--accent) 70%, transparent), transparent 70%),
    linear-gradient(180deg, #13261b, #0b130e);
  padding: 34px 18px 18px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  color: #fff; text-align: center;
}
.ax-browser .ax-screen { border-radius: 0; padding: 26px 22px; aspect-ratio: 16 / 10; height: auto; }
.ax-screen .ax-icon { --s: 58px; }
.ax-screen-name { font-family: var(--font-display); font-size: 1.25rem; }
.ax-screen-row {
  width: 100%; text-align: left;
  display: flex; gap: 10px; align-items: center;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px; padding: 9px 11px;
  font-size: .72rem; line-height: 1.3; color: #E6EDE7;
}
.ax-screen-row b { flex: none; width: 22px; height: 22px; border-radius: 7px; background: linear-gradient(140deg, var(--accent), var(--accent-2)); }
.ax-screen-row span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Light sections ---------- */
.ax-section { padding: clamp(56px, 8vw, 104px) 0; }
.ax-section.tint { background: linear-gradient(180deg, var(--canvas-alt), var(--canvas)); }
.ax-head { max-width: 62ch; margin-bottom: 40px; }
.ax-head .ax-eyebrow { color: var(--copper); margin-bottom: 14px; }
.ax-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); font-weight: 500; letter-spacing: -.02em; margin: 0 0 .3em; }

/* ---------- App cards (listing) ---------- */
.ax-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 22px; }
.ax-card {
  position: relative;
  display: flex; flex-direction: column; gap: 14px;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  padding: 26px;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  overflow: hidden;
}
.ax-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.ax-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; border-bottom-color: transparent; }
.ax-card-top { display: flex; align-items: center; gap: 16px; }
.ax-card h3 { font-size: 1.4rem; font-weight: 500; margin: 0 0 4px; }
.ax-card p { margin: 0; font-size: .98rem; }
.ax-card-go { margin-top: auto; padding-top: 6px; font-weight: 600; color: var(--leaf-deep); display: inline-flex; gap: 8px; align-items: center; }
.ax-card-go::after { content: "→"; transition: transform .2s ease; }
.ax-card:hover .ax-card-go::after { transform: translateX(5px); }

.ax-group-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin: 56px 0 22px; }
.ax-group-head:first-child { margin-top: 0; }
.ax-group-head h3 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 500; margin: 0; }
.ax-group-head span { font-family: var(--font-mono); font-size: .8rem; color: var(--ink-faint); }

/* ---------- Feature cards (app page) ---------- */
.ax-features { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 18px; counter-reset: f; }
.ax-feature {
  background: var(--card); border: 1px solid var(--line-soft); border-radius: 20px;
  padding: 26px 24px 24px; box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
}
.ax-feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.ax-feature::before {
  counter-increment: f; content: counter(f, decimal-leading-zero);
  display: inline-grid; place-items: center;
  width: 46px; height: 46px; border-radius: 14px; margin-bottom: 16px;
  background: linear-gradient(140deg, var(--accent), var(--accent-2)); color: #fff;
  font-family: var(--font-display); font-size: 1.05rem;
  box-shadow: 0 10px 20px -10px var(--accent);
}
.ax-feature p { margin: 0; color: var(--ink); font-size: 1.02rem; }

/* ---------- Audience quote ---------- */
.ax-quote {
  position: relative;
  border-radius: 28px; padding: clamp(28px, 5vw, 56px);
  background: linear-gradient(135deg, var(--night), var(--night-3));
  color: var(--cream); overflow: hidden;
}
.ax-quote::after {
  content: "\201C"; position: absolute; right: 24px; top: -40px;
  font-family: var(--font-display); font-size: 16rem; line-height: 1; color: var(--accent); opacity: .25;
}
.ax-quote .ax-eyebrow { margin-bottom: 14px; }
.ax-quote p { color: var(--cream); font-family: var(--font-display); font-size: clamp(1.25rem, 2.4vw, 1.8rem); line-height: 1.4; max-width: 46ch; margin: 0; position: relative; z-index: 1; }

/* ---------- Action cards ---------- */
.ax-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 18px; }
.ax-action {
  display: flex; flex-direction: column; gap: 8px;
  padding: 24px; border-radius: 20px;
  background: var(--card); border: 1px solid var(--line-soft); color: inherit;
  transition: transform .2s ease, box-shadow .2s ease;
}
.ax-action:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-bottom-color: var(--line-soft); }
.ax-action strong { font-family: var(--font-display); font-weight: 500; font-size: 1.25rem; color: var(--ink); }
.ax-action span { color: var(--ink-soft); font-size: .95rem; }
.ax-action .ax-glyph {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 14%, #fff); color: var(--accent-ink, var(--leaf-deep)); margin-bottom: 4px;
}
.ax-action svg { width: 22px; height: 22px; }

.ax-credit {
  margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line);
  font-family: var(--font-display); font-style: italic; color: var(--ink-soft); font-size: 1.02rem;
}
.ax-operator { color: var(--ink-faint); font-size: .92rem; margin: 6px 0 0; }

/* ---------- Sub-navigation (tabs) ---------- */
.ax-tabs {
  display: inline-flex; flex-wrap: wrap; gap: 6px; padding: 6px; margin-top: 30px;
  border-radius: 999px; background: rgba(244, 239, 223, .08); border: 1px solid rgba(244, 239, 223, .16);
}
.ax-tabs a { padding: 9px 18px; border-radius: 999px; color: var(--cream-soft) !important; font-size: .92rem; font-weight: 500; }
.ax-tabs a:hover { background: rgba(244, 239, 223, .1); border-bottom-color: transparent; }
.ax-tabs a[aria-current="page"] { background: var(--cream); color: var(--night) !important; }

/* ---------- Policy pages ---------- */
.ax-doc { display: grid; grid-template-columns: 240px 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (max-width: 900px) { .ax-doc { grid-template-columns: 1fr; } .ax-toc { position: static !important; } }
.ax-toc {
  position: sticky; top: 96px;
  background: var(--card); border: 1px solid var(--line-soft); border-radius: 18px; padding: 18px 18px 14px;
}
.ax-toc b { display: block; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 8px; font-weight: 500; }
.ax-toc ol { list-style: none; margin: 0; padding: 0; counter-reset: t; }
.ax-toc li { counter-increment: t; }
.ax-toc a { display: flex; gap: 10px; padding: 7px 4px; font-size: .92rem; color: var(--ink-soft); border-bottom: none; border-radius: 8px; }
.ax-toc a::before { content: counter(t); min-width: 1.4em; color: var(--accent-ink, var(--leaf)); font-family: var(--font-display); }
.ax-toc a:hover { color: var(--ink); background: var(--canvas); }

.ax-clause {
  display: grid; grid-template-columns: 64px 1fr; gap: 18px;
  background: var(--card); border: 1px solid var(--line-soft); border-radius: 20px;
  padding: 24px 26px; margin-bottom: 16px; scroll-margin-top: 96px;
}
@media (max-width: 560px) { .ax-clause { grid-template-columns: 1fr; gap: 6px; padding: 20px; } }
.ax-num {
  font-family: var(--font-display); font-size: 2.6rem; line-height: 1; font-weight: 500;
  background: linear-gradient(160deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ax-clause h2 { font-size: 1.35rem; font-weight: 500; margin: 4px 0 10px !important; }
.ax-clause p, .ax-clause li { color: var(--ink-soft); }
.ax-clause p:last-child { margin-bottom: 0; }
.ax-clause ul { margin: 0; padding: 0; list-style: none; }
.ax-clause li { position: relative; padding-left: 22px; margin: 8px 0; max-width: 70ch; }
.ax-clause li::before {
  content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 8px; border-radius: 3px;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
}
.ax-note {
  border-radius: 18px; padding: 18px 22px; margin-bottom: 18px;
  background: color-mix(in srgb, var(--accent) 10%, #fff); border: 1px solid color-mix(in srgb, var(--accent) 30%, #fff);
}
.ax-note p { margin: 0; color: var(--ink); }

/* ---------- Footer band ---------- */
.ax-band {
  border-radius: 28px; padding: clamp(28px, 5vw, 52px);
  background:
    radial-gradient(600px 300px at 100% 0%, rgba(227, 176, 98, .35), transparent 60%),
    linear-gradient(135deg, var(--leaf-deep), var(--night));
  color: var(--cream);
  display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between;
}
.ax-band h2 { color: var(--cream); font-weight: 500; margin: 0 0 6px; font-size: clamp(1.5rem, 3vw, 2.2rem); }
.ax-band p { color: var(--cream-soft); margin: 0; }
.ax-band a:not(.ax-btn) { color: var(--link-dark); }

/* ---------- Entrance animation ---------- */
.ax-rise { opacity: 0; transform: translateY(18px); animation: ax-rise .8s cubic-bezier(.2, .7, .2, 1) forwards; }
.ax-rise.d1 { animation-delay: .08s; } .ax-rise.d2 { animation-delay: .16s; } .ax-rise.d3 { animation-delay: .24s; } .ax-rise.d4 { animation-delay: .32s; }
@keyframes ax-rise { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .ax-hero::after, .ax-phone, .ax-browser, .ax-pill.live::before { animation: none !important; }
  .ax-rise { opacity: 1; transform: none; }
}

/* Phone width: no sideways scroll, mock-up upright */
@media (max-width: 600px) {
  .ax-phone, .ax-browser { transform: none; }
  .ax-hero::after { width: 380px; height: 380px; right: -140px; }
  .ax-stat { flex: 1 1 40%; min-width: 0; }
  .ax-tabs { border-radius: 18px; }
}

/* Polish (2026-11-19) */
.ax-screen-tiles { width: 100%; margin-top: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ax-screen-tiles i { aspect-ratio: 1; border-radius: 8px; background: linear-gradient(140deg, var(--accent), var(--accent-2)); opacity: .55; }
.ax-screen-tiles i:nth-child(2n) { opacity: .3; }
.ax-screen-tiles i:nth-child(3n) { opacity: .8; }
.ax-browser .ax-screen-tiles { grid-template-columns: repeat(6, 1fr); }
.ax-quote::after { top: -10px; }
.ax-credit { max-width: none; }
@media (max-width: 600px) {
  .ax-icon.xl { --s: 72px; margin-bottom: 18px; }
  .ax-tabs a { padding: 8px 12px; font-size: .88rem; }
}

/* Enrolment, user guide, supplied icons (VKG ruling 2026-11-19: each app page a full home page) */
.ax-icon.has-img { background: #fff; }
.ax-icon.has-img img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 0; }
.ax-enrol-note { margin: 16px 0 0; font-size: .98rem; color: var(--cream) !important; max-width: 52ch;
  padding: 10px 14px; border-left: 3px solid var(--gold); background: rgba(244, 239, 223, .06); border-radius: 0 10px 10px 0; }
.ax-steps { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; gap: 14px; max-width: 760px; }
.ax-steps li { counter-increment: s; display: grid; grid-template-columns: 52px 1fr; gap: 16px; align-items: center;
  background: var(--card); border: 1px solid var(--line-soft); border-radius: 18px; padding: 16px 20px; box-shadow: var(--shadow-sm); }
.ax-steps li::before { content: counter(s); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(140deg, var(--accent), var(--accent-2)); color: #fff; font-family: var(--font-display); font-size: 1.2rem; }
.ax-steps p { margin: 0; color: var(--ink); }
.ax-guide { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between;
  background: var(--card); border: 1px solid var(--line-soft); border-radius: 22px; padding: 26px 28px; box-shadow: var(--shadow-sm); }
.ax-guide p { margin: 0; color: var(--ink-soft); }
.ax-guide.empty { border-style: dashed; box-shadow: none; background: transparent; }
