:root {
  --ink: #17191d;
  --ink-soft: #343840;
  --gold: #c7a46c;
  --gold-dark: #9f7b45;
  --paper: #ffffff;
  --mist: #f5f6f8;
  --line: #e5e6e8;
  --serif: "Prata", Georgia, "Times New Roman", serif;
  --sans: "Open Sans", Arial, sans-serif;
  --shadow: 0 18px 48px rgba(20, 24, 30, 0.1);
  --radius: 4px;
  --container: 1024px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  color: var(--ink-soft);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid rgba(199, 164, 108, 0.65);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 200;
  padding: 10px 16px;
  color: #fff;
  background: var(--ink);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
}

.container {
  width: min(calc(100% - 40px), var(--container));
  margin-inline: auto;
}

.section {
  padding: 104px 0;
}

.section--soft {
  background: var(--mist);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold-dark);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section-title,
.page-title,
.article-title {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.14;
}

.section-title {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
}

.section-heading {
  max-width: 720px;
  margin: 0 auto 54px;
  text-align: center;
}

.section-heading p:last-child {
  margin: 14px 0 0;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 22px;
  border: 1px solid var(--gold);
  border-radius: 2px;
  color: var(--ink);
  background: transparent;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.button:hover {
  color: #fff;
  background: var(--gold-dark);
  transform: translateY(-2px);
}

.button--light {
  color: #fff;
}

.button--filled {
  color: #fff;
  background: var(--gold-dark);
}

.button--filled:hover {
  background: var(--ink);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(229, 230, 232, 0.85);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 5px 20px rgba(20, 24, 30, 0.04);
  backdrop-filter: blur(12px);
  transition: box-shadow 0.35s ease, background-color 0.35s ease;
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.985);
  box-shadow: 0 12px 30px rgba(20, 24, 30, 0.09);
}

.header-inner {
  display: flex;
  min-height: 96px;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.brand {
  flex: 0 0 auto;
}

.brand img {
  width: 82px;
  height: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-nav a:not(.button) {
  position: relative;
  padding: 10px 0;
  color: #34353a;
  font-size: 0.875rem;
  font-weight: 500;
}

.site-nav a:not(.button)::after {
  position: absolute;
  right: 0;
  bottom: 5px;
  left: 0;
  height: 1px;
  background: var(--gold);
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.2s ease;
}

.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
}

.nav-toggle svg {
  width: 22px;
  height: 22px;
}

.hero {
  min-height: 780px;
  display: grid;
  align-items: center;
  color: #fff;
  background-color: #272826;
  background-image: linear-gradient(90deg, rgba(18, 18, 18, 0.74) 0%, rgba(18, 18, 18, 0.2) 56%, rgba(18, 18, 18, 0.05) 100%), url("../images/rpa-time01.jpg");
  background-position: center, calc(50% + 80px) center;
  background-size: cover, cover;
  background-repeat: no-repeat;
}

.hero-content {
  max-width: 390px;
  padding: 72px 0;
}

.hero h1 {
  margin: 0 0 20px;
  color: #d0aa72;
  font-family: var(--serif);
  max-width: 360px;
  font-size: clamp(2.15rem, 3vw, 2.3rem);
  font-weight: 400;
  line-height: 1.2;
  animation: hero-enter 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}

.hero p {
  max-width: 390px;
  margin: 0 0 30px;
  font-size: clamp(1rem, 1.6vw, 1.08rem);
  animation: hero-enter 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.22s both;
}

.hero .button {
  animation: hero-enter 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.36s both;
}

@keyframes hero-enter {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.72s cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay, 0ms), transform 0.72s cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.specialties-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.specialty-card {
  min-height: 188px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 26px 18px;
  border: 1px solid rgba(226, 228, 232, 0.8);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 15px 35px rgba(26, 29, 34, 0.07);
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.specialty-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-5px);
}

.specialty-card img {
  width: 52px;
  height: 52px;
  margin-bottom: 17px;
  object-fit: contain;
  filter: grayscale(1) contrast(0.8);
}

.specialty-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  align-items: center;
  gap: clamp(44px, 8vw, 104px);
}

.split-copy p:not(.eyebrow) {
  margin: 22px 0 28px;
}

.split-media img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.video-wrap {
  max-width: 900px;
  margin: 46px auto 0;
}

.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
  background: #111;
}

.video-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.video-poster {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  color: #fff;
  background: #111;
}

.video-poster::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10, 12, 16, 0.68), rgba(10, 12, 16, 0.18));
  content: "";
  transition: background 0.35s ease;
}

.video-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.video-poster-content {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 16px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
  transform: translate(-50%, -50%);
}

