/* ═══════════════════════════════════════════════════════════════════════════
   VRCardio — design system
   Three colours only: deep red, black, white. Everything else is one of those
   three at an opacity. Keeping the palette that narrow is what makes the red
   read as a signal rather than as decoration.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* Black, in five steps. Pure #000 is reserved for the deepest wells. */
  --ink-900: #0e0a0a;
  --ink-800: #151010;
  --ink-700: #1c1515;
  --ink-600: #251b1b;
  --ink-500: #302322;

  /* Red, dark. --red is the one that acts; --ember only glows. */
  --red: #c8202a;
  --red-bright: #e8423a;
  --red-deep: #8a1418;
  --red-ink: #4a0b0d;
  --ember: rgba(200, 32, 42, .45);

  /* White, in four steps. */
  --white: #ffffff;
  --paper: rgba(255, 240, 232, .92);
  --mist: rgba(255, 240, 232, .64);
  --mute: rgba(255, 240, 232, .42);
  --line: rgba(255, 240, 232, .09);
  --line-strong: rgba(255, 240, 232, .16);

  --glass: linear-gradient(180deg, rgba(255, 240, 232, .085) 0%, rgba(255, 240, 232, .035) 100%);
  --glass-hi: linear-gradient(180deg, rgba(255, 240, 232, .12) 0%, rgba(255, 240, 232, .05) 100%);

  --shadow: 0 18px 40px rgba(0, 0, 0, .55);
  --shadow-lift: 0 28px 60px rgba(0, 0, 0, .65), 0 0 0 1px rgba(200, 32, 42, .35), 0 0 46px -12px var(--ember);

  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  --radius: 18px;
  --radius-lg: 26px;
  --ease: cubic-bezier(.22, 1, .36, 1);

  /* Legacy names. Older markup still asks for these by hand; pointing them at
     the palette means those elements re-theme instead of staying light. */
  --primary-color: var(--red);
  --primary-dark: var(--red-deep);
  --text-color: var(--white);
  --text-light: var(--mist);
  --background: var(--ink-800);
  --background-dark: var(--ink-900);
  --border-color: var(--line);
  --border-radius: var(--radius);
  --transition: all .35s var(--ease);
  --gradient-primary: linear-gradient(135deg, var(--red) 0%, var(--red-deep) 100%);
  --gradient-dark: linear-gradient(135deg, var(--ink-600) 0%, var(--ink-900) 100%);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  font-family: var(--font-body);
  background: var(--ink-800);
  color: var(--paper);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* The light behind everything. Two crimson pools that never move, so the page
   scrolls past them and the colour appears to live behind the content. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  /* Warm pools over a warm charcoal that lifts toward the middle of the page,
     so the canvas reads as lit rather than as black. */
  background:
    radial-gradient(62rem 42rem at 80% -6%, rgba(232, 66, 58, .30), transparent 62%),
    radial-gradient(50rem 40rem at 2% 38%, rgba(190, 52, 40, .22), transparent 64%),
    radial-gradient(72rem 52rem at 50% 112%, rgba(232, 96, 64, .20), transparent 62%),
    linear-gradient(180deg, #171111 0%, #1e1615 52%, #161010 100%);
}

/* A film of grain. Without it the large flat blacks band on cheap panels, and
   the gradients above look like plastic. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: .035;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3, h4, h5 { font-family: var(--font-display); font-weight: 700; line-height: 1.1; letter-spacing: -.02em; color: var(--white); }
p { color: var(--mist); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { font-family: inherit; }

::selection { background: var(--red); color: var(--white); }

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--ink-900); }
::-webkit-scrollbar-thumb { background: var(--ink-500); border-radius: 99px; border: 3px solid var(--ink-900); }
::-webkit-scrollbar-thumb:hover { background: var(--red-deep); }

:focus-visible { outline: 2px solid var(--red-bright); outline-offset: 3px; border-radius: 4px; }

.container { max-width: 1240px; margin: 0 auto; padding: 0 2rem; }

/* ── Entrances ────────────────────────────────────────────────────────────
   Visible by default and hidden only once JS confirms it can animate them, so
   a blocked script leaves a readable page rather than an empty one. */
