:root {
  --ink: #1d1d1b;
  --muted: #686660;
  --paper: #f4f2ed;
  --white: #fffefa;
  --line: #d7d4cc;
  --accent: #b52c1e;
  --charcoal: #20201e;
  --deep: #11110f;
  --shadow: 0 22px 60px rgba(20, 20, 18, 0.16);
  --radius: 8px;
  --text-label: 0.8rem;
  --text-small: 0.9rem;
  --text-body: 1rem;
  --text-lead: 1.16rem;
  --text-card-title: 1.2rem;
  --text-h2: clamp(2rem, 3.2vw, 3rem);
  --text-h1: clamp(4rem, 7vw, 6.4rem);
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: Arial, Helvetica, sans-serif;
  font-size: var(--text-body);
  line-height: 1.6;
}

body.modal-open {
  overflow: hidden;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 56px);
  color: var(--white);
  transition: background 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

.site-header.is-scrolled,
.site-header.is-open {
  color: var(--ink);
  background: rgba(255, 253, 250, 0.94);
  box-shadow: 0 8px 28px rgba(24, 24, 22, 0.1);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 82px;
  height: 82px;
  padding: 7px;
  border: 1px solid rgba(245, 242, 236, 0.72);
  border-radius: 8px;
  background: rgba(255, 254, 250, 0.97);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(18, 18, 16, 0.14);
}

.brand img {
  width: 68px;
  height: 68px;
  border-radius: 5px;
  object-fit: cover;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 32px);
  font-size: var(--text-small);
  font-weight: 700;
  text-transform: uppercase;
}

.site-nav a {
  position: relative;
  padding-block: 8px;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 160ms ease;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: currentColor;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
}

.hero {
  position: relative;
  min-height: 86vh;
  display: grid;
  align-items: end;
  overflow: hidden;
  color: var(--white);
}

.hero-slides,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-slides {
  overflow: hidden;
  background: var(--deep);
}

.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.72) contrast(1.04);
  opacity: 0;
  transform: scale(1.035);
  transition: opacity 900ms ease, transform 6500ms ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(8, 8, 7, 0.9), rgba(8, 8, 7, 0.5) 48%, rgba(8, 8, 7, 0.12)),
    linear-gradient(0deg, rgba(8, 8, 7, 0.62), rgba(8, 8, 7, 0.02) 52%);
}

.hero-content {
  position: relative;
  width: min(820px, calc(100% - 36px));
  margin-left: clamp(18px, 7vw, 92px);
  margin-bottom: clamp(42px, 8vh, 88px);
}

.eyebrow,
.section-kicker {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: var(--text-label);
  line-height: 1.4;
  font-weight: 800;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.hero .eyebrow {
  color: #f0b3a8;
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1 {
  margin: 0;
  font-size: var(--text-h1);
  line-height: 0.96;
}

.hero h1 span {
  display: inline;
}

h2 {
  margin: 0;
  font-size: var(--text-h2);
  line-height: 1.12;
}

h3 {
  margin: 0;
  font-size: var(--text-card-title);
  line-height: 1.25;
}

.hero-lead {
  max-width: min(760px, 100%);
  margin: 22px 0 0;
  font-size: var(--text-lead);
  line-height: 1.65;
  color: rgba(255, 253, 250, 0.9);
  overflow-wrap: break-word;
}

.hero-focus {
  margin: 16px 0 0;
  color: #f0b3a8;
  font-size: var(--text-label);
  font-weight: 900;
  line-height: 1.5;
  text-transform: uppercase;
}

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

.hero-project-nav {
  position: absolute;
  right: clamp(18px, 5vw, 72px);
  bottom: clamp(118px, 17vh, 176px);
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 12px 18px;
  width: min(350px, calc(100% - 36px));
  padding: 14px;
  border: 1px solid rgba(255, 254, 250, 0.3);
  border-radius: 8px;
  color: var(--white);
  background: rgba(18, 18, 16, 0.68);
  backdrop-filter: blur(14px);
}

.hero-project-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.hero-project-copy span,
.hero-project-copy small {
  color: rgba(255, 254, 250, 0.68);
  font-size: var(--text-label);
  font-weight: 800;
  text-transform: uppercase;
}

.hero-project-copy strong {
  overflow: hidden;
  font-size: var(--text-card-title);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-project-controls {
  display: flex;
  gap: 6px;
  align-items: center;
}

.hero-project-controls button {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 254, 250, 0.35);
  border-radius: 6px;
  color: var(--white);
  background: transparent;
  font-size: 1.1rem;
  cursor: pointer;
}

.hero-project-controls button:hover,
.hero-project-controls button:focus-visible {
  color: var(--deep);
  background: var(--white);
}

.hero-progress {
  grid-column: 1 / -1;
  height: 2px;
  overflow: hidden;
  background: rgba(255, 254, 250, 0.18);
}

.hero-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
}

.hero-progress span.is-running {
  width: 100%;
  transition: width 6500ms linear;
}

.hero-stats {
  position: absolute;
  right: clamp(18px, 5vw, 72px);
  bottom: clamp(24px, 6vh, 72px);
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(86px, 1fr));
  overflow: hidden;
  border: 1px solid rgba(255, 253, 250, 0.28);
  border-radius: 8px;
  background: rgba(18, 18, 16, 0.62);
  backdrop-filter: blur(12px);
}

