/*
 * Compatibility layer for the theme-rendered pages (site/pages.php).
 *
 * The netcell templates use classes and --nc-* tokens from netcell/style.css, which the
 * static build does not load. The rules below port only the classes the templates use and
 * take their values from netcell/style.css :root, so the copy renders as it does on the theme.
 * Loaded by theme-rendered pages only (site/config.php THEME_PAGE_STYLE_PATHS).
 */

:root {
  --nc-primary: #1677ff;
  --nc-primary-dark: #0958d9;
  --nc-text: #1E293B;
  --nc-text-light: #64748B;
  --nc-bg: #ffffff;
  --nc-bg-alt: #F8FAFC;
  --nc-border: #E2E8F0;
  --nc-radius: 10px;
  --nc-shadow-lg: 0 4px 6px rgba(0, 0, 0, 0.04), 0 10px 30px rgba(0, 0, 0, 0.08);
  --nc-icon-tile: 64px;
  --nc-label-text: #475569;
  --nc-on-dark-accent: #93C5FD;
  --nc-badge-green: #047857;
  --nc-badge-amber: #B45309;
  --nc-tile-neutral: #F1F5F9;
  --nc-logo-max: 48px;
  --nc-logo-max-h: 40px;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.s-new {
  background: var(--nc-bg);
}

/* Legal-page language notice. Ported from netcell/style.css (.lg-lang-notice). It sits on the white
   .lg-body section, so the text colour is set explicitly; the inherited static body colour is light. */
.lg-lang-notice {
  margin: 0 0 28px;
  padding: 12px 16px;
  background: var(--nc-bg-alt);
  border-left: 3px solid #00D4AA;
  border-radius: 6px;
  color: var(--nc-text);
  font-size: 14px;
  line-height: 1.5;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
}

/* Sits on the dark .hero (styles.css), so it takes the light accent: #1677ff measured 3.8:1 there. */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(22, 119, 255, 0.1);
  border: 1px solid rgba(22, 119, 255, 0.2);
  border-radius: 100px;
  color: var(--nc-on-dark-accent);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 24px;
}

/* Section padding follows the static site rhythm (--space-section, 80px), not the theme's 100px. */
.features {
  padding: var(--space-section) 0;
  background: var(--nc-bg);
}

.section-header {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 64px;
}

.section-header h2 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  color: var(--nc-text);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-header p {
  font-size: 15px;
  color: var(--nc-text-light);
  line-height: 1.7;
}

/* Eyebrow label above section headings. Without a colour it inherits the light static body text
   (#E2E8F0, 1.2:1 on white); #475569 gives 7.2:1 on both white and the .features background. */
.section-label {
  color: var(--nc-label-text);
}

/* Light sections (.s-new) keep the theme's dark text; the static body colour is light (--c-ink, --c-heading). */
.s-new .sh h2 {
  color: var(--nc-text);
}

.s-new .sh p {
  color: var(--nc-text-light);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.feature-card {
  padding: 36px;
  background: var(--nc-bg);
  border: 1px solid var(--nc-border);
  border-radius: var(--nc-radius);
  color: var(--nc-text);
  transition: all 0.3s ease;
}

/* Status and tag chips inside cards use inline styles with no colour, so they inherited the light
   body text. The inline white-on-green "Verfügbar" badge (2.5:1) and the white-on-amber coming-soon
   badge (2.1:1) are darkened; the attribute selectors match the colours the templates write inline. */
/* Language chips in the "Offene Architektur" block (Go, PHP, Python, Node.js) are inline spans on the
   light alt background with no colour, so they inherited the light body text too. */
.features span[style*="background:var(--nc-bg-alt)"] {
  color: var(--nc-text);
}

.feature-card span[style*="#10B981"] {
  background: var(--nc-badge-green) !important;
}

.feature-card span[style*="#F59E0B"] {
  background: var(--nc-badge-amber) !important;
}

.feature-card:hover {
  border-color: rgba(22, 119, 255, 0.25);
  box-shadow: var(--nc-shadow-lg);
  transform: translateY(-4px);
}

.feature-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--nc-text);
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 14px;
  color: #475569;
  line-height: 1.8;
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 20px;
  background: rgba(22, 119, 255, 0.08);
  color: var(--nc-primary);
}

.feature-icon.teal,
.feature-icon.blue {
  background: rgba(22, 119, 255, 0.08);
  color: #1677ff;
}

.feature-icon.purple {
  background: rgba(139, 92, 246, 0.1);
  color: #8B5CF6;
}

.feature-icon.orange {
  background: rgba(249, 115, 22, 0.1);
  color: #F97316;
}

.feature-icon.red {
  background: rgba(239, 68, 68, 0.1);
  color: #EF4444;
}

.feature-icon.green {
  background: rgba(34, 197, 94, 0.1);
  color: #22C55E;
}

/* Brand tiles on the extension cards. Ported from netcell/style.css (.nc-brand-icon*). The logos are
   masks, so they take the tile colour; the paths are absolute, so the build copies each SVG to dist. */