.js-reveal [data-reveal] { opacity: 0; transform: translateY(26px); }
.js-reveal [data-reveal].in { opacity: 1; transform: none; transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js-reveal [data-reveal].in[data-delay="1"] { transition-delay: .09s; }
.js-reveal [data-reveal].in[data-delay="2"] { transition-delay: .18s; }
.js-reveal [data-reveal].in[data-delay="3"] { transition-delay: .27s; }
.js-reveal [data-reveal].in[data-delay="4"] { transition-delay: .36s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js-reveal [data-reveal] { opacity: 1; transform: none; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ── Section furniture ───────────────────────────────────────────────────── */
.section-header { text-align: center; max-width: 760px; margin: 0 auto 4.5rem; }
.section-header h2 {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  margin-bottom: 1rem;
  background: linear-gradient(180deg, #fff 30%, rgba(255, 240, 232, .55) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.section-header p { font-size: 1.07rem; color: var(--mist); }

/* A kicker above a heading: small, spaced, red dot in front. */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: 1.1rem;
  font-family: var(--font-body);
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--mute);
}
.kicker::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--red-bright); box-shadow: 0 0 12px var(--red-bright); }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: .95rem 1.7rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .01em;
  cursor: pointer;
  overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
}
.btn-primary { background: linear-gradient(135deg, var(--red-bright) 0%, var(--red-deep) 100%); color: var(--white); box-shadow: 0 10px 30px -10px var(--ember); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 44px -12px rgba(232, 66, 58, .75); }
/* A sheen that crosses the button once on hover. */
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 240, 232, .28) 50%, transparent 80%);
  transform: translateX(-120%);
  transition: transform .75s var(--ease);
}
.btn-primary:hover::after { transform: translateX(120%); }
.btn-secondary { background: rgba(255, 240, 232, .04); color: var(--white); border-color: var(--line-strong); backdrop-filter: blur(10px); }
.btn-secondary:hover { background: rgba(255, 240, 232, .09); border-color: var(--red); transform: translateY(-2px); }
.btn i { transition: transform .3s var(--ease); }
.btn:hover i { transform: translateX(2px); }

/* ── Header ──────────────────────────────────────────────────────────────── */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  transition: background .4s var(--ease), border-color .4s var(--ease), backdrop-filter .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.header.scrolled {
  background: rgba(21, 16, 16, .78);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: var(--line);
}
.nav-container { max-width: 1240px; margin: 0 auto; padding: 1.15rem 2rem; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.header.scrolled .nav-container { padding-top: .8rem; padding-bottom: .8rem; }
.nav-logo { display: flex; align-items: center; gap: .7rem; }
.nav-logo span { font-family: var(--font-display); font-size: 1.22rem; font-weight: 700; letter-spacing: -.02em; color: var(--white); }
.logo-img { width: 36px; height: 36px; object-fit: contain; filter: drop-shadow(0 0 10px var(--ember)); }
.nav-menu { display: flex; align-items: center; gap: .35rem; }
.nav-menu > li > a {
  position: relative;
  display: block;
  padding: .55rem .95rem;
  border-radius: 999px;
  font-size: .92rem;
  font-weight: 500;
  color: var(--mist);
  transition: color .25s var(--ease), background .25s var(--ease);
}
.nav-menu > li > a:hover { color: var(--white); background: rgba(255, 240, 232, .06); }
/* The underline grows from the middle, which reads as deliberate where a full
   width bar reads as a border. */
.nav-menu > li > a::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: .28rem;
  width: 0;
  height: 2px;
  background: var(--red-bright);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width .3s var(--ease);
}
.nav-menu > li > a:hover::after { width: 22px; }

.btn-cart { position: relative; background: none; border: none; cursor: pointer; font-size: 1.05rem; color: var(--mist); padding: .55rem .7rem; border-radius: 999px; transition: color .25s var(--ease), background .25s var(--ease); }
.btn-cart:hover { color: var(--white); background: rgba(255, 240, 232, .06); }
#cartBadge {
  position: absolute; top: 2px; right: 0;
  width: 18px; height: 18px;
  background: var(--red-bright); color: var(--white);
  border-radius: 50%; font-size: .68rem; font-weight: 700;
  display: none; align-items: center; justify-content: center;
  box-shadow: 0 0 0 2px var(--ink-800), 0 0 14px var(--ember);
}
.btn-login {
  padding: .6rem 1.35rem;
  background: linear-gradient(135deg, var(--red-bright) 0%, var(--red-deep) 100%);
  color: var(--white);
  border: none; border-radius: 999px;
  font-size: .9rem; font-weight: 600; cursor: pointer;
  box-shadow: 0 8px 24px -10px var(--ember);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 14px 32px -10px rgba(232, 66, 58, .8); }
