/* ==========================================================================
   Tapansoft public site styles
   Uses the custom properties defined in tokens.css.
   ========================================================================== */

/* ---- Reset & base ------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, video, canvas, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: var(--fw-regular); letter-spacing: var(--ls-tight); line-height: var(--lh-tight); color: inherit; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding-left: 1.2em; }
:focus-visible { outline: 2px solid var(--blue-400); outline-offset: 3px; border-radius: 4px; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 2000; background: var(--color-primary); color: #fff; padding: 10px 16px; border-radius: var(--radius-pill); }
.skip-link:focus { top: 12px; }
.muted { color: var(--color-text-muted); }
.icon { width: 24px; height: 24px; flex: none; }
.icon--sm { width: 18px; height: 18px; }

/* ---- Typography -------------------------------------------------------- */
.eyebrow {
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--blue-500);
  margin: 0 0 16px;
}
.eyebrow--light { color: rgba(255, 255, 255, 0.78); }
.section__title { font-size: var(--fs-h2); max-width: 22ch; }
.section__lead { font-size: var(--fs-lead); color: var(--color-text-muted); max-width: 60ch; margin-top: 16px; }
.prose { font-size: 1.0625rem; line-height: 1.7; }
.prose--lg { font-size: 1.125rem; }
.prose p { margin-bottom: 1.2em; }
.prose h2 { font-size: 1.75rem; margin: 1.8em 0 .6em; }
.prose h3 { font-size: 1.375rem; margin: 1.6em 0 .5em; }
.prose h4 { font-size: 1.125rem; font-weight: var(--fw-medium); margin: 1.4em 0 .4em; }
.prose ul, .prose ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.prose li { margin-bottom: .4em; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose img { border-radius: var(--radius-sm); margin: 1.5em 0; }
.prose blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--blue-100); color: var(--color-text-muted); }
.prose code { font-family: var(--font-mono); font-size: .9em; background: var(--grey-100); padding: 2px 6px; border-radius: 4px; }
.prose pre { background: var(--grey-100); padding: 16px 20px; border-radius: var(--radius-sm); overflow: auto; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: .95em; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--color-border); }
.prose hr { border: 0; border-top: 1px solid var(--color-border); margin: 2.5em 0; }

