:root {
  color-scheme: light;
  --ink: #182536;
  --pale-blue: #eaf4ff;
  --line: #d6e0ec;
  --blue: #24578e;
  --muted: #49586a;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: #fff; font: 1rem/1.65 "Inter", "Helvetica Neue", Arial, sans-serif; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 3px solid #407bc0; outline-offset: 5px; }
.skip { position: absolute; z-index: 2; top: .5rem; left: .5rem; padding: .5rem 1rem; background: #fff; transform: translateY(-200%); }
.skip:focus { transform: none; }
.wrap { width: min(1320px, 100% - 5rem); margin-inline: auto; }
.masthead, footer { background: #fff; }
.masthead { border-bottom: 1px solid var(--line); }
.hero { background: var(--pale-blue); }
.header, .footer, .brand, nav { display: flex; align-items: center; }
.header, .footer { justify-content: space-between; gap: 1.5rem; }
.header { min-height: 68px; }
.brand { gap: .8rem; width: fit-content; }
.monogram { font-size: 2rem; font-weight: 850; letter-spacing: -.09em; line-height: 1; }
.monogram span { color: var(--blue); }
.brand-name { color: var(--muted); border-left: 1px solid var(--line); padding-left: .8rem; font-size: .875rem; line-height: 1.25; }
nav { flex-wrap: wrap; gap: .35rem clamp(.8rem, 2.2vw, 1.65rem); font-size: .92rem; color: var(--muted); }
nav a:hover { color: var(--blue); }
nav a { display: inline-flex; align-items: center; min-height: 44px; }
.nav-contact { color: var(--blue); font-weight: 750; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: stretch; width: min(1600px, 100%); min-height: clamp(430px, 39vw, 580px); }
.hero-copy { align-self: center; padding: clamp(2.5rem, 5vw, 5rem) clamp(1.5rem, 5vw, 5rem) clamp(2.5rem, 5vw, 5rem) max(2.5rem, calc((min(100vw, 1600px) - 1320px) / 2)); }
.label { margin: 0 0 1rem; color: var(--blue); font-size: .875rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }

h1, h2, h3 { margin: 0; font-weight: 760; line-height: 1.05; letter-spacing: -.045em; text-wrap: balance; }
h1 { max-width: 18ch; font-size: clamp(2.6rem, 4.45vw, 5rem); overflow-wrap: anywhere; }
h1 em { color: var(--blue); font-style: normal; }
h2 { font-size: clamp(2.15rem, 4vw, 3.9rem); }
h3 { font-size: clamp(1.55rem, 2.5vw, 2rem); }
.lead { color: var(--muted); max-width: 37ch; margin: 1.5rem 0 2rem; font-size: 1.16rem; }
.button { display: inline-block; padding: .8rem 1.25rem; border-radius: .25rem; background: var(--blue); color: #fff; font-weight: 750; }
.button:hover { background: #193f6a; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem 1.4rem; }
.text-link { padding-block: .55rem; color: var(--blue); font-weight: 750; text-decoration: underline; text-underline-offset: .24em; }
.hero-art {
  display: grid;
  place-items: center;
  min-width: 0;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse at 78% 18%, #fafdff 0, transparent 48%),
    radial-gradient(ellipse at 15% 80%, #a8c8ee 0, transparent 60%),
    linear-gradient(142deg, #c8def7, #eaf2fc 67%, #b1c1d5);
}
.device-scene {
  position: relative;
  width: min(100%, 740px);
  aspect-ratio: 1.4;
  container-type: inline-size;
  perspective: 1100px;
}
.device-scene::before, .device-scene::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: -1;
}
.device-scene::before {
  inset: 10% -18% 13% -12%;
  transform: rotate(-29deg);
  border: 1px solid #ffffffa0;
  border-radius: 50%;
  background: linear-gradient(165deg, #ffffff45, transparent 44%, #79a5d648);
  box-shadow: 0 0 0 1.8cqw #ffffff26, 0 0 0 4.8cqw #ffffff19;
}
.device-scene::after {
  inset: auto -2% 4% 1%;
  height: 20%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, #304c7458, transparent 69%);
  filter: blur(1.1cqw);
  transform: rotate(-7deg);
}
.device {
  position: absolute;
  border: max(2px, .66cqw) solid #202b39;
  background: #202b39;
  box-shadow: .36cqw .3cqw 0 #637187, .7cqw 1.3cqw 2.8cqw #1e365a51, 0 .25cqw .48cqw #0a142266;
  transform: var(--pose);
}
.device img { display: block; width: 100%; height: auto; }
.device-laptop {
  --pose: rotateY(-12deg) rotateX(5deg) rotateZ(-6deg);
  inset: 13% auto auto 6%;
  width: 72%;
  border-width: max(3px, .88cqw);
  border-radius: 1.25cqw 1.25cqw .35cqw .35cqw;
}
.device-laptop img { border-radius: .45cqw .45cqw 0 0; }
.device-laptop::after {
  content: "";
  position: absolute;
  inset: 100% -7% auto;
  height: 3.1cqw;
  background: linear-gradient(#edf2f8 12%, #99a7b9 32%, #d9e3ee 43%, #718096 89%);
  clip-path: polygon(4% 0, 96% 0, 100% 70%, 97% 100%, 3% 100%, 0 70%);
}
.device-tablet {
  --pose: rotateY(10deg) rotateZ(8deg);
  right: 13.5%;
  bottom: 16%;
  width: 31%;
  border-radius: 1.8cqw;
}
.device-tablet img { border-radius: 1.1cqw; }
.device-phone {
  --pose: rotateY(-8deg) rotateZ(-8deg);
  right: 4%;
  bottom: 7%;
  width: 15%;
  border-radius: 1.8cqw;
}
.device-phone img { border-radius: 1.17cqw; }
@media (prefers-reduced-motion: no-preference) {
  .device { animation: device-settle 2.8s cubic-bezier(.2,.72,.28,1) both; }
  .device-tablet { animation-delay: .15s; }
  .device-phone { animation-delay: .28s; }
}
@keyframes device-settle {
  from { opacity: .35; transform: translateY(6cqw) var(--pose); }
  55% { opacity: 1; transform: translateY(-.7cqw) var(--pose); }
  to { opacity: 1; transform: var(--pose); }
}
.quick-links { display: flex; justify-content: center; gap: 1.25rem clamp(2rem, 6vw, 6rem); padding-block: 1.85rem; border-bottom: 1px solid var(--line); }
.quick-links a { flex-direction: column; justify-content: center; gap: .5rem; text-align: center; color: var(--blue); font-weight: 700; }
.quick-links .service-icon { margin: 0; }
.section { padding-block: clamp(3.25rem, 7vw, 6rem); }
.introduction { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 2rem 4rem; }
.introduction > p, article p, .operations-intro { color: var(--muted); font-size: 1.08rem; margin: 0; max-width: 52ch; }
.services { background: #f4f6f9; }
.service-grid, .brand-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; margin-top: 2rem; }
.service-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
article { padding: clamp(1.45rem, 4vw, 2.7rem); background: #fff; border: 1px solid #dce3f2; border-radius: .35rem; }
article p { margin-top: .8rem; }
.service-icon { position: relative; color: var(--blue); width: 2rem; height: 2rem; margin-bottom: 1.5rem; }
.platform { border: 2px solid; border-radius: .32rem; }
.platform::before { content: ""; position: absolute; inset: .36rem 0 auto; border-top: 2px solid; }
.build { border: 2px solid; border-radius: .32rem; }
.build::before, .build::after { content: ""; position: absolute; background: currentColor; inset: 45% 22%; }
.build::after { transform: rotate(90deg); }
.play { border: 2px solid; border-radius: 50%; }
.play::before { content: ""; position: absolute; width: .68rem; height: .68rem; border-radius: 50%; background: currentColor; top: .42rem; left: .42rem; }
.operations { background: var(--pale-blue); }
.operations-intro { color: var(--muted); margin-top: 1rem; }
.brand-grid { list-style: none; margin-bottom: 0; padding: 0; }
.brand-grid li { display: flex; align-items: center; gap: 1rem; padding: 1.35rem; border: 1px solid var(--line); border-radius: .7rem; background: #fff; font-size: clamp(1.2rem, 2.5vw, 1.7rem); font-weight: 700; line-height: 1.2; }
.brand-dot { flex: 0 0 .75rem; aspect-ratio: 1; background: var(--blue); border-radius: 50%; }
.brand-grid li + li .brand-dot { background: #6a7d95; }
.footer { padding-block: 1.8rem; color: var(--muted); }
@media (min-width: 721px) and (max-width: 950px) {
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .wrap { width: calc(100% - 2rem); }
  .header { flex-wrap: wrap; gap: .85rem; padding-block: 1rem; }
  nav { width: 100%; }
  .hero-inner, .introduction, .service-grid, .brand-grid { grid-template-columns: 1fr; }
  .hero-inner { width: 100%; min-height: 0; }
  .hero-copy { padding: 2.5rem 1rem; }
  h1 { font-size: clamp(1.95rem, 7.1vw, 3.8rem); }
  .hero-art { min-height: 0; }
  .quick-links { width: calc(100% - 2rem); gap: 1rem; padding-block: 1.5rem; }
  .quick-links a { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.project-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.15rem, 2.5vw, 2rem);
  margin-top: 2rem;
}
.project {
  padding: 0;
  overflow: hidden;
  border-color: var(--line);
  box-shadow: 0 10px 30px #172a490d;
}
.project-art {
  overflow: hidden;
}
.project-art img { display: block; width: 100%; height: auto; }
@media (min-width: 721px) and (max-width: 1050px) {
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.project-copy { padding: clamp(1.2rem, 2vw, 1.8rem); }
.project-copy .label { margin: 0 0 .65rem; font-size: .875rem; }
.contact { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 1.5rem 4rem; margin-block: clamp(2.75rem, 7vw, 6rem); padding: clamp(1.5rem, 5vw, 4rem); border: 1px solid var(--line); border-radius: .35rem; background: var(--pale-blue); }
.contact p:not(.label) { margin: 0 0 1.1rem; color: var(--muted); }
.contact p.contact-email { margin: .5rem 0 0; overflow-wrap: anywhere; }
footer { border-top: 1px solid var(--line); background: #eef2f6; }
.footer address { text-align: right; font-style: normal; }
@media (max-width: 720px) {
  .project-grid, .contact { grid-template-columns: minmax(0, 1fr); }
  .footer { flex-wrap: wrap; }
  .footer address { text-align: left; }
}

.service-card { position: relative; display: flex; flex-direction: column; }
.service-card:hover, .service-card:focus-within { border-color: var(--blue); background: #fbfdff; }
.service-open {
  align-self: flex-start;
  margin: auto 0 0;
  padding: 1rem 0 .15rem;
  border: 0;
  background: none;
  color: var(--blue);
  font: inherit;
  font-weight: 750;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: .22em;
  cursor: pointer;
}
.service-open::after { content: ""; position: absolute; inset: 0; }
.service-open:focus-visible, .dialog-close:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.service-dialog {
  width: min(960px, 100% - 2rem);
  max-height: calc(100% - 2rem);
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: .75rem;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 20px 72px #18253652;
  overscroll-behavior: contain;
}
body:has(.service-dialog[open]) { overflow: hidden; }
.service-dialog::backdrop { background: #182536a8; }
.dialog-header {
  position: sticky;
  z-index: 1;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 2rem);
  border-bottom: 1px solid var(--line);
  background: var(--pale-blue);
}
.dialog-header h2 { font-size: clamp(1.25rem, 3vw, 2rem); }
.dialog-close {
  min-height: 44px;
  padding: .35rem .75rem;
  border: 1px solid var(--line);
  border-radius: .25rem;
  color: var(--blue);
  background: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.dialog-content { padding: clamp(1rem, 4vw, 2rem); }
.dialog-content p { color: var(--muted); }
.dialog-content > p { margin: .5rem 0 1.5rem; }
.dialog-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.dialog-grid figure {
  display: grid;
  grid-template-rows: auto 1fr;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: .45rem;
  background: #f4f6f9;
}
.dialog-grid img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; }
.dialog-grid figcaption { padding: .8rem 1rem; font-weight: 700; }
.dialog-grid figcaption h3 { font-size: 1.2rem; }
.dialog-grid figcaption p { margin: .4rem 0 0; font-weight: 400; }
.operation-devices {
  isolation: isolate;
  aspect-ratio: 1.58;
  background: radial-gradient(ellipse at 70% 15%, #f9fcff, #dceafb 66%, #cddcef);
}
.operation-devices .device { animation: none; }
.operation-devices img { aspect-ratio: auto; }
.operation-devices .device-laptop { inset: 16% auto auto 9%; width: 73%; --pose: rotateY(-7deg) rotateZ(-3deg); }
.operation-devices .device-phone { right: 8%; bottom: 11%; width: 19%; --pose: rotateY(-4deg) rotateZ(6deg); }
.aganar-views { grid-template-columns: minmax(0, 1fr); max-width: 590px; margin-inline: auto; }
.aganar-views + .text-link { display: inline-block; margin-top: .9rem; }
.game-views { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.game-views img { aspect-ratio: 3 / 2; }

@media (min-width: 581px) and (max-width: 800px) {
  .game-views { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 580px) {
  .dialog-grid { grid-template-columns: minmax(0, 1fr); }
}

.draw-showcase {
  display: grid;
  position: relative;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  aspect-ratio: 3 / 2;
  gap: 3%;
  overflow: hidden;
  isolation: isolate;
  padding: 7%;
  container-type: inline-size;
  background: radial-gradient(ellipse at 82% 35%, #7f8cde, transparent 56%),
    radial-gradient(ellipse at 20% 104%, #a25d8e, transparent 52%),
    linear-gradient(140deg, #22245d, #435299 67%, #2a3a7b);
}
.draw-showcase::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 16% -15%;
  border: 1px solid #adcbffaf;
  border-radius: 50%;
  transform: rotate(-24deg);
  background: linear-gradient(160deg, #79aaff2e, #a9caff60, #738ce345);
  box-shadow: 0 0 1.5rem #a8baff45, inset 0 0 .9rem #bbcfff78;
}
.draw-sheet {
  display: grid;
  gap: 1.3cqw;
  padding: 2.1cqw;
  border: 1px solid #fff;
  border-radius: 2.25cqw;
  background: #fff;
  box-shadow: 0 3.6cqw 5.6cqw #11173b88, .8cqw .9cqw 0 #d0d5efb8;
}
.draw-melate { transform: translateY(-2cqw) rotate(-7deg); }
.draw-chispazo { transform: translateY(3cqw) rotate(7deg); }
.draw-showcase .draw-brand img {
  display: block;
  width: 46%;
  height: 7cqw;
  margin-inline: auto;
  object-fit: contain;
}
.draw-showcase .draw-capture {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  border: 1px solid #e8ebf3;
  border-radius: 1cqw;
}
@media (prefers-reduced-motion: no-preference) {
  .draw-showcase.is-visible .draw-float,
  .service-dialog[open] .draw-float {
    animation: draw-float 3.1s cubic-bezier(.24,.7,.33,1) both;
  }
  .draw-showcase.is-visible .draw-float:nth-child(2),
  .service-dialog[open] .draw-float:nth-child(2) {
    animation-delay: .19s;
    --draw-offset: -10cqw;
  }
}
@keyframes draw-float {
  from { opacity: .45; transform: translateY(var(--draw-offset, 10cqw)) scale(.96); }
  60% { opacity: 1; transform: translateY(-1.2cqw); }
  to { opacity: 1; transform: none; }
}