.nav-user-name { color: var(--white) !important; font-weight: 600; }
.btn-logout { background: transparent !important; border: 1px solid var(--line-strong) !important; color: var(--mist) !important; border-radius: 999px !important; padding: .5rem 1rem !important; cursor: pointer; transition: var(--transition); }
.btn-logout:hover { border-color: var(--red) !important; color: var(--white) !important; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: .4rem; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--white); border-radius: 2px; transition: transform .3s var(--ease), opacity .3s var(--ease); }
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero { position: relative; padding: 11rem 0 6rem; overflow: hidden; }
/* The trace. A real ECG rhythm, drawn once and swept by a moving highlight. */
#ecgCanvas { position: absolute; left: 0; right: 0; bottom: 8%; width: 100%; height: 190px; opacity: .5; pointer-events: none; z-index: 0; }
.hero-container { position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; padding: 0 2rem; display: grid; grid-template-columns: 1.08fr .92fr; gap: 4rem; align-items: center; }

.hero-badges { display: flex; gap: .7rem; margin-bottom: 1.8rem; flex-wrap: wrap; }
.badge {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .42rem .85rem .42rem .45rem;
  background: rgba(255, 240, 232, .045);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .76rem; font-weight: 600; letter-spacing: .04em;
  color: var(--mist);
  backdrop-filter: blur(8px);
}
.badge img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; background: #fff; }

.hero-title {
  font-size: clamp(2.9rem, 6.4vw, 5.1rem);
  line-height: .98;
  letter-spacing: -.035em;
  margin-bottom: 1.6rem;
  background: linear-gradient(180deg, #fff 32%, rgba(255, 240, 232, .5) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-title .highlight {
  display: inline-block;
  background: linear-gradient(135deg, var(--red-bright) 0%, #ff6b74 55%, var(--red) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-description { font-size: 1.1rem; color: var(--mist); max-width: 46ch; margin-bottom: 2.2rem; }

.hero-paths { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; margin-bottom: 2rem; }
.hero-path {
  display: flex; align-items: flex-start; gap: .9rem;
  padding: 1.1rem 1.2rem;
  text-align: left;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--white);
  cursor: pointer;
  transition: transform .35s var(--ease), border-color .35s var(--ease), background .35s var(--ease), box-shadow .35s var(--ease);
}
.hero-path:hover { transform: translateY(-4px); border-color: rgba(200, 32, 42, .55); background: var(--glass-hi); box-shadow: 0 20px 40px -22px var(--ember); }
.hero-path i { font-size: 1.15rem; color: var(--red-bright); margin-top: .15rem; }
.hero-path span { display: flex; flex-direction: column; gap: .2rem; }
.hero-path strong { font-size: .97rem; font-weight: 600; }
.hero-path em { font-style: normal; font-size: .83rem; color: var(--mute); line-height: 1.45; }

.hero-buttons { display: flex; gap: .8rem; flex-wrap: wrap; }

.hero-image { position: relative; }
.hero-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--ink-700);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .9), 0 0 70px -30px var(--ember);
}
.hero-card--video { aspect-ratio: 16 / 10; }
.hero-card--video iframe { width: 100%; height: 100%; border: 0; display: block; }
.hero-caption { margin-top: .9rem; text-align: center; font-size: .83rem; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }

/* ── Credibility strip ───────────────────────────────────────────────────── */
.proof { padding: 2.2rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(0, 0, 0, .35); backdrop-filter: blur(6px); }
.proof__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem 2.6rem; }
.proof__item { display: inline-flex; align-items: center; gap: .6rem; font-size: .86rem; font-weight: 500; color: var(--mute); transition: color .3s var(--ease); }
a.proof__item:hover { color: var(--white); }
.proof__item i { color: var(--red-bright); font-size: .98rem; }
.proof__item img { width: 24px; height: 24px; border-radius: 4px; object-fit: contain; background: #fff; padding: 2px; }

/* ── Shop ────────────────────────────────────────────────────────────────── */
.shop { position: relative; padding: 7.5rem 0; }
.shop-group { position: relative; margin-bottom: 4.5rem; }
.shop-group__title {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: .75rem;
  font-size: 1.28rem; font-weight: 700;
  padding-left: 1rem;
  margin-bottom: 2rem;
  border-left: 3px solid var(--red);
  color: var(--white);
}
.shop-group__title i { color: var(--red-bright); font-size: 1.05rem; }
.shop-group__title small { font-size: .85rem; font-weight: 400; color: var(--mute); letter-spacing: 0; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.6rem; }

.shop-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.7rem;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(14px);
  transition: transform .45s var(--ease), border-color .45s var(--ease), box-shadow .45s var(--ease), background .45s var(--ease);
}
/* The hairline at the top of every card, brighter on the featured ones. */
.shop-card::before {
  content: '';
  position: absolute; left: 1.7rem; right: 1.7rem; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 240, 232, .35), transparent);
}
.shop-card:hover { transform: translateY(-8px); background: var(--glass-hi); border-color: rgba(200, 32, 42, .5); box-shadow: var(--shadow-lift); }
.shop-card--featured { border-color: rgba(200, 32, 42, .38); background: linear-gradient(180deg, rgba(200, 32, 42, .09) 0%, rgba(255, 240, 232, .02) 55%); }
.shop-card--featured::before { background: linear-gradient(90deg, transparent, var(--red-bright), transparent); }

