/* Daliven · estilo común de la web.
   Mundo: el visor de una cámara. Cada página es un visor (esquinas de color) que enfoca
   el día a día que resuelve una app. Daliven es blanco papel sobre negro; cada app aporta
   su color con --accent (y Tutoa, además, su fondo azul marino y su tipografía). */

@font-face { font-family: "Archivo"; src: url("../fonts/archivo.woff2") format("woff2"); font-weight: 400 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("../fonts/instrument-sans.woff2") format("woff2"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 500 700; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("../fonts/plus-jakarta-sans.woff2") format("woff2"); font-weight: 500 800; font-display: swap; }

:root {
  --ink: #0B0B0C;
  --panel: #151517;
  --panel-2: #1D1D20;
  --line: #2B2A27;
  --paper: #F2EEE4;
  --muted: #A39E91;
  --kcal: #CFAE62;
  --tutoa: #F2B544;
  --tutoa-navy: #0B1431;
  --accent: var(--paper);
  --font-display: "Archivo", "Arial Narrow", "Helvetica Neue", sans-serif;
  --font-body: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --font-data: "JetBrains Mono", ui-monospace, "Consolas", monospace;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  color-scheme: dark;
}
.t-kcal { --accent: var(--kcal); }
.t-tutoa {
  --ink: #0B1431; --panel: #111D45; --panel-2: #17255A; --line: #26356B;
  --paper: #FFFFFF; --muted: #C9D2EC; --accent: var(--tutoa);
  --font-display: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scrollbar-color: color-mix(in srgb, var(--paper) 25%, var(--ink)) var(--ink); scroll-behavior: smooth; }
body { margin: 0; background: var(--ink); color: var(--paper); font-family: var(--font-body); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
::selection { background: var(--accent); color: var(--ink); }
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); text-wrap: balance; }
p { margin: 0; }
.gutter { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.inner { max-width: 1200px; margin: 0 auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); color: var(--ink); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }

/* ---------- Visor ---------- */
.viewfinder { position: relative; padding-block: 18px 44px; }
.corners { position: absolute; inset: 10px max(10px, env(safe-area-inset-left, 0px)) 10px max(10px, env(safe-area-inset-right, 0px)); pointer-events: none; }
.corners i { position: absolute; width: 34px; height: 34px; border: 0 solid var(--accent); transition: border-color .6s var(--ease-out); }
.corners i:nth-child(1) { top: 0; left: 0; border-top-width: 2px; border-left-width: 2px; border-top-left-radius: 10px; }
.corners i:nth-child(2) { top: 0; right: 0; border-top-width: 2px; border-right-width: 2px; border-top-right-radius: 10px; }
.corners i:nth-child(3) { bottom: 0; left: 0; border-bottom-width: 2px; border-left-width: 2px; border-bottom-left-radius: 10px; }
.corners i:nth-child(4) { bottom: 0; right: 0; border-bottom-width: 2px; border-right-width: 2px; border-bottom-right-radius: 10px; }

.camerabar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: "Archivo", sans-serif; font-weight: 800; font-stretch: 112%; font-size: 21px; letter-spacing: -0.01em; text-decoration: none; color: inherit; }
.brand svg { flex: none; }
.camerabar nav { display: flex; gap: 26px; font-size: 15px; color: var(--muted); }
.camerabar nav a { text-decoration: none; transition: color .2s var(--ease-out); }
.camerabar nav a:hover, .camerabar nav a[aria-current="page"] { color: var(--paper); }

