*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  transition: background-color var(--dur-slow) var(--ease-out), color var(--dur-slow) var(--ease-out);
}
body[data-scene="light"] { background: var(--paper); }
body[data-scene="paper"] { background: var(--paper-2); }
body[data-scene="dark"] { background: var(--ink); color: var(--on-dark); }

img, video { max-width: 100%; display: block; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 4px; }
body[data-scene="dark"] :focus-visible { outline-color: var(--fig-yellow); }

.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.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; }
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius-s); }
.skip:focus { top: 12px; }

/* Scroll progress in the five logo colors */
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60; pointer-events: none; }
.progress span {
  display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--fig-red) 0 20%, var(--fig-green) 20% 40%, var(--fig-yellow) 40% 60%, var(--fig-blue) 60% 80%, var(--fig-black) 80%);
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: var(--radius-m); border: 2px solid transparent;
  font-weight: 600; text-decoration: none; cursor: pointer; letter-spacing: 0.005em;
  transition: background-color var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast) var(--ease-out);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-strong); }
.btn-ghost { border-color: var(--line); background: var(--card); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 15px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--card); cursor: pointer; box-shadow: var(--shadow-1); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: background-color var(--dur-slow), border-color var(--dur), color var(--dur-slow);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
body[data-scene="dark"] .site-header { background: color-mix(in srgb, var(--ink) 88%, transparent); color: var(--on-dark); border-bottom-color: rgb(255 255 255 / 8%); }
body[data-scene="paper"] .site-header { background: color-mix(in srgb, var(--paper-2) 90%, transparent); }
.header-row { display: flex; align-items: center; gap: var(--space-4); min-height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.logo img { width: 40px; height: 40px; }
.logo-word { font-weight: 800; font-stretch: 88%; letter-spacing: -0.01em; font-size: 19px; margin: 0; }
.nav { display: flex; gap: var(--space-4); margin-left: auto; }
.nav a { text-decoration: none; font-weight: 500; padding: 10px 2px; position: relative; white-space: nowrap; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 2px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform var(--dur) var(--ease-out); }
.nav a:hover::after, .nav a[aria-current="true"]::after { transform: scaleX(1); }
.nav-count { font-size: 12px; font-weight: 700; background: var(--brand-tint); color: var(--brand-strong); border-radius: 999px; padding: 1px 7px; margin-left: 2px; }
.nav-count:empty { display: none; }
.lang-switch { position: relative; display: inline-flex; align-items: center; }
.lang-switch .ico { position: absolute; left: 10px; width: 16px; height: 16px; pointer-events: none; }
.lang-switch select {
  appearance: none; -webkit-appearance: none; min-height: 40px; padding: 0 12px 0 32px; border-radius: var(--radius-m);
  border: 1.5px solid var(--line); background: transparent; font-size: 14px; font-weight: 600; cursor: pointer;
}
body[data-scene="dark"] .lang-switch select { border-color: rgb(255 255 255 / 25%); }
.lang-switch select option { color: var(--ink); }
@media (max-width: 960px) {
  .install-btn span { display: none; }
  .install-btn { padding: 0 10px; }
}
@media (max-width: 720px) {
  .header-row { gap: 12px; }
  .nav { gap: 14px; font-size: 15px; }
  .nav-count { display: none; }
  .lang-switch select { padding: 0 8px 0 28px; }
  .lang-switch .ico { left: 8px; }
  .nav a:first-child { display: none; }
  .logo-word { display: none; }
  .install-btn span { display: none; }
}
@media (max-width: 480px) {
  .nav { display: none; }
  .lang-switch { margin-left: auto; }
}

/* Type */
.eyebrow { margin: 0 0 var(--space-3); font-size: 15px; font-weight: 600; color: var(--brand); }
.eyebrow-dark { color: var(--fig-yellow); }
.section-title { margin: 0; font-size: clamp(34px, 5.2vw, 58px); line-height: 1.02; letter-spacing: -0.025em; font-weight: 800; font-stretch: 90%; }

/* Reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(20px); }
/* Safety net: if scripts never run, show the content anyway. */
.js .reveal:not(.is-in) { animation: reveal-fallback 0.4s 2.5s forwards; }
@keyframes reveal-fallback { to { opacity: 1; transform: none; } }
.reveal { transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* Hero: headline wraps around the globe */
.hero { padding-block: var(--space-5) var(--space-6); overflow: hidden; }
.hero-inner { display: grid; justify-items: center; text-align: center; }
.hero-title {
  margin: 0; display: grid; justify-items: center;
  font-size: clamp(38px, 7vw, 88px); line-height: 0.98; letter-spacing: -0.035em; font-weight: 800; font-stretch: 85%;
}
.hero-line { display: block; text-wrap: balance; }
.hero-globe {
  position: relative; display: block;
  width: min(92vw, clamp(300px, 46vw, 540px)); aspect-ratio: 454 / 306;
  margin-block: clamp(12px, 2.5vw, 28px) clamp(16px, 3vw, 36px);
  transform: translateY(calc(var(--parallax, 0) * 1px)) scale(calc(1 - var(--shrink, 0)));
  will-change: transform;
}
/* Soft contact shadow so the globe sits on the page instead of floating on a cutout */
.hero-globe::after {
  content: ""; position: absolute; left: 24%; right: 24%; bottom: -6%; height: 9%; z-index: -1;
  background: radial-gradient(closest-side, rgb(11 29 58 / 22%), transparent);
  filter: blur(4px);
}
.hero-globe img, .hero-globe video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.hero-globe video, .hero-globe .hero-globe-anim { opacity: 0; transition: opacity 400ms ease; }
.hero-globe.is-playing video, .hero-globe.is-playing .hero-globe-anim { opacity: 1; }
.hero-globe.is-playing .hero-globe-still { opacity: 0; transition: opacity 400ms ease 200ms; }
.hero-lead { max-width: 52ch; font-size: clamp(17px, 1.8vw, 20px); color: var(--ink-soft); margin: var(--space-4) 0 var(--space-4); }
.hero-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3); }