.shop-card__badge {
  position: absolute; z-index: 2; top: 1rem; right: 1rem;
  max-width: calc(100% - 2rem);
  padding: .34rem .75rem;
  border-radius: 999px;
  background: rgba(255, 240, 232, .08);
  border: 1px solid var(--line-strong);
  color: var(--white);
  font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  white-space: nowrap;
  backdrop-filter: blur(10px);
}
.shop-card__badge--hot { background: linear-gradient(135deg, var(--red-bright), var(--red-deep)); border-color: transparent; box-shadow: 0 6px 20px -8px var(--ember); }

.shop-card__media {
  width: 100%; height: 172px;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 1.25rem;
  border: 1px solid var(--line);
  filter: saturate(1.05) contrast(1.04);
  transition: transform .55s var(--ease);
}
.shop-card:hover .shop-card__media { transform: scale(1.035); }
.shop-card__title { font-size: 1.16rem; margin-bottom: .85rem; color: var(--white); }
.shop-card__list { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1.4rem; font-size: .87rem; color: var(--mist); }
.shop-card__list li { position: relative; padding-left: 1.3rem; line-height: 1.5; }
.shop-card__list li::before {
  content: ''; position: absolute; left: 0; top: .54em;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--red); box-shadow: 0 0 8px var(--ember);
}
.shop-card__list strong { color: var(--white); font-weight: 600; }

.shop-price { font-family: var(--font-display); font-size: 2rem; font-weight: 700; letter-spacing: -.03em; color: var(--white); margin-bottom: .35rem; font-variant-numeric: tabular-nums; }
.shop-price s { font-family: var(--font-body); font-size: .95rem; font-weight: 400; color: var(--mute); margin-left: .5rem; }
.shop-note { font-size: .79rem; color: var(--mute); margin-bottom: 1.35rem; letter-spacing: .02em; }
/* The button is pushed to the bottom so uneven feature lists still line up. */
.shop-card .shop-btn:first-of-type { margin-top: auto; }

.shop-btn {
  display: flex; align-items: center; justify-content: center; gap: .55rem;
  width: 100%;
  padding: .92rem 1.4rem;
  background: linear-gradient(135deg, var(--red-bright) 0%, var(--red-deep) 100%);
  color: var(--white);
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: .93rem; font-weight: 600;
  cursor: pointer;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease), opacity .3s var(--ease);
}
.shop-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -14px rgba(232, 66, 58, .85); }
.shop-btn:disabled { background: rgba(255, 240, 232, .07); color: var(--mute); border-color: var(--line); cursor: not-allowed; transform: none; box-shadow: none; }
.shop-btn--proposal { margin-top: .6rem; background: transparent; color: var(--mist); border-color: var(--line-strong); }
.shop-btn--proposal:hover { background: rgba(255, 240, 232, .05); color: var(--white); border-color: var(--red); box-shadow: none; }
/* Set by script.js when the catalogue has no such product. */
.shop-card--unavailable { opacity: .55; }

/* ── Institutional band ──────────────────────────────────────────────────── */
.institutional {
  display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap;
  margin: 0 0 4.5rem;
  padding: 2.2rem 2.4rem;
  background: linear-gradient(120deg, rgba(200, 32, 42, .16) 0%, rgba(255, 240, 232, .03) 60%);
  border: 1px solid rgba(200, 32, 42, .3);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}
.institutional::after {
  content: '';
  position: absolute; right: -10%; top: -60%;
  width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, var(--ember), transparent 70%);
  pointer-events: none;
}
.institutional__text { position: relative; z-index: 1; max-width: 62ch; }
.institutional__text h3 { font-size: 1.4rem; margin-bottom: .5rem; }
.institutional__text p { font-size: .94rem; }
.institutional__cta {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .92rem 1.6rem;
  background: var(--white); color: var(--ink-900);
  border: none; border-radius: 999px;
  font-family: var(--font-body); font-size: .93rem; font-weight: 700;
  white-space: nowrap; cursor: pointer;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.institutional__cta:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -14px rgba(255, 240, 232, .45); }

