/* ==========================================================================
   IoT42 2026 — Theme Stylesheet
   Accessibility: WCAG 2.2 AA verified contrast ratios
   ========================================================================== */

/* --------------------------------------------------------------------------
   Custom properties (design tokens)
   -------------------------------------------------------------------------- */
:root {
  /* Colors — light mode */
  --c-bg: #ffffff;
  --c-bg-subtle: #f8fafc;
  --c-bg-elevated: #ffffff;
  --c-fg: #0e141b;          /* 17.4:1 on white */
  --c-fg-muted: #475569;    /* 7.5:1 on white */
  --c-fg-subtle: #64748b;   /* 5.4:1 on white — body subtle text only */
  --c-border: #e2e8f0;
  --c-border-strong: #cbd5e1;
  --c-accent: #0066b3;      /* 6.4:1 on white */
  --c-accent-hover: #004f8f;
  --c-accent-fg: #ffffff;
  --c-focus: #0066b3;
  --c-success: #047857;
  --c-warning: #b45309;

  /* Typography */
  --f-heading: 'Inter Tight', -apple-system, BlinkMacSystemFont, sans-serif;
  --f-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --f-mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;

  --fs-xs: 0.8125rem;   /* 13px */
  --fs-sm: 0.9375rem;   /* 15px */
  --fs-base: 1.125rem;  /* 18px */
  --fs-md: 1.25rem;     /* 20px */
  --fs-lg: 1.5rem;      /* 24px */
  --fs-xl: 1.875rem;    /* 30px */
  --fs-2xl: 2.25rem;    /* 36px */
  --fs-3xl: 3rem;       /* 48px */
  --fs-4xl: clamp(2.5rem, 5vw, 4rem); /* hero */

  --lh-tight: 1.15;
  --lh-snug: 1.35;
  --lh-normal: 1.55;
  --lh-relaxed: 1.7;

  /* Spacing scale (4-base) */
  --s-1: 0.25rem; --s-2: 0.5rem; --s-3: 0.75rem; --s-4: 1rem;
  --s-5: 1.5rem;  --s-6: 2rem;   --s-8: 3rem;    --s-10: 4rem;
  --s-12: 6rem;   --s-16: 8rem;  --s-20: 10rem;

  /* Layout */
  --max-w: 1200px;
  --max-w-prose: 68ch;
  --gutter: clamp(1rem, 4vw, 3rem);
  --content-offset: clamp(1.5rem, 8vw, 8rem); /* consistent left whitespace */

  /* Misc */
  --radius-sm: 2px;
  --radius-md: 4px;
  --shadow-sm: 0 1px 2px rgba(14, 20, 27, 0.04);
  --shadow-md: 0 4px 16px rgba(14, 20, 27, 0.06);
  --transition: 180ms ease;
}

/* Dark-mode (system preference) */
@media (prefers-color-scheme: dark) {
  :root {
    --c-bg: #0e141b;
    --c-bg-subtle: #161e28;
    --c-bg-elevated: #1a232f;
    --c-fg: #f1f5f9;          /* 16:1 on bg */
    --c-fg-muted: #cbd5e1;    /* 11:1 on bg */
    --c-fg-subtle: #94a3b8;   /* 6.8:1 on bg */
    --c-border: #1f2937;
    --c-border-strong: #334155;
    --c-accent: #5bafe8;      /* 7.2:1 on dark bg */
    --c-accent-hover: #84c5ed;
    --c-accent-fg: #0e141b;
    --c-focus: #5bafe8;
  }
}

/* --------------------------------------------------------------------------
   Reset / base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--f-body);
  font-size: var(--fs-base);
  line-height: var(--lh-relaxed);
  color: var(--c-fg);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; display: block; }

a {
  color: var(--c-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--transition);
}
a:hover { color: var(--c-accent-hover); text-decoration-thickness: 2px; }

/* Focus — visible for keyboard users only, but always 3:1 contrast */
:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--c-focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--c-fg);
  color: var(--c-bg);
  padding: var(--s-3) var(--s-5);
  font-weight: 600;
  z-index: 9999;
  text-decoration: none;
}
.skip-link:focus { top: 0; }