/* How it works */
.how { padding-block: var(--space-7); }
.how-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: var(--space-6); }
.how-sticky { position: sticky; top: 120px; align-self: start; }
.how-counter { margin: var(--space-4) 0 0; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.how-counter span { color: var(--ink); font-size: 30px; }
.how-steps { list-style: none; margin: 0; display: grid; gap: 28vh; padding: 8vh 0 18vh; }
.how-step {
  position: relative; background: var(--card); border-radius: var(--radius-l); padding: var(--space-5) var(--space-5) var(--space-5) calc(var(--space-5) + 8px);
  box-shadow: var(--shadow-1); overflow: hidden;
  opacity: 0.4; transform: translateY(12px); transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out), box-shadow var(--dur-slow);
}
.how-step::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--fig); }
.how-step.is-active { opacity: 1; transform: none; box-shadow: var(--shadow-2); }
.how-num { font-size: 15px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.how-step h3 { font-size: 30px; font-stretch: 90%; letter-spacing: -0.02em; margin: 4px 0 var(--space-2); }
.how-step p { margin: 0; color: var(--ink-soft); font-size: 18px; }
@media (max-width: 860px) {
  .how-grid { grid-template-columns: 1fr; gap: var(--space-4); }
  .how-sticky { position: static; }
  .how-counter { display: none; }
  .how-steps { gap: var(--space-3); padding: 0; }
  .how-step { opacity: 1; transform: none; }
}

/* Mission / vision statements */
.statement { padding-block: clamp(96px, 18vh, 200px); }
.statement-text { margin: 0; max-width: 24ch; font-size: clamp(30px, 4.8vw, 62px); line-height: 1.1; letter-spacing: -0.025em; font-weight: 700; font-stretch: 90%; }
.statement-text .w { color: rgb(244 247 252 / 22%); transition: color 240ms linear; }
.statement-text .w.on { color: var(--on-dark); }
.statement + .statement { padding-top: 0; }

/* Products */
.products { padding-block: var(--space-7); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-5); }
.section-sub { max-width: 40ch; margin: 0; color: var(--ink-soft); }
.toolbar { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; margin-bottom: var(--space-4); }
.search { position: relative; flex: 1 1 280px; max-width: 420px; }
.search .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { width: 100%; min-height: 48px; padding: 0 16px 0 44px; border-radius: var(--radius-m); border: 1.5px solid var(--line); background: var(--card); }
.search input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 4px rgb(7 66 183 / 12%); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 0 14px; border-radius: var(--radius-m); border: 1.5px solid var(--line); background: var(--card); font-weight: 500; font-size: 15px; cursor: pointer; transition: background-color var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast); }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.demo-note { font-size: 14px; background: #fff6d6; color: #5c4200; border-radius: var(--radius-s); padding: 10px 14px; }

.product-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }
.card {
  position: relative; display: flex; flex-direction: column; background: var(--card); border-radius: var(--radius-l);
  overflow: hidden; border: 1px solid var(--line); transition: border-color var(--dur), box-shadow var(--dur);
}
.card:hover { border-color: #c3cde0; box-shadow: var(--shadow-2); }
.card.pop { animation: pop var(--dur-slow) var(--ease-out) both; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes pop { from { opacity: 0; transform: translateY(14px); } }
.card-media { aspect-ratio: 4 / 3; background: var(--paper-2); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease-out); }
.card:hover .card-media img { transform: scale(1.03); }
/* No photo yet: quiet panel with a faded logo */
.placeholder-media { width: 100%; height: 100%; display: grid; place-items: center; background: var(--paper-2); }
.placeholder-media img { width: 80px; height: 80px; opacity: 0.35; filter: grayscale(0.6); }
.card-body { display: flex; flex-direction: column; gap: 8px; padding: var(--space-4); flex: 1; }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; padding: 3px 9px; border-radius: var(--radius-s); background: var(--paper-2); color: var(--ink-soft); }
.tag .ico { width: 14px; height: 14px; }
.card h3 { margin: 4px 0 0; font-size: 22px; font-stretch: 92%; letter-spacing: -0.015em; line-height: 1.2; }
.card h3 a { text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; } /* whole card opens detail */
.card p { margin: 0; color: var(--ink-soft); }
.card-actions { display: flex; gap: 8px; margin-top: auto; padding-top: var(--space-3); position: relative; z-index: 1; }
.card-actions .btn { flex: 1; min-height: 44px; font-size: 16px; }
.new-badge { position: absolute; top: 12px; left: 12px; z-index: 1; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: var(--radius-s); background: var(--fig-yellow); color: var(--ink); }
.skeleton { min-height: 380px; background: linear-gradient(100deg, var(--card) 40%, var(--paper-2) 50%, var(--card) 60%) var(--card); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty { text-align: center; padding: var(--space-6) var(--space-3); color: var(--ink-soft); }

/* Contact */
.contact { padding-block: var(--space-7); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: var(--space-6); align-items: start; }
.contact-intro > p { font-size: 19px; color: var(--ink-soft); }
.contact-points { list-style: none; padding: 0; margin: var(--space-5) 0 0; display: grid; gap: var(--space-4); }
.contact-points li { display: flex; gap: 14px; }
.contact-points li:nth-child(1) .ico { color: var(--fig-red); }
.contact-points li:nth-child(2) .ico { color: var(--ok); }
.contact-points li:nth-child(3) .ico { color: var(--brand); }
.contact-points .ico { margin-top: 3px; }
.contact-card { background: var(--card); border-radius: var(--radius-l); padding: var(--space-4); border: 1px solid var(--line); box-shadow: var(--shadow-2); }
@media (max-width: 860px) { .contact-grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); } }

