/* Kalsma Tech. Mobile first: base rules are for phones, then 700px and 1000px. */

/* Self-hosted fonts (latin subset, variable weight). Paths are relative to this file. */
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-latin-var.woff2") format("woff2");
}
@font-face {
  font-family: "Space Grotesk"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url("../fonts/space-grotesk-latin-var.woff2") format("woff2");
}

:root {
  --red: #e11d48;
  --red-2: #fb4b6d;
  --blue: #38bdf8;
  --blue-2: #0ea5e9;
  --radius: 18px;
  --max: 1180px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-head: "Space Grotesk", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --grad: linear-gradient(135deg, var(--red), var(--blue-2));
}

:root, [data-theme="dark"] {
  --bg: #070b14;
  --bg-2: #0d1424;
  --surface: rgba(255, 255, 255, .045);
  --surface-2: rgba(255, 255, 255, .08);
  --border: rgba(255, 255, 255, .1);
  --text: #e8ecf5;
  --muted: #94a1ba;
  --accent: var(--blue);
  --nav-bg: rgba(7, 11, 20, .72);
  --shadow: 0 20px 50px rgba(0, 0, 0, .45);
  --grid-line: rgba(255, 255, 255, .045);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f7f8fc;
  --bg-2: #eceff7;
  --surface: #ffffff;
  --surface-2: #f1f3fa;
  --border: rgba(11, 18, 32, .11);
  --text: #0b1220;
  --muted: #55627a;
  --accent: #0284c7;
  --nav-bg: rgba(247, 248, 252, .8);
  --shadow: 0 18px 40px rgba(20, 30, 60, .12);
  --grid-line: rgba(11, 18, 32, .05);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); background: var(--bg); color: var(--text);
  line-height: 1.65; overflow-x: hidden; transition: background .3s, color .3s;
}
body::before { /* faint tech grid behind everything */
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 75%);
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4, .brand, .stat strong, .step::before {
  font-family: var(--font-head);
}
h1, h2, h3, h4 { line-height: 1.12; margin: 0 0 .6rem; letter-spacing: -.025em; font-weight: 700; }
h1 { font-size: clamp(2.2rem, 7.5vw, 4.2rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.7rem, 4.8vw, 2.6rem); letter-spacing: -.03em; }
h3 { font-size: 1.2rem; letter-spacing: -.015em; }
p { margin: 0 0 1rem; color: var(--muted); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

.container { width: min(100% - 2.2rem, var(--max)); margin-inline: auto; }
.section { padding: 4.5rem 0; position: relative; }
.section.alt { background: linear-gradient(180deg, transparent, var(--bg-2), transparent); }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem; font-size: .78rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: .9rem;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--grad); border-radius: 2px; }
.section-head { max-width: 680px; margin-bottom: 2.4rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50; background: var(--nav-bg);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--text); font-weight: 800; letter-spacing: .08em; font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
.brand-logo { display: block; height: 38px; width: auto; }
.nav-links {
  position: fixed; inset: 68px 0 auto 0; background: var(--bg); border-bottom: 1px solid var(--border);
  display: none; flex-direction: column; padding: 1rem 1.1rem 1.4rem; gap: .2rem; box-shadow: var(--shadow);
}
.nav-links.open { display: flex; }
.nav-links a { color: var(--muted); padding: .75rem .9rem; border-radius: 10px; font-weight: 600; }
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav-links a.active { box-shadow: inset 0 -2px 0 var(--red); }
.nav-actions { display: flex; align-items: center; gap: .5rem; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); display: grid; place-items: center; cursor: pointer; font-size: 1.1rem; transition: .2s;
}
.icon-btn:hover { border-color: var(--blue); color: var(--accent); }
.nav-actions .nav-cta { display: none; } /* desktop only; see 1000px breakpoint */

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem; padding: .85rem 1.4rem;
  border-radius: 12px; font-weight: 700; font-size: .95rem; border: 1px solid transparent; cursor: pointer;
  transition: transform .2s, box-shadow .2s, background .2s; font-family: inherit; text-decoration: none !important;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(135deg, var(--red), #be123c); color: #fff; box-shadow: 0 8px 26px rgba(225, 29, 72, .38); }
.btn-primary:hover { box-shadow: 0 12px 34px rgba(225, 29, 72, .55); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--blue); color: var(--accent); box-shadow: 0 0 24px rgba(56, 189, 248, .2); }
.btn-wa { background: #16a34a; color: #fff; box-shadow: 0 8px 24px rgba(22, 163, 74, .32); }
.btn-sm { padding: .55rem 1rem; font-size: .85rem; border-radius: 10px; }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }

/* Hero */
.hero { padding: 4.5rem 0 4rem; position: relative; overflow: hidden; }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; filter: blur(90px); z-index: -1; opacity: .5; }
.hero::before { width: 420px; height: 420px; background: var(--red); top: -120px; left: -140px; opacity: .32; }
.hero::after { width: 460px; height: 460px; background: var(--blue-2); bottom: -180px; right: -140px; opacity: .28; }
.hero-grid { display: grid; gap: 3rem; align-items: center; }
.hero h1 { margin-bottom: 1.1rem; }
.hero .lead { font-size: 1.1rem; max-width: 560px; }
.badge {
  display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .85rem; border-radius: 99px; font-size: .8rem; font-weight: 600;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted); margin-bottom: 1.2rem;
}
.badge i { color: var(--red-2); }
.page-hero { padding: 4rem 0 2.5rem; position: relative; overflow: hidden; }
.page-hero::before { content: ""; position: absolute; width: 380px; height: 380px; background: var(--red); filter: blur(100px); opacity: .22; top: -180px; right: -100px; z-index: -1; border-radius: 50%; }
.page-hero .lead { max-width: 680px; font-size: 1.1rem; }
.crumbs { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; font-size: .85rem; color: var(--muted); margin-bottom: 1.2rem; }
.crumbs a { color: var(--muted); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; margin-top: 2rem; }
.stat { padding: 1rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.stat strong { display: block; font-size: 1.5rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { font-size: .8rem; color: var(--muted); }

/* Placeholders: swap the .ph content for an <img> and the label hides itself */
.ph {
  position: relative; width: 100%; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden;
  border: 1px dashed color-mix(in srgb, var(--blue) 55%, transparent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--red) 14%, var(--bg-2)), color-mix(in srgb, var(--blue-2) 16%, var(--bg-2)));
  display: grid; place-items: center; text-align: center; color: var(--muted); padding: 1rem;
}
.ph.wide { aspect-ratio: 16 / 9; }
.ph.square { aspect-ratio: 1; }
.ph.tall { aspect-ratio: 3 / 4; }
.ph.round { border-radius: 50%; aspect-ratio: 1; }
.ph-label i { display: block; font-size: 2rem; color: var(--accent); margin-bottom: .4rem; }
.ph-label { font-size: .8rem; font-weight: 600; letter-spacing: .02em; }
.ph-label small { display: block; font-weight: 400; opacity: .8; }
.ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph:has(img) { border-style: solid; }
.ph:has(img) .ph-label { display: none; }
.hero-visual { position: relative; }
.hero-visual .ph { box-shadow: var(--shadow); }
.float-chip {
  position: absolute; display: flex; align-items: center; gap: .55rem; padding: .6rem .9rem; border-radius: 14px; font-size: .82rem; font-weight: 600;
  background: var(--nav-bg); backdrop-filter: blur(12px); border: 1px solid var(--border); box-shadow: var(--shadow); color: var(--text);
  animation: float 5s ease-in-out infinite;
}
.float-chip i { color: var(--accent); font-size: 1.1rem; }
.float-chip.a { top: 6%; left: .6rem; }
.float-chip.b { bottom: 8%; right: .6rem; animation-delay: -2.5s; }
@media (min-width: 1000px) { .float-chip.a { left: -4%; } .float-chip.b { right: -3%; } }
@keyframes float { 50% { transform: translateY(-10px); } }

/* Cards */
.grid { display: grid; gap: 1.2rem; }
.card {
  position: relative; padding: 1.6rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  backdrop-filter: blur(8px); transition: transform .25s, border-color .25s, box-shadow .25s; display: flex; flex-direction: column; color: inherit;
}
.card:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--blue) 60%, transparent); box-shadow: 0 16px 40px rgba(56, 189, 248, .12); text-decoration: none; }
a.card:hover h3 { color: var(--accent); }
.card p:last-child { margin-bottom: 0; }
.icon-box {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; margin-bottom: 1.1rem; flex-shrink: 0;
  color: #fff; background: var(--grad); box-shadow: 0 8px 22px rgba(225, 29, 72, .3);
}
.icon-box.blue { background: linear-gradient(135deg, var(--blue), var(--blue-2)); box-shadow: 0 8px 22px rgba(14, 165, 233, .3); }
.card .more { margin-top: auto; padding-top: 1rem; font-weight: 700; font-size: .9rem; display: inline-flex; align-items: center; gap: .4rem; color: var(--accent); }
.card .more i { transition: transform .2s; }
.card:hover .more i { transform: translateX(4px); }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: .4rem 0 1rem; }
.tag { padding: .22rem .65rem; border-radius: 99px; font-size: .74rem; font-weight: 600; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); }
.tag.red { color: var(--red-2); border-color: color-mix(in srgb, var(--red) 40%, transparent); }
.project-card { padding: 0; overflow: hidden; }
.project-card .ph { border-radius: 0; border: 0; border-bottom: 1px dashed var(--border); }
.project-card .body { padding: 1.4rem 1.6rem 1.6rem; display: flex; flex-direction: column; flex: 1; }