/* Visually hidden (still readable by screen readers) */
.iot42-visually-hidden,
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--f-heading);
  font-weight: 600;
  line-height: var(--lh-tight);
  margin: 0 0 var(--s-4);
  letter-spacing: -0.015em;
  color: var(--c-fg);
}

h1 { font-size: var(--fs-4xl); font-weight: 700; letter-spacing: -0.025em; }
h2 { font-size: var(--fs-2xl); margin-top: var(--s-10); }
h3 { font-size: var(--fs-lg); margin-top: var(--s-6); }
h4 { font-size: var(--fs-md); }

p { margin: 0 0 var(--s-4); max-width: var(--max-w-prose); }

ul, ol { margin: 0 0 var(--s-5); padding-left: var(--s-5); }
li { margin-bottom: var(--s-2); }

blockquote {
  margin: var(--s-6) 0;
  padding: var(--s-5) var(--s-6);
  border-left: 3px solid var(--c-accent);
  background: var(--c-bg-subtle);
  font-style: normal;
}
blockquote p:last-of-type { margin-bottom: var(--s-3); }
blockquote footer {
  font-size: var(--fs-sm);
  color: var(--c-fg-muted);
  font-style: normal;
}

code {
  font-family: var(--f-mono);
  font-size: 0.9em;
  background: var(--c-bg-subtle);
  padding: 0.125em 0.375em;
  border-radius: var(--radius-sm);
}

address {
  font-style: normal;
  line-height: var(--lh-normal);
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
/* Generic container helper (for inline use) */
.iot42-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* Optional inner wrapper (when a section needs explicit nesting) */
.iot42-section > .iot42-inner,
.iot42-page-hero > .iot42-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

/* Sections / page-hero — container behaviour built-in.
   Children automatically max-width:1200px and gutter padding,
   no inner wrapper required. */
.iot42-section,
.iot42-page-hero {
  padding-left: var(--content-offset);
  padding-right: var(--gutter);
}

.iot42-section {
  padding-top: var(--s-12);
  padding-bottom: var(--s-12);
  border-top: 1px solid var(--c-border);
}
.iot42-section > * {
  max-width: var(--max-w);
  margin-left: 0;
  margin-right: 0;
}
.iot42-section:first-child { border-top: 0; }

.iot42-page-hero {
  padding-top: var(--s-16);
  padding-bottom: var(--s-10);
  background: var(--c-bg-subtle);
  border-bottom: 1px solid var(--c-border);
}
.iot42-page-hero > * {
  max-width: var(--max-w);
  margin-left: 0;
  margin-right: 0;
}

/* --------------------------------------------------------------------------
   Site header / nav
   -------------------------------------------------------------------------- */
.iot42-site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--c-border);
}
@media (prefers-color-scheme: dark) {
  .iot42-site-header { background: rgba(14, 20, 27, 0.92); }
}

.iot42-site-header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--s-4) var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-6);
}

.iot42-logo {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--f-heading);
  font-weight: 700;
  font-size: var(--fs-md);
  text-decoration: none;
  color: var(--c-fg);
  letter-spacing: -0.02em;
}
.iot42-logo:hover { color: var(--c-fg); text-decoration: none; }
.iot42-logo .iot42-logo-mark {
  width: 28px; height: 28px;
  flex-shrink: 0;
}
.iot42-logo .iot42-logo-mark path { fill: var(--c-accent); }

.iot42-primary-nav { display: flex; align-items: center; gap: var(--s-6); }

.iot42-primary-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--s-5);
}

/* Top-level menu items — LEVEL 1 */
.iot42-primary-nav > ul > li {
  position: relative;
}

.iot42-primary-nav > ul > li > a {
  color: var(--c-fg);
  text-decoration: none;
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: -0.02em;
  padding: var(--s-3) var(--s-2);
  border-bottom: 3px solid transparent;
  transition: all var(--transition);
  display: block;
  background: transparent;
}

.iot42-primary-nav > ul > li > a:hover,
.iot42-primary-nav > ul > li.current-menu-item > a,
.iot42-primary-nav > ul > li.current-menu-parent > a,
.iot42-primary-nav > ul > li > a[aria-current="page"] {
  color: var(--c-accent);
  border-bottom-color: var(--c-accent);
  background: rgba(0, 102, 179, 0.05);
}