.hero-stats div {
  padding: 14px 16px;
  border-left: 1px solid rgba(255, 253, 250, 0.2);
}

.hero-stats div:first-child {
  border-left: 0;
}

.hero-stats strong,
.hero-stats span {
  display: block;
}

.hero-stats strong {
  font-size: 1.6rem;
  line-height: 1.1;
}

.hero-stats .location-stat {
  font-size: 1.05rem;
  line-height: 1.2;
}

.hero-stats span {
  margin-top: 5px;
  color: rgba(255, 253, 250, 0.76);
  font-size: var(--text-label);
  font-weight: 800;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 800;
  text-align: center;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}

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

.button.primary {
  color: var(--white);
  background: var(--accent);
}

.button.ghost {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.06);
}

.button.whatsapp {
  color: var(--white);
  background: var(--charcoal);
}

section {
  padding: clamp(68px, 9vw, 112px) clamp(18px, 5vw, 72px);
}

.band {
  background: var(--paper);
}

.content-grid,
.contact-panel {
  width: min(1160px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 1fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}

.content-grid > p {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-lead);
}

.section-heading {
  width: min(1160px, 100%);
  margin: 0 auto clamp(32px, 5vw, 54px);
}

.section-heading h2 {
  max-width: 900px;
}

.service-grid,
.project-grid {
  width: min(1160px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 16px;
}

.service-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.project-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-card,
.project-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
}

.service-card {
  min-height: 280px;
  padding: 24px;
}

.service-number {
  display: block;
  margin-bottom: 46px;
  color: var(--accent);
  font-weight: 900;
}

.service-card p,
.project-desc,
.process-list p,
.contact p {
  color: var(--muted);
}

.portfolio-toolbar {
  width: min(1160px, 100%);
  margin: 0 auto 18px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
}

.filter-button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: var(--white);
  font-size: var(--text-small);
  font-weight: 800;
  cursor: pointer;
}

.filter-button.is-active,
.filter-button:hover,
.filter-button:focus-visible {
  color: var(--white);
  background: var(--charcoal);
  border-color: var(--charcoal);
}

.project-card {
  box-shadow: 0 16px 42px rgba(20, 20, 18, 0.1);
}

.project-button {
  display: grid;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.project-image-wrap {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--deep);
}

.project-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease, filter 220ms ease;
}

.project-button:hover img,
.project-button:focus-visible img {
  transform: scale(1.04);
  filter: saturate(1.05) contrast(1.03);
}

.project-status {
  position: absolute;
  left: 14px;
  bottom: 14px;
  max-width: calc(100% - 28px);
  padding: 7px 10px;
  border-radius: 6px;
  color: var(--white);
  background: rgba(18, 18, 16, 0.76);
  font-size: var(--text-label);
  font-weight: 900;
  text-transform: uppercase;
}

.project-body {
  display: grid;
  gap: 9px;
  padding: 20px;
}

.project-meta {
  color: var(--accent);
  font-size: var(--text-label);
  font-weight: 900;
  text-transform: uppercase;
}

.project-title {
  color: var(--ink);
  font-size: var(--text-card-title);
  font-weight: 900;
  line-height: 1.15;
}

.project-desc {
  display: -webkit-box;
  min-height: 4.65em;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  font-size: var(--text-small);
  line-height: 1.55;
}

