/* piSmart product pages, pironex technology GmbH
   Shared stylesheet for all piSmart landing pages (DE/EN). No build step. */

/* ---------- fonts (self-hosted, IBM Plex, SIL OFL 1.1, see ../fonts/OFL.txt) ---------- */
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

/* ---------- tokens ---------- */
:root {
  color-scheme: light;
  /* light, ink ramp */
  --page: #f5f7fa; --card: #ffffff; --raised: #eceff4;
  --ink: #111827; --ink-2: #4b5565; --ink-3: #626b7f; --line: rgba(17, 24, 39, .08);
  /* dark, ink ramp */
  --d-deep: #07080d; --d-bg: #0b0d14; --d-card: #11141c; --d-raised: #1a1e28;
  --d-ink: #eef0f5; --d-ink-2: #a3a9b8; --d-ink-3: #7a8296; --d-line: rgba(238, 240, 245, .08);
  /* pironex */
  --accent: #c31f2c; --accent-press: #a91b26;
  --ok: #4cc38a; --amber: #d4a03a;
  --sans: "IBM Plex Sans", -apple-system, "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --flag: polygon(0 0, 72% 0, 100% 50%, 72% 100%, 0 100%);
  --wrap: 1160px;
  --header-h: 64px;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px)); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { font-family: var(--sans); font-size: 16px; line-height: 1.6; color: var(--ink); background: var(--page); -webkit-font-smoothing: antialiased; padding-bottom: env(safe-area-inset-bottom, 0px); }
img, video { max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }
h1, h2, h3 { font-weight: 500; }
h2 { font-size: clamp(28px, 3.6vw, 36px); line-height: 1.15; letter-spacing: -0.01em; margin-bottom: 16px; }
h3 { font-size: 17px; line-height: 1.4; margin-bottom: 8px; }
.lead { font-size: 18px; line-height: 1.65; color: var(--ink-2); max-width: 36rem; }
section { padding: 112px 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* skip link */
.skip { position: absolute; left: 16px; top: -64px; z-index: 20; background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 8px; text-decoration: none; font-weight: 500; }
.skip:focus { top: 12px; }

/* signature: the pironex flag as a marker */
.kicker { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 13px; color: var(--ink-3); margin-bottom: 16px; }
.kicker::before { content: ""; width: 12px; height: 12px; background: var(--accent); clip-path: var(--flag); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 20px; border-radius: 8px; font-weight: 500; font-size: 16px; text-decoration: none; transition: background-color .15s var(--ease), border-color .15s var(--ease), transform .12s var(--ease); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn:active { transform: scale(.98); }
.btn:focus-visible, header a:focus-visible, .final a:focus-visible, footer a:focus-visible { outline: 2px solid var(--d-ink); outline-offset: 2px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-press); }
.btn-secondary { background: var(--d-raised); color: var(--d-ink); box-shadow: inset 0 0 0 1px var(--d-line), inset 0 1px 0 rgba(255,255,255,.06); }
.btn-secondary:hover { background: #222736; }
.btn-light { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(17, 24, 39, .14); }
.btn-light:hover { background: var(--raised); }
.btn-light:focus-visible { outline-color: var(--accent); }

/* ---------- header ---------- */
header { position: sticky; top: 0; z-index: 10; padding-top: env(safe-area-inset-top, 0px); background: rgba(11, 13, 20, .92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--d-line); }
header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--header-h); }
header .logo svg { width: 88px; height: 36px; display: block; }
header nav { display: flex; align-items: center; gap: 32px; font-size: 15px; }
header nav a { color: var(--d-ink-2); text-decoration: none; transition: color .15s var(--ease); }
header nav a:hover { color: var(--d-ink); }
header nav .btn { height: 36px; padding: 0 16px; font-size: 15px; color: #fff; }
.lang { display: flex; gap: 2px; font-family: var(--mono); font-size: 13px; }
.lang a, .lang span { padding: 4px 6px; border-radius: 4px; }
.lang [aria-current] { color: var(--d-ink); background: var(--d-raised); }

/* ---------- hero ---------- */
.hero { background: var(--d-bg); color: var(--d-ink); padding: 64px 0 80px; }
.hero .wrap { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: center; min-height: min(calc(100svh - 208px), 640px); }
.hero .name { font-family: var(--mono); font-size: 13px; color: var(--d-ink-3); margin-bottom: 24px; }
.hero h1 { font-size: clamp(40px, 5vw, 60px); line-height: 1.06; letter-spacing: -0.03em; margin-bottom: 24px; }
.hero .lead { color: var(--d-ink-2); }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 40px; }
.hero .note { margin-top: 16px; font-size: 14px; color: var(--d-ink-3); }
.hero .note a { color: var(--d-ink-2); }
.device svg { width: 100%; height: auto; display: block; }
.device .device-m { display: none; }
.flow { stroke-dasharray: 4 8; animation: flow 2s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -24; } }
@media (prefers-reduced-motion: reduce) { .flow { animation: none; } }