/* Checklist and steps */
.checks { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .65rem; }
.checks li { display: flex; gap: .7rem; color: var(--muted); }
.checks i { color: var(--red-2); margin-top: .2rem; flex-shrink: 0; }
.steps { counter-reset: s; display: grid; gap: 1.2rem; }
.step { position: relative; padding: 1.5rem 1.5rem 1.5rem 1.5rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.step::before {
  counter-increment: s; content: "0" counter(s); font-size: 2.2rem; font-weight: 800; line-height: 1; display: block; margin-bottom: .7rem;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.split { display: grid; gap: 2.5rem; align-items: center; }

/* CTA band */
.cta {
  position: relative; overflow: hidden; text-align: center; padding: 3.2rem 1.5rem; border-radius: 28px; border: 1px solid var(--border);
  background: linear-gradient(135deg, color-mix(in srgb, var(--red) 22%, var(--bg-2)), color-mix(in srgb, var(--blue-2) 20%, var(--bg-2)));
}
.cta p { max-width: 560px; margin-inline: auto; color: var(--text); opacity: .85; }
.cta .btn-row { justify-content: center; }

/* Contact */
.channel { align-items: flex-start; }
.channel.recommended { border-color: color-mix(in srgb, var(--red) 65%, transparent); box-shadow: 0 0 40px rgba(225, 29, 72, .15); }
.channel .badge { margin: 0 0 .8rem; color: var(--red-2); }
.socials { display: flex; flex-wrap: wrap; gap: .7rem; }
.socials a {
  display: inline-flex; align-items: center; gap: .55rem; padding: .65rem 1rem; border-radius: 12px; background: var(--surface); border: 1px solid var(--border);
  color: var(--text); font-weight: 600; font-size: .9rem; transition: .2s;
}
.socials a:hover { border-color: var(--blue); color: var(--accent); text-decoration: none; transform: translateY(-2px); }
.socials.round a { width: 42px; height: 42px; padding: 0; justify-content: center; font-size: 1.1rem; }
.qa-list { display: grid; gap: .6rem; }
.qa-list a { display: flex; align-items: center; justify-content: space-between; padding: .8rem 1rem; border-radius: 12px; background: var(--surface-2); color: var(--text); font-weight: 600; font-size: .9rem; }
.qa-list a:hover { text-decoration: none; color: var(--accent); }

/* Insights */
.filters { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1.8rem; }
.chip { padding: .5rem 1rem; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-weight: 600; font-size: .88rem; cursor: pointer; font-family: inherit; display: inline-flex; gap: .5rem; align-items: center; }
.chip.active, .chip:hover { color: #fff; background: var(--red); border-color: var(--red); }
.media-card { padding: 0; overflow: hidden; }
.media-card .ph { border-radius: 0; border: 0; border-bottom: 1px dashed var(--border); }
.media-card .ph:not(:has(img)) { place-items: end center; padding-bottom: .7rem; }
.media-card .ph-label i { display: none; }
.media-card .body { padding: 1.2rem 1.4rem 1.4rem; }
.media-card .play { position: absolute; inset: 0; display: grid; place-items: center; z-index: 1; pointer-events: none; }
.media-card .play i { font-size: 3rem; color: #fff; text-shadow: 0 6px 24px rgba(0, 0, 0, .6); opacity: .92; transition: transform .2s; }
.media-card:hover .play i { transform: scale(1.12); }
.platform { display: inline-flex; align-items: center; gap: .4rem; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--red-2); margin-bottom: .4rem; }

/* Footer */
.site-footer { margin-top: 3rem; border-top: 1px solid var(--border); background: var(--bg-2); padding: 3.5rem 0 1.5rem; }
.footer-grid { display: grid; gap: 2rem; }
.site-footer h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text); margin-bottom: 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.site-footer li a { color: var(--muted); }
.site-footer li a:hover { color: var(--accent); }
.footer-bottom { margin-top: 2.4rem; padding-top: 1.3rem; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem; font-size: .85rem; color: var(--muted); }
.wa-float {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 40; width: 54px; height: 54px; border-radius: 50%; background: #16a34a; color: #fff; display: grid; place-items: center;
  font-size: 1.6rem; box-shadow: 0 10px 28px rgba(22, 163, 74, .5); transition: transform .2s;
}
.wa-float:hover { transform: scale(1.08); text-decoration: none; }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

@media (min-width: 700px) {
  .grid.c2, .grid.c3, .grid.c4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; }
  .section { padding: 5.5rem 0; }
  .cta { padding: 4.5rem 3rem; }
}

@media (min-width: 1000px) {
  .nav-links { position: static; display: flex !important; flex-direction: row; padding: 0; border: 0; background: transparent; box-shadow: none; gap: .1rem; }
  .nav-links a { padding: .5rem .85rem; font-size: .93rem; }
  .menu-btn { display: none; }
  .nav-actions .nav-cta { display: inline-flex; }
  .hero { padding: 6.5rem 0 5.5rem; }
  .hero-grid { grid-template-columns: 1.1fr .9fr; }
  .split { grid-template-columns: 1fr 1fr; }
  .split.rev > :first-child { order: 2; }
  .grid.c3 { grid-template-columns: repeat(3, 1fr); }
  .grid.c4 { grid-template-columns: repeat(4, 1fr); }
  .steps { grid-template-columns: repeat(4, 1fr); }
}

/* Accessibility: skip link, visible only when focused by keyboard */
.skip-link { position: absolute; left: .75rem; top: -4rem; z-index: 1000; padding: .6rem 1rem; border-radius: 8px; background: var(--red); color: #fff; font-weight: 700; text-decoration: none; }
.skip-link:focus { top: .75rem; text-decoration: none; }
