/* ------------------------------------------------------------------
   Nicomotica Labs — landing page
   Palette draws from nicomotica.cl (midnight #020381, royal #2874fc,
   sky #0693e3, cyan #1FC0F2) with a cooler, more modern surface.
   ------------------------------------------------------------------ */

:root {
  /* Surface */
  --bg:            #F4F8FC;
  --bg-deep:       #EAF1F9;
  --surface:       #FFFFFF;
  --surface-soft:  #FAFCFF;
  --border:        #E1E8F2;
  --border-strong: #C7D3E3;

  /* Ink */
  --ink:           #0A1628;
  --ink-mid:       #2C3E5A;
  --ink-soft:      #5C6F8A;
  --ink-faint:     #8A9AB0;

  /* Blue scale (echoes nicomotica.cl) */
  --midnight:      #020381;
  --indigo:        #0B1A4A;
  --royal:         #2874FC;
  --sky:           #0693E3;
  --cyan:          #1FC0F2;
  --pale:          #BFDFFB;

  /* Gradients */
  --grad-hero:    linear-gradient(135deg, #020381 0%, #0B2A8A 30%, #1E5BB8 65%, #0693E3 100%);
  --grad-accent:  linear-gradient(135deg, #2874FC 0%, #0693E3 55%, #1FC0F2 100%);
  --grad-soft:    linear-gradient(180deg, #F4F8FC 0%, #FFFFFF 100%);
  --grad-card:    linear-gradient(180deg, #FFFFFF 0%, #FAFCFF 100%);

  /* Shadows */
  --shadow-sm:  0 1px 2px rgba(10, 22, 40, .04), 0 1px 1px rgba(10, 22, 40, .03);
  --shadow-md:  0 6px 18px rgba(10, 22, 40, .06), 0 1px 3px rgba(10, 22, 40, .04);
  --shadow-lg:  0 20px 48px rgba(10, 22, 40, .10), 0 4px 12px rgba(10, 22, 40, .05);
  --shadow-blue: 0 18px 36px rgba(40, 116, 252, .22), 0 4px 12px rgba(6, 147, 227, .14);

  /* Radius & rhythm */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;

  /* Type */
  --f-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Layout */
  --maxw: 1180px;
  --pad: clamp(20px, 4vw, 56px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

a {
  color: var(--royal);
  text-decoration: none;
  transition: color .18s ease;
}
a:hover { color: var(--midnight); }

::selection { background: rgba(40, 116, 252, .22); color: var(--midnight); }

.skip-link {
  position: absolute; top: -40px; left: 0;
  background: var(--midnight); color: #fff;
  padding: 8px 14px; border-radius: 0 0 8px 0;
  z-index: 200; font: 500 14px/1 var(--f-sans);
}
.skip-link:focus { top: 0; }

/* ------------------------------------------------------------------
   Header
   ------------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px var(--pad);
  background: rgba(244, 248, 252, .82);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid rgba(10, 22, 40, .06);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-family: var(--f-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1;
}

.wordmark__mark {
  width: 28px; height: 28px;
  color: var(--ink-mid);
  filter: drop-shadow(0 2px 6px rgba(40, 116, 252, .18));
  transition: transform .25s cubic-bezier(.2, .8, .2, 1);
}
.wordmark:hover .wordmark__mark { transform: rotate(-6deg) scale(1.04); }

.wordmark__type {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
}
.wordmark__nicomotica {
  font-weight: 500;
  color: var(--ink-mid);
}
.wordmark__slash {
  margin: 0 6px;
  color: var(--ink-faint);
  font-weight: 400;
}
.wordmark__labs {
  font-weight: 700;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 18px;
}

.site-nav {
  display: flex;
  gap: 6px;
}
.site-nav a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--ink-mid);
  font-size: 14px;
  font-weight: 500;
  transition: background .18s ease, color .18s ease;
}
.site-nav a:hover {
  background: rgba(10, 22, 40, .05);
  color: var(--ink);
}

.lang-toggle {
  display: inline-flex;
  padding: 3px;
  background: rgba(10, 22, 40, .06);
  border-radius: 999px;
}
.lang-toggle__btn {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 6px 11px;
  font: 500 12px/1 var(--f-mono);
  letter-spacing: .04em;
  color: var(--ink-soft);
  border-radius: 999px;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}
.lang-toggle__btn.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

/* ------------------------------------------------------------------
   Layout primitives
   ------------------------------------------------------------------ */

main { display: block; }

.section,
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  font: 500 12px/1 var(--f-mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.eyebrow__num {
  display: inline-block;
  padding: 4px 8px;
  background: rgba(40, 116, 252, .08);
  border: 1px solid rgba(40, 116, 252, .18);
  border-radius: 6px;
  color: var(--royal);
  font-weight: 600;
}

/* ------------------------------------------------------------------
   Hero
   ------------------------------------------------------------------ */

.hero {
  position: relative;
  padding-top: clamp(72px, 12vw, 128px);
  padding-bottom: clamp(72px, 12vw, 128px);
  overflow: hidden;
}

.hero__mesh {
  position: absolute;
  inset: -10% -10% 0 -10%;
  z-index: -1;
  pointer-events: none;
}
.hero__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .55;
  will-change: transform;
}
.hero__blob--a {
  top: -8%; left: -4%;
  width: 520px; height: 520px;
  background: radial-gradient(circle at 30% 30%, #2874FC 0%, rgba(40,116,252,0) 70%);
  animation: floatA 14s ease-in-out infinite alternate;
}
.hero__blob--b {
  top: 14%; right: -6%;
  width: 460px; height: 460px;
  background: radial-gradient(circle at 60% 40%, #1FC0F2 0%, rgba(31,192,242,0) 70%);
  animation: floatB 18s ease-in-out infinite alternate;
}
.hero__blob--c {
  top: -14%; left: 36%;
  width: 380px; height: 380px;
  background: radial-gradient(circle at 50% 50%, #020381 0%, rgba(2,3,129,0) 70%);
  opacity: .35;
  animation: floatC 22s ease-in-out infinite alternate;
}
.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(10,22,40,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10,22,40,.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 60% 60% at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 30%, #000 30%, transparent 75%);
  opacity: .85;
}

@keyframes floatA {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(40px, 30px) scale(1.08); }
}
@keyframes floatB {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-30px, 50px) scale(.95); }
}
@keyframes floatC {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(20px, -30px) scale(1.05); }
}
@media (prefers-reduced-motion: reduce) {
  .hero__blob { animation: none; }
}

.hero__title {
  margin: 0 0 28px;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(40px, 7.5vw, 92px);
  line-height: 1.02;
  letter-spacing: -0.028em;
  color: var(--indigo);
  max-width: 18ch;
}
.hero__title::after {
  content: '.';
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero__lede {
  margin: 0 0 44px;
  max-width: 56ch;
  font-size: clamp(17px, 1.7vw, 20px);
  line-height: 1.6;
  color: var(--ink-mid);
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  max-width: 640px;
  margin: 0;
  padding: 0;
}
.stat {
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.stat__label {
  margin: 0 0 6px;
  font: 500 11px/1 var(--f-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.stat__value {
  margin: 0;
  font-family: var(--f-display);
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ------------------------------------------------------------------
   Sections
   ------------------------------------------------------------------ */

.section {
  padding-top: clamp(64px, 10vw, 112px);
  padding-bottom: clamp(40px, 6vw, 80px);
}

.section__head {
  margin: 0 0 44px;
  max-width: 720px;
}
.section__title {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.022em;
  color: var(--ink);
}

/* ------------------------------------------------------------------
   Studio narrative
   ------------------------------------------------------------------ */

.section--studio { padding-top: clamp(72px, 10vw, 120px); }

.studio {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}

.studio__prose p {
  margin: 0 0 18px;
  font-size: clamp(16px, 1.4vw, 18px);
  line-height: 1.65;
  color: var(--ink-mid);
}
.studio__prose p:last-child { margin-bottom: 0; }

.studio__lead {
  font-size: clamp(18px, 1.6vw, 21px) !important;
  line-height: 1.55 !important;
  color: var(--ink) !important;
  font-weight: 500;
  letter-spacing: -0.005em;
}

.studio__aside {
  position: sticky;
  top: 88px;
}

.facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.fact {
  position: relative;
  padding: 22px 18px 20px;
  background: var(--grad-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.fact::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 36px; height: 3px;
  background: var(--grad-accent);
  border-radius: 0 0 4px 0;
  opacity: .85;
}
.fact:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.fact__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  margin-bottom: 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(40, 116, 252, .10), rgba(31, 192, 242, .14));
  border: 1px solid rgba(40, 116, 252, .18);
  color: var(--royal);
}
.fact__icon svg {
  width: 20px; height: 20px;
}

.fact__label {
  margin: 0 0 4px;
  font: 500 10px/1 var(--f-mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.fact__value {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 500;
  color: var(--ink);
}

@media (max-width: 540px) {
  .facts { grid-template-columns: 1fr 1fr; gap: 10px; }
  .fact { padding: 18px 14px 16px; }
}

@media (max-width: 760px) {
  .studio { grid-template-columns: 1fr; gap: 28px; }
}

/* ------------------------------------------------------------------
   Cards
   ------------------------------------------------------------------ */

.card-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 22px;
}
.card-grid--apps  { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card-grid--sites { grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 28px 26px 22px;
  background: var(--grad-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  transition: transform .28s cubic-bezier(.2,.8,.2,1),
              box-shadow .28s cubic-bezier(.2,.8,.2,1),
              border-color .28s ease;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--grad-accent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity .28s ease;
  pointer-events: none;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.card:hover::before { opacity: 1; }

.card__icon {
  width: 72px; height: 72px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(10, 22, 40, .12), 0 1px 2px rgba(10, 22, 40, .08);
  background: var(--surface);
}
.card__icon img {
  width: 100%; height: 100%; object-fit: cover;
}

.card__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.card__kicker {
  margin: 0;
  font: 500 11px/1 var(--f-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.card__title {
  margin: 0;
  font-family: var(--f-display);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.018em;
  color: var(--ink);
}

.card__copy {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-mid);
}

.card__tags {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.card__tags li {
  padding: 4px 10px;
  background: rgba(40, 116, 252, .06);
  border: 1px solid rgba(40, 116, 252, .14);
  border-radius: 6px;
  font: 500 11px/1.4 var(--f-mono);
  color: var(--royal);
  letter-spacing: .02em;
}

.card__link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding: 12px 16px;
  background: rgba(10, 22, 40, .03);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--ink);
  font: 500 14px/1 var(--f-sans);
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.card__link:hover {
  background: var(--grad-accent);
  border-color: transparent;
  color: #fff;
}
.card__link--inert {
  opacity: .7;
  cursor: default;
}
.card__link--inert:hover {
  background: rgba(10, 22, 40, .03);
  color: var(--ink);
}
.card__arrow {
  font-size: 16px;
  transition: transform .2s ease;
}
.card__link:hover .card__arrow {
  transform: translateX(3px);
}

/* ------------------------------------------------------------------
   Site cards — image-led variant
   ------------------------------------------------------------------ */

.card--site {
  padding: 0;
  gap: 0;
}

.card--site .card__body {
  padding: 22px 26px 4px;
  gap: 12px;
}

.card--site .card__link {
  margin: 14px 26px 22px;
}

.card__shot {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-deep);
  border-bottom: 1px solid var(--border);
}
.card__shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform .5s cubic-bezier(.2, .8, .2, 1);
}
.card__shot::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 22, 40, 0) 60%, rgba(10, 22, 40, .04) 100%);
  pointer-events: none;
}
.card--site:hover .card__shot img {
  transform: scale(1.03);
}

/* ------------------------------------------------------------------
   Services
   ------------------------------------------------------------------ */

.section--services {
  position: relative;
}

.services {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px;
}

.service {
  position: relative;
  padding: 32px 28px 26px;
  background: var(--grad-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  transition: transform .28s cubic-bezier(.2,.8,.2,1),
              box-shadow .28s cubic-bezier(.2,.8,.2,1),
              border-color .28s ease;
  overflow: hidden;
}
.service::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--grad-accent);
  opacity: .8;
}
.service:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}

.service__num {
  display: block;
  margin-bottom: 14px;
  font: 500 12px/1 var(--f-mono);
  letter-spacing: .14em;
  color: var(--royal);
}

.service__title {
  margin: 0 0 12px;
  font-family: var(--f-display);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.018em;
  color: var(--ink);
}

.service__copy {
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-mid);
}

.service__bullets {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.service__bullets li {
  position: relative;
  padding-left: 22px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-mid);
}
.service__bullets li::before {
  content: '';
  position: absolute;
  left: 0; top: 7px;
  width: 12px; height: 2px;
  background: var(--grad-accent);
  border-radius: 2px;
}

/* ------------------------------------------------------------------
   Contact
   ------------------------------------------------------------------ */

.section--contact {
  padding-bottom: clamp(72px, 10vw, 120px);
}

.contact__lede {
  max-width: 64ch;
  font-size: clamp(16px, 1.6vw, 18px);
  line-height: 1.6;
  color: var(--ink-mid);
  margin: 0 0 36px;
}

.contact__channels {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.contact__channels li {
  padding: 22px 22px 20px;
  background: var(--grad-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease;
}
.contact__channels li:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.contact__label {
  margin: 0 0 8px;
  font: 500 11px/1 var(--f-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.contact__channels a {
  font-family: var(--f-display);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.012em;
  color: var(--ink);
}
.contact__channels a:hover { color: var(--royal); }

/* ------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------ */

.site-footer {
  margin-top: clamp(40px, 6vw, 80px);
  padding: 36px var(--pad);
  border-top: 1px solid var(--border);
  background: var(--bg-deep);
}
.footer__line {
  max-width: var(--maxw);
  margin: 0 auto 6px;
  font-size: 13px;
  color: var(--ink-soft);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.footer__line--muted { color: var(--ink-faint); }
.footer__mark {
  font-family: var(--f-display);
  font-weight: 600;
  color: var(--ink-mid);
  letter-spacing: -0.01em;
}
.footer__sep { color: var(--ink-faint); }

/* ------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------ */

@media (max-width: 720px) {
  .site-nav { display: none; }
  .hero__stats { grid-template-columns: 1fr; max-width: 360px; }
  .card { padding: 24px 22px 20px; }
}

@media (max-width: 480px) {
  .header-controls { gap: 10px; }
  .lang-toggle__btn { padding: 5px 9px; font-size: 11px; }
  .hero__title { letter-spacing: -0.024em; }
}
