/* Home: marco del editor, pila de capas en 3D, qué incluye, privacidad y atajos */

/* ---------- Marco del editor ---------- */
.app {
  margin: clamp(40px, 6vw, 76px) 0 0; background: var(--chrome); color: var(--fg-2);
  border-radius: 12px; overflow: hidden; font-size: 12px; line-height: 1.2; user-select: none;
  box-shadow: 0 0 0 1px var(--line), 0 60px 140px -50px rgb(0 0 0 / .85);
}
.app-menubar { height: 30px; display: flex; align-items: center; gap: 15px; padding: 0 12px; border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden; }
.app-menubar .m { color: var(--fg); }
.app-menubar .spacer { margin-left: auto; }
.app-menubar .ws { padding: 3px 9px; border: 1px solid var(--line-2); border-radius: 5px; }
.app-options { height: 36px; display: flex; align-items: center; gap: 18px; padding: 0 12px; border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden; }
.app-options .tool-ico { color: var(--fg); display: flex; }
.field { display: inline-block; margin-left: 6px; padding: 3px 8px; border: 1px solid var(--line-2); border-radius: 4px; color: var(--fg); }
.app-body { display: grid; grid-template-columns: 44px minmax(0, 1fr) 272px; }
.app-tools { border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0; }
.tool { width: 30px; height: 27px; display: grid; place-items: center; border-radius: 4px; color: var(--fg-2); }
.tool.on { background: var(--panel); color: var(--fg); box-shadow: inset 0 0 0 1px var(--line-2); }
.tool svg { width: 17px; height: 17px; }
.swatches { position: relative; width: 26px; height: 26px; margin-top: 10px; }
.swatches span { position: absolute; width: 16px; height: 16px; border: 1px solid var(--line-2); }
.swatches .fgc { left: 0; top: 0; background: var(--fg); z-index: 1; }
.swatches .bgc { right: 0; bottom: 0; background: #000; }
.app-center { display: flex; flex-direction: column; min-width: 0; background: var(--board); }
.doc-tabs { height: 30px; display: flex; align-items: stretch; background: var(--chrome); border-bottom: 1px solid var(--line); overflow: hidden; }
.doc-tab { display: flex; align-items: center; gap: 10px; padding: 0 12px; background: var(--board); color: var(--fg); border-right: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-tab .x { color: var(--fg-3); }
.app-canvas { position: relative; padding: clamp(12px, 3.2vw, 44px); display: grid; place-items: center; flex: 1; }
.compare {
  --pos: 50;
  position: relative; width: 100%; aspect-ratio: 3 / 2; max-width: 100%; overflow: hidden;
  touch-action: pan-y; cursor: ew-resize; background: #000;
  box-shadow: 0 14px 40px rgb(0 0 0 / .5);
}
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; user-select: none; }
/* .img-after { filter: url(#revelado) } va en línea en la página: el filtro vive en su SVG */
.img-before { filter: contrast(.8) saturate(.58) brightness(1.07); }
.before-clip { position: absolute; inset: 0; overflow: hidden; transform: translateX(calc((var(--pos) - 100) * 1%)); }
.before-inner { position: absolute; inset: 0; transform: translateX(calc((100 - var(--pos)) * 1%)); }
.cmp-label { position: absolute; top: 12px; font-size: 13px; font-weight: 500; color: var(--on-photo); text-shadow: 0 1px 3px rgb(0 0 0 / .75); pointer-events: none; }
.cmp-label.l { left: 14px; }
.cmp-label.r { right: 14px; }
.handle-track { position: absolute; inset: 0; pointer-events: none; transform: translateX(calc((var(--pos) - 50) * 1%)); }
.handle-line { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--on-photo); box-shadow: 0 0 0 1px rgb(0 0 0 / .2); }
.knob {
  position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px;
  border-radius: 50%; background: var(--on-photo); color: var(--bg); display: grid; place-items: center;
  pointer-events: auto; cursor: ew-resize; box-shadow: 0 6px 18px rgb(0 0 0 / .45);
}
.knob:focus-visible { outline: 3px solid var(--select); outline-offset: 3px; border-radius: 50%; }
.drop-overlay {
  position: absolute; inset: 10px; display: grid; place-items: center; text-align: center; padding: 16px;
  background: var(--scrim); color: var(--fg); font-size: 15px; opacity: 0; pointer-events: none; transition: opacity .15s;
}
.drop-overlay svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.app-canvas.is-over .drop-overlay { opacity: 1; }
.ants { fill: none; stroke-width: 1.5; stroke-dasharray: 6 6; vector-effect: non-scaling-stroke; }
.ants.a { stroke: #000; }
.ants.b { stroke: #fff; stroke-dashoffset: 6; animation: march 0.6s linear infinite; animation-play-state: paused; }
/* las hormigas solo marchan cuando se ven: al arrastrar un archivo y en la selección de la vista previa de atajos */
.app-canvas.is-over .ants.b, .fx-sel.is-visible .ants.b { animation-play-state: running; }
@keyframes march { to { stroke-dashoffset: -6; } }
.app-panels { border-left: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; }
.panel { border-bottom: 1px solid var(--line); }
.panel-tabs { display: flex; gap: 14px; height: 30px; align-items: center; padding: 0 12px; border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden; }
.panel-tabs .on { color: var(--fg); font-weight: 500; }
.props { padding: 10px 12px 12px; display: grid; gap: 9px; }
.props-title { display: flex; align-items: center; gap: 8px; color: var(--fg); font-weight: 500; }
.props-row { display: flex; justify-content: space-between; gap: 8px; }
.curve-graph { width: 100%; aspect-ratio: 1; background: var(--board); border: 1px solid var(--line); }
.readout { display: flex; gap: 16px; }
.readout b { color: var(--fg); font-weight: 500; }
.layers-panel { flex: 1; display: flex; flex-direction: column; }
.layers-opts { display: flex; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.layer { display: grid; grid-template-columns: 16px auto minmax(0, 1fr) auto; align-items: center; gap: 8px; height: 40px; padding: 0 10px; border-bottom: 1px solid rgb(255 255 255 / .04); white-space: nowrap; }
.layer.on { background: var(--select-bg); color: var(--fg); }
.layer .name { overflow: hidden; text-overflow: ellipsis; }
.thumbs { display: flex; gap: 3px; }
.thumb { width: 30px; height: 20px; border: 1px solid var(--line-2); background: var(--board); display: grid; place-items: center; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.mask { background: radial-gradient(ellipse at 50% 70%, #fff 0 38%, #000 80%); }
.thumb.adj { background: var(--panel); color: var(--fg); }
.layer-icons { margin-top: auto; display: flex; justify-content: flex-end; gap: 12px; padding: 8px 12px; border-top: 1px solid var(--line); }
.app-status { height: 26px; display: flex; align-items: center; gap: 18px; padding: 0 12px; border-top: 1px solid var(--line); white-space: nowrap; overflow: hidden; }
.app-status .doc-status { margin-left: auto; color: var(--fg); overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1100px) {
  .app-body { grid-template-columns: 40px minmax(0, 1fr) 220px; }
  .props { display: none; }
}
@media (max-width: 760px) {
  .app-tools, .app-panels, .app-options, .app-menubar .m-extra, .app-status .dims { display: none; }
  .app-body { grid-template-columns: minmax(0, 1fr); }
  .app-canvas { padding: 10px; }
  .app { border-radius: 10px; }
}


/* ---------- Un PSD por dentro (pila 3D) ---------- */
.psd { position: relative; border-top: 1px solid var(--line); }
.psd-inner { padding-block: var(--section); overflow: clip; }
.psd-inner > .wrap { width: 100%; }
.psd-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 32px); row-gap: 48px; align-items: center; }
.psd-copy { grid-column: 1 / span 5; display: grid; gap: 22px; }
.psd-copy > p { color: var(--fg-2); max-width: 44ch; }
.layer-list { list-style: none; margin: 8px 0 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--chrome); max-width: 460px; }
.layer-list li + li { border-top: 1px solid var(--line); }
.layer-btn {
  all: unset; box-sizing: border-box; display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 14px; align-items: center;
  width: 100%; min-height: 56px; padding: 10px 14px; cursor: pointer; transition: background-color .15s;
}
.layer-btn:hover, .layer-btn.is-active { background: var(--select-bg); }
.layer-btn:focus-visible { outline: 2px solid var(--select); outline-offset: -2px; }
.layer-btn .lt { display: block; width: 46px; height: 31px; border: 1px solid var(--line-2); background: var(--board); overflow: hidden; }
.layer-btn .lt img { width: 100%; height: 100%; object-fit: cover; }
.layer-btn .ln { display: block; color: var(--fg); font-weight: 500; }
.layer-btn .lk { display: block; color: var(--fg-2); font-size: var(--t-small); }
.layer-btn:hover .lk, .layer-btn.is-active .lk { color: var(--fg); }
.lt.lt-shape, .lt.lt-text { background-color: var(--board); background-image: conic-gradient(rgb(255 255 255 / .09) 25%, transparent 0 50%, rgb(255 255 255 / .09) 0 75%, transparent 0); background-size: 8px 8px; display: grid !important; place-items: center; color: var(--fg); font-weight: 700; font-size: 13px; }
.lt.lt-mask { background: radial-gradient(ellipse at 50% 62%, #fff 0 34%, #000 78%); }
.lt.lt-adj { display: grid !important; place-items: center; color: var(--warm); }
.psd-hint { font-size: var(--t-small); color: var(--fg-3); }

.stack-scene { grid-column: 6 / span 7; perspective: 1900px; perspective-origin: 50% 30%; display: grid; place-items: center; min-height: 520px; }
.stack {
  --p: 1; --gap: 66px;
  position: relative; width: min(100%, 560px); aspect-ratio: 3 / 2; transform-style: preserve-3d;
  transform: translateY(calc(var(--p) * 40px)) rotateX(calc(var(--p) * 54deg)) rotateZ(calc(var(--p) * -36deg));
}
.plane {
  position: absolute; inset: 0; border-radius: 3px; transform-style: preserve-3d;
  transform: translateZ(calc(var(--i) * var(--gap) * var(--p) + var(--lift, 0px)));
  transition: transform .45s var(--ease), box-shadow .2s;
  box-shadow: 0 0 0 1px rgb(255 255 255 / .18);
}
.plane.is-lift { --lift: 44px; box-shadow: 0 0 0 2px var(--select); }
.plane-bg { box-shadow: 0 0 0 1px rgb(255 255 255 / .12), 0 40px 70px rgb(0 0 0 / .55); }
.plane-bg img { width: 100%; height: 100%; object-fit: cover; border-radius: 3px; }
.plane .checker {
  position: absolute; inset: 0; border-radius: 3px; opacity: calc(var(--p) * .9);
  background-image: conic-gradient(rgb(255 255 255 / .07) 25%, transparent 0 50%, rgb(255 255 255 / .07) 0 75%, transparent 0);
  background-size: 18px 18px;
}
.plane-curves .tint { position: absolute; inset: 0; background: rgb(231 169 104 / .12); border-radius: 3px; }
.plane-curves svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: calc(.25 + var(--p) * .75); }
.plane-mask .mk { position: absolute; inset: 0; border-radius: 3px; background: radial-gradient(ellipse at 50% 62%, #fff 0 30%, #000 82%); opacity: calc(.08 + var(--p) * .5); }
.plane-text span {
  position: absolute; left: 7%; bottom: 10%; right: 7%; color: var(--on-photo);
  font-weight: 700; font-size: clamp(1.25rem, 2.6vw, 2.5rem); line-height: .95; letter-spacing: -.035em;
  text-shadow: 0 2px 18px rgb(0 0 0 / .35);
}
.plane-shape svg { position: absolute; inset: 0; width: 100%; height: 100%; }
@media (min-width: 1024px) {
  .psd.is-scrolly { height: 185vh; }
  .psd.is-scrolly .psd-inner { position: sticky; top: calc(var(--header-h) + env(safe-area-inset-top, 0px)); min-height: calc(100vh - var(--header-h)); display: grid; align-items: center; padding-block: 48px; }
}
@media (max-width: 1023px) {
  .psd-copy, .stack-scene { grid-column: 1 / -1; }
  /* en pantallas estrechas la pila va entre la entradilla y la lista de capas */
  .psd-grid { row-gap: 22px; }
  .psd-copy { display: contents; }
  .psd-copy > * { grid-column: 1 / -1; }
  #h-psd { order: 1; }
  .psd-copy > p:not(.psd-hint) { order: 2; }
  .stack-scene { order: 3; }
  .layer-list { order: 4; }
  .psd-hint { order: 5; }
  .stack-scene { min-height: 0; padding-block: 40px 20px; }
  .stack { --gap: 36px; width: min(78%, 460px); }
}
@media (max-width: 560px) {
  .stack { --gap: 30px; width: 60%; }
  .stack-scene { padding-block: 56px 36px; }
}


/* ---------- Qué incluye ---------- */
.incl-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 32px); row-gap: 40px; }
.incl-grid .intro { grid-column: 1 / span 4; display: grid; gap: 20px; align-content: start; }
.incl-grid .intro p { color: var(--fg-2); max-width: 36ch; }
.spec { grid-column: 6 / span 7; margin: 0; border-top: 1px solid var(--line); }
.spec > div { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 8px 32px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.spec dt { font-size: var(--t-h3); font-weight: 500; letter-spacing: -.015em; line-height: 1.25; }
.spec dd { margin: 0; color: var(--fg-2); }
.spec kbd { font: 500 .8125rem/1 var(--font); }
.strips { grid-column: 1 / -1; display: grid; gap: 28px; margin-top: 24px; }
.strip { display: grid; gap: 10px; }
.strip-label { font-size: var(--t-small); color: var(--fg-3); }
.strip-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 26px; padding: 14px 18px; background: var(--chrome); border: 1px solid var(--line); border-radius: 8px; font-size: .9375rem; color: var(--fg); }
.strip-bar.tabs { gap: 6px; padding: 6px; }
.strip-bar.tabs span { padding: 8px 14px; border-radius: 5px; color: var(--fg-2); }
.strip-bar.tabs span:first-child { background: var(--panel); color: var(--fg); }
@media (max-width: 899px) {
  .incl-grid .intro, .spec { grid-column: 1 / -1; }
  .spec > div { grid-template-columns: minmax(0, 1fr); }
}

/* El diagrama de privacidad (.flow) vive en site.css: también lo usa la página "acerca de". */

/* ---------- Atajos ---------- */
.keys-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 32px); row-gap: 32px; align-items: start; }
.keys { grid-column: 1 / span 6; list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.key-btn {
  all: unset; box-sizing: border-box; width: 100%; min-height: 58px; display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px; align-items: center; padding: 10px 6px 10px 2px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background-color .15s;
}
.key-btn:hover, .key-btn.is-active { background: linear-gradient(90deg, var(--chrome), transparent); }
.key-btn:focus-visible { outline: 2px solid var(--select); outline-offset: -2px; }
.key-btn .kn { color: var(--fg); font-size: 1.0625rem; }
.key-btn.is-active .kn { color: var(--fg-strong); }
.combo { display: inline-flex; gap: 5px; }
kbd {
  font: 500 .8125rem/1 var(--font); display: inline-grid; place-items: center; min-width: 2.2em; height: 2em; padding: 0 .5em;
  border-radius: 5px; background: var(--panel); border: 1px solid var(--line-2); border-bottom-width: 2px; color: var(--fg);
}
.key-btn.is-active kbd { border-color: var(--select); }
.mac-note { grid-column: 1 / span 6; font-size: var(--t-small); color: var(--fg-3); margin-top: -12px; }
.fx { grid-column: 8 / span 5; grid-row: 1 / span 2; position: sticky; top: calc(var(--header-h) + 32px); margin: 0; display: grid; gap: 14px; }
.fx-tile { position: relative; aspect-ratio: 3 / 2; max-width: 100%; background: var(--board); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.fx-tab { position: absolute; left: 0; top: 0; right: 0; height: 28px; display: flex; align-items: center; padding: 0 12px; font-size: 12px; color: var(--fg); background: var(--chrome); border-bottom: 1px solid var(--line); z-index: 3; }
.fx-stage { position: absolute; inset: 28px 0 0; display: grid; place-items: center; padding: 18px; }
.fx-img-wrap { position: relative; width: 86%; aspect-ratio: 3 / 2; transition: transform .5s var(--ease); }
.fx-img { width: 100%; height: 100%; object-fit: cover; transition: filter .4s var(--ease); }
.fx-sel { position: absolute; left: 30%; top: 8%; width: 40%; height: 70%; transition: opacity .2s; }
.fx-sel svg { width: 100%; height: 100%; overflow: visible; }
.fx-box { position: absolute; inset: -1px; opacity: 0; transition: opacity .2s; border: 1px solid var(--fg-strong); }
.fx-box .h { position: absolute; width: 8px; height: 8px; margin: -4.5px 0 0 -4.5px; background: var(--fg-strong); border: 1px solid #000; }
.fx-new { position: absolute; inset: 28px 0 0; display: grid; place-items: center; background: var(--board); opacity: 0; transition: opacity .25s; z-index: 2; }
.fx-new div { width: 62%; aspect-ratio: 16 / 9; background: var(--fg-strong); box-shadow: 0 10px 30px rgb(0 0 0 / .4); }
.fx-open { position: absolute; left: 50%; top: 50%; width: min(78%, 300px); translate: -50% -42%; background: var(--chrome); border: 1px solid var(--line-2); border-radius: 8px; padding: 12px; font-size: 12px; color: var(--fg-2); display: grid; gap: 6px; opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .3s var(--ease); z-index: 4; box-shadow: 0 20px 40px rgb(0 0 0 / .5); }
.fx-open b { color: var(--fg); font-weight: 500; font-size: 13px; }
.fx-open span { padding: 6px 8px; border-radius: 4px; }
.fx-open span.sel { background: var(--select-bg); color: var(--fg); }
.fx-layers { position: absolute; right: 12px; bottom: 12px; width: 170px; background: var(--chrome); border: 1px solid var(--line-2); border-radius: 6px; font-size: 12px; overflow: hidden; opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .3s var(--ease); z-index: 4; }
.fx-layers div { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px; color: var(--fg-2); border-top: 1px solid var(--line); }
.fx-layers div:first-child { border-top: 0; }
.fx-layers .new { background: var(--select-bg); color: var(--fg); }
.fx-layers i { width: 20px; height: 14px; border: 1px solid var(--line-2); background: var(--board); }
.fx-caption { color: var(--fg-2); font-size: .9688rem; min-height: 3em; }
.fx[data-fx="t"] .fx-img-wrap { transform: scale(.84); }
.fx[data-fx="t"] .fx-box { opacity: 1; }
.fx[data-fx="t"] .fx-sel, .fx[data-fx="d"] .fx-sel, .fx[data-fx="n"] .fx-sel { opacity: 0; }
.fx[data-fx="m"] .fx-img { filter: contrast(1.3) saturate(1.1); }
.fx[data-fx="l"] .fx-img { filter: brightness(1.16) contrast(1.1); }
.fx[data-fx="u"] .fx-img { filter: hue-rotate(-30deg) saturate(1.5); }
.fx[data-fx="sn"] .fx-layers, .fx[data-fx="o"] .fx-open, .fx[data-fx="n"] .fx-open { opacity: 1; transform: none; }

@media (max-width: 899px) {
  .keys, .mac-note, .fx { grid-column: 1 / -1; }
  .fx { grid-row: auto; position: static; order: -1; }
}

