/* Portada de omniapps.es: paneles claros redondeados, letra con serifa y una ola de puntos.
   Las páginas legales y la landing de WebRest siguen usando sus propias hojas. */
@font-face { font-family: "Instrument Serif"; src: url("/fonts/instrument-serif-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("/fonts/instrument-serif-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/fonts/geist.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #ffffff;
  --ink: #131313;
  --muted: #55596a;
  --soft: #eef2fb;
  --grey: #f4f5f7;
  --line: #e6e8ee;
  --dark: #1d1d1f;
  --blue: #1f5bff;
  --blue-deep: #1747d6;
  --white: #ffffff;

  --frame: 12px;
  --radius-panel: 32px;
  --radius-card: 28px;
  --wrap: 1180px;
  --side: clamp(16px, 4vw, 48px);

  --step-small: 0.875rem;
  --step-body: 1rem;
  --step-lead: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  --step-h3: clamp(1.75rem, 1.4rem + 1vw, 2.125rem);
  --step-h2: clamp(2.5rem, 1.6rem + 3.2vw, 4rem);
  --step-h1: clamp(3.1rem, 1.8rem + 5vw, 6rem);

  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --shadow: 0 1px 2px rgba(19, 19, 19, .04), 0 12px 40px rgba(31, 60, 140, .10);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--step-body)/1.5 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, video, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; text-wrap: balance; }