/* ---------- facts strip ---------- */
.facts { background: var(--card); border-bottom: 1px solid var(--line); padding: 0; }
.facts ul { display: grid; grid-template-columns: repeat(4, 1fr); list-style: none; padding: 0; }
.facts li { padding: 32px 24px; border-left: 1px solid var(--line); }
.facts li:first-child { border-left: 0; padding-left: 0; }
.facts b { display: block; font-size: 18px; font-weight: 500; margin-bottom: 4px; }
.facts span { color: var(--ink-2); font-size: 15px; }

/* ---------- benefits ---------- */
.benefits { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 56px; padding: 0; list-style: none; }
.benefits li { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 28px 32px; }
.benefits h3 { display: flex; align-items: center; gap: 10px; }
.benefits h3::before { content: ""; flex: none; width: 10px; height: 10px; background: var(--accent); clip-path: var(--flag); }
.benefits p { color: var(--ink-2); font-size: 15px; }

/* ---------- product photo ---------- */
.photo { margin: 0; }
.photo img { display: block; width: 100%; height: auto; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.photo figcaption { margin-top: 12px; font-size: 14px; color: var(--ink-3); }
.product { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.product .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }

/* ---------- features ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px 40px; margin-top: 64px; }
.feature { border-top: 1px solid var(--line); padding-top: 24px; }
.feature svg { width: 18px; height: 18px; color: var(--ink-2); margin-bottom: 16px; display: block; }
.feature p { color: var(--ink-2); font-size: 15px; }

/* ---------- power: timeline ---------- */
.power { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.power .wrap { display: grid; grid-template-columns: 1fr 1.3fr; gap: 64px; align-items: center; }
.tl { background: var(--page); border: 1px solid var(--line); border-radius: 16px; padding: 32px; display: grid; grid-template-columns: 96px 1fr; row-gap: 20px; align-items: center; position: relative; }
.tl-label { font-family: var(--mono); font-size: 13px; color: var(--ink-2); }
.tl-track { position: relative; height: 12px; }
.tl-track i { position: absolute; top: 0; bottom: 0; border-radius: 4px; }
.tl-axis { grid-column: 2; grid-row: 1 / 6; position: absolute; inset: 0; pointer-events: none; }
.tl-axis::before { content: ""; position: absolute; left: 40%; top: 4px; bottom: 4px; border-left: 1px dashed var(--ink-3); }
.tl-event { padding-left: calc(40% + 8px); font-family: var(--mono); font-size: 13px; color: var(--ink); }
.supply-on { left: 0; width: 40%; background: var(--ink); }
.supply-off { left: 40%; right: 0; border: 1px dashed rgba(17, 24, 39, .2); }
.battery { left: 40%; right: 0; background: linear-gradient(90deg, var(--accent) 60%, rgba(195, 31, 44, .25)); }
.writes { left: 0; right: 0; background: repeating-linear-gradient(90deg, var(--ink-2) 0 3px, transparent 3px 12px); opacity: .7; }
.sends { left: 0; right: 0; background: repeating-linear-gradient(90deg, var(--ink-3) 0 3px, transparent 3px 36px); opacity: .7; }
.tl-phases { grid-column: 2; display: flex; font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.tl-phases span:first-child { width: 40%; }
.tl-phases span:last-child { padding-left: 8px; }
.points { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.points div { border-top: 1px solid var(--line); padding-top: 20px; }
.points p { color: var(--ink-2); font-size: 15px; }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; margin-top: 64px; padding: 0; list-style: none; counter-reset: s; }
.steps li::before { counter-increment: s; content: counter(s); display: flex; align-items: center; padding-left: 12px; width: 44px; height: 32px; margin-bottom: 20px; background: var(--accent); color: #fff; font-family: var(--mono); font-size: 14px; font-weight: 500; clip-path: var(--flag); }
.steps p { color: var(--ink-2); font-size: 15px; }

/* ---------- console recording ---------- */
.demo { margin-top: 80px; }
.demo h3 { font-size: 20px; font-weight: 500; }
.demo > p { color: var(--ink-2); font-size: 15px; margin-top: 8px; max-width: 40rem; }
.clip { margin: 32px 0 0; max-width: 960px; }
.clip video { display: block; width: 100%; height: auto; aspect-ratio: 960 / 600; background: var(--raised); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.06); }
.clip figcaption { margin-top: 12px; font-size: 14px; color: var(--ink-3); }

/* ---------- use cases ---------- */
.cases { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 64px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.cases article { padding: 32px; border-left: 1px solid var(--line); }
.cases article:first-child { border-left: 0; }
.cases p { color: var(--ink-2); font-size: 15px; }

/* ---------- specs ---------- */
.specs-sec { background: var(--card); border-top: 1px solid var(--line); }
.specs { display: grid; grid-template-columns: 1fr 1.4fr; gap: 64px; align-items: start; }
.specs .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 16px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:first-child th, tr:first-child td { border-top: 1px solid var(--line); }
th { width: 36%; padding-right: 24px; color: var(--ink-3); font-weight: 400; }
.table-note { margin-top: 16px; font-size: 14px; color: var(--ink-3); }

/* ---------- closing / contact ---------- */
.final { background: var(--d-bg); color: var(--d-ink); text-align: center; }
.final h2 { margin-bottom: 16px; }
.final .lead { color: var(--d-ink-2); margin: 0 auto 40px; }
.final .cta { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.contact { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 880px; margin: 48px auto 0; padding: 0; list-style: none; text-align: left; }
.contact li { background: var(--d-card); border: 1px solid var(--d-line); border-radius: 12px; padding: 20px 24px; }
.contact .label { display: block; font-family: var(--mono); font-size: 12px; color: var(--d-ink-3); margin-bottom: 4px; }
.contact a { color: var(--d-ink); text-decoration: none; overflow-wrap: anywhere; }
.contact a:hover { text-decoration: underline; }

/* ---------- footer ---------- */
footer { background: var(--d-deep); color: var(--d-ink-3); font-size: 13px; padding: 32px 0; border-top: 1px solid var(--d-line); }
footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px 32px; flex-wrap: wrap; }
footer .brand { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
footer svg { width: 72px; height: 28px; display: block; }
footer nav ul { display: flex; flex-wrap: wrap; gap: 8px 24px; list-style: none; padding: 0; }
footer nav a { color: var(--d-ink-2); text-decoration: none; }
footer nav a:hover { color: var(--d-ink); text-decoration: underline; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  section { padding: 80px 0; }
  .hero .wrap, .power .wrap, .product .wrap, .specs { grid-template-columns: 1fr; min-height: 0; gap: 48px; }
  .features { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .cases { grid-template-columns: 1fr; }
  .cases article { border-left: 0; border-top: 1px solid var(--line); }
  .cases article:first-child { border-top: 0; }
  .facts ul { grid-template-columns: 1fr 1fr; }
  .facts li:nth-child(3) { border-left: 0; padding-left: 0; }
  .facts li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .contact { grid-template-columns: 1fr; max-width: 480px; }
  header nav { gap: 20px; }
  header nav a:not(.btn):not(.lang a) { display: none; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  section { padding: 64px 0; }
  .hero { padding: 48px 0 64px; }
  .hero h1 { font-size: 38px; }
  .features, .steps, .points, .facts ul, .benefits { grid-template-columns: 1fr; }
  .facts li { border-left: 0; padding: 24px 0; }
  .facts li + li { border-top: 1px solid var(--line); }
  .tl { padding: 20px; grid-template-columns: 80px 1fr; }
  .tl-label { font-size: 12px; }
  th { width: 40%; }
  header .wrap { gap: 12px; }
  header nav { gap: 12px; }
  header nav .btn { padding: 0 12px; }
  .device .device-d { display: none; }
  .device .device-m { display: block; max-width: 360px; margin: 0 auto; }
}
@media (max-width: 380px) {
  /* logo + DE/EN + CTA must fit 288px (320px screen minus gutters) */
  header .logo svg { width: 64px; height: 26px; }
  header .wrap, header nav { gap: 8px; }
  header nav .btn { padding: 0 10px; font-size: 14px; }
  .lang a, .lang span { padding: 4px; }
}
