/* =========================================================================
   Smoke Machine · Landing v0 · styles.css
   Referencia canónica: products/smoke-machine/DESIGN.md §11
   ========================================================================= */

/* -------- Fonts (self-hosted) ------------------------------------------- */

@font-face {
  font-family: 'Space Grotesk';
  src: url('/fonts/SpaceGrotesk-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IBM Plex Sans';
  src: url('/fonts/IBMPlexSans-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IBM Plex Sans';
  src: url('/fonts/IBMPlexSans-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/JetBrainsMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/JetBrainsMono-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* -------- Tokens -------------------------------------------------------- */

:root {
  /* Color */
  --sm-ink: #0A0A0A;
  --sm-paper: #FAFAF7;
  --sm-grain: #8A8680;
  --sm-signal: #E9A317;
  --sm-signal-hot: #F3B43D;

  /* Tipografía */
  --sm-font-voice: 'Space Grotesk', system-ui, sans-serif;
  --sm-font-body: 'IBM Plex Sans', system-ui, sans-serif;
  --sm-font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  /* Landing v0 — márgenes y tamaños */
  --sm-v0-margin-x: 96px;
  --sm-v0-margin-y: 48px;
  --sm-v0-headline-size: 5rem;      /* 80px */
  --sm-v0-subcopy-size: 1.25rem;    /* 20px */
  --sm-v0-email-size: 1.5rem;       /* 24px */
  --sm-v0-label-size: 0.6875rem;    /* 11px */
  --sm-v0-tagline-size: 0.875rem;   /* 14px */
  --sm-v0-meta-size: 0.75rem;       /* 12px */
}

@media (max-width: 768px) {
  :root {
    --sm-v0-margin-x: 24px;
    --sm-v0-margin-y: 24px;
    --sm-v0-headline-size: 3rem;    /* 48px */
    --sm-v0-subcopy-size: 1rem;     /* 16px */
    --sm-v0-email-size: 1.25rem;    /* 20px */
  }
}

/* -------- Reset --------------------------------------------------------- */

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

html,
body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background: var(--sm-ink);
  color: var(--sm-paper);
  font-family: var(--sm-font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  position: relative;
}

/* -------- Fondo capa 2: radial overlay --------------------------------- */

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    rgba(10, 10, 10, 0.40) 0%,
    rgba(10, 10, 10, 0.85) 100%
  );
  z-index: 1;
  pointer-events: none;
}

/* -------- Fondo capa 1: video (desktop) -------------------------------- */

.bg-video {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  object-fit: cover;
  filter: blur(3px);
  opacity: 0.25;
  z-index: 0;
  pointer-events: none;
}

/* -------- Fondo capa 1b: still (mobile / reduced-motion) --------------- */

.bg-still {
  display: none;
  position: fixed;
  inset: 0;
  background: url('/video/smoke-v0-still.jpg') center/cover no-repeat;
  filter: blur(3px);
  opacity: 0.25;
  z-index: 0;
  pointer-events: none;
}

@media (max-width: 768px), (prefers-reduced-motion: reduce) {
  .bg-video { display: none; }
  .bg-still { display: block; }
}

/* -------- Fondo capa 3: grano SVG -------------------------------------- */

.bg-grain {
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.54 0 0 0 0 0.52 0 0 0 0 0.50 0 0 0 0.4 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.06;
  z-index: 2;
  pointer-events: none;
  mix-blend-mode: overlay;
}

/* -------- Canvas (contenedor de las 5 anclas) -------------------------- */

.canvas {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 10;
}

/* -------- Ancla 1: Metadata top-left ----------------------------------- */

.anchor-meta {
  position: absolute;
  top: var(--sm-v0-margin-y);
  left: var(--sm-v0-margin-x);
  font: 400 var(--sm-v0-meta-size) var(--sm-font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sm-grain);
  line-height: 1;
}

/* -------- Ancla 2: SM seal top-right ----------------------------------- */

.sm-seal {
  position: absolute;
  top: var(--sm-v0-margin-y);
  right: var(--sm-v0-margin-x);
  width: 40px;
  height: 40px;
  border: 1px solid var(--sm-grain);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 700 14px var(--sm-font-mono);
  color: var(--sm-grain);
  letter-spacing: 0;
  line-height: 1;
}

@media (max-width: 768px) {
  .sm-seal {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }
}

/* -------- Ancla 3: Composición central --------------------------------- */

.composition {
  position: absolute;
  top: 46%;
  left: calc((100vw / 12) + var(--sm-v0-margin-x) / 2);
  transform: translateY(-50%);
  max-width: min(1100px, calc(100vw - 2 * var(--sm-v0-margin-x)));
}

@media (max-width: 768px) {
  .composition {
    top: 42%;
    left: var(--sm-v0-margin-x);
    right: var(--sm-v0-margin-x);
    max-width: none;
  }
}

.headline {
  font: 700 var(--sm-v0-headline-size) var(--sm-font-voice);
  letter-spacing: -0.03em;
  line-height: 0.95;
  color: var(--sm-paper);
  /* Ancho amplio para que los <br> manden sobre el wrap natural.
     Los breaks están hardcoded en el HTML: 3 líneas con "otros" aislado. */
  max-width: none;
  white-space: normal;
}

.subcopy {
  font: 400 var(--sm-v0-subcopy-size) var(--sm-font-body);
  line-height: 1.45;
  color: var(--sm-grain);
  margin-top: 32px;
}

/* -------- CTA ---------------------------------------------------------- */

.cta-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 56px;
  text-decoration: none;
  color: inherit;
  max-width: 520px;
}

.cta-label {
  font: 400 var(--sm-v0-label-size) var(--sm-font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sm-grain);
  line-height: 1;
}

.cta-email {
  font: 400 var(--sm-v0-email-size) var(--sm-font-mono);
  color: var(--sm-signal);
  transition: color 150ms cubic-bezier(0.2, 0, 0, 1);
  line-height: 1.2;
  word-break: break-all;
  text-decoration: none;
}

.cta-tagline {
  font: 400 var(--sm-v0-tagline-size) var(--sm-font-body);
  font-style: italic;
  color: var(--sm-grain);
  line-height: 1.4;
}

.cta-block:hover .cta-email,
.cta-block:focus-visible .cta-email {
  color: var(--sm-signal-hot);
}

.cta-block:focus-visible {
  outline: 2px solid var(--sm-paper);
  outline-offset: 4px;
}

/* -------- Ancla 4: Footer bottom-left ---------------------------------- */

.anchor-footer {
  position: absolute;
  bottom: var(--sm-v0-margin-y);
  left: var(--sm-v0-margin-x);
  font: 400 var(--sm-v0-meta-size) var(--sm-font-mono);
  letter-spacing: 0.05em;
  color: var(--sm-grain);
  line-height: 1;
  max-width: calc(100vw - 2 * var(--sm-v0-margin-x) - 200px);
}

@media (max-width: 768px) {
  .anchor-footer {
    font-size: 11px;
    max-width: calc(100vw - 2 * var(--sm-v0-margin-x));
    /* Se mantiene en bottom-left; el timestamp se oculta abajo. */
  }
}

/* -------- Ancla 5: Timestamp bottom-right ------------------------------ */

.anchor-timestamp {
  position: absolute;
  bottom: var(--sm-v0-margin-y);
  right: var(--sm-v0-margin-x);
  font: 400 var(--sm-v0-meta-size) var(--sm-font-mono);
  letter-spacing: 0.05em;
  color: var(--sm-grain);
  line-height: 1;
  text-align: right;
}

@media (max-width: 768px) {
  /* Mobile: ocultamos timestamp — espacio para footer + aire.
     El timestamp vive en el HTML para lectores de pantalla. */
  .anchor-timestamp {
    display: none;
  }
}

/* -------- Selección ---------------------------------------------------- */

::selection {
  background: var(--sm-signal);
  color: var(--sm-ink);
}