/* ---- Layout ------------------------------------------------------------ */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container--narrow { max-width: calc(var(--container-narrow) + 2 * var(--gutter)); }
.section { padding: var(--section-y) 0; position: relative; }
.section--tight { padding-top: 24px; }
.section--alt {
  background: linear-gradient(180deg, var(--white) 0%, var(--grey-100) 14%, var(--grey-100) 86%, var(--white) 100%);
}
.section--fade-top { background: linear-gradient(180deg, var(--blue-50) 0%, var(--white) 38%); }
.section__intro { margin-bottom: clamp(32px, 5vw, 56px); }
.section__actions { margin-top: 40px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.section__actions--left { justify-content: flex-start; margin-top: 28px; }

.grid { display: grid; gap: var(--grid-gap); }
.grid--products { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid--products-wide { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--features { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 40px) var(--grid-gap); }
.grid--split { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---- Buttons (pills) --------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: var(--fs-sm); font-weight: var(--fw-medium); line-height: 1.2;
  letter-spacing: -0.005em;
  cursor: pointer; text-decoration: none !important; white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease-out), background-color var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast), box-shadow var(--dur-fast);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--lg { padding: 16px 32px; font-size: 1rem; }
.btn--sm { padding: 10px 18px; font-size: .875rem; }
.btn--white { background: var(--white); color: var(--ink); }
.btn--white:hover { background: var(--grey-100); }
.btn--primary { background: var(--color-primary); color: #fff; }
.btn--primary:hover { background: var(--color-primary-hover); }
.btn--dark { background: var(--charcoal); color: #fff; }
.btn--dark:hover { background: #000; }
.btn--outline { background: transparent; color: var(--ink); border-color: var(--grey-300); }
.btn--outline:hover { border-color: var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); border-color: rgba(18, 24, 38, 0.25); }
.btn--ghost:hover { background: rgba(18, 24, 38, 0.06); }
.btn--ghost-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.45); }
.btn--ghost-light:hover { background: rgba(255, 255, 255, 0.12); }
.btn--static { cursor: default; opacity: .92; }
.btn--static:hover { transform: none; }

/* "Coming soon" badge for products whose site is not live yet */
.badge-soon {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .75rem; font-weight: var(--fw-medium); letter-spacing: .02em; white-space: nowrap;
  padding: 5px 10px; border-radius: var(--radius-pill);
  background: rgba(41, 150, 207, 0.14); color: var(--blue-900);
}
.badge-soon::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--blue-400); }
.badge-soon--light { background: rgba(255, 255, 255, 0.16); color: #fff; }
.badge-soon--light::before { background: #fff; }
.product-card__badges { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; min-width: 0; }

/* ---- Floating navigation: logo on the left, glass pill starts after it --- */
.site-nav {
  position: fixed; top: var(--nav-top); left: 0; right: 0; z-index: 900;
  padding: 0 calc(var(--panel-inset) + 16px);
  pointer-events: none;
}
.site-nav__inner { max-width: var(--container); margin: 0 auto; display: flex; align-items: center; gap: 24px; }
.site-nav__brand { pointer-events: auto; display: inline-flex; align-items: center; gap: 12px; flex: none; height: var(--nav-h); }
.site-nav__brand:hover { text-decoration: none; }
.site-nav__mark { width: 48px; height: 48px; }
.site-nav__wordmark { height: 26px; width: auto; }
/* White logo over the dark hero; navy logo once the hero scrolls away or on light pages */
.site-nav__mark--dark, .site-nav__wordmark--dark { display: none; }
.site-nav.on-light .site-nav__mark--light, .site-nav.on-light .site-nav__wordmark--light { display: none; }
.site-nav.on-light .site-nav__mark--dark, .site-nav.on-light .site-nav__wordmark--dark { display: block; }
/* Once the page scrolls, the logo gets its own glass chip (white logo again) so it never collides with content */
.site-nav__brand { padding: 0; border-radius: var(--nav-radius); border: 1px solid transparent; transition: background-color .3s var(--ease-out), padding .3s var(--ease-out), border-color .3s var(--ease-out); }
.site-nav.is-scrolled .site-nav__brand {
  padding: 0 18px 0 8px;
  background: var(--nav-bg-solid);
  -webkit-backdrop-filter: blur(var(--nav-blur)) saturate(150%);
  backdrop-filter: blur(var(--nav-blur)) saturate(150%);
  border-color: var(--nav-border);
  box-shadow: var(--shadow-nav);
}
.site-nav.is-scrolled .site-nav__mark--dark, .site-nav.is-scrolled .site-nav__wordmark--dark { display: none; }
.site-nav.is-scrolled .site-nav__mark--light, .site-nav.is-scrolled .site-nav__wordmark--light { display: block; }
.site-nav__pill {
  pointer-events: auto; flex: 1; min-width: 0;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: flex-end; gap: 16px;
  padding: 0 10px 0 16px;
  border-radius: var(--nav-radius);
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(var(--nav-blur)) saturate(150%);
  backdrop-filter: blur(var(--nav-blur)) saturate(150%);
  border: 1px solid var(--nav-border);
  box-shadow: var(--shadow-nav);
  color: #fff;
  transition: background-color .3s var(--ease-out);
}
.site-nav.is-scrolled .site-nav__pill { background: var(--nav-bg-solid); }
.site-nav__links { display: flex; align-items: center; gap: 4px; }
.site-nav__link {
  color: rgba(255, 255, 255, 0.82); font-size: var(--fs-sm); font-weight: var(--fw-medium);
  padding: 10px 14px; border-radius: var(--radius-pill);
  transition: color var(--dur-fast), background-color var(--dur-fast);
}
.site-nav__link:hover, .site-nav__link.is-active { color: #fff; text-decoration: none; background: rgba(255, 255, 255, 0.08); }
.site-nav__cta { margin-left: 8px; }
.site-nav__toggle {
  display: none; width: 44px; height: 44px; border: 0; background: transparent; border-radius: 50%;
  position: relative; cursor: pointer; margin-right: -4px;
}
.site-nav__toggle-bar { position: absolute; left: 12px; right: 12px; height: 2px; background: #fff; border-radius: 2px; transition: transform .25s var(--ease-out), top .25s var(--ease-out); }
.site-nav__toggle-bar:nth-child(1) { top: 17px; }
.site-nav__toggle-bar:nth-child(2) { top: 25px; }
.site-nav.is-open .site-nav__toggle-bar:nth-child(1) { top: 21px; transform: rotate(45deg); }
.site-nav.is-open .site-nav__toggle-bar:nth-child(2) { top: 21px; transform: rotate(-45deg); }

@media (max-width: 820px) {
  .site-nav__inner { gap: 12px; }
  .site-nav__mark { width: 40px; height: 40px; }
  .site-nav__wordmark { height: 22px; }
  .site-nav__toggle { display: block; margin: 0; }
  .site-nav__pill { flex: none; width: var(--nav-h); padding: 0; justify-content: center; margin-left: auto; }
  .site-nav__links {
    position: absolute; left: calc(var(--panel-inset) + 16px); right: calc(var(--panel-inset) + 16px);
    top: calc(var(--nav-h) + 8px);
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 12px;
    border-radius: 24px;
    background: var(--nav-bg-solid);
    -webkit-backdrop-filter: blur(var(--nav-blur)) saturate(150%);
    backdrop-filter: blur(var(--nav-blur)) saturate(150%);
    border: 1px solid var(--nav-border);
    box-shadow: var(--shadow-nav);
    opacity: 0; transform: translateY(-8px); pointer-events: none;
    transition: opacity .25s var(--ease-out), transform .25s var(--ease-out);
  }
  .site-nav.is-open .site-nav__links { opacity: 1; transform: none; pointer-events: auto; }
  .site-nav__link { padding: 14px 16px; font-size: 1rem; }
  .site-nav__cta { margin: 8px 4px 4px; justify-content: center; }
}

/* ---- Background media (video / WebGL gradient) ------------------------- */
.media-bg {
  position: absolute; inset: 0; overflow: hidden;
  background: linear-gradient(135deg, var(--blue-950) 0%, var(--blue-700) 55%, var(--blue-400) 100%);
  background-size: 200% 200%;
}
.media-bg--image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media-bg__poster, .media-bg__video, .media-bg__canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.media-bg__video, .media-bg__canvas { opacity: 0; transition: opacity 1.2s ease; }
.media-bg__video.is-ready, .media-bg__canvas.is-ready { opacity: 1; }
.media-bg__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(4, 16, 32, 0.28) 0%, rgba(4, 16, 32, 0.18) 45%, rgba(4, 16, 32, 0.48) 100%);
}
.media-bg__overlay--accent { background: linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,.55)); }
.no-webgl .media-bg { animation: gradientDrift 18s ease-in-out infinite alternate; }
@keyframes gradientDrift { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

/* ---- Hero -------------------------------------------------------------- */
.hero { padding: var(--panel-inset); }
.hero__panel {
  position: relative; overflow: hidden;
  border-radius: var(--radius-sm);
  min-height: min(calc(100vh - 2 * var(--panel-inset)), 920px);
  min-height: min(calc(100svh - 2 * var(--panel-inset)), 920px);
  display: flex; align-items: center;
  background: var(--blue-950);
  color: #fff;
}
.hero__content {
  position: relative; z-index: 2;
  width: 100%; max-width: var(--container); margin: 0 auto;
  padding: calc(var(--nav-h) + 80px) var(--gutter) 88px;
}
.hero__title { font-size: var(--fs-h1); max-width: 18ch; text-wrap: balance; }
.hero__lead { font-size: var(--fs-lead); max-width: 56ch; margin-top: 20px; color: rgba(255, 255, 255, 0.86); }
.hero__actions { margin-top: 32px; display: flex; gap: 12px; flex-wrap: wrap; }

/* ---- Cards ------------------------------------------------------------- */
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--card-tint, var(--white));
  border-radius: var(--radius-sm);
  padding: clamp(24px, 3vw, 32px);
  color: var(--ink);
  border: 1px solid transparent;
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out);
}
a.card:hover { text-decoration: none; transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.card--tint { margin-bottom: var(--grid-gap); }
.card__category {
  display: inline-block; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-size: .7rem; font-weight: var(--fw-medium); letter-spacing: .04em; text-transform: uppercase;
  color: var(--blue-900); background: rgba(5, 53, 94, 0.07); padding: 5px 10px; border-radius: var(--radius-pill);
}
.card__title { font-size: var(--fs-h3); font-weight: var(--fw-medium); margin: 20px 0 8px; letter-spacing: -0.01em; }
.card__title a { color: inherit; }
.card__text { color: var(--color-text-muted); font-size: var(--fs-body); }
.card__link { margin-top: auto; padding-top: 24px; display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; font-weight: var(--fw-medium); color: var(--color-primary); }
.card__link .icon { transition: transform var(--dur-fast) var(--ease-out); }
a.card:hover .card__link .icon { transform: translateX(4px); }

.product-card { min-height: 280px; }
.product-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.product-card__logo {
  display: grid; place-items: center; width: 60px; height: 60px; flex: none;
  background: var(--white); border-radius: 14px; box-shadow: var(--shadow-card); overflow: hidden;
}
.product-card__logo img { width: 44px; height: 44px; object-fit: contain; }
.product-card__logo--initial { font-size: 1.5rem; font-weight: var(--fw-medium); color: var(--accent, var(--blue-900)); }
.product-tile { min-height: 320px; }
.product-tile__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.product-tile__desc { color: var(--color-text-muted); font-size: var(--fs-sm); margin-top: 12px; }
.product-tile__actions { margin-top: auto; padding-top: 28px; display: flex; gap: 10px; flex-wrap: wrap; }

/* ---- Feature grid ------------------------------------------------------ */
.feature { display: flex; flex-direction: column; }
.feature__icon {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px;
  background: var(--blue-50); color: var(--blue-900); margin-bottom: 20px;
}
.feature__icon--accent { background: color-mix(in srgb, var(--accent, var(--blue-900)) 10%, white); color: var(--accent, var(--blue-900)); }
.feature__title { font-size: var(--fs-card-title); font-weight: var(--fw-medium); margin-bottom: 8px; letter-spacing: -0.01em; }
.feature__text { color: var(--color-text-muted); font-size: var(--fs-sm); }
.feature--card { background: var(--white); border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: 28px; }

/* ---- Split cards ("Ways we help") -------------------------------------- */
.split-card { padding: clamp(28px, 4vw, 48px); min-height: 340px; }
.split-card__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: rgba(255,255,255,.7); color: var(--blue-900); margin-bottom: 28px; }
.split-card__icon .icon { width: 28px; height: 28px; }
.split-card__title { font-size: clamp(1.5rem, 2vw, 1.75rem); margin-bottom: 12px; }
.split-card__text { color: var(--color-text-muted); font-size: var(--fs-lead); max-width: 46ch; }
.split-card .tags { margin: 24px 0 8px; }
.split-card .btn { align-self: flex-start; margin-top: auto; }
.split-card .btn:not(:first-of-type) { margin-top: 24px; }