/* ── Technology ──────────────────────────────────────────────────────────── */
.technology { padding: 7.5rem 0; }
.tech-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.6rem; }
.tech-card {
  position: relative;
  padding: 2rem 1.7rem;
  text-align: center;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  cursor: pointer;
  overflow: hidden;
  transition: transform .45s var(--ease), border-color .45s var(--ease), box-shadow .45s var(--ease);
}
.tech-card::after {
  content: '';
  position: absolute; left: 50%; bottom: -40%;
  width: 150%; height: 150%;
  background: radial-gradient(circle at 50% 100%, var(--ember), transparent 62%);
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity .5s var(--ease);
  pointer-events: none;
}
.tech-card:hover { transform: translateY(-8px); border-color: rgba(200, 32, 42, .5); box-shadow: var(--shadow-lift); }
.tech-card:hover::after { opacity: .5; }
.tech-icon { position: relative; z-index: 1; width: 92px; height: 92px; margin: 0 auto 1.3rem; display: grid; place-items: center; border-radius: 22px; background: rgba(255, 240, 232, .05); border: 1px solid var(--line); }
.tech-icon img { width: 62px; height: 62px; object-fit: contain; }
.tech-card h3 { position: relative; z-index: 1; font-size: 1.08rem; margin-bottom: .6rem; }
.tech-card p { position: relative; z-index: 1; font-size: .88rem; }

/* ── Voices ──────────────────────────────────────────────────────────────── */
.voices { padding: 7.5rem 0; }
.voices__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1.6rem; }
.voices__item { display: flex; flex-direction: column; gap: .9rem; }
.voices__item__frame {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--ink-700);
  transition: transform .45s var(--ease), border-color .45s var(--ease), box-shadow .45s var(--ease);
}
.voices__item:hover .voices__item__frame { transform: translateY(-6px); border-color: rgba(200, 32, 42, .5); box-shadow: var(--shadow-lift); }
.voices__item__frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.voices__item figcaption { font-family: var(--font-display); font-size: .97rem; font-weight: 600; color: var(--white); text-align: center; }
.voices__more { margin-top: 2.4rem; text-align: center; }
.voices__more a { font-size: .92rem; font-weight: 600; color: var(--red-bright); border-bottom: 1px solid transparent; transition: border-color .3s var(--ease); }
.voices__more a:hover { border-bottom-color: var(--red-bright); }

/* ── About ───────────────────────────────────────────────────────────────── */
.about { padding: 7.5rem 0; }
.about-content { display: grid; grid-template-columns: 1.25fr .75fr; gap: 4rem; align-items: center; }
.about-text h2 { font-size: clamp(2rem, 4vw, 2.9rem); margin-bottom: 1.2rem; }
.about-text p { font-size: 1.03rem; margin-bottom: 2rem; }
.about-features { display: flex; flex-wrap: wrap; gap: .7rem; }
.feature {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .65rem 1.1rem;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .87rem; font-weight: 500; color: var(--paper);
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}
.feature:hover { border-color: rgba(200, 32, 42, .5); transform: translateY(-2px); }
.feature i { color: var(--red-bright); }
.about-image { display: grid; place-items: center; }
.about-image img { max-width: 260px; filter: drop-shadow(0 20px 50px rgba(0, 0, 0, .6)); }

/* ── Contact ─────────────────────────────────────────────────────────────── */
.contact { padding: 7.5rem 0 8.5rem; }
.contact-container { display: grid; grid-template-columns: .85fr 1.15fr; gap: 3rem; align-items: start; }
.contact-info { display: flex; flex-direction: column; gap: 1rem; }
.contact-item {
  display: flex; align-items: center; gap: 1.1rem;
  padding: 1.3rem 1.4rem;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .35s var(--ease), transform .35s var(--ease);
}
.contact-item:hover { border-color: rgba(200, 32, 42, .5); transform: translateX(4px); }
.contact-item > i { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: rgba(200, 32, 42, .14); color: var(--red-bright); font-size: 1rem; }
.contact-item h4 { font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); margin-bottom: .2rem; }
.contact-item p { font-size: .96rem; color: var(--white); }

