:root {
  --ink: #151719;
  --muted: #58636a;
  --paper: #f7f4ee;
  --panel: #ffffff;
  --line: #ddd8ce;
  --teal: #167c74;
  --coral: #d85f49;
  --blue: #356a82;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

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

section[id],
article[id] {
  scroll-margin-top: 96px;
}

main {
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 14px clamp(20px, 5vw, 68px);
  border-bottom: 1px solid rgba(21, 23, 25, 0.1);
  background: rgba(247, 244, 238, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 850;
  letter-spacing: 0;
}

.brand span:last-child {
  display: grid;
  line-height: 1.1;
}

.brand strong {
  font-size: 0.98rem;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: #3d464b;
  font-size: 0.94rem;
  font-weight: 650;
}

.site-header nav a {
  transition: color 180ms ease;
}

.site-header nav a:hover,
.site-header nav a:focus-visible {
  color: var(--coral);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.72fr);
  gap: clamp(34px, 6vw, 82px);
  align-items: center;
  min-height: min(820px, calc(100vh - 76px));
  padding: clamp(54px, 8vw, 96px) clamp(20px, 5vw, 68px) 48px;
}

.hero-copy {
  max-width: 790px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 880px;
  margin: 0;
  font-size: clamp(2.6rem, 7.2vw, 6.7rem);
  line-height: 0.97;
  letter-spacing: 0;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 680px;
  margin: 26px 0 0;
  color: #38444a;
  font-size: clamp(1rem, 1.8vw, 1.22rem);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button.primary {
  background: var(--ink);
  color: #fff;
}

.button.secondary {
  border-color: rgba(21, 23, 25, 0.18);
  background: #fff;
}

.hero-board {
  border: 1px solid rgba(21, 23, 25, 0.12);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(38, 34, 28, 0.14);
  overflow: hidden;
}

.metric {
  display: grid;
  gap: 6px;
  padding: 22px;
  border-bottom: 1px solid var(--line);
}

.metric strong {
  font-size: clamp(1.45rem, 3vw, 2.2rem);
  line-height: 1;
}

.metric span {
  color: var(--muted);
  font-size: 0.95rem;
}

.preview-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  min-height: 132px;
}

.preview-strip img {
  width: 100%;
  height: 132px;
  object-fit: cover;
  border-right: 1px solid var(--line);
}

.preview-strip img:first-child {
  object-fit: contain;
  padding: 16px;
  background: #fbf8f4;
}

.preview-strip img:last-child {
  border-right: 0;
}

.intro-band {
  padding: 38px clamp(20px, 5vw, 68px);
  background: var(--ink);
  color: #fff;
}

.intro-band p {
  max-width: 1040px;
  margin: 0 auto;
  font-size: clamp(1.1rem, 2.5vw, 1.75rem);
  line-height: 1.45;
}

.section {
  padding: clamp(64px, 9vw, 110px) clamp(20px, 5vw, 68px);
}

.section-heading {
  max-width: 760px;
  margin: 0 0 34px;
}

.section-heading.compact {
  max-width: 660px;
}

.section-heading h2,
.contact h2 {
  margin: 0;
  font-size: clamp(2rem, 4.2vw, 4rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.project-list {
  display: grid;
  gap: 22px;
}

.project-card {
  display: grid;
  grid-template-columns: minmax(280px, 0.86fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 52px);
  align-items: stretch;
  min-height: 520px;
  padding: clamp(18px, 3vw, 34px);
  border: 1px solid rgba(21, 23, 25, 0.12);
  border-radius: 8px;
  overflow: hidden;
}

.theme-corsi {
  background: linear-gradient(135deg, #e9f6f2, #fff8ed);
}

.theme-mariana {
  background: linear-gradient(135deg, #edf5fb, #f7fbf5);
}

.theme-gonzalo {
  background: linear-gradient(135deg, #eef7f5, #f8f2e6);
}

.theme-jorge {
  background: linear-gradient(135deg, #fbf4ec, #eff3f9);
}

.project-visual {
  display: grid;
  grid-template-rows: auto minmax(220px, 1fr) auto;
  border: 1px solid rgba(21, 23, 25, 0.16);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.browser-chrome {
  display: flex;
  gap: 7px;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
}

.browser-chrome span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #d9d3c7;
}

.visual-main {
  display: grid;
  min-height: 300px;
  place-items: center;
  padding: 18px;
  background: #faf8f4;
}

.visual-main img {
  width: 100%;
  height: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: 8px;
}

.visual-main.contain img {
  object-fit: contain;
  padding: 18px;
  background: #fff;
}

.visual-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.visual-gallery.single {
  grid-template-columns: 1fr;
}

.visual-gallery img {
  width: 100%;
  height: 118px;
  object-fit: cover;
  border-right: 1px solid var(--line);
}

.visual-gallery img:last-child {
  border-right: 0;
}

.project-copy {
  align-self: center;
  max-width: 720px;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
  color: rgba(21, 23, 25, 0.62);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.project-type {
  margin: 0 0 10px;
  color: var(--coral);
  font-size: 0.8rem;
  font-weight: 850;
  text-transform: uppercase;
}

.project-copy h3 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4.8rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.project-copy > p:not(.project-type) {
  margin: 20px 0 0;
  color: #344149;
  font-size: 1.05rem;
  line-height: 1.72;
}

.project-copy ul {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.project-copy li {
  position: relative;
  padding-left: 22px;
  color: #2d383e;
  line-height: 1.5;
}

.project-copy li::before {
  content: "";
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--coral);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.tag-row span {
  padding: 7px 10px;
  border: 1px solid var(--teal);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.64);
  font-size: 0.82rem;
  font-weight: 750;
}

.case-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.case-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 850;
  transition: transform 180ms ease, background 180ms ease;
}

.case-link:hover,
.case-link:focus-visible {
  transform: translateY(-2px);
}

.case-link.secondary-link {
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}

.services {
  background: #fff;
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.capability-grid article {
  min-height: 150px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf8f4;
}

.capability-grid span {
  display: block;
  width: 34px;
  height: 6px;
  margin-bottom: 24px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal), var(--coral));
}

.capability-grid h3 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.25;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.process-grid article {
  padding: 24px;
  border: 1px solid rgba(21, 23, 25, 0.14);
  border-radius: 8px;
  background: #fff;
}

.process-grid span {
  color: var(--blue);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-weight: 850;
}

.process-grid h3 {
  margin: 24px 0 10px;
  font-size: 1.35rem;
}

.process-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 36px;
  align-items: end;
  padding: clamp(56px, 9vw, 96px) clamp(20px, 5vw, 68px);
  background: #152022;
  color: #fff;
}

.contact p:not(.eyebrow) {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 1.06rem;
  line-height: 1.7;
}

.contact .button.primary {
  min-width: 290px;
  background: #fff;
  color: var(--ink);
}

@media (max-width: 980px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header nav {
    width: 100%;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hero,
  .project-card,
  .contact {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .capability-grid,
  .process-grid {
    grid-template-columns: 1fr 1fr;
  }

  .contact {
    align-items: start;
  }

  .contact .button.primary {
    width: fit-content;
  }
}

@media (max-width: 640px) {
  .site-header {
    min-height: 0;
  }

  .brand strong {
    font-size: 0.9rem;
  }

  .site-header nav {
    font-size: 0.86rem;
  }

  .hero,
  .section,
  .contact {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-actions,
  .contact .button.primary {
    width: 100%;
  }

  .button {
    width: 100%;
  }

  .preview-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-card {
    min-height: 0;
    padding: 14px;
  }

  .visual-main {
    min-height: 230px;
  }

  .case-actions,
  .case-link {
    width: 100%;
  }

  .capability-grid,
  .process-grid {
    grid-template-columns: 1fr;
  }
}