/* Submenu container — LEVEL 2 */
.iot42-primary-nav .sub-menu,
.iot42-primary-nav ul ul {
  display: none;
  position: absolute;
  top: calc(100% + 2px);
  left: -var(--s-4);
  right: auto;
  background: var(--c-bg-elevated);
  border: 1px solid var(--c-border);
  border-top: 3px solid var(--c-accent);
  flex-direction: column;
  gap: 0;
  padding: 0;
  margin: 0;
  min-width: 260px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  z-index: 1001;
}

@media (prefers-color-scheme: dark) {
  .iot42-primary-nav .sub-menu,
  .iot42-primary-nav ul ul {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  }
}

/* Show submenu on hover/active */
.iot42-primary-nav > ul > li:hover .sub-menu,
.iot42-primary-nav > ul > li:hover ul ul,
.iot42-primary-nav > ul > li.current-menu-parent .sub-menu,
.iot42-primary-nav > ul > li.current-menu-parent ul ul {
  display: flex;
}

/* Force-collapse submenu after a child link is clicked (set by JS) so the
   open dropdown does not overlay content during navigation. The next
   mouseleave / focusout removes the attribute and normal hover resumes. */
.iot42-primary-nav > ul > li[data-iot42-collapsed="true"] .sub-menu,
.iot42-primary-nav > ul > li[data-iot42-collapsed="true"] ul ul {
  display: none !important;
}

/* Submenu items — LEVEL 2 STYLING */
.iot42-primary-nav .sub-menu a,
.iot42-primary-nav ul ul a {
  color: var(--c-fg);
  text-decoration: none;
  font-size: var(--fs-xs);
  font-weight: 500;
  padding: var(--s-3) var(--s-4);
  border-left: 4px solid transparent;
  transition: all var(--transition);
  display: block;
  background: transparent;
  border-bottom: 1px solid var(--c-border);
}

.iot42-primary-nav .sub-menu a:last-child,
.iot42-primary-nav ul ul a:last-child {
  border-bottom: none;
}

.iot42-primary-nav .sub-menu a:hover,
.iot42-primary-nav .sub-menu li.current-menu-item > a,
.iot42-primary-nav .sub-menu a[aria-current="page"],
.iot42-primary-nav ul ul a:hover,
.iot42-primary-nav ul ul li.current-menu-item > a,
.iot42-primary-nav ul ul a[aria-current="page"] {
  background: var(--c-bg-subtle);
  color: var(--c-accent);
  border-left-color: var(--c-accent);
  font-weight: 600;
}

/* All primary nav links (generic fallback) */
.iot42-primary-nav a {
  color: var(--c-fg);
  text-decoration: none;
  font-size: var(--fs-sm);
  font-weight: 500;
  padding: var(--s-2) 0;
  border-bottom: 2px solid transparent;
  transition: border-color var(--transition);
}

/* Lang switcher */
.iot42-lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--c-fg-muted);
}
.iot42-lang-switcher a,
.iot42-lang-switcher span {
  padding: var(--s-1) var(--s-2);
  text-decoration: none;
  color: var(--c-fg-muted);
  border-radius: var(--radius-sm);
}
.iot42-lang-switcher a:hover { color: var(--c-fg); background: var(--c-bg-subtle); }
.iot42-lang-switcher [aria-current="true"] { color: var(--c-fg); font-weight: 700; }

/* Mobile menu toggle */
.iot42-menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--c-border-strong);
  border-radius: var(--radius-sm);
  padding: var(--s-2) var(--s-3);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--c-fg);
  cursor: pointer;
  align-items: center;
  gap: var(--s-2);
}
.iot42-menu-toggle:hover { background: var(--c-bg-subtle); }
.iot42-menu-toggle .iot42-burger {
  width: 18px; height: 14px;
  position: relative;
  display: inline-block;
}
.iot42-menu-toggle .iot42-burger::before,
.iot42-menu-toggle .iot42-burger::after,
.iot42-menu-toggle .iot42-burger > span {
  content: ""; position: absolute; left: 0; right: 0;
  height: 2px; background: var(--c-fg);
}
.iot42-menu-toggle .iot42-burger::before { top: 0; }
.iot42-menu-toggle .iot42-burger > span { top: 6px; }
.iot42-menu-toggle .iot42-burger::after { bottom: 0; }