.contact-form { padding: 2rem; background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.form-group { margin-bottom: 1rem; }
.contact-form input, .contact-form textarea {
  width: 100%;
  padding: .95rem 1.1rem;
  background: rgba(0, 0, 0, .35);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--white);
  font: inherit; font-size: .94rem;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease);
}
.contact-form textarea { resize: vertical; min-height: 7rem; }
.contact-form input::placeholder, .contact-form textarea::placeholder { color: var(--mute); }
.contact-form input:focus, .contact-form textarea:focus {
  outline: none;
  border-color: var(--red);
  background: rgba(0, 0, 0, .5);
  box-shadow: 0 0 0 3px rgba(200, 32, 42, .18);
}
.contact-form .btn { width: 100%; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.footer { position: relative; padding: 4.5rem 0 2rem; background: var(--ink-900); border-top: 1px solid var(--line); }
.footer::before { content: ''; position: absolute; top: -1px; left: 50%; transform: translateX(-50%); width: min(560px, 70%); height: 1px; background: linear-gradient(90deg, transparent, var(--red), transparent); }
.footer-content { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2.5rem; margin-bottom: 3rem; }
.footer-logo { display: flex; align-items: center; gap: .7rem; margin-bottom: 1rem; }
.footer-logo span { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; color: var(--white); }
.footer-section p { font-size: .9rem; max-width: 34ch; }
.footer-section h4 { font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); margin-bottom: 1.1rem; }
.footer-section ul { display: flex; flex-direction: column; gap: .65rem; }
.footer-section ul a { font-size: .9rem; color: var(--mist); transition: color .25s var(--ease), padding-left .25s var(--ease); }
.footer-section ul a:hover { color: var(--red-bright); padding-left: 5px; }
.certifications { display: flex; gap: .7rem; }
.certifications img { width: 54px; height: 54px; border-radius: 8px; object-fit: contain; background: #fff; padding: 5px; }
.footer-bottom { padding-top: 2rem; border-top: 1px solid var(--line); text-align: center; }
.footer-bottom p { font-size: .83rem; color: var(--mute); }

/* ── Modals ──────────────────────────────────────────────────────────────── */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  /* 100% and not 100vw: vw counts the scrollbar, so the overlay came out wider
     than the room it had and put a horizontal bar under every modal. */
  width: 100%;
  height: 100%;
  overflow: auto;
  background: rgba(14, 10, 10, .82);
  backdrop-filter: blur(10px);
}
.modal--scrollcard { overflow: hidden; }

.modal-content {
  position: relative;
  width: min(92vw, 520px);
  margin: 7vh auto;
  background: linear-gradient(180deg, var(--ink-600) 0%, var(--ink-800) 100%);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 50px 110px -30px rgba(0, 0, 0, .95), 0 0 80px -40px var(--ember);
  animation: modalIn .45s var(--ease);
  overflow: hidden;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }

/* The form modals have no header band, so they carry their own padding. */
.modal-content--wide {
  width: min(92vw, 680px);
  padding: 2rem;
  margin: 2rem auto;
  max-height: calc(100vh - 4rem);
  max-height: calc(100dvh - 4rem);
  overflow-y: auto;
}
.modal-content--wide h2 { padding-right: 2.5rem; font-size: 1.6rem; }
.modal-content--wide .close { top: 1rem; right: 1.2rem; }

.modal-header { padding: 1.5rem 1.8rem; background: linear-gradient(135deg, rgba(200, 32, 42, .35), rgba(138, 20, 24, .15)); border-bottom: 1px solid var(--line); }
.modal-header h2 { font-size: 1.35rem; color: var(--white); }
.modal-body { padding: 1.8rem; }
.close {
  position: absolute; top: 1rem; right: 1.2rem;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 1.5rem; line-height: 1; font-weight: 400;
  color: var(--mist); cursor: pointer; z-index: 10;
  transition: background .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}
.close:hover { background: rgba(255, 240, 232, .08); color: var(--white); transform: rotate(90deg); }
.modal-lead { color: var(--mute); font-size: .92rem; line-height: 1.6; margin: .35rem 0 1.4rem; }

/* Forms inside modals */
.modal .form-group label, .modal-content label { display: block; margin-bottom: .45rem; font-size: .82rem; font-weight: 600; color: var(--mist); }
.modal input, .modal select, .modal textarea {
  width: 100%;
  padding: .82rem 1rem;
  background: rgba(0, 0, 0, .4);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--white);
  font: inherit; font-size: .93rem;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.modal input::placeholder, .modal textarea::placeholder { color: var(--mute); }
.modal input:focus, .modal select:focus, .modal textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(200, 32, 42, .18); }
.modal select option { background: var(--ink-600); color: var(--white); }

