/* ============================================================================
   KCS Studio — native app polish (loaded in the Capacitor shell on every page)
   ========================================================================== */
:root { --app-inset-bg: #12141d; }

/* --- remove the "this is a website" tells --- */
* { -webkit-tap-highlight-color: transparent; }
html, body { overscroll-behavior: none; }
body {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
/* keep text selectable where it matters */
input, textarea, select, [contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
}
img, a, button, .lbtn, .appnav-item { -webkit-user-drag: none; }

/* --- safe areas (edge-to-edge on Android 15+/notched iOS) --- */
.app-studio .lheader { padding-top: env(safe-area-inset-top, 0px); }

/* ============================================================================
   Bottom tab bar — studio "app shell"
   ========================================================================== */
html.has-appnav body { padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px)); }

.appnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999;
  display: flex; align-items: stretch;
  background: rgba(18, 20, 29, 0.92);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
}
.appnav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; padding: 8px 4px 6px; min-height: 50px;
  text-decoration: none; color: #868ba2;
  font-size: 11px; font-weight: 500; letter-spacing: .015em;
  transition: color .18s ease, transform .12s ease;
}
.appnav-item svg { width: 22px; height: 22px; transition: stroke .18s ease; }
.appnav-item span { line-height: 1; }
.appnav-item.active { color: #ffffff; }
.appnav-item.active svg { stroke: #96a0d2; }
.appnav-item:active { transform: scale(.9); opacity: .7; }

/* ============================================================================
   "Back to Studio" chip — client sub-site pages
   ========================================================================== */
.app-backchip {
  position: fixed; z-index: 9999;
  top: calc(env(safe-area-inset-top, 0px) + 10px); left: 12px;
  display: inline-flex; align-items: center; gap: 3px;
  padding: 7px 13px 7px 8px; border-radius: 999px;
  background: rgba(18, 20, 29, 0.82); color: #ffffff; text-decoration: none;
  font: 600 13px/1 'Inter', system-ui, sans-serif;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.app-backchip svg { width: 16px; height: 16px; }
.app-backchip:active { transform: scale(.95); }

/* ============================================================================
   Tab-view app shell — studio home becomes Work / Studio / Contact screens
   ========================================================================== */
html.app-shell .app-hide { display: none !important; }

html.app-shell body { padding-top: calc(52px + env(safe-area-inset-top, 0px)); }

html.app-shell .app-screen { display: none; }
html.app-shell .app-screen.screen-active { display: block; animation: appScreenIn .26s ease both; }
@keyframes appScreenIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* hero, when used as the Studio screen, shouldn't force full-viewport height */
html.app-shell .lhero { min-height: auto; }

/* top app bar */
.app-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9998;
  display: flex; align-items: center; justify-content: space-between;
  height: calc(52px + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 8px 0 18px;
  background: rgba(18, 20, 29, 0.86);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
html[data-theme="light"] .app-bar { background: rgba(255, 255, 255, 0.9); border-bottom-color: rgba(0, 0, 0, 0.08); }
.app-bar-title { font-family: 'Space Grotesk', 'Inter', sans-serif; font-weight: 600; font-size: 17px; letter-spacing: .01em; color: #fff; }
html[data-theme="light"] .app-bar-title { color: #12141d; }
.app-bar-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; padding: 0; border: 0; border-radius: 10px;
  background: transparent; color: #c9ccdd;
}
.app-bar-toggle svg { width: 21px; height: 21px; }
html[data-theme="light"] .app-bar-toggle { color: #4a4a55; }
.app-bar-toggle:active { background: rgba(127, 127, 140, 0.16); }

/* "Get a quote" CTA on the Contact screen */
.app-quote-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 20px 0 4px; padding: 15px 20px; border-radius: 14px;
  background: linear-gradient(135deg, #5b6ee0, #8a7bf0);
  color: #fff; text-decoration: none;
  font: 600 16px/1 'Space Grotesk', 'Inter', sans-serif;
  box-shadow: 0 8px 24px rgba(91, 110, 224, 0.35);
}
.app-quote-btn svg { width: 20px; height: 20px; }
.app-quote-btn:active { transform: scale(0.985); filter: brightness(1.06); }

/* compact home header above the cards (Studio screen) */
html.app-shell #work { padding-top: 14px; padding-bottom: 14px; }
.app-home-tagline {
  font-family: 'Space Grotesk', 'Inter', sans-serif; font-weight: 600;
  font-size: 21px; line-height: 1.28; letter-spacing: -0.01em;
  margin: 4px 0 15px;
}
.app-home-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.app-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px;
  background: rgba(130, 134, 156, 0.13); border: 1px solid rgba(130, 134, 156, 0.2);
  font: 500 13px/1 'Inter', system-ui, sans-serif;
}
.app-chip svg { width: 15px; height: 15px; opacity: 0.75; }
.app-home-label {
  font: 600 12px/1 'Space Grotesk', sans-serif; letter-spacing: 0.14em; text-transform: uppercase;
  opacity: 0.5; margin-bottom: 14px;
}