@media (max-width: 900px) {
  .iot42-menu-toggle { display: inline-flex; }
  .iot42-primary-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--c-bg);
    border-bottom: 1px solid var(--c-border);
    flex-direction: column;
    align-items: stretch;
    padding: var(--s-4) var(--gutter);
    gap: var(--s-2);
    display: none;
  }
  .iot42-primary-nav[data-open="true"] { display: flex; }
  .iot42-primary-nav ul { flex-direction: column; gap: 0; width: 100%; }
  
  /* Mobile LEVEL 1 — Top-level items (bold, full-width) */
  .iot42-primary-nav > ul > li > a {
    padding: var(--s-4) var(--s-3);
    border-bottom: 1px solid var(--c-border);
    font-weight: 700;
    color: var(--c-fg);
    font-size: var(--fs-sm);
    letter-spacing: -0.02em;
    background: transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .iot42-primary-nav > ul > li > a:hover,
  .iot42-primary-nav > ul > li.current-menu-parent > a {
    background: rgba(0, 102, 179, 0.05);
    color: var(--c-accent);
  }
  
  /* Mobile LEVEL 2 — Submenus (indented, background, left border) */
  .iot42-primary-nav .sub-menu,
  .iot42-primary-nav ul ul {
    position: static;
    display: none;
    background: var(--c-bg-subtle);
    border-left: 4px solid var(--c-accent);
    border-bottom: 1px solid var(--c-border);
    box-shadow: none;
    padding: 0;
    min-width: auto;
    margin: 0;
  }
  
  /* Show mobile submenu on active parent */
  .iot42-primary-nav > ul > li.current-menu-parent .sub-menu,
  .iot42-primary-nav > ul > li.current-menu-parent ul ul {
    display: flex;
  }

  /* Same collapse-on-click override for mobile (mirrors desktop behaviour). */
  .iot42-primary-nav > ul > li[data-iot42-collapsed="true"] .sub-menu,
  .iot42-primary-nav > ul > li[data-iot42-collapsed="true"] ul ul {
    display: none !important;
  }
  
  /* Mobile LEVEL 2 items — smaller, indented, with left border */
  .iot42-primary-nav .sub-menu a,
  .iot42-primary-nav ul ul a {
    padding: var(--s-3) var(--s-4) var(--s-3) var(--s-6);
    border-left: none;
    border-bottom: 1px solid var(--c-border-strong);
    font-size: var(--fs-xs);
    font-weight: 500;
    color: var(--c-fg);
    background: transparent;
    transition: all var(--transition);
  }
  
  .iot42-primary-nav .sub-menu a:hover,
  .iot42-primary-nav .sub-menu li.current-menu-item > a,
  .iot42-primary-nav ul ul a:hover,
  .iot42-primary-nav ul ul li.current-menu-item > a {
    background: var(--c-bg-elevated);
    color: var(--c-accent);
    font-weight: 600;
  }
  
  /* Generic fallback */
  .iot42-primary-nav a { padding: var(--s-3) 0; border-bottom: 1px solid var(--c-border); }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.iot42-hero {
  padding: var(--s-16) var(--gutter) var(--s-12) var(--content-offset);
  position: relative;
  overflow: hidden;
}
.iot42-hero > * {
  max-width: var(--max-w);
  margin-left: 0;
  margin-right: 0;
}
.iot42-hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 85% 0%, rgba(0,102,179,0.08) 0%, transparent 60%),
    linear-gradient(180deg, var(--c-bg-subtle) 0%, var(--c-bg) 100%);
  z-index: -1;
}
.iot42-hero h1 { max-width: 22ch; }
.iot42-lead {
  font-size: var(--fs-md);
  line-height: var(--lh-normal);
  color: var(--c-fg-muted);
  max-width: var(--max-w-prose);
  margin-bottom: var(--s-6);
}