/* ── Proposal form ───────────────────────────────────────────────────────── */
.proposal-form__row {
  display: grid;
  /* min() so a narrow card drops to one column instead of overflowing. */
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.proposal-form label, .proposal-form__full { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.proposal-form__full { margin-bottom: 1.1rem; }
/* label > span, not any span: this also caught the submit button's own label. */
.proposal-form label > span { font-size: .8rem; font-weight: 600; color: var(--mist); }
.proposal-form textarea { resize: vertical; min-height: 6.5rem; }
/* Hidden from people, reachable by bots. Not display:none, which some bots skip. */
.proposal-form__hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }
.proposal-form__submit { width: 100%; justify-content: center; color: #fff; }
.proposal-form__submit span, .proposal-form__submit i { color: inherit; }
.proposal-form__feedback { margin: .9rem 0 0; font-size: .9rem; min-height: 1.2em; }
.proposal-form__feedback--ok { color: #34d399; font-weight: 600; }
.proposal-form__feedback--error { color: #fb7185; font-weight: 600; }

/* ── Cart ────────────────────────────────────────────────────────────────── */
.cart-items { display: flex; flex-direction: column; gap: .8rem; }
.cart-item { display: flex; align-items: center; gap: 1rem; padding: .9rem; background: rgba(255, 240, 232, .04); border: 1px solid var(--line); border-radius: 14px; }
.cart-item img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }
.cart-total { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.cart-total h3 { font-size: 1.2rem; color: var(--white); }
.cart-total span { color: var(--red-bright); }

/* The DAS size buttons. */
.das-size-btn {
  padding: .8rem 1.2rem;
  background: rgba(255, 240, 232, .04);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--paper);
  font: inherit; font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.das-size-btn:hover { border-color: var(--red); background: rgba(200, 32, 42, .12); }
.das-size-btn.selected, .das-size-btn.active { background: linear-gradient(135deg, var(--red-bright), var(--red-deep)); border-color: transparent; color: #fff; }

/* ── Toast ───────────────────────────────────────────────────────────────── */
.toast {
  position: fixed; top: 24px; right: 24px; z-index: 1100;
  padding: .95rem 1.4rem;
  background: var(--ink-600);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--red);
  border-radius: 12px;
  color: var(--white);
  font-size: .92rem; font-weight: 500;
  box-shadow: var(--shadow);
  transform: translateX(calc(100% + 32px));
  opacity: 0;
  visibility: hidden;
  transition: transform .45s var(--ease), opacity .3s var(--ease), visibility .45s;
}
.toast.show { transform: translateX(0); opacity: 1; visibility: visible; }
.toast.success { border-left-color: #34d399; }
.toast.error { border-left-color: #fb7185; }
.toast.warning { border-left-color: #fbbf24; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero-container { grid-template-columns: 1fr; gap: 3rem; }
  .hero-description { max-width: none; }
  .about-content { grid-template-columns: 1fr; gap: 2.5rem; }
  .contact-container { grid-template-columns: 1fr; }
  .footer-content { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .container, .nav-container, .hero-container { padding-left: 1.25rem; padding-right: 1.25rem; }
  .hero { padding-top: 8.5rem; }
  .nav-toggle { display: flex; }
  .nav-menu {
    position: fixed; inset: 0 0 auto; top: 0;
    flex-direction: column; align-items: stretch;
    gap: .25rem;
    padding: 6rem 1.5rem 2rem;
    background: rgba(21, 16, 16, .97);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-110%);
    transition: transform .45s var(--ease);
  }
  .nav-menu.active { transform: translateY(0); }
  .nav-menu > li > a { padding: .9rem 1rem; font-size: 1rem; }
  .hero-paths { grid-template-columns: 1fr; }
  .shop { padding: 5rem 0; }
  .technology, .voices, .about, .contact { padding: 5rem 0; }
  .section-header { margin-bottom: 3rem; }
  .institutional { flex-direction: column; align-items: flex-start; padding: 1.6rem; }
  .institutional__cta { width: 100%; justify-content: center; }
  .proof__row { gap: .9rem 1.4rem; }
  .proof__item { font-size: .8rem; }
  .footer-content { grid-template-columns: 1fr; gap: 2rem; }
  .modal-content--wide {
    width: min(94vw, 680px);
    padding: 1.15rem;
    margin: 1rem auto;
    max-height: calc(100vh - 2rem);
    max-height: calc(100dvh - 2rem);
  }
  .modal-content--wide h2 { font-size: 1.4rem; }
  .modal-content--wide .close { top: .55rem; right: .7rem; }
  .proposal-form__row { gap: .75rem; margin-bottom: .75rem; }
  /* 16px: anything smaller makes iOS Safari zoom the page on focus and it
     never zooms back out. */
  .modal input, .modal select, .modal textarea, .contact-form input, .contact-form textarea { font-size: 16px; }
  #ecgCanvas { height: 120px; opacity: .35; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2.6rem; }
  .shop-card { padding: 1.3rem; }
  .shop-card::before { left: 1.3rem; right: 1.3rem; }
  .btn { width: 100%; }
  .hero-buttons { flex-direction: column; }
}

/* ── Pieces the markup asks for by name ──────────────────────────────────── */
/* The "Professional account" chip on the subscription cards. */
.shop-chip {
  display: inline-flex; align-items: center; gap: .45rem;
  margin-bottom: .85rem;
  padding: .28rem .7rem;
  background: rgba(200, 32, 42, .14);
  border: 1px solid rgba(200, 32, 42, .3);
  border-radius: 999px;
  font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: #ffab9a;
}

.auth-form .form-group { margin-bottom: 1.1rem; }
.auth-form .btn { width: 100%; margin-top: .4rem; }
.auth-divider { position: relative; margin: 1.4rem 0; text-align: center; }
.auth-divider::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--line); }
.auth-divider span { position: relative; padding: 0 .9rem; background: var(--ink-700); color: var(--mute); font-size: .82rem; }
.modal-body > .btn-secondary { width: 100%; }

.das-size-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .55rem; margin-bottom: 1.3rem; }
.form-error { color: #fb7185; font-size: .85rem; margin-bottom: .75rem; }

.cart-empty { padding: 2.5rem 0; text-align: center; color: var(--mute); }
.cart-item img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.cart-item__body { flex: 1; min-width: 0; }
.cart-item__name { font-size: .9rem; font-weight: 600; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item__size { margin-left: .35rem; padding: .1rem .45rem; background: rgba(200, 32, 42, .2); color: #ffab9a; border-radius: 5px; font-size: .72rem; font-weight: 700; }
.cart-item__price { font-size: .86rem; font-weight: 700; color: var(--red-bright); }
.cart-item__qty { display: flex; align-items: center; gap: .4rem; }
.cart-item__qty button {
  width: 28px; height: 28px;
  background: rgba(255, 240, 232, .06);
  border: 1px solid var(--line); border-radius: 8px;
  color: var(--white); font-size: 1rem; line-height: 1; cursor: pointer;
  transition: var(--transition);
}
.cart-item__qty button:hover { border-color: var(--red); background: rgba(200, 32, 42, .18); }
.cart-item__qty span { min-width: 22px; text-align: center; font-weight: 600; color: var(--white); }
.cart-item__remove { background: none; border: none; color: var(--mute); cursor: pointer; padding: .3rem; transition: color .25s var(--ease); }
.cart-item__remove:hover { color: #fb7185; }

/* ── Language selector ───────────────────────────────────────────────────── */
/* The header injects this from /js/language-selector.js, but MainLayout never
   loaded language-selector.css, so on the homepage the dropdown had no
   display:none and hung open over the nav. It is styled here instead. */
.language-selector { position: relative; }
.language-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .55rem .9rem;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--mist);
  font: inherit; font-size: .88rem; font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}
.language-btn:hover { color: var(--white); border-color: var(--line-strong); background: rgba(255, 240, 232, .06); }
.language-btn .fa-chevron-down { font-size: .7rem; opacity: .7; transition: transform .3s var(--ease); }
.language-selector.open .language-btn .fa-chevron-down { transform: rotate(180deg); }

.language-dropdown {
  display: none;
  position: absolute; top: calc(100% + .55rem); right: 0;
  min-width: 190px;
  padding: .35rem;
  background: rgba(28, 21, 21, .97);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  z-index: 1000;
  overflow: hidden;
}
.language-dropdown.show { display: block; animation: modalIn .25s var(--ease); }
.language-option {
  display: flex; align-items: center; gap: .6rem;
  padding: .6rem .75rem;
  border-radius: 9px;
  color: var(--mist);
  font-size: .88rem;
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.language-option:hover { background: rgba(255, 240, 232, .07); color: var(--white); }
.language-option.active { background: linear-gradient(135deg, var(--red-bright), var(--red-deep)); color: var(--white); }
.flag { font-size: 1.05rem; }

@media (max-width: 768px) {
  .language-dropdown { position: static; width: 100%; margin-top: .4rem; }
  .language-btn { width: 100%; justify-content: space-between; }
}

/* A feature line worth noticing. The emphasis lives here and not in a <strong>
   inside the <li>, because the translator assigns textContent and would wipe
   any child element the moment the language is applied. */
.shop-card__list li.is-key { color: var(--white); font-weight: 600; }
.shop-card__list li.is-key::before { box-shadow: 0 0 10px var(--red-bright); background: var(--red-bright); }

/* ── Rhythm ──────────────────────────────────────────────────────────────────
   Every other section sits on a faint warm band, so the page reads as a
   sequence of rooms rather than one long dark corridor. */
.technology, .about {
  background: linear-gradient(180deg,
    transparent 0%, rgba(255, 228, 214, .04) 16%,
    rgba(255, 228, 214, .04) 84%, transparent 100%);
}
.proof { background: rgba(255, 228, 214, .035); }