.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); grid-template-areas: "copy stage" "action stage"; column-gap: 48px; row-gap: 28px; align-items: end; padding-top: 28px; }
.copy { grid-area: copy; align-self: end; display: grid; gap: 20px; }
.display { font-weight: 850; font-stretch: 78%; text-transform: uppercase; font-size: clamp(44px, 7vw, 92px); line-height: .9; letter-spacing: -0.02em; }
.display span { color: var(--accent); display: block; transition: color .6s var(--ease-out); }
.t-tutoa .display { text-transform: none; font-weight: 800; font-size: clamp(40px, 5.6vw, 72px); line-height: 1.02; letter-spacing: -0.025em; }
.lead { color: var(--muted); font-size: 19px; max-width: 44ch; }
.action { grid-area: action; align-self: start; display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.shutter { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; font-weight: 600; font-size: 17px; }
.shutter .ring { width: 64px; height: 64px; border-radius: 50%; border: 2px solid var(--accent); display: grid; place-items: center; transition: transform .25s var(--ease-out); flex: none; }
.shutter .ring b { width: 48px; height: 48px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; transition: transform .25s var(--ease-out); }
.shutter .ring svg { stroke: var(--ink); }
.shutter:hover .ring b { transform: scale(.9); }
.shutter:active .ring { transform: scale(.94); }
.shutter small { display: block; color: var(--muted); font-weight: 400; font-size: 14px; }
.textlink { color: var(--muted); font-size: 15px; }
.textlink:hover { color: var(--paper); }

/* ---------- Escenario animado (portada) ---------- */
.stage-wrap { grid-area: stage; display: grid; gap: 14px; justify-items: center; }
.stage { position: relative; width: 100%; max-width: 580px; aspect-ratio: 1; }
.scene { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .5s var(--ease-out), visibility 0s .5s; }
.scene.on { opacity: 1; visibility: visible; transition: opacity .5s var(--ease-out), visibility 0s; }
.scene svg.art { position: absolute; inset: 9%; width: 82%; height: 82%; }
.scan { position: absolute; left: 8%; right: 8%; top: 8%; height: 2px; background: var(--accent); box-shadow: 0 0 18px 2px color-mix(in srgb, var(--accent) 55%, transparent); opacity: 0; pointer-events: none; }
.stage.run .scan { animation: sweep 1.6s var(--ease-out) forwards; }
@keyframes sweep { 0% { opacity: 1; transform: translateY(0); } 85% { opacity: 1; } 100% { opacity: 0; transform: translateY(calc(var(--h, 500px) * .84)); } }
.focus { position: absolute; border: 1.5px solid var(--accent); border-radius: 12px; transition: opacity .45s var(--ease-out), transform .5s var(--ease-out); }
.tag { position: absolute; display: grid; gap: 2px; background: rgba(11, 11, 12, .84); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; font-size: clamp(11px, 1.35vw, 14px); white-space: nowrap; box-shadow: 0 10px 30px rgba(0,0,0,.45); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out), filter .6s var(--ease-out); }
.tag b { font-weight: 600; }
.tag span { font-family: var(--font-data); color: var(--muted); font-variant-numeric: tabular-nums; font-size: .92em; }
.tag span em { font-style: normal; color: var(--accent); }
.scene.pre .tag, .scene.pre .focus { opacity: 0; transform: translateY(8px) scale(.97); filter: blur(6px); }
.result { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 9px 18px 9px 10px; white-space: nowrap; }
.result .app { font-family: "Archivo", sans-serif; font-weight: 800; font-size: 13px; color: var(--ink); background: var(--accent); border-radius: 99px; padding: 3px 10px; }
.result output { font-family: var(--font-data); font-weight: 700; font-size: clamp(16px, 2.1vw, 22px); color: var(--paper); font-variant-numeric: tabular-nums; }
.result small { color: var(--muted); font-size: 13px; }
.sim { position: absolute; left: 0; top: 4px; font-family: var(--font-data); font-size: 11px; color: var(--muted); }
.switch { display: flex; gap: 6px; padding: 5px; border: 1px solid var(--line); border-radius: 99px; background: var(--panel); }
.switch button { font: 600 14px var(--font-body); color: var(--muted); background: none; border: 0; border-radius: 99px; padding: 7px 16px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: color .2s var(--ease-out), background .3s var(--ease-out); }
.switch button i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.switch button:hover { color: var(--paper); }
.switch button[aria-selected="true"] { color: var(--paper); background: var(--panel-2); }

/* ---------- Secciones ---------- */
section { padding-block: 96px; }
.band { background: var(--panel); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: end; margin-bottom: 48px; }
.section-head h2 { font-weight: 800; font-stretch: 85%; font-size: clamp(32px, 4.4vw, 58px); line-height: .98; letter-spacing: -0.015em; }
.t-tutoa .section-head h2 { line-height: 1.05; letter-spacing: -0.02em; }
.section-head p { color: var(--muted); max-width: 46ch; }

