:root {
  --bg: #f8f7f4;
  --surface: #ffffff;
  --ink: #121117;
  --muted: #65626e;
  --line: #e4e2e8;
  --violet: #5146e5;
  --violet-hover: #4338d6;
  --violet-light: #a99ff7;
  --violet-soft: #efedfd;
  --mint-soft: #e2f6ee;
  --mint-ink: #1b6a50;
  --display: "Inter Tight", "Inter", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --radius: 18px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scrollbar-color: #cfccd6 var(--bg); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.6 var(--body); -webkit-font-smoothing: antialiased; caret-color: var(--violet); }
img { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
::selection { background: var(--violet); color: #fff; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 6px; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.accent { color: var(--violet); }
.wrap { width: min(1200px, 100% - 48px); margin-inline: auto; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 40; background: var(--violet); color: #fff; padding: 10px 14px; border-radius: 10px; font-weight: 600; }
.skip:focus { top: 12px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 48px; padding: 0 1.4em; border-radius: 999px; background: var(--violet); color: #fff; font: 600 1rem/1 var(--body); white-space: nowrap; transition: background-color .2s, transform .16s var(--ease-out); }
.btn:active { transform: scale(.97); }
.btn-sm { min-height: 40px; padding: 0 1.1em; font-size: .94rem; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px #cfccd6; }
.btn-light { background: rgba(255, 255, 255, .1); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
@media (hover: hover) {
  .btn:hover { background: var(--violet-hover); }
  .btn-ghost:hover { background: var(--surface); }
  .btn-light:hover { background: rgba(255, 255, 255, .18); }
}

/* Navigation: a centered, rounded bar */
.nav { position: fixed; top: 16px; left: 50%; z-index: 30; transform: translateX(-50%); width: min(880px, 100% - 32px); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 7px 7px 7px 22px; border-radius: 999px; background: rgba(18, 17, 23, .9); color: #fff; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 8px 24px rgba(18, 17, 23, .14); }
.nav nav { display: flex; gap: 6px; }
.nav nav a { padding: 8px 14px; border-radius: 999px; font-size: .95rem; font-weight: 500; color: #e6e4ec; transition: background-color .2s, color .2s; }
@media (hover: hover) { .nav nav a:hover { background: rgba(255, 255, 255, .1); color: #fff; } }
.nav .btn:focus-visible, .nav a:focus-visible { outline-color: var(--violet-light); }
.logo { font: 800 1.75rem/1 var(--display); letter-spacing: -.04em; }
.logo span { color: var(--violet-light); }
.logo-dark span { color: var(--violet); }

/* Hero */
.hero { width: min(1440px, 100% - 64px); padding: 112px 0 48px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.hero-copy, .hero-work { min-width: 0; }
.hero h1 { font: 700 clamp(3.2rem, 6.2vw, 6rem)/.98 var(--display); letter-spacing: -.04em; }
.hero h1 .accent { white-space: nowrap; }
.lede { margin-top: 28px; max-width: 32ch; font-size: clamp(1.15rem, 1.6vw, 1.4rem); line-height: 1.45; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-work { display: grid; gap: 20px; width: 100%; max-width: 560px; justify-self: end; }
.hero-feature { display: block; overflow: hidden; border-radius: 14px; background: var(--surface); box-shadow: 0 20px 44px -26px rgba(18, 17, 23, .4); }
.hero-feature > img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; object-position: top; }
.hero-caption { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; }
.hero-caption strong, .hero-secondary strong { font-size: 1rem; font-weight: 600; }
.hero-caption > span { display: inline-flex; align-items: center; gap: 12px; color: var(--muted); font-size: .8rem; }
.hero-secondary { display: flex; align-items: center; gap: 20px; margin-left: 64px; padding: 12px; border-radius: 12px; background: var(--violet-soft); }
.hero-secondary > img { width: 112px; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 6px; }
.hero-secondary > span { display: grid; gap: 4px; }
.hero-secondary > span > span { font-size: .8rem; color: #655a88; }
.hero-secondary > svg { margin-left: auto; margin-right: 8px; color: var(--violet); }
.hero-feature svg, .hero-secondary > svg { transition: transform .18s var(--ease-out); }
.project[id] { scroll-margin-top: 100px; }
@media (hover: hover) and (pointer: fine) {
  .hero-feature:hover svg, .hero-secondary:hover > svg { transform: translateX(3px); }
  .hero-feature:hover strong, .hero-secondary:hover strong { color: var(--violet); }
}
@media (max-width: 1100px) and (min-width: 901px) {
  .hero { gap: 32px; }
  .hero .btn { font-size: .88rem; padding-inline: 1.2em; }
  .hero-caption { padding: 14px; }
  .hero-caption > span { gap: 6px; }
  .hero-secondary { margin-left: 32px; gap: 14px; }
  .hero-secondary > img { width: 108px; }
}
@media (max-width: 900px) {
  .hero { width: calc(100% - 48px); grid-template-columns: 1fr; padding: 120px 0 48px; gap: 40px; }
  .hero h1 { font-size: clamp(3.2rem, 10vw, 5rem); }
  .hero-work { max-width: 640px; width: 100%; justify-self: start; }
  .hero-secondary { margin-left: 48px; }
}
@media (max-width: 480px) {
  .hero { width: calc(100% - 32px); padding-top: 112px; gap: 32px; }
  .hero h1 { font-size: clamp(2.8rem, 11vw, 3.3rem); }
  .hero .lede { margin-top: 20px; }
  .hero .actions { margin-top: 24px; gap: 10px; }
  .hero-work { gap: 16px; }
  .hero-caption { padding: 14px; }
  .hero-caption > span { font-size: .72rem; gap: 6px; }
  .hero-caption strong, .hero-secondary strong { font-size: .9rem; }
  .hero-secondary { margin-left: 24px; gap: 14px; }
  .hero-secondary > img { width: 104px; }
}

/* Sections */
.section { padding: clamp(56px, 8vw, 104px) 0; border-top: 1px solid var(--line); scroll-margin-top: 80px; }
#proyectos { padding-top: 56px; }
.head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px 48px; align-items: end; margin-bottom: clamp(32px, 4vw, 52px); }
.head h2 { font: 700 clamp(2.2rem, 4vw, 3.4rem)/1.02 var(--display); letter-spacing: -.04em; }
.head p { color: var(--muted); font-size: 1.1rem; max-width: 46ch; justify-self: end; }
.note { margin-top: 32px; color: var(--muted); font-size: .95rem; }

/* Projects: every project has the same size and weight */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px) clamp(20px, 2.4vw, 32px); }
.project { display: flex; flex-direction: column; gap: 18px; }
.shot { display: block; overflow: hidden; aspect-ratio: 16 / 10; border-radius: var(--radius); background: var(--surface); box-shadow: 0 0 0 1px var(--line), 0 12px 32px -18px rgba(18, 17, 23, .25); }
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .7s var(--ease-out); }
.meta { display: grid; gap: 6px; padding-inline: 4px; }
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.title-row strong { font: 700 1.4rem/1.2 var(--display); letter-spacing: -.025em; }
.chip { flex: none; padding: 5px 11px; border-radius: 999px; background: var(--violet-soft); color: var(--violet); font-size: .8rem; font-weight: 600; }
.chip-live { background: var(--mint-soft); color: var(--mint-ink); }
.desc { color: var(--muted); }
.go { display: inline-flex; align-items: center; gap: .4em; margin-top: 4px; font-weight: 600; color: var(--violet); }
.go svg { transition: transform .25s var(--ease-out); }
@media (hover: hover) {
  .project:hover .shot img { transform: scale(1.02); }
  .project:hover .go svg { transform: translate(2px, -2px); }
}
.next-body { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 12px; height: 100%; min-height: 280px; padding: clamp(28px, 3vw, 44px); border-radius: var(--radius); background: var(--ink); color: #fff; }
.next-body strong { font: 700 clamp(1.7rem, 2.6vw, 2.3rem)/1.1 var(--display); letter-spacing: -.035em; }
.next-body > span:not(.btn) { color: #c9c6d3; max-width: 34ch; }
.next-body .btn { margin-top: 12px; }
.project-next { grid-column: 1 / -1; }
.project-next .next-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 32px; min-height: 0; }
.project-next .next-body strong, .project-next .next-body > span:not(.btn) { grid-column: 1; }
.project-next .next-body > span:not(.btn) { max-width: 52ch; }
.project-next .next-body .btn { grid-column: 2; grid-row: 1 / span 2; align-self: center; margin-top: 0; }
@media (hover: hover) { .project-next:hover .btn { background: var(--violet-hover); } }

/* Services */
#servicios .head { grid-template-columns: 1fr; gap: 16px; margin-bottom: 36px; }
#servicios .head p { justify-self: start; max-width: 54ch; }
.services li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 12px 40px; align-items: baseline; padding: 28px 0; border-top: 1px solid var(--line); }
.services li:last-child { border-bottom: 1px solid var(--line); }
.services h3 { font: 600 1.3rem/1.3 var(--display); letter-spacing: -.02em; }
.services p { color: var(--muted); max-width: 52ch; }

/* Process */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.steps li { padding: 28px; border-radius: var(--radius); background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.num { display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 22px; border-radius: 50%; background: var(--violet-soft); color: var(--violet); font: 700 1rem/1 var(--display); font-variant-numeric: tabular-nums; }
.steps h3 { font: 600 1.25rem/1.3 var(--display); letter-spacing: -.02em; margin-bottom: 6px; }
.steps p { color: var(--muted); }

/* Contact */
#contacto { padding: clamp(24px, 4vw, 48px) 0 clamp(56px, 7vw, 88px); scroll-margin-top: 80px; }
.contact { padding: clamp(40px, 6vw, 80px); border-radius: 28px; background: var(--ink); color: #fff; }
.contact h2 { font: 700 clamp(2.4rem, 5vw, 4.2rem)/1.02 var(--display); letter-spacing: -.045em; max-width: 14ch; }
.contact .accent { color: var(--violet-light); }
.contact > p { margin-top: 20px; max-width: 52ch; color: #c9c6d3; font-size: 1.1rem; }
.contact > .contact-data { margin-top: 24px; font-size: .95rem; color: #a9a6b4; overflow-wrap: anywhere; }
.contact ::selection { background: var(--violet-light); color: var(--ink); }
.contact :focus-visible { outline-color: var(--violet-light); }

.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 28px 0 calc(32px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--muted); font-size: .92rem; }
.foot .logo { color: var(--ink); font-size: 1.5rem; }

/* Motion: a calm entrance for the hero, then projects rise in once */
@media (prefers-reduced-motion: no-preference) {
  .js .hero > * { animation: rise .6s var(--ease-out) both; }
  .js .hero-work { animation-delay: .06s; }
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
  .js .reveal.in { opacity: 1; transform: none; }
}
@keyframes rise { from { opacity: .85; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-feature svg, .hero-secondary > svg { transition: none; }
}

/* Tablet and phone */
@media (max-width: 860px) {
  .wrap { width: calc(100% - 32px); }
  .nav { padding-left: 18px; }
  .nav nav a { padding: 8px 10px; }
  .head { grid-template-columns: 1fr; }
  .head p { justify-self: start; }
  .grid { grid-template-columns: 1fr; }
  .project-next .next-body { display: flex; gap: 12px; }
  .project-next .next-body .btn { align-self: flex-start; margin-top: 12px; }
  .services li { grid-template-columns: 1fr; }
  #servicios .head { margin-bottom: 28px; }
  .services li { gap: 8px; padding-block: 24px; }
  .steps { grid-template-columns: 1fr; }
  .contact .actions { flex-direction: column; align-items: stretch; }
  .contact .btn { white-space: normal; text-align: center; }
}
@media (max-width: 480px) {
  .nav { gap: 8px; }
  .hide-sm { display: none; }
  .nav nav { gap: 0; }
  .nav nav a { font-size: .9rem; padding: 8px 8px; }
  .hero .actions .btn { flex: 1 1 100%; }
}
