/* ==========================================================================
   NAUTILUS — EON technical datasheet section
   Uses the theme's variables (with fallbacks so it also works standalone):
     --theme-color  --heading-color  --font-color  --border-color
     --assistant-color  --heading-font  --body-font  --font-weight-heading
   Prefix .ntl-ds- on everything new.
   ========================================================================== */

.ntl-ds{
  --ds-wine:   var(--theme-color, #79182d);
  --ds-head:   var(--heading-color, #000);
  --ds-text:   var(--font-color, #5c5c5c);
  --ds-line:   var(--border-color, #dcdcdc);
  --ds-alt:    var(--assistant-color, #E9E9E9);
  --ds-hfont:  var(--heading-font, 'Exo 2', sans-serif);
  --ds-bfont:  var(--body-font, 'Exo 2', sans-serif);
  --ds-hw:     var(--font-weight-heading, 600);
  --ds-ease:   cubic-bezier(.16, 1, .3, 1);
}

.ntl-ds-intro{max-width:620px;margin:18px 0 0;color:var(--ds-text)}

/* ---------- layout ---------- */
.ntl-ds-layout{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:64px;
  align-items:start;
}
@media(max-width:991px){
  .ntl-ds-layout{grid-template-columns:1fr;gap:44px}
  .ntl-ds-figure{position:relative;top:auto}
}

/* ==========================================================================
   Product figure + dimension overlay
   ========================================================================== */
.ntl-ds-figure{
  position:sticky;          /* stays in view while the spec table scrolls */
  top:110px;                /* clears the fixed site header — adjust if needed */
  margin:0;
  aspect-ratio:1/1;
  border-radius:6px;
  overflow:hidden;
  background:#303033;
}
.ntl-ds-figure img{width:100%;height:100%;object-fit:cover;display:block}

.ntl-ds-dims{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}

.ntl-dim,
.ntl-ext{
  stroke:rgba(255,255,255,.82);
  stroke-width:1.4;
  vector-effect:non-scaling-stroke;
  transform-box:fill-box;
}
.ntl-ext{stroke:rgba(255,255,255,.38);stroke-dasharray:4 4}
.ntl-tick{fill:#EC7E98;transform-box:fill-box;transform-origin:center}

/* initial (hidden) state — drawn when the figure enters the viewport */
.ntl-dim-h{transform-origin:center;transform:scaleX(0)}
.ntl-dim-v{transform-origin:center;transform:scaleY(0)}
.ntl-ext-v{transform-origin:bottom;transform:scaleY(0)}   /* grow up from the unit */
.ntl-ext-h{transform-origin:left;transform:scaleX(0)}     /* grow right from the unit */
.ntl-tick{transform:scale(0)}

.ntl-ds-figure.is-in .ntl-ext-v{transition:transform .5s var(--ds-ease) .15s;transform:none}
.ntl-ds-figure.is-in .ntl-ext-h{transition:transform .5s var(--ds-ease) .9s;transform:none}
.ntl-ds-figure.is-in .ntl-dim-h{transition:transform .8s var(--ds-ease) .45s;transform:none}
.ntl-ds-figure.is-in .ntl-dim-v{transition:transform .8s var(--ds-ease) 1.2s;transform:none}
.ntl-ds-figure.is-in .ntl-tick{transition:transform .35s var(--ds-ease) 1.9s;transform:none}

/* labels are HTML so their size stays readable at every width */
.ntl-ds-label{
  position:absolute;
  font-family:var(--ds-hfont);
  font-weight:var(--ds-hw);
  font-size:13px;
  letter-spacing:.12em;
  color:#fff;
  white-space:nowrap;
  opacity:0;
  transition:opacity .5s ease, transform .5s var(--ds-ease);
}
.ntl-ds-label-w{left:50%;top:7.2%;transform:translate(-50%,6px)}
.ntl-ds-label-h{left:93%;top:50%;transform:translate(-50%,-50%) rotate(90deg) translateY(-6px)}
.ntl-ds-figure.is-in .ntl-ds-label-w{opacity:1;transform:translate(-50%,0);transition-delay:1.05s}
.ntl-ds-figure.is-in .ntl-ds-label-h{opacity:1;transform:translate(-50%,-50%) rotate(90deg);transition-delay:1.75s}

.ntl-ds-caption{
  position:absolute;left:20px;bottom:16px;
  font-family:var(--ds-hfont);font-weight:400;font-size:11px;letter-spacing:.16em;
  text-transform:uppercase;color:rgba(255,255,255,.55);
}

@media(max-width:575px){
  .ntl-ds-label{font-size:11px;letter-spacing:.08em}
  .ntl-ds-caption{left:14px;bottom:12px;font-size:10px}
}

/* ==========================================================================
   Datasheet
   ========================================================================== */

/* column wrapper — min-width:0 stops long rows from widening the grid track */
.ntl-ds-data{min-width:0}

/* key figures */
.ntl-ds-keys{
  --ico:36px;                    /* icon size */
  --ico-gap:18px;                /* icon → line */
  --line-y:calc(var(--ico) + var(--ico-gap));
  position:relative;
  display:grid;grid-template-columns:repeat(3,1fr);
  margin-bottom:40px;
}
/* the wine rule, now between icons and figures (icons sit on top, aligned with the photo) */
.ntl-ds-keys::before{
  content:"";position:absolute;left:0;right:0;top:var(--line-y);
  height:2px;background:var(--ds-wine);
  transform-origin:left;
}
.ntl-ds-key{position:relative;padding:0 16px 6px 0}
.ntl-ds-key + .ntl-ds-key{padding-left:18px}
/* column separators start at the rule, not above it */
.ntl-ds-key + .ntl-ds-key::after{
  content:"";position:absolute;left:0;top:calc(var(--line-y) + 2px);bottom:0;
  width:1px;background:var(--ds-line);
}
.ntl-ds-key-ico{
  display:block;width:var(--ico);height:var(--ico);
  margin-bottom:calc(var(--ico-gap) + 2px + 22px);   /* gap + rule + space above the figure */
}
.ntl-ds-key-ico svg{
  width:100%;height:100%;display:block;
  fill:none;stroke:var(--ds-wine);stroke-width:1.6;
  stroke-linecap:round;stroke-linejoin:round;
}
.ntl-ds-key-val{
  display:block;
  font-family:var(--ds-hfont);font-weight:var(--ds-hw);
  font-size:clamp(26px,2.6vw,36px);line-height:1;
  color:var(--ds-head);margin-bottom:10px;
}
.ntl-ds-key-lab{
  display:block;font-size:11px;font-weight:400;letter-spacing:.16em;
  text-transform:uppercase;color:var(--ds-text);
}

/* spec table */
.ntl-ds-table{margin:0 0 40px;padding:0}
.ntl-ds-group{
  font-family:var(--ds-hfont);font-weight:var(--ds-hw);
  font-size:11px;letter-spacing:.2em;text-transform:uppercase;color:var(--ds-wine);
  padding:26px 0 10px;
}
.ntl-ds-group:first-child{padding-top:0}
.ntl-ds-row{
  display:grid;grid-template-columns:44% 1fr;gap:18px;
  padding:12px 0;border-top:1px solid var(--ds-line);
}
.ntl-ds-row dt{margin:0;font-weight:400;color:var(--ds-text)}
.ntl-ds-row dd{margin:0;font-weight:var(--ds-hw);color:var(--ds-head)}
.ntl-ds-tbc{
  font-size:11px;font-weight:600;letter-spacing:.08em;color:var(--ds-wine);
  margin-left:6px;
}
.ntl-ds-tbc:first-child{margin-left:0}   /* when the placeholder is the whole value */

/* rows fade in, one after the other */
.ntl-ds-table > *{opacity:0;transform:translateY(10px);
  transition:opacity .6s ease, transform .6s var(--ds-ease)}
.ntl-ds-table.is-in > *{opacity:1;transform:none}

.ntl-ds-cta{margin-top:8px}

@media(max-width:575px){
  .ntl-ds-keys{grid-template-columns:1fr 1fr 1fr}
  .ntl-ds-key{padding-right:8px}
  .ntl-ds-key + .ntl-ds-key{padding-left:10px}
  .ntl-ds-row{grid-template-columns:1fr 1fr;gap:12px}
}

/* icons rise in, the rule draws left to right — triggered with the table */
.ntl-ds-key-ico{opacity:0;transform:translateY(8px);transition:opacity .6s ease,transform .6s var(--ds-ease)}
.ntl-ds-keys::before{transform:scaleX(0);transition:transform .9s var(--ds-ease)}
.ntl-ds-keys.is-in .ntl-ds-key-ico{opacity:1;transform:none}
.ntl-ds-keys.is-in .ntl-ds-key:nth-child(2) .ntl-ds-key-ico{transition-delay:.12s}
.ntl-ds-keys.is-in .ntl-ds-key:nth-child(3) .ntl-ds-key-ico{transition-delay:.24s}
.ntl-ds-keys.is-in::before{transform:none}

/* reduced motion: everything visible, nothing moves */
@media(prefers-reduced-motion:reduce){
  .ntl-ds *{transition:none !important}
  .ntl-dim-h,.ntl-dim-v,.ntl-ext-v,.ntl-ext-h,.ntl-tick{transform:none}
  .ntl-ds-label{opacity:1}
  .ntl-ds-label-w{transform:translate(-50%,0)}
  .ntl-ds-label-h{transform:translate(-50%,-50%) rotate(90deg)}
  .ntl-ds-table > *{opacity:1;transform:none}
  .ntl-ds-key-ico{opacity:1;transform:none}
  .ntl-ds-keys::before{transform:none}
}