.tabs { display: flex; gap: 4px; margin-bottom: var(--space-4); border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { flex: 1; min-height: 48px; padding: 0 12px; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px; background: transparent; font-weight: 600; font-size: 15px; white-space: nowrap; cursor: pointer; color: var(--muted); transition: color var(--dur-fast), border-color var(--dur-fast); }
.tabs button:hover { color: var(--ink); }
@media (max-width: 560px) {
  /* Let long labels wrap instead of widening the page. */
  .tabs { overflow: visible; }
  .tabs button { white-space: normal; line-height: 1.2; padding: 8px 6px; font-size: 14px; }
}
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--brand); }

/* Forms */
.form { display: grid; gap: var(--space-3); }
.field { display: grid; gap: 6px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.field label { font-weight: 600; font-size: 15px; }
.opt { font-weight: 400; color: var(--muted); }
.field input, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: var(--radius-s);
  border: 1.5px solid var(--line); background: var(--paper); font-size: 16px;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgb(7 66 183 / 12%); background: var(--card); }
.field.has-error input, .field.has-error textarea { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: 14px; font-weight: 500; margin: 0; }
.hint { margin: -4px 0 0; font-size: 14px; color: var(--muted); }
.form-error { margin: 0; padding: 10px 14px; border-radius: var(--radius-s); background: #fde7e8; color: #7a0710; font-size: 15px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-success { text-align: center; padding: var(--space-5) var(--space-3); }
.form-success:focus { outline: none; }
.form-success h3 { font-size: 26px; margin: var(--space-3) 0 var(--space-2); }
.form-success p { color: var(--ink-soft); }
.success-icon { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: #dff3e4; color: var(--ok); animation: pop var(--dur-slow) var(--ease-out); }
.success-icon .ico { width: 32px; height: 32px; }

/* Product modal */
.modal { width: min(760px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: var(--radius-l); background: var(--card); color: var(--ink); box-shadow: 0 30px 80px rgb(0 0 0 / 30%); overflow: auto; overscroll-behavior: contain; }
.modal::backdrop { background: rgb(11 29 58 / 55%); backdrop-filter: blur(3px); }
.modal[open] { animation: modal-in var(--dur) var(--ease-out); }
@keyframes modal-in { from { opacity: 0; transform: translateY(20px); } }
.modal-close-form { position: sticky; top: 0; height: 0; z-index: 2; }
.modal-close { position: absolute; right: 14px; top: 14px; }
.modal-media { aspect-ratio: 16 / 9; background: var(--paper-2); }
.modal-media img, .modal-media .placeholder-media { width: 100%; height: 100%; object-fit: cover; }
.modal-media .placeholder-media img { width: 96px; height: 96px; object-fit: contain; }
.modal-body { padding: var(--space-5); display: grid; gap: var(--space-2); }
@media (max-width: 560px) { .modal-body { padding: var(--space-4); } }
.modal-title { margin: 0; font-size: clamp(28px, 4vw, 40px); font-stretch: 90%; letter-spacing: -0.025em; line-height: 1.05; }
.modal-tagline { margin: 0; font-size: 19px; color: var(--ink-soft); }
.modal-desc { white-space: pre-line; color: var(--ink-soft); }
.modal-price { margin: 0; font-weight: 700; }
.modal-price:empty { display: none; }
.link-ext { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--brand); width: fit-content; }
.link-ext .ico { width: 16px; height: 16px; }
.interest-form { margin-top: var(--space-4); padding: var(--space-4); border-radius: var(--radius-m); background: var(--paper-2); }
.interest-form h3 { margin: 0; font-size: 21px; }

/* Footer */
.site-footer { background: var(--ink); color: var(--on-dark); padding-block: var(--space-5) calc(var(--space-5) + env(safe-area-inset-bottom)); }
.footer-row { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-5); align-items: center; justify-content: space-between; }
.footer-row p { margin: 0; }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; }
.footer-brand img { width: 36px; height: 36px; }
.site-footer .muted { color: var(--on-dark-muted); }

/* Toast */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 90; background: var(--ink); color: #fff; padding: 12px 20px; border-radius: var(--radius-m); box-shadow: var(--shadow-2); font-weight: 500; animation: pop var(--dur) var(--ease-out); max-width: calc(100% - 32px); }

@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; }
  .js .reveal { opacity: 1; transform: none; }
  .statement-text .w { color: var(--on-dark); }
  .how-step { opacity: 1; transform: none; }
  .hero-globe { transform: none; }
}
