/* ============================================================
   KONECT DIFFUSION — Base design system
   Shared tokens + common components across both directions
   ============================================================ */

:root {
  /* Surfaces */
  --ink:        #0b0b0d;
  --ink-2:      #0f0f12;
  --surface:    #121215;
  --surface-2:  #17171b;
  --line:       rgba(255,255,255,0.09);
  --line-soft:  rgba(255,255,255,0.05);

  /* Text */
  --white:      #f4f2ef;
  --gray:       #a2a2a8;
  --gray-dim:   #6b6b72;

  /* Accent — from the KD badge */
  --orange:     #d8742f;
  --orange-hi:  #ef8a3e;
  --orange-dim: rgba(216,116,47,0.16);
  --glow-rgb:   216,116,47;   /* accent as r,g,b for the ambiance glows */

  --maxw: 1240px;

  --font-sans: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Space Mono", ui-monospace, "SFMono-Regular", monospace;
  --font-display: var(--font-sans);   /* swapped by the Tipografía tweak */

  --ease: cubic-bezier(.22,.61,.36,1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--white);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--orange); color: #0b0b0d; }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 40px; }

/* ---- Eyebrow / technical label ---- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--orange);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: "";
  width: 7px; height: 7px;
  background: var(--orange);
  transform: rotate(45deg);
  flex: none;
}
.eyebrow.muted { color: var(--gray-dim); }
.eyebrow.muted::before { background: var(--gray-dim); }

/* ---- Diamond bullet ---- */
.dia { display:inline-block; width:7px; height:7px; background:var(--orange); transform:rotate(45deg); }

/* ---- Best-seller chip (shared) ---- */
.chip { font-size: 13px; color: var(--white); background: rgba(255,255,255,.04); border: 1px solid var(--line); padding: 6px 12px; border-radius: 2px; white-space: nowrap; flex: none; }

/* ---- Headings ---- */
h1,h2,h3 { font-weight: 700; line-height: 1.04; letter-spacing: -0.02em; }
.display {
  font-size: clamp(40px, 5.4vw, 74px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.0;
}
.h-sec { font-size: clamp(30px, 3.6vw, 52px); font-weight: 700; letter-spacing: -0.028em; }
.lead  { font-size: clamp(18px, 1.5vw, 22px); color: var(--gray); line-height: 1.6; }

.text-or { color: var(--orange); }
.text-mut { color: var(--gray); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 15px; font-weight: 600; letter-spacing: .01em;
  padding: 15px 26px; border-radius: 2px; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer;
  transition: all .35s var(--ease);
}
.btn .arr { transition: transform .35s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.btn-pri { background: var(--orange); color: #140a03; }
.btn-pri:hover { background: var(--orange-hi); }
.btn-ghost { border-color: var(--line); color: var(--white); background: transparent; }
.btn-ghost:hover { border-color: rgba(255,255,255,.4); background: rgba(255,255,255,.03); }

/* ---- Top navigation ---- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .4s var(--ease), border-color .4s var(--ease), backdrop-filter .4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(11,11,13,0.82);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 96px; }
.brand { display: flex; align-items: center; gap: 15px; }
.brand img { width: 74px; height: 74px; border-radius: 50%; }
.brand-name { font-weight: 700; font-size: 15px; letter-spacing: .08em; line-height: 1; text-transform: uppercase; }
.brand-k { color: var(--orange); }
.brand-name em { display:block; font-style: normal; font-family:var(--font-mono); font-size:9.5px; letter-spacing:.26em; color:var(--gray-dim); text-transform:uppercase; margin-top:4px; }
.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a { font-size: 14.5px; color: var(--gray); transition: color .25s; position: relative; white-space: nowrap; }
.nav-links a:hover { color: var(--white); }
.nav-right { display: flex; align-items: center; gap: 22px; }
.lang { font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; color: var(--gray); border: 1px solid var(--line); padding: 6px 11px; border-radius: 2px; }

/* ---- Image placeholder ---- */
.ph {
  position: relative; overflow: hidden;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.022) 0 2px, transparent 2px 11px),
    linear-gradient(160deg, #1a1613, #0c0c0e 70%);
  border: 1px solid var(--line-soft);
}
.ph::after {
  content: attr(data-label);
  position: absolute; left: 18px; bottom: 16px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em;
  color: rgba(255,255,255,.34); text-transform: uppercase;
}
.ph .glow {
  position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 80% 10%, rgba(216,116,47,.16), transparent 55%);
  pointer-events: none;
}

/* ---- Real scene background image ---- */
.scene { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }

/* ---- Floating product panel (transparent cut-out on warm-lit dark) ---- */
.prod { position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden;
  background:
    radial-gradient(78% 80% at 50% 34%, rgba(216,116,47,.18), transparent 62%),
    linear-gradient(158deg, #1c1814 0%, #0c0c0e 74%);
}
.prod::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 -60px 80px rgba(0,0,0,.45); pointer-events: none; }
.prod img { position: relative; z-index: 1; max-width: 72%; max-height: 84%; width: auto; height: auto; object-fit: contain; filter: drop-shadow(0 26px 46px rgba(0,0,0,.55)); }
.framed .prod, .framed .scene { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---- Footer ---- */
.foot { border-top: 1px solid var(--line); padding: 64px 0 40px; background: var(--ink-2); }
.foot-top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; padding-bottom: 48px; border-bottom: 1px solid var(--line-soft); }
.foot-brand { display:flex; align-items:center; gap:18px; }
.foot-brand img { width: 138px; height: 138px; border-radius: 50%; }
.foot-cols { display: flex; gap: 72px; flex-wrap: wrap; }
.foot-col h5 { font-family: var(--font-mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--gray-dim); margin-bottom: 16px; font-weight: 400; }
.foot-col a, .foot-col p { display:block; font-size: 14.5px; color: var(--gray); margin-bottom: 9px; }
.foot-col a:hover { color: var(--white); }
.foot-bottom { display:flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 28px; font-size: 13px; color: var(--gray-dim); font-family: var(--font-mono); letter-spacing: .04em; }

/* ---- Scroll reveal (JS scrubs opacity/transform from scroll position) ---- */
.reveal { opacity: 0; transform: translateY(28px); will-change: opacity, transform; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto; }
}
@media print { .reveal { opacity: 1 !important; transform: none !important; } }