/* --------------------------------------------------------------------------
   Hero — two-column variant with visual (Homepage)
   --------------------------------------------------------------------------
   The hero on the homepage hosts a stylised SVG illustration on the right.
   Wrap the existing hero text in .iot42-hero__text and add a sibling
   .iot42-hero__visual that contains the inline SVG.

   On mobile (< 960px) the visual stacks below the text and shrinks.
   On reduced-motion preferences, the data-pulse animations are stopped.
-------------------------------------------------------------------------- */
.iot42-hero--with-visual {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--s-10);
  align-items: center;
}
.iot42-hero--with-visual > * { max-width: none; }
.iot42-hero__text { min-width: 0; }
.iot42-hero__visual {
  position: relative;
  width: 100%;
  max-width: 560px;
  justify-self: end;
  align-self: center;
}
.iot42-hero__visual svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Dezente Animationen für das Hero-Visual --------------------------------- */
@keyframes iot42-pulse-dot {
  0%, 100% { opacity: 0.35; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.35); }
}
@keyframes iot42-flow {
  0%   { stroke-dashoffset: 60; }
  100% { stroke-dashoffset: 0; }
}
@keyframes iot42-fade-up {
  0%   { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes iot42-soft-glow {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 0.95; }
}

.iot42-hero__visual [data-pulse] {
  transform-origin: center;
  transform-box: fill-box;
  animation: iot42-pulse-dot 3.2s ease-in-out infinite;
}
.iot42-hero__visual [data-pulse="2"] { animation-delay: 0.6s; }
.iot42-hero__visual [data-pulse="3"] { animation-delay: 1.2s; }
.iot42-hero__visual [data-pulse="4"] { animation-delay: 1.8s; }
.iot42-hero__visual [data-flow] {
  stroke-dasharray: 4 8;
  animation: iot42-flow 4.5s linear infinite;
}
.iot42-hero__visual [data-flow="2"] { animation-duration: 5.5s; }
.iot42-hero__visual [data-flow="3"] { animation-duration: 6.5s; }
.iot42-hero__visual [data-glow] {
  animation: iot42-soft-glow 4.8s ease-in-out infinite;
}
.iot42-hero__visual [data-fade] {
  animation: iot42-fade-up 0.9s ease-out both;
}
.iot42-hero__visual [data-fade="2"] { animation-delay: 0.15s; }
.iot42-hero__visual [data-fade="3"] { animation-delay: 0.30s; }

/* Stack on smaller screens — visual moves below the text */
@media (max-width: 959px) {
  .iot42-hero--with-visual {
    grid-template-columns: 1fr;
    gap: var(--s-8);
  }
  .iot42-hero__visual {
    max-width: 440px;
    justify-self: start;
  }
}

/* Respect reduced-motion preferences (WCAG 2.2 AA) */
@media (prefers-reduced-motion: reduce) {
  .iot42-hero__visual [data-pulse],
  .iot42-hero__visual [data-flow],
  .iot42-hero__visual [data-glow],
  .iot42-hero__visual [data-fade] {
    animation: none !important;
  }
}

/* CTA row */
.iot42-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin: var(--s-6) 0;
  max-width: var(--max-w);
  padding: 0;
}


/* Icon/pill row (below hero) */
.iot42-pill-row,
.iot42-hero + .iot42-pills,
.iot42-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
  margin: var(--s-8) 0 0;
  padding: 0;
  max-width: var(--max-w);
  justify-content: flex-start;
  align-items: center;
}

/* Generic flex row for alignment */
.iot42-flex-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
  margin: var(--s-6) 0;
  padding: 0;
  max-width: var(--max-w);
}

/* Buttons */
.iot42-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-5);
  font-family: var(--f-body);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
  cursor: pointer;
  line-height: 1.3;
  min-height: 44px;        /* touch target */
}
.iot42-btn-primary {
  background: var(--c-accent);
  color: var(--c-accent-fg);
  border-color: var(--c-accent);
}
.iot42-btn-primary:hover {
  background: var(--c-accent-hover);
  border-color: var(--c-accent-hover);
  color: var(--c-accent-fg);
  text-decoration: none;
}
.iot42-btn-secondary {
  background: transparent;
  color: var(--c-fg);
  border-color: var(--c-border-strong);
}
.iot42-btn-secondary:hover {
  background: var(--c-bg-subtle);
  border-color: var(--c-fg-muted);
  color: var(--c-fg);
  text-decoration: none;
}
.iot42-btn .iot42-icon { width: 1em; height: 1em; }

