/* thirdwatchpartners.com/diseno — la misma página con el sistema de diseño de Third Watch.
   Tokens, tipografía y grano salen de apps/thirdwatch/marca (tokens.css y bundle.css).
   El servidor arma /diseno a partir de index.html y cambia solo el CSS y la cabecera:
   el contenido y el formulario son los mismos, así que nunca se desalinean. */

@font-face { font-family: "Quattrocento"; src: url("/diseno/fuentes/Quattrocento-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Quattrocento Sans"; src: url("/diseno/fuentes/QuattrocentoSans-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Quattrocento Sans"; src: url("/diseno/fuentes/QuattrocentoSans-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Quattrocento Sans"; src: url("/diseno/fuentes/QuattrocentoSans-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

/* Night es el tema principal: así se presenta la marca. Day (bone) con el botón de tema.
   La página guarda 'light'/'dark' en data-theme; aquí light = Day y todo lo demás = Night. */
:root {
  --surface: #02151c; --surface-raised: #112228; --surface-orange: #f48336; --surface-teal: #4bc1c3;
  --line: #2e3e41; --ink: #f7f6e7; --ink-muted: #a1a7a0; --ink-on-color: #02151c;
  --orange: #f48336; --orange-full: #f48336; --teal: #4bc1c3; --teal-full: #4bc1c3; --focus: #f48336;
  --grain-opacity: 0.1;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px;
  --space-6: 32px; --space-7: 48px; --space-8: 64px; --space-9: 96px;
  --radius-none: 0; --radius-sm: 2px; --radius-full: 999px;
  --font-serif: "Quattrocento", Georgia, "Times New Roman", serif;
  --font-sans: "Quattrocento Sans", "Gill Sans", "Trebuchet MS", sans-serif;
  --grain: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320'%3E%3Cfilter id='g' x='0' y='0' width='100%25' height='100%25' color-interpolation-filters='sRGB'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.8' numOctaves='1' stitchTiles='stitch' seed='7'/%3E%3CfeComponentTransfer%3E%3CfeFuncR type='linear' slope='3' intercept='-1'/%3E%3CfeFuncG type='linear' slope='3' intercept='-1'/%3E%3CfeFuncB type='linear' slope='3' intercept='-1'/%3E%3CfeFuncA type='table' tableValues='1 1'/%3E%3C/feComponentTransfer%3E%3CfeColorMatrix type='matrix' values='0.5 0.25 0.25 0 0  0.25 0.5 0.25 0 0  0.25 0.25 0.5 0 0  0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  color-scheme: dark;
}
:root[data-theme="light"], .tw-day {
  --surface: #f7f6e7; --surface-raised: #ffffff; --line: #d0d2c7; --ink: #02151c; --ink-muted: #4c5859;
  --orange: #a94f17; --teal: #1a7072; --focus: #02151c; --grain-opacity: 0.07;
  color-scheme: light;
}

html, body { overflow-x: clip; }
/* Con fondo propio en html, el del body se pinta en el body y el grano se mezcla contra midnight
   (si no, el fondo sube al lienzo y el grano se mezcla contra transparente: sale gris). */
html { background: var(--surface); }
body {
  margin: 0; background: var(--surface); color: var(--ink);
  font-family: var(--font-sans); font-size: 17px; line-height: 26px;
  padding-inline: clamp(16px, 6vw, 72px); -webkit-font-smoothing: antialiased;
  position: relative; isolation: isolate;
}
/* El grano va en el plano del sitio, nunca sobre texto ni logo: queda detrás del contenido. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: var(--grain); background-size: 320px 320px;
  mix-blend-mode: hard-light; opacity: var(--grain-opacity);
}
img { max-width: 100%; }
[hidden] { display: none !important; }
.wrap { max-width: 920px; margin: 0 auto; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--focus); outline-offset: 2px;
}

/* eyebrow: mayúsculas, 0.18em */
.mono { font-family: var(--font-sans); font-size: 13px; line-height: 16px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-muted); }

/* ---------- Cabecera ---------- */
header { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); flex-wrap: wrap; padding-block: var(--space-6) 0; }
header .brand { display: block; line-height: 0; }
header .brand img { width: 150px; height: auto; }
:root[data-theme="light"] .tw-night-only, :root:not([data-theme="light"]) .tw-day-only { display: none; }
.controls { display: flex; align-items: center; gap: var(--space-1); }
.controls button {
  font-family: var(--font-sans); font-size: 12px; font-weight: 700; letter-spacing: 0.18em; color: var(--ink-muted);
  background: none; border: 1px solid transparent; border-radius: var(--radius-full); padding: 6px 10px; cursor: pointer; line-height: 1;
}
.controls button:hover { color: var(--ink); }
.controls button[aria-pressed="true"] { color: var(--ink); border-color: var(--line); }
.controls .sep { width: 1px; height: 16px; background: var(--line); margin-inline: 6px; }
.controls .theme { font-size: 14px; letter-spacing: 0; padding: 5px 9px; }

/* ---------- Portada ---------- */
.hero { padding-block: clamp(72px, 13vw, 136px) clamp(56px, 9vw, 96px); border-bottom: 1px solid var(--line); }
.hero::before { content: ""; display: block; width: var(--space-7); border-top: 3px solid var(--orange-full); margin-bottom: var(--space-6); }
h1 {
  font-family: var(--font-serif); font-weight: 700; font-size: clamp(40px, 7.4vw, 72px); line-height: 1; letter-spacing: -0.01em;
  margin: 0 0 var(--space-6); text-wrap: balance; max-width: 17ch;
}
/* La cursiva es la voz del cliente: aquí el acento es color, no estilo. */
h1 em { font-style: normal; color: var(--orange); }
.lede { font-size: clamp(18px, 2.2vw, 22px); line-height: 1.45; color: var(--ink-muted); max-width: 54ch; margin: 0 0 var(--space-7); text-wrap: pretty; }

.cta {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-family: var(--font-sans); font-size: 15px; line-height: 20px; font-weight: 700; letter-spacing: 0.04em;
  padding: var(--space-3) var(--space-5); border-radius: var(--radius-none); text-decoration: none;
  background: var(--orange-full); color: var(--ink-on-color); border: 0; transition: background .15s;
}
.cta:hover { background: #f69a5b; }
.cta::after { content: "→"; }

/* ---------- Secciones ---------- */
section { padding-block: clamp(56px, 8vw, 96px); border-bottom: 1px solid var(--line); }
section:last-of-type { border-bottom: 0; }
.kicker { margin: 0 0 var(--space-2); color: var(--orange); }
h2 {
  font-family: var(--font-serif); font-weight: 700; font-size: clamp(30px, 4.4vw, 44px); line-height: 1.1;
  margin: 0 0 var(--space-6); text-wrap: balance; max-width: 22ch;
}
.sub { color: var(--ink-muted); max-width: 58ch; margin: calc(-1 * var(--space-2)) 0 var(--space-6); text-wrap: pretty; }
h3 { font-family: var(--font-serif); font-weight: 700; }

/* Cómo funciona: discos del reloj unidos por una línea fina. El primero lleno. */
.timeline { list-style: none; margin: 0; padding: 0; max-width: 680px; }
.timeline li { position: relative; display: grid; grid-template-columns: 40px 1fr; gap: var(--space-5); padding-bottom: var(--space-6); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: 19.5px; top: 40px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .n {
  width: 40px; height: 40px; border-radius: var(--radius-full); display: grid; place-items: center;
  font-family: var(--font-serif); font-weight: 700; font-size: 18px;
  background: var(--surface-raised); border: 1px solid var(--ink); color: var(--ink); box-sizing: border-box;
}
.timeline li:first-child .n { background: var(--orange-full); border-color: var(--orange-full); color: var(--ink-on-color); }
.timeline h3 { font-size: 22px; line-height: 1.2; margin: 7px 0 var(--space-2); }
.timeline p { margin: 0; color: var(--ink-muted); text-wrap: pretty; }
.timeline .benefit {
  margin-top: var(--space-4); padding: var(--space-3) var(--space-4); color: var(--ink);
  background: var(--surface-raised); border: 1px solid var(--line); border-left: 3px solid var(--teal-full);
}
.how-note { margin: var(--space-7) 0 0; padding: var(--space-4) var(--space-5); background: var(--surface-raised); border: 1px solid var(--line); color: var(--ink); max-width: 62ch; }
.how-note + .how-note { margin-top: var(--space-4); }

/* Tarjetas: superficie elevada, borde en line, sin sombra ni radio. */
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
.principles.two { grid-template-columns: repeat(2, 1fr); }
.principles > div { background: var(--surface-raised); border: 1px solid var(--line); padding: var(--space-5); }
.principles strong { display: block; font-family: var(--font-serif); font-weight: 700; font-size: 22px; line-height: 1.2; margin-bottom: var(--space-2); }
.principles p { margin: 0; color: var(--ink-muted); font-size: 16px; line-height: 24px; }

.steps { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); }
.step { display: grid; grid-template-columns: auto 1fr; gap: var(--space-4); align-items: start; background: var(--surface-raised); border: 1px solid var(--line); padding: var(--space-5); }
.step .n {
  width: 40px; height: 40px; border-radius: var(--radius-full); display: grid; place-items: center;
  font-family: var(--font-serif); font-weight: 700; font-size: 18px; background: var(--orange-full); color: var(--ink-on-color);
}
.step + .step .n { background: var(--teal-full); }
.step h3 { font-size: 22px; line-height: 1.2; margin: 7px 0 var(--space-3); }
.step p { margin: 0; color: var(--ink-muted); text-wrap: pretty; }
.step .tag {
  display: inline-block; margin-top: var(--space-4); font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--teal); border: 1px solid var(--line); border-radius: var(--radius-full); padding: 4px 10px;
}

.rules { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.rules .cl { display: block; margin: 0 0 var(--space-4); color: var(--teal); }
.rules .it { border-top: 1px solid var(--line); padding-top: var(--space-4); margin-bottom: var(--space-5); }
.rules .it:first-of-type { border-top: 3px solid var(--orange-full); }
.rules strong { display: block; font-family: var(--font-serif); font-weight: 700; font-size: 20px; line-height: 1.2; margin-bottom: var(--space-2); }
.rules p { margin: 0; color: var(--ink-muted); font-size: 16px; line-height: 24px; }

/* Herramientas */
.tools { margin-top: var(--space-2); display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-5) var(--space-6); }
.tools .cl { display: block; margin: 0 0 var(--space-3); color: var(--ink-muted); }
.tools .fila { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.tool { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; line-height: 20px; color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-full); padding: 4px 12px 4px 9px; }
.tool.on { border-color: var(--orange-full); background: var(--surface-raised); }
.tool.on .logo { background: var(--orange); }
.tool.off { color: var(--ink-muted); }
.logo { width: 14px; height: 14px; flex: none; background: var(--ink-muted); -webkit-mask: var(--logo) center/contain no-repeat; mask: var(--logo) center/contain no-repeat; }
.mono-logo { width: 16px; height: 16px; flex: none; border-radius: var(--radius-full); background: var(--line); color: var(--ink); font-size: 8px; font-weight: 700; display: grid; place-items: center; letter-spacing: 0; }

.role p { color: var(--ink-muted); max-width: 62ch; margin: 0 0 var(--space-4); text-wrap: pretty; }
.role ul { margin: var(--space-6) 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.role li { font-size: 14px; font-weight: 700; border: 1px solid var(--line); border-radius: var(--radius-full); padding: 5px 14px; }

/* Cierre: plano naranja de borde a borde, con grano. Todo el texto en ink-on-color. */
.final {
  position: relative; isolation: isolate; color: var(--ink-on-color);
  background: var(--surface-orange); box-shadow: 0 0 0 100vmax var(--surface-orange); clip-path: inset(0 -100vmax);
  border-bottom: 0;
}
.final::before {
  content: ""; position: absolute; inset: 0 -100vmax; z-index: -1; pointer-events: none;
  background-image: var(--grain); background-size: 320px 320px; mix-blend-mode: hard-light; opacity: 0.1;
}
.final .kicker { color: var(--ink-on-color); }
.final p { color: var(--ink-on-color); max-width: 50ch; margin: 0 0 var(--space-6); }
.final .cta { background: var(--ink-on-color); color: #f7f6e7; }
.final .cta:hover { background: #112228; }
.final .mail { display: block; margin-top: var(--space-5); font-size: 15px; font-weight: 700; color: var(--ink-on-color); text-decoration: underline; text-underline-offset: 3px; }
.final a:focus-visible { outline-color: var(--ink-on-color); }

footer { display: flex; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; padding-block: var(--space-6) var(--space-7); }
footer .mono { font-size: 12px; font-weight: 400; letter-spacing: 0.06em; }

@media (max-width: 640px) {
  .steps, .principles, .principles.two, .rules, .tools { grid-template-columns: 1fr; }
  .rules { gap: var(--space-2); }
}

/* ---------- Formulario ---------- */
.ov { position: fixed; inset: 0; background: color-mix(in srgb, #02151c 70%, transparent); display: flex; align-items: flex-end; justify-content: center; z-index: 50; }
@media (min-width: 640px) { .ov { align-items: center; padding: var(--space-5); } }
.modal {
  background: var(--surface); color: var(--ink); width: 100%; max-width: 640px; max-height: 92vh; overflow: auto;
  border: 1px solid var(--line); border-radius: var(--radius-none); padding: var(--space-6) clamp(20px, 5vw, 40px); box-sizing: border-box;
}
.modal .top { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); margin-bottom: var(--space-5); }
.modal .prog { font-size: 12px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--orange); }
.modal .x { background: none; border: 0; color: var(--ink-muted); font-size: 24px; line-height: 1; cursor: pointer; padding: 4px 8px; }
.modal .x:hover { color: var(--ink); }
.modal .bar { height: 3px; background: var(--line); margin-bottom: var(--space-6); }
.modal .bar i { display: block; height: 100%; background: var(--orange-full); transition: width .25s; }
.modal h3 { font-size: clamp(26px, 4vw, 30px); line-height: 1.15; margin: 0 0 var(--space-2); text-wrap: balance; }
.modal .hint { color: var(--ink-muted); margin: 0 0 var(--space-5); font-size: 15px; line-height: 22px; }
.modal label { display: block; font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-muted); margin: var(--space-5) 0 var(--space-2); }
.modal input[type=text], .modal input[type=email], .modal input[type=tel], .modal input[type=number] {
  width: 100%; box-sizing: border-box; font: inherit; font-size: 17px; color: var(--ink);
  background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px;
}
.modal input:focus { outline: none; border-color: var(--focus); }
.modal textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 15px; color: var(--ink); background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; }
.modal .busca { width: 100%; box-sizing: border-box; font: inherit; font-size: 15px; color: var(--ink); background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: var(--space-3); }
.modal .err { color: var(--orange); font-size: 14px; font-weight: 700; margin: var(--space-2) 0 0; min-height: 1.2em; }
.modal .actions { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); margin-top: var(--space-6); }
.modal .btn {
  font-family: var(--font-sans); font-size: 15px; line-height: 20px; font-weight: 700; letter-spacing: 0.04em;
  padding: var(--space-3) var(--space-5); border-radius: var(--radius-none); border: 0; background: var(--orange-full); color: var(--ink-on-color); cursor: pointer;
}
.modal .btn:hover { background: #f69a5b; }
.modal .ghost { background: none; color: var(--ink-muted); border: 1.5px solid var(--line); }
.modal .ghost:hover { background: none; color: var(--ink); border-color: var(--ink); }
.cat { margin-bottom: var(--space-4); }
.cat .cl { margin: 0 0 var(--space-2); }
.cat .cuenta { color: var(--ink-muted); font-weight: 400; letter-spacing: 0; }
.dos { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
@media (max-width: 520px) { .dos { grid-template-columns: 1fr; } }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chips + label { margin-top: var(--space-5); }
.chip { font-family: var(--font-sans); font-size: 14px; line-height: 18px; color: var(--ink); border: 1px solid var(--line); background: transparent; border-radius: var(--radius-full); padding: 7px 13px; cursor: pointer; }
.chip:hover { border-color: var(--ink-muted); }
.chip.more { border-style: dashed; color: var(--orange); }
.chip[aria-pressed="true"] { background: var(--orange-full); border-color: var(--orange-full); color: var(--ink-on-color); font-weight: 700; }
.chip .ic { width: 13px; height: 13px; margin-right: 6px; vertical-align: -2px; display: inline-block; background: currentColor; -webkit-mask: var(--logo) center/contain no-repeat; mask: var(--logo) center/contain no-repeat; }
.chip .mono { display: inline-block; width: 15px; margin-right: 6px; font-size: 9px; letter-spacing: 0; vertical-align: 1px; color: inherit; opacity: .7; }
.sum { background: var(--surface-raised); border: 1px solid var(--line); padding: var(--space-4) var(--space-5); font-size: 15px; }
.sum dl { margin: 0; }
.sum dt { font-size: 11px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-muted); margin-top: var(--space-3); }
.sum dt:first-child { margin-top: 0; }
.sum dd { margin: 2px 0 0; }