.video-play-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  color: #fff;
  background: rgba(159, 123, 69, 0.86);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.28);
  transition: background 0.25s ease, transform 0.25s ease;
}

.video-play-icon svg {
  width: 32px;
  height: 32px;
  margin-left: 3px;
}

.video-poster:hover img {
  transform: scale(1.025);
}

.video-poster:hover::after {
  background: linear-gradient(90deg, rgba(10, 12, 16, 0.6), rgba(10, 12, 16, 0.1));
}

.video-poster:hover .video-play-icon {
  background: var(--gold-dark);
  transform: scale(1.06);
}

.video-actions {
  margin-top: 28px;
  text-align: center;
}

.team-banner {
  min-height: 520px;
  background: #191a1e url("../images/rpa-time03.jpg") center / cover no-repeat;
}

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

.news-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 32px rgba(20, 24, 30, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.news-card-image {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #ddd;
}

.news-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.news-card:hover .news-card-image img {
  transform: scale(1.04);
}

.news-card-content {
  padding: 24px;
}

.news-card time,
.article-meta {
  color: #777b82;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.news-card h3 {
  margin: 10px 0 12px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 400;
  line-height: 1.24;
}

.news-card p {
  margin: 0;
  color: #62666d;
  font-size: 0.94rem;
  line-height: 1.6;
}

.text-link {
  display: inline-flex;
  margin-top: 16px;
  color: var(--gold-dark);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.section-actions {
  margin-top: 44px;
  text-align: center;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius);
  background: #ddd;
  cursor: zoom-in;
  aspect-ratio: 4 / 5;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.gallery-item:hover img {
  filter: brightness(0.82);
  transform: scale(1.03);
}

.gallery-grid--office {
  grid-template-columns: repeat(4, 1fr);
}

.gallery-grid--office .gallery-item {
  aspect-ratio: 4 / 3;
}

.page-hero {
  padding: 94px 0;
  color: #fff;
  background: linear-gradient(115deg, rgba(16, 19, 25, 0.95), rgba(16, 19, 25, 0.66)), url("../images/escritorio-ronald3.png") center / cover;
}

.page-hero .eyebrow {
  color: #d2b17d;
}

.page-title {
  max-width: 900px;
  color: #fff;
  font-size: clamp(2.65rem, 6vw, 5rem);
}

.page-lead {
  max-width: 720px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.05rem;
}

.office-intro-image {
  width: 100%;
  max-height: 680px;
  object-fit: cover;
  object-position: center 28%;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: clamp(48px, 8vw, 100px);
}

.contact-form {
  display: grid;
  gap: 18px;
}

.field label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 700;
}

.field input,
.field textarea {
  width: 100%;
  padding: 14px 15px;
  border: 1px solid #d8dadd;
  border-radius: 2px;
  color: var(--ink);
  background: #fff;
}

.field textarea {
  min-height: 160px;
  resize: vertical;
}

.form-note,
.form-status {
  margin: 0;
  color: #686c73;
  font-size: 0.83rem;
}

.contact-details {
  display: grid;
  align-content: start;
  gap: 18px;
}

.contact-card {
  padding: 24px;
  border-left: 3px solid var(--gold);
  background: var(--mist);
}

.contact-card h3 {
  margin: 0 0 6px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.38rem;
  font-weight: 400;
}

.contact-card p {
  margin: 0;
}

.article-shell {
  display: grid;
  grid-template-columns: minmax(0, 780px) minmax(240px, 320px);
  justify-content: center;
  gap: 70px;
}

.article-title {
  margin: 12px 0 24px;
  font-size: clamp(2.4rem, 5vw, 4.4rem);
}

.article-cover {
  width: 100%;
  margin: 34px 0 42px;
  border-radius: var(--radius);
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.article-body {
  color: #40434a;
  font-family: var(--serif);
  font-size: 1.12rem;
}

.article-body p {
  margin: 0 0 1.35em;
}

.article-body h2,
.article-body h3 {
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.25;
}

.article-body a {
  color: var(--gold-dark);
  text-decoration: underline;
}

.article-body img {
  margin: 32px auto;
}

.article-aside {
  position: sticky;
  top: 112px;
  align-self: start;
  padding: 28px;
  border-top: 3px solid var(--gold);
  background: var(--mist);
}

.article-aside h2 {
  margin: 0 0 12px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 400;
  line-height: 1.2;
}

.cta-band {
  padding: 78px 0;
  color: #fff;
  background: linear-gradient(120deg, rgba(14, 17, 23, 0.96), rgba(14, 17, 23, 0.82)), url("../images/escritorio-ronald2.png") center / cover;
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.cta-inner h2 {
  margin: 0 0 10px;
  color: #fff;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 400;
}

.cta-inner p {
  max-width: 680px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
}

.site-footer {
  color: rgba(255, 255, 255, 0.78);
  background: #14171c;
}

.footer-main {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 60px;
  padding: 66px 0;
}

.footer-brand {
  position: relative;
  width: 126px;
  margin-bottom: 18px;
}

.footer-logo {
  width: 100%;
  margin: 0;
}

.footer-logo--light {
  position: absolute;
  inset: 0;
  clip-path: inset(72% 0 0 0);
  filter: brightness(0) invert(1);
  pointer-events: none;
}

.site-footer h3 {
  margin: 0 0 16px;
  color: #fff;
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 400;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links a:hover,
.social-links a:hover {
  color: #d3b27e;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.social-links a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}

.footer-bottom {
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.82rem;
  text-align: center;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 10, 13, 0.92);
}

.lightbox.is-open {
  display: flex;
}

.lightbox img {
  max-width: min(1120px, 92vw);
  max-height: 88vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  color: #fff;
  background: transparent;
  font-size: 1.7rem;
  cursor: pointer;
}

@media (max-width: 980px) {
  .section {
    padding: 82px 0;
  }

  .site-header {
    background: #fff;
    backdrop-filter: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: fixed;
    inset: 96px 0 0;
    z-index: 90;
    display: flex;
    visibility: hidden;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 26px 30px 40px;
    background: #fff;
    opacity: 0;
    overflow-y: auto;
    transform: translateY(-12px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  }

  .site-nav.is-open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
  }

  .site-nav a:not(.button) {
    min-height: 52px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--line);
    font-size: 1rem;
  }

  .site-nav .button {
    margin-top: 16px;
  }

  .hero {
    min-height: 720px;
    background-image: linear-gradient(90deg, rgba(15, 16, 16, 0.86) 0%, rgba(15, 16, 16, 0.48) 100%), url("../images/rpa-time01.jpg");
    background-position: center, 68% center;
    background-size: cover, cover;
  }

  .hero-content {
    max-width: 540px;
  }

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

  .split {
    grid-template-columns: 1fr;
  }

  .split-media {
    max-width: 760px;
  }

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

  .gallery-grid--office {
    grid-template-columns: repeat(3, 1fr);
  }

  .team-banner {
    min-height: 420px;
  }

  .contact-grid,
  .article-shell {
    grid-template-columns: 1fr;
  }

  .article-aside {
    position: static;
  }

  .footer-main {
    grid-template-columns: 1fr 1fr;
  }

  .footer-about {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .container {
    width: min(calc(100% - 28px), var(--container));
  }

  .section {
    padding: 66px 0;
  }

  .header-inner {
    min-height: 82px;
  }

  .brand img {
    width: 72px;
  }

  .site-nav {
    inset: 82px 0 0;
  }

  .hero {
    min-height: auto;
    padding-top: 340px;
    background-image: linear-gradient(180deg, rgba(19, 20, 20, 0.05) 28%, rgba(19, 20, 20, 0.96) 66%), url("../images/rpa-time01.jpg");
    background-position: center top, 66% top;
    background-size: 100% 520px, auto 520px;
    background-repeat: no-repeat;
  }

  .hero-content {
    padding: 42px 0 64px;
  }

  .hero h1 {
    font-size: clamp(2rem, 9vw, 2.55rem);
    line-height: 1.18;
  }

  .hero .button {
    width: 100%;
  }

  .video-play-icon {
    width: 64px;
    height: 64px;
  }

  .section-heading {
    margin-bottom: 38px;
  }

  .specialties-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .specialty-card {
    min-height: 150px;
    padding: 20px 8px;
  }

  .specialty-card img {
    width: 42px;
    height: 42px;
    margin-bottom: 12px;
  }

  .specialty-card h3 {
    font-size: 0.86rem;
    line-height: 1.3;
  }

  .news-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid,
  .gallery-grid--office {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .gallery-grid--office .gallery-item {
    aspect-ratio: 1 / 1;
  }

  .team-banner {
    min-height: 280px;
    background-position: 52% center;
  }

  .page-hero {
    padding: 66px 0;
  }

  .contact-grid {
    gap: 52px;
  }

  .article-shell {
    gap: 42px;
  }

  .article-cover {
    margin: 26px 0 32px;
  }

  .article-body {
    font-size: 1.04rem;
  }

  .cta-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .cta-inner .button {
    width: 100%;
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 52px 0;
  }

  .footer-about {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