/* ---- On-load entrance animation ---- */
@keyframes kd-intro-key { from { opacity: 0; transform: translateY(46px) scale(.985); filter: blur(7px); } to { opacity: 1; transform: none; filter: blur(0); } }
.kd-intro { opacity: 1; animation: kd-intro-key 1s var(--ease) both; }
@media (prefers-reduced-motion: reduce) { .kd-intro { animation: none !important; } }

/* ---- Direction switcher (review aid) ---- */
.switch {
  position: fixed; z-index: 300; right: 22px; bottom: 22px;
  display: flex; align-items: center; gap: 4px;
  background: rgba(18,18,21,.86); backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: 100px; padding: 5px;
  box-shadow: 0 10px 40px rgba(0,0,0,.5);
}
.switch span { font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em; color: var(--gray-dim); padding: 0 8px 0 12px; text-transform: uppercase; }
.switch a { font-size: 13px; font-weight: 600; color: var(--gray); padding: 8px 14px; border-radius: 100px; transition: all .25s; white-space: nowrap; }
.switch a.active { background: var(--orange); color: #140a03; }
.switch a:not(.active):hover { color: var(--white); }

/* ---- Section rhythm ---- */
section { position: relative; z-index: 1; }
.sec-pad { padding: clamp(90px, 11vw, 160px) 0; }

@media (max-width: 860px) {
  .wrap { padding: 0 22px; }
  .nav-links { display: none; }
}

/* ============================================================
   TWEAKABLE LAYERS — driven by the Tweaks panel
   ============================================================ */

/* --- Atmósfera: animated orange-glow background --- */
.ambiance { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; opacity: 0; transition: opacity .8s ease; }
body.amb-calido .ambiance, body.amb-vivo .ambiance { opacity: 1; }
.ambiance .blob { position: absolute; border-radius: 50%; filter: blur(90px); will-change: transform; background: radial-gradient(circle, rgba(var(--glow-rgb), .42), transparent 66%); }
.ambiance .b1 { width: 50vw; height: 50vw; left: -12vw; top: 2vh; opacity: .30; }
.ambiance .b2 { width: 42vw; height: 42vw; right: -10vw; top: 38vh; opacity: .24; }
.ambiance .b3 { width: 36vw; height: 36vw; left: 34vw; bottom: -12vh; opacity: .18; }
/* Drift is driven from JS (site.js) — CSS keyframe animations & transitions are
   frozen in some embedded preview contexts, so JS sets transforms directly. */

/* --- Tipografía: heading tone --- */
.display, .h-sec, h1, h2, h3 { font-family: var(--font-display); }
body.type-editorial { --font-display: "Instrument Serif", Georgia, "Times New Roman", serif; }
body.type-editorial .display, body.type-editorial .h-sec, body.type-editorial h1, body.type-editorial h2, body.type-editorial h3 { font-weight: 400; letter-spacing: -.005em; line-height: 1.12; }
body.type-editorial .display { line-height: 1.1; }
body.type-tecnico .display, body.type-tecnico .h-sec, body.type-tecnico h1, body.type-tecnico h2, body.type-tecnico h3 { text-transform: uppercase; letter-spacing: -.012em; font-weight: 800; }