.nc-brand-icon {
  width: var(--nc-icon-tile);
  height: var(--nc-icon-tile);
  border-radius: 14px;
  margin-bottom: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.nc-brand-icon::after {
  content: '';
  display: block;
  width: 36px;
  height: 36px;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-position: center;
          mask-position: center;
  -webkit-mask-size: contain;
          mask-size: contain;
}

/* Line icons on the extension cards (Docker, Uptime, MCP) are templated as a bare 40px box with an
   inline 34px SVG and a 12px bottom margin, so their headings sat 28px higher than the brand tiles.
   They take the same 64px tile and 16px margin as .nc-brand-icon, with a matching 10% tint. The inline
   width/height/margin are overridden with !important. */
.feature-card > [aria-hidden="true"][style*="width:40px"] {
  width: var(--nc-icon-tile) !important;
  height: var(--nc-icon-tile) !important;
  margin-bottom: 16px !important;
  border-radius: 14px;
  background-color: color-mix(in srgb, currentColor 10%, transparent);
}

.feature-card > [aria-hidden="true"][style*="width:40px"] > svg {
  width: 36px;
  height: 36px;
}

/* A partner logo (ClouDNS PNG, 91x40) is templated as a 40px-high strip with no tile, which put its
   heading 28px off the others. It gets the same tile; the logo is capped to fit inside it. */
.feature-card > [aria-hidden="true"][style*="height:40px"] {
  width: var(--nc-icon-tile) !important;
  height: var(--nc-icon-tile) !important;
  margin-bottom: 16px !important;
  border-radius: 14px;
  background-color: var(--nc-tile-neutral);
  justify-content: center;
}

.feature-card > [aria-hidden="true"][style*="height:40px"] > img {
  width: auto !important;
  height: auto !important;
  max-width: var(--nc-logo-max);
  max-height: var(--nc-logo-max-h);
}

.nc-brand-icon--wp {
  background: rgba(33, 117, 155, 0.10);
  color: #21759B;
}

.nc-brand-icon--wp::after {
  -webkit-mask-image: url('/assets/img/brand/wordpress.svg');
          mask-image: url('/assets/img/brand/wordpress.svg');
}

.nc-brand-icon--joomla {
  background: rgba(90, 165, 51, 0.10);
  color: #5091CD;
}

.nc-brand-icon--joomla::after {
  -webkit-mask-image: url('/assets/img/brand/joomla.svg');
          mask-image: url('/assets/img/brand/joomla.svg');
}

.nc-brand-icon--presta {
  background: rgba(223, 0, 103, 0.08);
  color: #DF0067;
}

.nc-brand-icon--presta::after {
  -webkit-mask-image: url('/assets/img/brand/prestashop.svg');
          mask-image: url('/assets/img/brand/prestashop.svg');
}

.nc-brand-icon--malware {
  background: rgba(220, 38, 38, 0.10);
  color: #DC2626;
}

.nc-brand-icon--malware::after {
  -webkit-mask-image: url('/assets/img/brand/malware-scanner.svg');
          mask-image: url('/assets/img/brand/malware-scanner.svg');
}

.nc-brand-icon--ai {
  background: rgba(14, 165, 233, 0.10);
  color: #0EA5E9;
}

.nc-brand-icon--ai::after {
  -webkit-mask-image: url('/assets/img/brand/ai-assistant.svg');
          mask-image: url('/assets/img/brand/ai-assistant.svg');
}

.nc-brand-icon--git {
  background: rgba(100, 116, 139, 0.10);
  color: #64748B;
}

.nc-brand-icon--git::after {
  -webkit-mask-image: url('/assets/img/brand/git-deploy.svg');
          mask-image: url('/assets/img/brand/git-deploy.svg');
}

/* The inline grid-template-columns in netcell/page-feature-mail-only.php overrides the theme's
   responsive rules (netcell/style.css:1989, 2021), so the breakpoints are forced here with
   !important. Only .features-grid is affected; the theme's own breakpoints are otherwise the same. */
@media (max-width: 992px) {
  .features-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 640px) {
  .features-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* Legal pages (impressum, datenschutz, agb, advisory; DE and EN). The theme caps the title banner (.lg-hero)
   and the body (.vp-legal) at 760px in inline <style> in netcell/page-*.php. From 1200px both containers share
   --legal-container, so the banner text and the body text sit on the same 880px column. The `main` prefix raises
   the specificity above the inline <style> rules, which load later in the document. Below 1200px the theme rules apply. */
@media (min-width: 1200px) {
  :root {
    --legal-measure: 880px;
    --legal-container: calc(var(--legal-measure) + 2 * var(--gutter));
  }

  main .lg-hero > .container,
  main .lg-body > .container,
  main .vp-legal > .container {
    max-width: var(--legal-container);
  }
}

/* Gap between the title banner and the body on the legal templates (DE and EN). The inline theme rules set
   50px (.vp-legal, datenschutz/agb/advisory) and 60px (.lg-body, impressum); both are tightened to 40px. The
   hero's own bottom padding is unchanged. The `main` prefix wins on specificity (0,1,1 vs 0,1,0), not on order. */
:root {
  --legal-top-gap: 40px;
}

main .vp-legal,
main .lg-body {
  padding-top: var(--legal-top-gap);
}

/* Gap between the numbered blocks of /datenschutz/ (DE and EN). The inline grid (.vp-legal section > div > div)
   sets row-gap 32px, and the separator hr between two blocks adds 28px margins, so two blocks were 60px apart.
   The hr margins are set to 0 here: the row-gap alone gives 32px on each side of the separator, the same as the
   impressum and agb pages. Sections touched with no gap, so they get the same 32px. The `main` prefix wins on specificity. */
:root {
  --legal-block-gap: 32px;
}

main .vp-legal section > div > div {
  row-gap: var(--legal-block-gap) !important;
}

main .vp-legal section > div > div > hr {
  margin: 0 !important;
}

main .vp-legal section + section {
  margin-top: var(--legal-block-gap);
}