/* ---- Tags -------------------------------------------------------------- */
.tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-size: .8125rem; font-weight: var(--fw-medium); padding: 7px 13px; border-radius: var(--radius-pill);
  border: 1px solid var(--grey-300); color: var(--ink); background: rgba(255, 255, 255, 0.6);
}
.tags--light { justify-content: center; }
.tags--light .tag { border-color: rgba(255, 255, 255, 0.32); color: #fff; background: rgba(255, 255, 255, 0.08); }

/* ---- Technology band --------------------------------------------------- */
.band { padding: 0 var(--panel-inset) var(--panel-inset); }
.band__panel {
  position: relative; overflow: hidden; border-radius: var(--radius-sm);
  min-height: 560px; display: flex; align-items: center; justify-content: center;
  background: var(--blue-950); color: #fff; text-align: center;
}
.band__content { position: relative; z-index: 2; padding: 96px var(--gutter); max-width: 900px; }
.band__words { display: flex; flex-wrap: wrap; justify-content: center; gap: .1em .45em; font-size: var(--fs-display); letter-spacing: -0.03em; line-height: 1; }
.band__words span:nth-child(2) { color: var(--blue-300); }
.band__words span:nth-child(3) { color: rgba(255, 255, 255, 0.62); }
.band__text { font-size: var(--fs-lead); color: rgba(255, 255, 255, 0.82); max-width: 52ch; margin: 28px auto 0; }
.band__content .tags { margin-top: 32px; }

/* ---- CTA band ---------------------------------------------------------- */
.cta { background: var(--charcoal); color: #fff; padding: var(--section-y) 0; text-align: center; }
.cta__inner { max-width: 720px; }
.cta__title { font-size: clamp(2rem, 3vw, 2.5rem); }
.cta__text { font-size: var(--fs-lead); color: rgba(255, 255, 255, 0.72); margin: 16px auto 32px; max-width: 48ch; }

/* ---- Footer ------------------------------------------------------------ */
.site-footer { background: var(--charcoal-deep); color: rgba(255, 255, 255, 0.72); padding: 72px 0 32px; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.site-footer__grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 40px 32px; }
.site-footer__logo { display: inline-flex; align-items: center; gap: 12px; }
.site-footer__logo img:first-child { width: 44px; height: 44px; }
.site-footer__logo img:last-child { height: 24px; width: auto; }
.site-footer__tagline { margin-top: 16px; font-size: var(--fs-sm); max-width: 30ch; }
.site-footer h4 { font-size: .875rem; font-weight: var(--fw-medium); color: #fff; margin-bottom: 16px; letter-spacing: 0; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.site-footer a { color: rgba(255, 255, 255, 0.72); font-size: var(--fs-sm); }
.site-footer a:hover { color: #fff; }
.site-footer__bottom { margin-top: 56px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.08); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: var(--fs-xs); }
.site-footer__meta { color: rgba(255, 255, 255, 0.45); }

/* ---- Inner page hero --------------------------------------------------- */
.page-hero {
  padding: calc(var(--nav-h) + var(--nav-top) + 88px) 0 56px;
  background: linear-gradient(180deg, var(--blue-50) 0%, var(--white) 100%);
}
.page-hero--compact { padding-bottom: 32px; }
.page-hero__title { font-size: var(--fs-h1); max-width: 20ch; text-wrap: balance; }
.page-hero__lead { font-size: var(--fs-lead); color: var(--color-text-muted); max-width: 60ch; margin-top: 20px; }

/* ---- Product detail ---------------------------------------------------- */
.product-hero { padding: var(--panel-inset); }
.product-hero__panel {
  position: relative; overflow: hidden; border-radius: var(--radius-sm);
  min-height: min(78vh, 760px);
  display: flex; align-items: center;
  background: var(--accent, var(--blue-900));
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent, var(--blue-900)) 78%, black) 0%, var(--accent, var(--blue-900)) 55%, color-mix(in srgb, var(--accent, var(--blue-900)) 72%, white) 140%);
}
.product-hero--dark .product-hero__panel { color: #fff; }
.product-hero--light .product-hero__panel { color: var(--ink); }
.product-hero__content { position: relative; z-index: 2; width: 100%; max-width: var(--container); margin: 0 auto; padding: calc(var(--nav-h) + 72px) var(--gutter) 72px; }
.product-hero__logo { max-height: 84px; width: auto; max-width: 320px; object-fit: contain; margin-bottom: 32px; }
.product-hero__title { font-size: var(--fs-h1); max-width: 18ch; }
.product-hero__tagline { font-size: var(--fs-lead); margin-top: 16px; max-width: 52ch; opacity: .88; }
.product-hero__actions { margin-top: 32px; display: flex; gap: 12px; flex-wrap: wrap; }
.product-intro { font-size: clamp(1.25rem, 1.4vw + .9rem, 1.5rem); line-height: 1.45; letter-spacing: -0.01em; margin-bottom: 32px; }
.cta[style*="--accent"] { background: var(--charcoal); }

.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--grid-gap); }
.gallery__item { display: block; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--color-border); background: var(--grey-50); transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out); }
.gallery__item:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.gallery__item img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }

.lightbox { position: fixed; inset: 0; z-index: 1500; background: rgba(8, 12, 20, 0.94); display: grid; place-items: center; padding: 24px; }
.lightbox[hidden] { display: none; }
.lightbox__figure { margin: 0; max-width: 100%; text-align: center; }
.lightbox__img { max-width: min(1400px, 92vw); max-height: 84vh; width: auto; height: auto; margin: 0 auto; border-radius: var(--radius-sm); }
.lightbox__caption { color: rgba(255,255,255,.75); margin-top: 12px; font-size: var(--fs-sm); }
.lightbox__close { position: absolute; top: 16px; right: 20px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 28px; cursor: pointer; }
.lightbox__close:hover { background: rgba(255,255,255,.22); }

.preview-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 950; background: #FFF4D6; color: #7A4B00; text-align: center; font-size: var(--fs-xs); padding: 6px 12px; border-bottom: 1px solid #F3D48A; }
.preview-bar + .product-hero { padding-top: 40px; }
body:has(.preview-bar) .site-nav { top: 44px; }

/* ---- Forms ------------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(0, 2fr); gap: var(--grid-gap); align-items: start; }
.contact-aside .card { padding: 24px; }
.contact-aside .card__title { margin-top: 0; }
.form { background: var(--white); border: 1px solid var(--color-border); padding: clamp(24px, 3vw, 40px); box-shadow: var(--shadow-card); }
.form__row--2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form__field { margin-bottom: 20px; }
.form__field label { display: block; font-size: var(--fs-sm); font-weight: var(--fw-medium); margin-bottom: 8px; }
.form__field input, .form__field textarea, .form__field select {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  padding: 12px 14px; border: 1px solid var(--grey-300); border-radius: var(--radius-sm); background: #fff;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.form__field textarea { resize: vertical; min-height: 140px; }
.form__field input:focus, .form__field textarea:focus, .form__field select:focus { outline: 0; border-color: var(--blue-500); box-shadow: 0 0 0 4px rgba(41, 150, 207, 0.15); }
.form__error { color: var(--color-error); font-size: var(--fs-xs); margin: 8px 0 0; }
.form__actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.form__note { font-size: var(--fs-xs); max-width: 44ch; }
.form__hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---- Flash messages ---------------------------------------------------- */
.flash-stack { position: fixed; top: calc(var(--nav-top) + var(--nav-h) + 12px); left: 50%; transform: translateX(-50%); z-index: 950; width: min(560px, calc(100% - 32px)); display: grid; gap: 8px; }
.flash { background: #fff; border: 1px solid var(--color-border); border-left: 4px solid var(--blue-500); border-radius: var(--radius-sm); padding: 14px 44px 14px 16px; font-size: var(--fs-sm); box-shadow: var(--shadow-hover); position: relative; }
.flash--success { border-left-color: var(--color-success); }
.flash--error { border-left-color: var(--color-error); }
.flash__close { position: absolute; right: 8px; top: 8px; width: 28px; height: 28px; border: 0; background: transparent; font-size: 20px; cursor: pointer; color: var(--slate); border-radius: 50%; }
.flash__close:hover { background: var(--grey-100); }

/* ---- Cookie notice ----------------------------------------------------- */
.cookie-notice {
  position: fixed; left: 16px; bottom: 16px; z-index: 940;
  width: min(400px, calc(100% - 32px));
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-hover); padding: 16px 18px;
  display: flex; gap: 16px; align-items: center;
}
.cookie-notice[hidden] { display: none; }
.cookie-notice p { font-size: var(--fs-xs); color: var(--color-text-muted); margin: 0; }
.cookie-notice a { text-decoration: underline; text-underline-offset: 2px; }

/* ---- Scroll reveal ----------------------------------------------------- */
html.js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out); }
html.js [data-reveal].is-visible { opacity: 1; transform: none; }
html.js [data-reveal-delay="1"] { transition-delay: .1s; }
html.js [data-reveal-delay="2"] { transition-delay: .2s; }
html.js [data-reveal-delay="3"] { transition-delay: .3s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .btn, .card, .gallery__item { transition: none; }
  .no-webgl .media-bg { animation: none; }
}

/* ---- Responsive -------------------------------------------------------- */
@media (max-width: 1024px) {
  .grid--features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .site-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .grid--features, .grid--split { grid-template-columns: minmax(0, 1fr); }
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .form__row--2 { grid-template-columns: 1fr; gap: 0; }
  .hero__content { padding-bottom: 64px; }
  .hero__panel { min-height: min(calc(100svh - 2 * var(--panel-inset)), 760px); }
  .band__panel { min-height: 440px; }
  .band__content { padding: 72px var(--gutter); }
  .split-card { min-height: 0; }
  .cookie-notice { flex-direction: column; align-items: stretch; }
}
@media (max-width: 480px) {
  .site-footer__grid { grid-template-columns: 1fr; }
  .site-nav__wordmark { height: 18px; }
}