/* --------------------------------------------------------------------------
   Trust indicators
   -------------------------------------------------------------------------- */
.iot42-trust-indicators {
  list-style: none;
  padding: 0;
  margin: var(--s-8) 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}
.iot42-trust-indicators li {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-3);
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--c-fg-muted);
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  margin: 0;
}
.iot42-trust-indicators .iot42-icon {
  width: 14px; height: 14px;
  color: var(--c-accent);
}

/* --------------------------------------------------------------------------
   Cards (services, use cases)
   -------------------------------------------------------------------------- */
.iot42-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--s-5);
  margin-top: var(--s-6);
}

/* Desktop: explicit 4-column layout for service cards */
@media (min-width: 1024px) {
  .iot42-services .iot42-cards { grid-template-columns: repeat(4, 1fr); }
}
/* Tablet: 2 columns */
@media (min-width: 600px) and (max-width: 1023px) {
  .iot42-services .iot42-cards { grid-template-columns: repeat(2, 1fr); }
}
.iot42-card {
  background: var(--c-bg-elevated);
  border: 1px solid var(--c-border) !important;
  border-radius: var(--radius-md);
  padding: var(--s-6);
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-sm);
}
.iot42-card:hover {
  border-color: var(--c-accent);
  box-shadow: var(--shadow-md);
}
.iot42-card .iot42-card-icon {
  width: 32px; height: 32px;
  color: var(--c-accent);
  margin-bottom: var(--s-4);
}
.iot42-card h3 { margin: 0 0 var(--s-3); font-size: var(--fs-md); }
.iot42-card p { color: var(--c-fg-muted); flex: 1; margin-bottom: var(--s-4); }
.iot42-card a { font-weight: 600; }

/* --------------------------------------------------------------------------
   Service detail block (services overview page)
   -------------------------------------------------------------------------- */
.iot42-service-detail {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: var(--s-5);
}
.iot42-service-detail::before {
  content: "";
  width: 48px; height: 48px;
  background: var(--c-accent);
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
}
.iot42-service-detail h2 { margin-top: 0; }
@media (max-width: 600px) {
  :root { --content-offset: var(--gutter); }
  .iot42-service-detail { grid-template-columns: 1fr; }
  .iot42-service-detail::before { display: none; }
}

/* --------------------------------------------------------------------------
   Testimonials
   -------------------------------------------------------------------------- */
.iot42-testimonials blockquote {
  margin-bottom: var(--s-5);
  position: relative;
}
.iot42-testimonial blockquote {
  background: var(--c-bg-elevated);
  border-left-color: var(--c-accent);
  padding: var(--s-6);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  border-top: 1px solid var(--c-border);
  border-right: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
}
.iot42-testimonial blockquote p { color: var(--c-fg); }
.iot42-testimonial blockquote footer { padding-top: var(--s-3); border-top: 1px solid var(--c-border); margin-top: var(--s-3); }

/* --------------------------------------------------------------------------
   Lead-magnet / final-cta
   -------------------------------------------------------------------------- */
.iot42-leadmagnet,
.iot42-final-cta {
  background: var(--c-bg-subtle);
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
  text-align: left;
}
.iot42-final-cta { background: var(--c-fg); color: var(--c-bg); }
.iot42-final-cta h2,
.iot42-final-cta p { color: var(--c-bg); }
.iot42-final-cta .iot42-btn-primary {
  background: var(--c-bg);
  color: var(--c-fg);
  border-color: var(--c-bg);
}
.iot42-final-cta .iot42-btn-primary:hover {
  background: var(--c-accent);
  color: var(--c-accent-fg);
  border-color: var(--c-accent);
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.iot42-form,
.wpcf7 form {
  display: grid;
  gap: var(--s-4);
  max-width: 640px;
}
.iot42-form label,
.wpcf7 form label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 600;
  margin-bottom: var(--s-2);
  color: var(--c-fg);
}
.iot42-form .required-mark,
.wpcf7 .required-mark { color: var(--c-warning); }