.apps-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.apps-list li { --c: var(--paper); display: grid; grid-template-columns: 72px minmax(0, 1fr) minmax(0, 1.9fr) 190px; gap: 24px; align-items: center; padding-block: 26px; border-bottom: 1px solid var(--line); transition: background .3s var(--ease-out); }
.apps-list li:hover { background: linear-gradient(90deg, color-mix(in srgb, var(--c) 8%, transparent), transparent 70%); }
.appicon { width: 60px; height: 60px; border-radius: 16px; display: grid; place-items: center; overflow: hidden; border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); }
.appicon img { width: 70%; height: 70%; object-fit: contain; }
.apps-list h3 { font-size: 30px; font-weight: 800; }
.apps-list h3 small { display: block; font-family: var(--font-body); font-weight: 500; font-size: 13px; color: var(--muted); margin-top: 4px; }
.apps-list p { color: var(--muted); }
.rowaction { justify-self: end; display: grid; justify-items: end; gap: 6px; }
.btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; text-decoration: none; padding: 10px 16px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--c, var(--accent)) 45%, transparent); color: var(--c, var(--accent)); transition: background .2s var(--ease-out); }
.btn:hover { background: color-mix(in srgb, var(--c, var(--accent)) 12%, transparent); }
.btn.solid { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.btn.solid:hover { filter: brightness(1.06); background: var(--accent); }
.state { font-family: var(--font-data); font-size: 12px; color: var(--muted); }
.addnext { margin-top: 22px; color: var(--muted); font-size: 15px; }

.label-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 64px; align-items: start; }
.label-wrap .section-head { grid-template-columns: minmax(0, 1fr); margin-bottom: 0; }
.ways { margin-top: 36px; display: grid; gap: 22px; }
.way { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; align-items: start; }
.way svg { width: 44px; height: 44px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; color: var(--accent); }
.way h3 { font-size: 21px; font-weight: 700; margin-bottom: 2px; }
.way p { color: var(--muted); }
.facts { background: #F2EEE4; color: #0B0B0C; padding: 18px 20px 20px; border-radius: 6px; }
.facts h3 { font-family: "Archivo", sans-serif; font-weight: 900; font-stretch: 70%; font-size: 38px; text-transform: uppercase; line-height: 1; border-bottom: 10px solid #0B0B0C; padding-bottom: 8px; }
.facts .sub { font-size: 14px; padding-block: 6px; border-bottom: 4px solid #0B0B0C; }
.facts dl { margin: 0; }
.facts .row { display: flex; justify-content: space-between; gap: 16px; padding-block: 8px; border-bottom: 1px solid #1a1a1a; font-size: 15px; }
.facts dt { font-weight: 600; }
.facts dd { margin: 0; text-align: right; font-family: var(--font-data); font-size: 13px; }
.facts .foot { font-size: 12px; padding-top: 10px; color: #3b3a36; }

/* ---------- Página de app ---------- */
.app-hero-visual { grid-area: stage; justify-self: center; width: 100%; max-width: 620px; }
.app-hero-visual img { border-radius: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.media-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.phone { width: min(320px, 100%); justify-self: center; aspect-ratio: 9 / 16; border-radius: 36px; padding: 10px; background: #000; border: 1px solid var(--line); box-shadow: 0 30px 80px color-mix(in srgb, var(--accent) 18%, transparent); }
.phone video { width: 100%; height: 100%; object-fit: cover; border-radius: 28px; background: #000; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 14px; counter-increment: s; }
.steps li::before { content: counter(s); width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--accent); color: var(--accent); display: grid; place-items: center; font-family: var(--font-data); font-size: 14px; }
.steps b { display: block; }
.steps span { color: var(--muted); }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.gallery figure { margin: 0; }
.gallery img { border-radius: 16px; border: 1px solid var(--line); }
.plans { width: 100%; border-collapse: collapse; font-size: 15px; }
.plans th, .plans td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.plans th { color: var(--muted); font-weight: 600; font-size: 13px; }
.plans td:nth-child(2), .plans td:nth-child(3) { color: var(--muted); }
.plans td:nth-child(3) { color: var(--paper); }
.table-scroll { overflow-x: auto; }
.note { color: var(--muted); font-size: 14px; margin-top: 16px; }

/* ---------- Texto legal ---------- */
.legal { max-width: 72ch; margin: 0 auto; padding-block: 48px 96px; }
.legal h1 { font-size: clamp(32px, 4vw, 48px); font-weight: 800; font-stretch: 90%; margin-bottom: 12px; }
.legal h2 { font-size: 22px; font-weight: 700; margin: 36px 0 10px; }
.legal p { color: var(--muted); margin-bottom: 10px; }
.draft { border: 1px solid #C4574B; color: #F0B3AB; border-radius: 12px; padding: 12px 14px; font-size: 14px; margin-block: 16px 8px; }
.ph { background: color-mix(in srgb, #C4574B 25%, transparent); color: var(--paper); padding: 0 4px; border-radius: 4px; }

footer { border-top: 1px solid var(--line); }
footer .inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding-block: 28px; color: var(--muted); font-size: 14px; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--paper); }
.mail { font-family: var(--font-data); color: var(--paper); user-select: all; }

@media (max-width: 880px) {
  .hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy" "stage" "action"; padding-top: 8px; }
  .camerabar nav { display: none; }
  .section-head, .label-wrap, .media-split { grid-template-columns: minmax(0, 1fr); }
  .apps-list li { grid-template-columns: 60px minmax(0, 1fr); row-gap: 10px; }
  .apps-list li p, .rowaction { grid-column: 2; justify-self: start; justify-items: start; }
  .gallery { grid-template-columns: minmax(0, 1fr); max-width: 460px; }
  section { padding-block: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stage.run .scan { animation: none; }
  .tag, .focus, .scene, .corners i, .display span { transition: none; }
}
