/* Shared October refinement. Local surfaces own their depth; no fixed canvas,
   animated shadows or backdrop filters participate in page scrolling. */
:root {
  --page-bottom-space:52px;
  --surface-edge:inset 0 1px 0 rgba(220,234,255,.085),inset 0 -1px 0 rgba(0,0,0,.12);
  --surface-shadow:var(--surface-edge),0 16px 36px rgba(0,0,0,.16);
  --panel-light:rgba(65,133,226,.24);
  --panel-violet:rgba(146,109,211,.24);
  --panel-cyan:rgba(57,145,173,.21);
}
[data-theme="light"] {
  --surface-edge:inset 0 1px 0 #fff;
  --surface-shadow:var(--surface-edge),0 14px 34px rgba(39,61,93,.07);
  --panel-light:rgba(115,167,230,.16);
  --panel-violet:rgba(154,132,206,.13);
  --panel-cyan:rgba(92,161,178,.11);
}
.site-shell { min-height:100vh; min-height:100svh; }
.site-header {
  background:var(--ks-bg);
  box-shadow:none;
  padding-left:max(var(--site-gutter),env(safe-area-inset-left,0px));
  padding-right:max(var(--site-gutter),env(safe-area-inset-right,0px));
}
html[dir] .main {
  padding-left:max(var(--site-gutter),env(safe-area-inset-left,0px))!important;
  padding-right:max(var(--site-gutter),env(safe-area-inset-right,0px))!important;
  /* One normal-flow inset protects the footer without reserving a new bar. */
  padding-bottom:calc(var(--page-bottom-space) + env(safe-area-inset-bottom,0px))!important;
}
.toast { bottom:calc(24px + env(safe-area-inset-bottom,0px)); }
.lang-menu {
  box-shadow:0 8px 20px rgba(0,0,0,.14);
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
}
.site-header .control { border-color:var(--ks-line)!important; }
.site-nav a.active { background:var(--visual-tint); border-color:var(--ks-line); }
:is(.principle,.app-mosaic,.contact-card,.apps-v2-feedback,.privacy-v2-contact,
    .services-card,.service-option-card,.template-tile,.template-stage) {
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
}
:is(.hero.hero-v3,.clarity,.contact-card,.apps-v2-feedback,.privacy-v2-contact,
    .services-card,.service-option-card,.template-tile,.services-final-cta) {
  box-shadow:var(--surface-shadow)!important;
}
:is(.hero.hero-v3,.clarity,.contact-card,.apps-v2-feedback,.privacy-v2-contact) {
  border-color:var(--ks-line)!important;
}
:root[data-theme] .hero.hero-v3 { background:var(--surface-feature)!important; }
.hero.hero-v3 .hero-copy p { color:var(--ks-muted)!important; }
.studio-atmosphere::after { filter:none; }
.studio-stage-core {
  box-shadow:var(--surface-edge),0 0 24px rgba(125,171,233,.08),0 8px 18px rgba(0,0,0,.14);
}
.planet-sphere { box-shadow:inset 1px 2px 5px rgba(224,235,253,.08),inset -4px -6px 12px rgba(0,0,0,.14),0 5px 12px rgba(0,0,0,.12); }
.principle { border-color:var(--ks-line)!important; box-shadow:var(--surface-edge)!important; }
.principle .principle-icon { box-shadow:var(--surface-edge); }
.section-symbol { box-shadow:none; }
.btn.primary {
  background:linear-gradient(115deg,#b5d1f5,#9dbde8)!important;
  border-color:#a7c5ed!important;
  box-shadow:none!important;
}
.btn.primary:hover { box-shadow:none!important; }
[data-theme="light"] .btn.primary { background:linear-gradient(115deg,#35649b,#28527f)!important; border-color:#35649b!important; }
.btn:not(.primary) { border-color:var(--ks-line)!important; }
.services-button-primary { background:#b5d1f5; color:#14263c; }
.services-button-primary:hover { background:#c3daf8; box-shadow:none; }
[data-theme="light"] .services-button-primary { background:#35649b; color:#fff; }
[data-theme="light"] .services-button-primary:hover { background:#28527f; }

/* Catalog: wider product cards and quieter material changes. */
.apps-v2-hero,.privacy-v2-hero { background:var(--surface-feature); border-color:var(--ks-line); box-shadow:var(--surface-shadow); }
.apps-v2-brand h1,.privacy-v2-brand h1 { line-height:1.06; letter-spacing:-.045em; }
.page-emblem { background:var(--surface-gradient); box-shadow:var(--surface-edge); }
.apps-v2-controls { padding-block:30px 12px; }
.apps-v2-search { background:var(--ks-surface); border-color:var(--ks-line); }
.apps-v2-search:focus { border-color:var(--visual-accent)!important; outline:2px solid var(--visual-tint); outline-offset:2px; }
.apps-v2-search::placeholder { color:var(--ks-muted); opacity:.8; }
.apps-v2-filters { flex-wrap:wrap; overflow:visible; }
.apps-v2-chip { min-height:44px; color:var(--ks-muted); font-size:14px; }
.apps-v2-grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:18px; padding-block:20px 64px; }
.apps-v2-grid .app-card {
  min-height:282px;
  padding:26px;
  border-radius:22px;
  border-color:var(--ks-line)!important;
  background:radial-gradient(ellipse at 8% 0%,color-mix(in srgb,var(--card-colour) 16%,transparent),transparent 65%),var(--surface-quiet)!important;
  box-shadow:var(--surface-shadow)!important;
  transition:transform 220ms var(--motion-ease),border-color 180ms ease!important;
}
.apps-v2-grid .card-icon { width:68px; height:68px; box-shadow:0 4px 10px rgba(0,0,0,.1); }
.apps-v2-grid .card-title { font-size:19px!important; line-height:1.35!important; padding-inline-end:18px; letter-spacing:-.02em; }
.apps-v2-grid .app-card p:not(.card-title) { font-size:14px; line-height:1.65; color:var(--ks-muted)!important; }
.apps-v2-grid .card-category { margin-top:auto; font-size:11px; letter-spacing:0; border:0; background:var(--visual-tint); color:var(--visual-accent); }
.apps-v2-grid .card-arrow { top:26px; inset-inline-end:24px; width:28px; height:28px; background:transparent; }
.apps-v2-grid .app-card:nth-child(3n) { --card-colour:#8fc9d1; }
.apps-v2-grid .app-card:hover { border-color:var(--visual-border)!important; box-shadow:var(--surface-shadow)!important; }
.privacy-v2-general-copy,.privacy-v2-grid { background:var(--surface-quiet); }
.privacy-v2-content :is(h1,h2,h3,p) { overflow-wrap:anywhere; hyphens:auto; }
.privacy-v2-grid .app-icon { box-shadow:0 4px 10px rgba(0,0,0,.09)!important; }
.footer { border-top-color:var(--ks-line); }
:is(.privacy-v2-contact,.apps-v2-feedback,.contact-card) > div { min-width:0; max-width:100%; }
:is(.privacy-v2-contact,.apps-v2-feedback,.contact-card) :is(h2,p) { overflow-wrap:anywhere; hyphens:auto; }
.section-eyebrow { min-width:0; white-space:normal; }
.section-eyebrow > span:not(.section-symbol):not(.section-index) { min-width:0; overflow-wrap:anywhere; }

/* App product pages keep real artwork, with a defined frame and calm motion. */
.pc-detail .pc-product-v3 { background:var(--surface-feature)!important; border-color:var(--visual-border); box-shadow:var(--surface-shadow); }
.pc-detail .pc-product-v3::before { opacity:.5; box-shadow:none; }
.pc-detail .pc-product-v3-icon-wrap::before { background:var(--surface-display); border-color:var(--visual-border); box-shadow:var(--surface-edge); }
.pc-detail .pc-product-v3-icon-wrap::after { border-color:var(--visual-border); opacity:.65; }
.pc-detail .pc-product-v3-icon { box-shadow:0 6px 14px rgba(0,0,0,.12); animation:productIconFloat 11s ease-in-out infinite; }
.pc-detail .pc-product-v3 h1 { text-wrap:balance; }
.pc-detail :is(.pc-description,.pc-live) { background:none!important; }
.pc-detail .pc-gallery { box-shadow:none!important; }
.pc-detail :is(.pc-demo-visual,.pc-pro-card,.pc-final-cta,.pc-support-v3) {
  box-shadow:var(--surface-shadow)!important;
  border-color:var(--ks-line)!important;
}
.pc-detail .pc-demo-image { animation:none!important; }
.pc-detail .pc-shot-image { box-shadow:none; border-radius:18px; }
.pc-detail .pc-carousel { padding-block:8px 18px; }
.pc-detail .pc-pro-card { background:var(--surface-gradient); }
.pc-detail .pc-pro-card:hover { box-shadow:var(--surface-shadow)!important; border-color:var(--visual-border)!important; }
.pc-detail .pc-more-app { box-shadow:var(--surface-edge); }
.pc-detail .pc-final-cta { background:var(--surface-feature); }
.pc-detail .pc-support-v3 { background:var(--surface-quiet); }
.pc-lightbox { background:var(--ks-bg); backdrop-filter:none; -webkit-backdrop-filter:none; padding:16px; padding-inline:max(16px,env(safe-area-inset-left,0px)) max(16px,env(safe-area-inset-right,0px)); padding-block-end:max(16px,env(safe-area-max-inset-bottom,0px)); }
.pc-lightbox-inner { max-height:calc(100svh - 48px); }
.pc-lightbox-image { max-height:calc(100svh - 48px); }
.pc-lightbox-close { top:12px; right:12px; }
.pc-lightbox-nav,.pc-lightbox-close { background:var(--ks-surface-2); color:var(--ks-text); border-color:var(--ks-line); }

/* Services, pricing, forms and legal documents share the same materials. */
.services-content { --services-shadow:var(--surface-shadow); }
:is(.services-hero-visual,.service-detail-visual,.services-case-screens) { background:var(--surface-display); box-shadow:var(--surface-shadow); border-color:var(--visual-border); }
:is(.services-proof-item,.service-info-card,.services-portfolio-item,.services-process) { background:var(--surface-quiet); box-shadow:var(--surface-edge); }
.services-card,.service-option-card { background:radial-gradient(ellipse at 100% 0%,var(--panel-light),transparent 60%),var(--surface-quiet); }
.services-card[data-service="google-play-publication"],.service-option-card[data-detail-option="app-care-6-months"] { background:radial-gradient(ellipse at 100% 0%,var(--panel-violet),transparent 60%),var(--surface-quiet); }
.services-card[data-service="updates-support"],.service-option-card[data-detail-option="app-care-12-months"] { background:radial-gradient(ellipse at 100% 0%,var(--panel-cyan),transparent 60%),var(--surface-quiet); }
.services-card-featured { border-color:var(--visual-accent); background:var(--surface-feature); }
.services-card::before,.service-option-card::before { opacity:.24; }
.service-legal-section p,.template-license-section p { text-wrap:pretty; }
#project-request { background:var(--surface-quiet); box-shadow:var(--surface-edge); }
.request-field :is(input,select,textarea),.request-file input { border-radius:12px; }
.service-legal-toc,.template-license-toc { background:var(--surface-quiet); }

/* The template previews move as objects. Their shadows remain fixed textures. */
.template-hero { gap:clamp(28px,4vw,64px); }
.template-stage { border-color:var(--visual-border); background:var(--surface-display); box-shadow:var(--surface-edge); }
.template-stage::after { opacity:.12; }
.template-stage::before { border-color:var(--visual-border); border-inline-start-color:transparent; animation:productRingTurn 60s linear infinite; }
.template-device { box-shadow:0 8px 18px rgba(0,0,0,.2); animation:productPreviewFloat 12s ease-in-out infinite; }
.template-device:nth-child(2) { animation-delay:-4s; }
.template-device:nth-child(3) { animation-delay:-8s; }
.pc-product-v3-icon,.template-device,.template-stage::before { animation-play-state:paused!important; }
html.ks-motion-on:not(.ks-page-hidden):not(.ks-motion-reduced) .template-stage.ks-ambient.is-motion-visible::before { animation-play-state:running!important; }
.template-tile { border-color:var(--ks-line); border-radius:26px; background:radial-gradient(ellipse at 0% 0%,var(--panel-light),transparent 60%),var(--surface-quiet); }
.template-tile--free-lifetime-pro { background:radial-gradient(ellipse at 0% 0%,var(--panel-violet),transparent 60%),var(--surface-quiet); }
.template-tile--bundle { border-color:var(--visual-border); background:var(--surface-feature); }
.template-tile h3 { line-height:1.22; text-wrap:balance; }
.template-tile-price { padding-block:15px; border-block:1px solid var(--ks-line); }
.template-main-price,.template-tile-price > bdi { font-variant-numeric:tabular-nums; }
.template-screen-thumb { background:var(--surface-display); }
.template-screen summary { transition:background-color 180ms ease; }
.template-license-summary { background:var(--surface-quiet); }
.template-faq summary:hover { color:var(--visual-accent); }
.template-faq details[open] { background:var(--visual-tint); border-radius:12px; padding-inline:16px; }

/* Different surface roles, with directional light held inside each frame. */
.portfolio-section .app-mosaic { background:var(--surface-display)!important; }
:is(.contact-card,.apps-v2-feedback,.privacy-v2-contact) { background:var(--surface-feature)!important; }
.services-prices li > a:hover { border-color:var(--visual-accent); }
.services-card .services-prices li > a .services-price { font-size:clamp(22px,2.3vw,26px); }
.services-card .services-prices li > a { box-shadow:var(--surface-edge); }
.template-tile-price { background:var(--surface-price); padding-inline:16px; border-radius:12px; }
.template-purchase,.services-final-cta { background:var(--surface-feature); box-shadow:var(--surface-shadow); }

/* Dark surfaces use graphite cores and localized light, rather than one blue
   field on every component. Light-theme materials remain independently set. */
:root:not([data-theme="light"]) .hero.hero-v3::before { opacity:.45; }
:root:not([data-theme="light"]) .pc-detail .pc-pro-card:nth-child(2n) { background:radial-gradient(ellipse at 100% 0%,var(--panel-violet),transparent 68%),var(--surface-quiet); }
:root:not([data-theme="light"]) .principle { background:radial-gradient(ellipse at 0% 0%,color-mix(in srgb,var(--card-tint) 13%,transparent),transparent 68%),var(--surface-quiet)!important; }
:root:not([data-theme="light"]) .apps-v2-grid .app-card { background:radial-gradient(ellipse at 0% 0%,color-mix(in srgb,var(--card-colour) 16%,transparent),transparent 68%),var(--surface-quiet)!important; }
:root:not([data-theme="light"]) .privacy-v2-general-copy { background:var(--surface-gradient); }
:root:not([data-theme="light"]) .services-card-featured { border-color:rgba(169,203,250,.54); }

@keyframes productIconFloat { 0%,100% { translate:0 0; } 50% { translate:0 -4px; } }
@keyframes productPreviewFloat { 0%,100% { translate:0 0; } 50% { translate:0 -5px; } }
@keyframes productRingTurn { to { rotate:360deg; } }
@media (hover:hover) and (pointer:fine) {
  .template-tile { transition:border-color 220ms ease; }
  .template-tile:hover { border-color:var(--visual-border); }
  .pc-detail .pc-more-app:hover { transform:translateY(-2px)!important; }
}
@media (hover:none) {
  .apps-v2-grid .app-card:hover,.apps-v2-grid .app-card:hover .card-icon,
  .pc-detail .pc-more-app:hover { transform:none!important; }
}
@media(max-width:1020px) { .apps-v2-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(max-width:740px) { .apps-v2-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; } }
@media(max-width:620px) {
  :root { --page-bottom-space:34px; }
  .apps-v2-hero,.privacy-v2-hero { padding:26px 22px!important; }
  .apps-v2-grid .app-card { padding:20px; }
  .apps-v2-grid .card-title { font-size:17px!important; }
  .apps-v2-filters { flex-wrap:nowrap; overflow-x:auto; overscroll-behavior-inline:contain; padding-block:18px 10px; }
  .apps-v2-chip { flex:none; }
  .template-stage { border-radius:24px; }
  .template-section-heading h2 { line-height:1.3; }
}
@media(max-width:440px) {
  .apps-v2-grid { grid-template-columns:minmax(0,1fr); gap:12px; }
  .apps-v2-grid .app-card { display:grid; grid-template-columns:60px minmax(0,1fr); gap:8px 18px; min-height:0; align-items:start; padding:20px; }
  .apps-v2-grid .card-icon { grid-column:1; grid-row:1 / 4; width:60px; height:60px; border-radius:17px; }
  .apps-v2-grid .card-title { grid-column:2; margin:0!important; padding-inline-end:20px; }
  .apps-v2-grid .app-card p:not(.card-title) { grid-column:2; margin:0; }
  .apps-v2-grid .card-category { grid-column:2; justify-self:start; margin:4px 0 0; }
  .apps-v2-grid .card-arrow { top:18px; inset-inline-end:16px; width:24px; height:24px; }
  .apps-v2-grid .card-arrow svg { width:17px; }
}
@media(prefers-reduced-motion:reduce) {
  .pc-detail .pc-product-v3-icon,.template-device,.template-stage::before { animation:none!important; translate:none!important; rotate:none!important; }
}
@media(forced-colors:active) {
  :is(.pc-product-v3,.template-tile,.template-stage,.services-card,.apps-v2-grid .app-card) { border-color:CanvasText!important; box-shadow:none!important; }
  .template-stage::before,.template-stage::after { display:none; }
}