.iot42-form input[type="text"],
.iot42-form input[type="email"],
.iot42-form input[type="tel"],
.iot42-form select,
.iot42-form textarea,
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 select,
.wpcf7 textarea {
  width: 100%;
  padding: var(--s-3);
  font-family: inherit;
  font-size: var(--fs-base);
  color: var(--c-fg);
  background: var(--c-bg);
  border: 1px solid var(--c-border-strong);
  border-radius: var(--radius-sm);
  min-height: 44px;
}
.iot42-form textarea { min-height: 140px; resize: vertical; }
.iot42-form input:focus-visible,
.iot42-form select:focus-visible,
.iot42-form textarea:focus-visible,
.wpcf7 input:focus-visible,
.wpcf7 select:focus-visible,
.wpcf7 textarea:focus-visible {
  outline: 3px solid var(--c-focus);
  outline-offset: 2px;
  border-color: var(--c-accent);
}

.iot42-checkbox-row { display: flex; align-items: flex-start; gap: var(--s-3); }
.iot42-checkbox-row input { margin-top: 4px; flex-shrink: 0; }

/* CF7 success/error states */
.wpcf7-response-output {
  margin: var(--s-4) 0 !important;
  padding: var(--s-4) !important;
  border: 1px solid var(--c-border-strong) !important;
  border-radius: var(--radius-sm);
}
.wpcf7-mail-sent-ok { border-left: 4px solid var(--c-success) !important; background: #f0fdf4 !important; color: var(--c-fg) !important; }
.wpcf7-validation-errors,
.wpcf7-mail-sent-ng { border-left: 4px solid var(--c-warning) !important; background: #fffbeb !important; color: var(--c-fg) !important; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.iot42-site-footer {
  background: var(--c-bg-subtle);
  border-top: 1px solid var(--c-border);
  padding: var(--s-12) 0 var(--s-6);
}
.iot42-site-footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  gap: var(--s-8);
  grid-template-columns: 2fr 1fr 1fr 1fr;
}
.iot42-site-footer h2 {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-fg-muted);
  margin: 0 0 var(--s-4);
}
.iot42-site-footer ul { list-style: none; padding: 0; margin: 0; }
.iot42-site-footer li { margin-bottom: var(--s-2); }
.iot42-site-footer a { color: var(--c-fg); text-decoration: none; }
.iot42-site-footer a:hover { color: var(--c-accent); text-decoration: underline; }
.iot42-site-footer p { font-size: var(--fs-sm); color: var(--c-fg-muted); }

.iot42-footer-bottom {
  max-width: var(--max-w);
  margin: var(--s-8) auto 0;
  padding: var(--s-5) var(--gutter) 0;
  border-top: 1px solid var(--c-border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-3);
  font-size: var(--fs-xs);
  color: var(--c-fg-muted);
}

@media (max-width: 800px) {
  .iot42-site-footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .iot42-site-footer-inner { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   Utility / helpers
   -------------------------------------------------------------------------- */
.iot42-icon { display: inline-block; vertical-align: middle; flex-shrink: 0; }
.iot42-icon-lg { width: 32px; height: 32px; }
.iot42-icon-md { width: 24px; height: 24px; }
.iot42-icon-sm { width: 16px; height: 16px; }

.iot42-list-with-icons {
  list-style: none;
  padding: 0;
  display: grid;
  gap: var(--s-3);
}
.iot42-list-with-icons li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: var(--s-3);
  align-items: start;
  margin: 0;
}
.iot42-list-with-icons .iot42-icon {
  color: var(--c-accent);
  margin-top: 4px;
}

/* Print */
@media print {
  .iot42-site-header,
  .iot42-site-footer,
  .iot42-cta-row,
  .iot42-leadmagnet,
  .iot42-final-cta { display: none; }
  body { color: #000; background: #fff; }
  a { color: #000; text-decoration: underline; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 0.85em; }
}