.process-list {
  width: min(1040px, 100%);
  margin: 0 auto;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.process-list li {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: clamp(16px, 4vw, 40px);
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.process-list li > span {
  color: var(--accent);
  font-weight: 900;
}

.process-list p {
  max-width: 720px;
  margin: 9px 0 0;
}

.tool-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tool-list li {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  font-weight: 800;
}

.contact {
  background: var(--charcoal);
  color: var(--white);
}

.contact-panel {
  align-items: center;
}

.contact .section-kicker {
  color: #f0b3a8;
}

.contact p {
  max-width: 560px;
  color: rgba(255, 253, 250, 0.78);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.contact-links a {
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  color: rgba(255, 253, 250, 0.9);
  font-size: var(--text-small);
  font-weight: 800;
}

.contact-links a:hover,
.contact-links a:focus-visible {
  color: var(--charcoal);
  background: var(--white);
}

.contact-form {
  display: grid;
  gap: 14px;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}

.contact-form label {
  display: grid;
  gap: 8px;
  color: rgba(255, 253, 250, 0.86);
  font-size: var(--text-small);
  font-weight: 800;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  padding: 12px;
  color: var(--ink);
  background: var(--white);
}

.contact-form textarea {
  resize: vertical;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(18, 18, 16, 0.66);
  backdrop-filter: blur(6px);
}

.project-modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  width: min(560px, 100%);
  overflow-y: auto;
  background: var(--white);
  box-shadow: -24px 0 60px rgba(18, 18, 16, 0.22);
  transform: translateX(105%);
  transition: transform 220ms ease;
}

.project-modal.is-open {
  transform: translateX(0);
}

.modal-close {
  position: sticky;
  top: 14px;
  z-index: 2;
  margin: 14px 14px -54px auto;
  display: block;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 6px;
  color: var(--white);
  background: rgba(18, 18, 16, 0.8);
  font-weight: 900;
  cursor: pointer;
}

.modal-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--deep);
}

.modal-content {
  padding: clamp(22px, 5vw, 36px);
}

.modal-content h2 {
  font-size: var(--text-h2);
}

.modal-desc {
  color: var(--muted);
  font-size: var(--text-body);
}

.modal-roles,
.modal-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.modal-roles span,
.modal-tools span {
  padding: 9px 11px;
  border-radius: 6px;
  font-size: var(--text-small);
  font-weight: 900;
}

.modal-roles span {
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
}

.modal-tools span {
  color: var(--white);
  background: var(--charcoal);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px clamp(18px, 5vw, 72px);
  color: var(--muted);
  background: var(--white);
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--ink);
  text-decoration-color: var(--accent);
}

@media (max-width: 1400px) and (min-width: 1121px) {
  .hero-content {
    width: min(720px, calc(100% - 36px));
  }
}

@media (max-width: 1120px) {
  .hero-project-nav {
    display: none;
  }

  .hero-stats {
    position: relative;
    right: auto;
    bottom: auto;
    z-index: 3;
    width: min(720px, calc(100% - 36px));
    margin: 0 18px 22px;
  }

  .hero {
    align-items: end;
  }
}

@media (max-width: 980px) {
  .service-grid,
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-grid,
  .contact-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .site-header {
    padding: 12px 16px;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 16px 18px;
    color: var(--ink);
    background: rgba(255, 253, 250, 0.97);
    box-shadow: 0 14px 28px rgba(24, 24, 22, 0.12);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }

  .hero {
    min-height: 82vh;
  }

  .hero-project-nav {
    display: none;
  }

  .hero-content {
    width: calc(100% - 32px);
    margin-left: 16px;
    margin-bottom: 24px;
    padding-top: 76px;
  }

  .hero .eyebrow {
    max-width: 300px;
    font-size: var(--text-label);
  }

  .hero h1 span {
    display: block;
  }

  .hero-lead {
    max-width: 320px;
  }

  .hero-focus {
    display: none;
  }

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

  .hero-actions {
    max-width: 320px;
  }

  .hero-stats {
    grid-template-columns: repeat(3, 1fr);
    width: calc(100% - 32px);
    margin: 0 16px 18px;
  }

  .hero-stats div {
    padding: 12px 8px;
  }

  .hero-stats strong {
    font-size: 1.4rem;
  }

  .hero-stats .location-stat {
    font-size: 0.86rem;
  }

  .hero-stats span {
    font-size: 0.74rem;
    overflow-wrap: anywhere;
  }

  .service-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .service-card {
    min-height: auto;
  }

  .service-number {
    margin-bottom: 24px;
  }

  .process-list li {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .project-modal {
    width: 100%;
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .brand {
    width: 68px;
    height: 68px;
    padding: 6px;
  }

  .brand img {
    width: 56px;
    height: 56px;
  }

  h1 {
    font-size: clamp(3rem, 14vw, 3.7rem);
  }

  .hero-lead {
    font-size: var(--text-body);
  }
}