h1 em, h2 em { font-style: italic; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 8px; }
::selection { background: var(--blue); color: #fff; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; background: var(--dark); color: #fff; padding: 10px 16px; border-radius: 999px; }
.skip:focus { left: 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Botones y pastillas */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; font: 500 var(--step-body)/1 var(--sans); text-decoration: none; border: 0; cursor: pointer; transition: transform .2s var(--ease), background-color .2s; }
.btn:hover { transform: translateY(-1px); }
.btn-dark { background: var(--dark); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-light { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn-block { width: 100%; min-height: 56px; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 10px; border-radius: 999px; background: rgba(255, 255, 255, .75); box-shadow: inset 0 0 0 1px var(--line); font: 500 var(--step-small)/1.3 var(--sans); color: var(--ink); }
.badge svg { width: 16px; height: 16px; fill: var(--blue); }
.badge-icon { padding: 9px; }
.badge-white { background: #fff; box-shadow: none; }

/* Menú flotante */
.nav { position: fixed; z-index: 20; top: var(--frame); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: clamp(8px, 2vw, 28px); padding: 6px 6px 6px 8px; background: #fff; border-radius: 999px; box-shadow: 0 0 0 1px rgba(19, 19, 19, .04); transition: box-shadow .3s; width: max-content; max-width: calc(100% - 2 * var(--frame)); }
.nav.scrolled { box-shadow: var(--shadow); }
.nav-mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--grey); }
.nav-mark img { width: 30px; height: auto; }
.nav-links { display: flex; gap: clamp(12px, 2vw, 32px); }
.nav-links a { text-decoration: none; color: var(--muted); font-size: 0.9375rem; padding: 8px 4px; }
.nav-links a:hover { color: var(--ink); }
.nav-btn { min-height: 44px; }

/* Paneles de color redondeados, con margen al borde */
.panel { position: relative; margin: var(--frame); border-radius: var(--radius-panel); background: var(--soft); overflow: hidden; isolation: isolate; }
.panel-blue { background: var(--blue); color: #fff; }
.wave { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

.head { max-width: 760px; margin: 0 auto; text-align: center; display: grid; justify-items: center; gap: 20px; padding: 0 var(--side); }
.head h2 { font-size: var(--step-h2); line-height: 1; letter-spacing: -0.01em; }
.head > p:last-child { color: var(--muted); font-size: var(--step-lead); max-width: 560px; }
.panel-blue .head > p:last-child { color: rgba(255, 255, 255, .88); }

/* Portada */
.hero { min-height: min(calc(100svh - 2 * var(--frame)), 980px); display: flex; flex-direction: column; align-items: center; padding-top: clamp(112px, 15vh, 150px); }
.hero-copy { text-align: center; display: grid; justify-items: center; gap: 22px; padding: 0 var(--side); max-width: 940px; }
.hero h1 { font-size: var(--step-h1); line-height: .98; letter-spacing: -0.02em; }
.hero h1 em { color: var(--blue); }
.lead { font-size: var(--step-lead); color: var(--muted); max-width: 540px; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 6px; }

.hero-cards { position: relative; width: min(1040px, 100%); height: clamp(250px, 34vh, 380px); margin-top: auto; padding-top: 48px; }
.shot { position: absolute; bottom: -60px; margin: 0; padding: 10px 10px 36px; background: rgba(255, 255, 255, .92); border-radius: 26px; box-shadow: var(--shadow); }
.shot img { border-radius: 16px; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.shot figcaption { position: absolute; left: 20px; bottom: 9px; font-size: var(--step-small); color: var(--muted); }
.shot-c { left: 50%; width: 46%; transform: translateX(-50%); z-index: 2; bottom: -90px; }
.shot-l { left: 4%; width: 36%; transform: rotate(-7deg); bottom: -40px; }
.shot-r { right: 4%; width: 34%; transform: rotate(7deg); bottom: -30px; }

/* Bloques blancos */
.block { padding: clamp(88px, 11vw, 150px) var(--side); }
.intro { display: grid; justify-items: center; gap: 36px; text-align: center; }
.statement { font-size: clamp(2.1rem, 1.3rem + 3vw, 3.75rem); line-height: 1.04; max-width: 1080px; letter-spacing: -0.01em; }
.media { position: relative; width: min(920px, 100%); border-radius: var(--radius-card); overflow: visible; margin-top: 12px; text-decoration: none; }
.media video { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-card); background: var(--soft); }
.float { position: absolute; background: rgba(255, 255, 255, .94); border-radius: 18px; box-shadow: var(--shadow); text-align: left; }
.float-a { left: clamp(12px, 3vw, 28px); bottom: clamp(12px, 3vw, 28px); padding: 14px 18px; display: grid; gap: 2px; max-width: 280px; }
.float-a strong { font: 400 1.5rem/1.1 var(--serif); }
.float-a span { font-size: var(--step-small); color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; width: min(var(--wrap), 100%); margin: 40px 0 0; text-align: left; }
.stats div { display: flex; align-items: center; gap: 18px; justify-content: center; }
.stats dt { font: 400 clamp(3.5rem, 2.6rem + 3vw, 5.25rem)/1 var(--serif); letter-spacing: -0.02em; white-space: nowrap; }
.stats dd { margin: 0; max-width: 190px; font-size: var(--step-body); }

/* Qué hacemos */
.services { padding: clamp(88px, 10vw, 130px) 0 clamp(72px, 8vw, 110px); }
.cards { list-style: none; margin: 56px auto 0; padding: 0 var(--side); display: grid; gap: 20px; max-width: calc(var(--wrap) + 2 * var(--side)); }
.cards-4 { grid-template-columns: repeat(4, 1fr); max-width: calc(1320px + 2 * var(--side)); }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.card { background: #fff; border-radius: var(--radius-card); padding: 28px; display: grid; align-content: start; gap: 12px; }
.card h3 { font-size: var(--step-h3); line-height: 1.08; margin-top: 18px; }
.card-grey h3 { margin-top: 8px; }
.card p { color: var(--muted); }
.card-grey { background: var(--grey); }
.icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--grey); }
.card-grey .icon { background: #fff; }
.icon svg { width: 24px; height: 24px; fill: none; stroke: var(--blue); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.center { text-align: center; margin-top: 44px; }

/* Productos */
.products .grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; max-width: var(--wrap); margin: 64px auto 0; }
.product { background: var(--grey); border-radius: var(--radius-card); padding: clamp(24px, 3vw, 36px); display: grid; align-content: start; gap: 16px; }
.tag { justify-self: start; padding: 5px 12px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); color: var(--blue); font: 500 var(--step-small)/1.3 var(--sans); }
.product h3 { font-size: clamp(2rem, 1.6rem + 1.2vw, 2.5rem); line-height: 1.05; }
.product h3 a { text-decoration: none; }
.product h3 a:hover { color: var(--blue); }
.product > p:not(.tag), .wide-copy > p:not(.tag) { color: var(--muted); }
.window { position: relative; margin: 8px 0; padding: 8px; background: #fff; border-radius: 20px; box-shadow: var(--shadow); aspect-ratio: 16 / 9.4; overflow: hidden; }
.window img { width: 100%; height: 100%; object-fit: cover; object-position: top left; border-radius: 13px; }
.window.has-phone > img:first-child { width: 82%; }
.window .phone { position: absolute; right: 14px; bottom: -40px; width: 24%; height: auto; border-radius: 16px; box-shadow: 0 0 0 5px #fff, var(--shadow); object-fit: contain; }
.window .note { position: absolute; left: 18px; bottom: 16px; padding: 4px 10px; border-radius: 999px; background: var(--dark); color: #fff; font-size: 0.8125rem; }
.more { justify-self: start; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 999px; background: var(--dark); color: #fff; text-decoration: none; font-weight: 500; margin-top: 4px; }
.more::after { content: "→"; transition: transform .2s var(--ease); }
.more:hover::after { transform: translateX(3px); }
.product-wide { grid-column: 1 / -1; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 32px; }
.wide-copy { display: grid; gap: 16px; align-content: center; }
.window-logo { aspect-ratio: auto; height: 100%; min-height: 220px; display: grid; place-items: center; }
.window-logo img { width: auto; height: 160px; object-fit: contain; }

/* Cómo trabajamos */
.how { padding-top: 0; }
.flow-box { background: #fff; border-radius: 20px; padding: clamp(20px, 2.4vw, 32px); margin-bottom: 6px; }
.flow { width: 100%; height: auto; }
.flow-p1 { fill: #c3cfee; }
.flow-p2 { fill: #9fb2e6; }
.flow-mid { fill: #7f9dff; }
.flow-acc { fill: var(--blue); }

/* Contacto */
.contact { padding: clamp(88px, 10vw, 130px) 0 clamp(72px, 8vw, 110px); }
.contact .head h2 { color: #fff; }
.contact-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 20px; max-width: calc(var(--wrap) + 2 * var(--side)); margin: 56px auto 0; padding: 0 var(--side); color: var(--ink); }
.ask { gap: 18px; padding: clamp(24px, 3vw, 36px); }
.field { display: grid; gap: 8px; }
.field span { font-weight: 500; font-size: var(--step-lead); }
.field input { width: 100%; min-height: 58px; padding: 0 20px; border: 0; border-radius: 16px; background: var(--grey); box-shadow: inset 0 0 0 1px var(--line); font: 400 var(--step-lead)/1.2 var(--sans); color: var(--ink); appearance: textfield; -moz-appearance: textfield; }
.field input::-webkit-outer-spin-button, .field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.field input::placeholder { color: #8a8e9c; }
.field input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--blue); background: #fff; }
.tally { display: block; padding: 14px 18px; border-radius: 16px; background: var(--soft); color: var(--muted); }
.tally.on { color: var(--blue-deep); font-weight: 500; }
.fine { font-size: var(--step-small); color: var(--muted); text-align: center; }
.direct { display: grid; gap: 20px; }
.direct-item { text-decoration: none; gap: 6px; padding: clamp(24px, 3vw, 32px); transition: transform .2s var(--ease); }
.direct-item:hover { transform: translateY(-2px); }
.direct-item .icon { margin-bottom: 10px; }
.direct-label { color: var(--muted); font-size: var(--step-lead); }
.direct-item strong { font: 400 clamp(2.25rem, 1.6rem + 2.2vw, 3.5rem)/1.05 var(--serif); letter-spacing: -0.01em; overflow-wrap: anywhere; }

/* Pie */
.foot { padding: clamp(72px, 9vw, 120px) var(--side) 0; overflow: hidden; }
.foot-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.1fr; gap: 40px; max-width: var(--wrap); margin: 0 auto; }
.foot-brand { display: grid; gap: 18px; justify-items: start; align-content: start; }
.foot-brand img { width: 120px; height: auto; }
.foot-brand p { color: var(--muted); max-width: 320px; }
.foot-col { display: grid; gap: 12px; align-content: start; font-style: normal; }
.foot-col h2 { font: 500 1.125rem/1.3 var(--sans); margin-bottom: 6px; }
.foot-col a, .foot-col span { color: var(--muted); text-decoration: none; }
.foot-col a:hover { color: var(--ink); }
.foot-word { font: italic 400 clamp(6rem, 24vw, 22rem)/.78 var(--serif); letter-spacing: -0.04em; text-align: center; margin: clamp(48px, 7vw, 96px) 0 -0.12em; white-space: nowrap; color: var(--ink); }

/* Movimiento: solo si la persona no ha pedido menos */
@media (prefers-reduced-motion: no-preference) {
  .js .rise { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
  .js .rise.in { opacity: 1; transform: none; }
  .js .hero-cards .shot { opacity: 0; transition: opacity 1s var(--ease), transform 1.1s var(--ease); }
  .js .hero-cards .shot-c { transform: translate(-50%, 80px); }
  .js .hero-cards .shot-l { transform: rotate(-2deg) translateY(90px); }
  .js .hero-cards .shot-r { transform: rotate(2deg) translateY(90px); }
  .js .hero.in .shot { opacity: 1; transition-delay: .35s; }
  .js .hero.in .shot-c { transform: translateX(-50%); }
  .js .hero.in .shot-l { transform: rotate(-7deg); transition-delay: .5s; }
  .js .hero.in .shot-r { transform: rotate(7deg); transition-delay: .5s; }
}

/* Tableta */
@media (max-width: 1080px) {
  .cards-4 { grid-template-columns: repeat(2, 1fr); }
  .nav-links a:first-child { display: none; }
}
@media (max-width: 900px) {
  .stats { grid-template-columns: 1fr; gap: 18px; max-width: 420px; }
  .stats div { justify-content: flex-start; }
  .contact-grid { grid-template-columns: 1fr; }
  .direct { grid-template-columns: 1fr 1fr; }
  .foot-top { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
  .shot-c { width: 58%; }
  .shot-l { width: 42%; left: 0; }
  .shot-r { width: 40%; right: 0; }
}

/* Móvil */
@media (max-width: 700px) {
  :root { --frame: 8px; --radius-panel: 24px; --radius-card: 22px; }
  .nav { gap: 8px; }
  .nav-links { display: none; }
  .hero { padding-top: 104px; }
  .hero-cards { height: 230px; }
  .shot { padding: 6px 6px 26px; border-radius: 18px; }
  .shot img { border-radius: 12px; }
  .shot figcaption { left: 12px; bottom: 5px; font-size: 0.75rem; }
  .shot-c { width: 78%; bottom: -70px; }
  .shot-l { width: 56%; left: -14%; bottom: -10px; }
  .shot-r { width: 54%; right: -14%; bottom: 0; }
  .actions { width: 100%; }
  .actions .btn { flex: 1 1 100%; }
  .float-a { position: static; margin-top: 12px; max-width: none; box-shadow: none; background: var(--grey); }
  .cards-4, .cards-3, .products .grid { grid-template-columns: 1fr; }
  .product-wide { grid-template-columns: 1fr; }
  .window-logo { min-height: 180px; }
  .direct { grid-template-columns: 1fr; }
  .field input { font-size: 1rem; padding: 0 16px; }
  .foot-top { grid-template-columns: 1fr; gap: 32px; }
}
