:root {
  color-scheme: dark;
  --bg: #101113;
  --surface: #191b1f;
  --white: #f6f6f4;
  --muted: #aeb0b5;
  --accent: #ded6b5;
  --line: #ffffff20;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--white);
  font-family: 'Avenir Next',Avenir,'Segoe UI',sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

button {
  font: inherit;
}

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

a:focus-visible,button:focus-visible,summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

.wrap {
  width: min(1280px,calc(100% - 100px));
  margin-inline: auto;
}

.skip {
  position: fixed;
  top: 8px;
  left: 8px;
  background: white;
  color: black;
  padding: 12px;
  z-index: 10;
  transform: translateY(-150%);
}

.skip:focus {
  transform: none;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  object-fit: contain;
}

.brand>span {
  font-size: 30px;
  font-weight: 500;
  letter-spacing: 3px;
  line-height: 1;
}

.brand-sub {
  display: block;
  font-size: 10px;
  letter-spacing: 3px;
  margin-top: 8px;
}

.header nav {
  display: flex;
  gap: 34px;
  color: #d3d4d6;
  font-size: 14px;
}

.header nav a {
  padding-block: 14px;
}

.header a:hover {
  color: var(--accent);
}

.header-contact {
  font-size: 14px;
  padding: 12px 0;
}

.header-contact span {
  margin-left: 16px;
}

.hero {
  display: grid;
  grid-template-columns: 1.13fr 1fr;
  min-height: 680px;
  align-items: center;
  gap: 30px;
  padding: 48px 0 64px;
}

.location {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 30px;
}

.location span {
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
}

h1,h2,p {
  margin-top: 0;
}

h1 {
  font-size: clamp(48px,5.6vw,82px);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -4px;
  max-width: 710px;
  margin-bottom: 28px;
  text-wrap: balance;
}

.intro {
  font-size: 18px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 400px;
  margin-bottom: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  min-height: 54px;
  padding: 15px 24px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  transition: background-color 150ms,scale 150ms;
}

.button.light {
  color: var(--bg);
  background: var(--white);
}

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

.button:active {
  scale: .96;
}

.text-link {
  display: block;
  width: fit-content;
  margin-top: 24px;
  color: var(--muted);
  font-size: 13px;
  padding: 8px 0;
}

.text-link span {
  margin-left: 12px;
}

.hero-visual {
  position: relative;
  align-self: stretch;
  min-height: 580px;
  background: #08090b;
  border-radius: 120px 120px 18px 18px;
  overflow: hidden;
  outline: 1px solid #ffffff1a;
}

.hero-visual>img {
  width: 100%;
  height: 100%;
  position: absolute;
  object-fit: cover;
  object-position: center 40%;
}

.photo-note {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 50px 24px 24px;
  background: linear-gradient(transparent,#000b);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #ddd;
}

.photo-note span:last-child {
  color: #aaa;
}

.discipline {
  display: flex;
  justify-content: space-between;
  padding: 27px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.discipline p {
  margin: 0;
}

.work,.services {
  padding-top: 115px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 50px;
  margin-bottom: 44px;
}

.section-kicker {
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 22px;
}

h2 {
  font-size: clamp(34px,3.8vw,54px);
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: -2px;
  text-wrap: balance;
  margin-bottom: 0;
}

.section-head>p {
  max-width: 330px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
  margin: 0;
}

.gallery {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 24px;
}

.photo {
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  color: var(--white);
  cursor: zoom-in;
  min-width: 0;
}

.photo img {
  display: block;
  width: 100%;
  height: 340px;
  object-fit: cover;
  border-radius: 12px;
  outline: 1px solid #ffffff1a;
  transition: filter 150ms;
}

.photo:hover img {
  filter: brightness(1.1);
}

.photo span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  margin-top: 14px;
  color: #d4d4d6;
}

.photo span span {
  margin: 0;
  color: var(--muted);
}

.photo:nth-child(4) img,.photo:nth-child(5) img,.photo:nth-child(6) img {
  height: 300px;
}

.photo:nth-child(3) img {
  object-position: center 40%;
}

.service-list {
  border-top: 1px solid var(--line);
}

details {
  border-bottom: 1px solid var(--line);
  padding: 0 5px;
}

summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: clamp(20px,2.2vw,30px);
  padding: 27px 0;
  font-weight: 500;
}

summary::-webkit-details-marker {
  display: none;
}

summary>span {
  font-size: 26px;
  color: var(--muted);
  transition: rotate 150ms;
}

details[data-expanded="true"] summary>span {
  rotate: 45deg;
  color: var(--accent);
}

details>div {
  max-width: 750px;
  padding: 0 0 28px;
}

details p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 18px;
}

details div>span {
  color: var(--accent);
  font-size: 12px;
}

.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 90px;
  padding-top: 140px;
  align-items: center;
}

.about-image img {
  display: block;
  width: 100%;
  height: 560px;
  object-fit: cover;
  border-radius: 16px;
  outline: 1px solid #ffffff1a;
}

.about-copy h2 {
  margin-bottom: 30px;
}

.about-copy>p:not(.section-kicker) {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
  max-width: 470px;
}

.reach {
  margin-top: 30px;
  padding-top: 25px;
  border-top: 1px solid var(--line);
}

.reach p {
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 20px;
}

.reach strong {
  color: var(--white);
  font-weight: 500;
}

.contact {
  margin-top: 130px;
  padding: 65px 60px;
  background: var(--surface);
  border-radius: 24px;
}

.contact h2 {
  font-size: clamp(42px,5vw,72px);
  letter-spacing: -3px;
}

.contact-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-top: 32px;
}

.contact-bottom p {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 0;
}

.phone {
  display: block;
  width: fit-content;
  margin-top: 25px;
  color: var(--muted);
  font-size: 14px;
}

.footer {
  padding: 55px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 25px;
}

.footer .brand>span {
  font-size: 24px;
}

.footer p,.footer small {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

.footer p {
  max-width: 220px;
  line-height: 1.6;
}

dialog {
  width: min(1000px,calc(100% - 30px));
  max-height: 94dvh;
  padding: 22px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 16px;
}

dialog::backdrop {
  background: #000d;
}

dialog img {
  display: block;
  margin: auto;
  max-width: 100%;
  max-height: 72dvh;
  object-fit: contain;
}

dialog p {
  margin: 18px 0 0;
  text-align: center;
  color: var(--muted);
}

.close {
  display: block;
  margin: 0 0 18px auto;
  padding: 10px 16px;
  min-height: 44px;
  color: var(--white);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  cursor: pointer;
}

.close span {
  margin-left: 12px;
}

body.modal-open {
  overflow: hidden;
}

@media(min-width:1600px) {
  .hero {
    min-height: 760px;
  }

  .hero-visual {
    min-height: 640px;
  }

}

@media(max-width:1000px) {
  .wrap {
    width: calc(100% - 56px);
  }

  h1 {
    letter-spacing: -2.7px;
  }

  .hero {
    gap: 24px;
    min-height: 600px;
  }

  .hero-visual {
    min-height: 510px;
  }

  .photo-note {
    flex-direction: column;
  }

  .gallery {
    gap: 18px;
  }

  .photo img {
    height: 280px;
  }

  .about {
    gap: 40px;
  }

  .about-image img {
    height: 530px;
  }

  .contact {
    padding: 48px 35px;
  }

}

@media(max-width:760px) {
  .wrap {
    width: calc(100% - 40px);
  }

  .header {
    height: 90px;
    gap: 12px;
  }

  .header nav {
    display: none;
  }

  .brand>span {
    font-size: 26px;
  }

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

  .hero {
    grid-template-columns: 1fr;
    padding: 35px 0 40px;
    gap: 36px;
  }

  .location {
    margin-bottom: 24px;
  }

  h1 {
    font-size: clamp(46px,10.5vw,66px);
    letter-spacing: -2.4px;
    max-width: 560px;
  }

  .intro {
    font-size: 16px;
    max-width: 400px;
  }

  .hero-visual {
    min-height: 460px;
    border-radius: 90px 90px 14px 14px;
  }

  .hero-visual img {
    object-position: center 36%;
  }

  .photo-note {
    flex-direction: row;
    font-size: 11px;
    padding-inline: 18px;
  }

  .discipline {
    gap: 16px;
    font-size: 11px;
    padding: 22px 0;
  }

  .discipline p {
    max-width: 95px;
  }

  .work,.services {
    padding-top: 75px;
  }

  .section-head {
    display: block;
    margin-bottom: 30px;
  }

  h2 {
    font-size: 36px;
    letter-spacing: -1.5px;
  }

  .section-head>p {
    margin-top: 22px;
    max-width: 440px;
    font-size: 14px;
  }

  .gallery {
    grid-template-columns: 1fr 1fr;
    gap: 24px 16px;
  }

  .photo img,.photo:nth-child(n) img {
    height: 240px;
  }

  .photo:first-child {
    grid-column: 1/-1;
  }

  .photo:first-child img {
    height: 280px;
  }

  .photo:last-child {
    grid-column: 1/-1;
  }

  .photo:last-child img {
    height: 300px;
  }

  .photo span {
    font-size: 11px;
  }

  summary {
    padding: 24px 0;
    font-size: 20px;
  }

  details p {
    font-size: 14px;
  }

  .about {
    grid-template-columns: 1fr;
    gap: 35px;
    padding-top: 80px;
  }

  .about-image img {
    height: 340px;
  }

  .about-copy>p:not(.section-kicker) {
    font-size: 15px;
  }

  .contact {
    margin-top: 60px;
    padding: 36px 24px;
    border-radius: 18px;
  }

  .contact h2 {
    font-size: 42px;
    letter-spacing: -2px;
  }

  .contact-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 24px;
  }

  .contact-bottom p {
    font-size: 14px;
  }

  .contact .button {
    gap: 16px;
    padding-inline: 20px;
  }

  .footer {
    flex-wrap: wrap;
    padding: 38px 0;
    gap: 25px;
  }

  .footer p {
    max-width: 180px;
  }

  .footer small {
    width: 100%;
  }

}

@media(max-width:380px) {
  .gallery {
    grid-template-columns: 1fr;
  }

  .photo:nth-child(n) {
    grid-column: auto;
  }

  .photo:nth-child(n) img {
    height: 310px;
  }

  .photo-note {
    flex-direction: column;
  }

  .contact h2 {
    font-size: 36px;
  }

}

@media(prefers-reduced-motion:reduce) {
  html {
    scroll-behavior: auto;
  }

  *,*::before,*::after {
    transition: none!important;
  }

}

.brand .brand-horizontal {
  display: block;
  width: 210px;
  height: auto;
  object-fit: contain;
}

.footer .brand .brand-horizontal {
  width: 180px;
}

@media(max-width:760px) {
  .brand .brand-horizontal {
    width: 175px;
    height: auto;
  }

  .footer .brand .brand-horizontal {
    width: 175px;
  }

}

/* Services ticker: duplicated groups keep the loop seamless. */
.discipline {
  display: block;
  overflow: hidden;
  padding: 25px 0;
  font-size: 16px;
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: services-scroll 35s linear infinite;
}

.ticker-group {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 32px;
  padding-right: 32px;
  white-space: nowrap;
}

.ticker-separator {
  color: #ffffff45;
}

.discipline:hover .ticker-track {
  animation-play-state: paused;
}

@keyframes services-scroll {
  to {
    transform: translateX(-50%);
  }

}

@media(max-width:760px) {
  .discipline {
    font-size: 14px;
    padding: 22px 0;
  }

  .ticker-group {
    gap: 24px;
    padding-right: 24px;
  }

}

@media(prefers-reduced-motion:reduce) {
  .ticker-track {
    animation: none;
    width: auto;
  }

  .ticker-group {
    flex-wrap: wrap;
    white-space: normal;
    gap: 12px 20px;
    padding-right: 0;
  }

  .ticker-group[aria-hidden="true"] {
    display: none;
  }

}

/* Restrained ticker with bold, clean lettering. */
.discipline {
  padding: 25px 0;
  font-size: clamp(20px,2vw,26px);
  font-weight: 700;
  letter-spacing: .2px;
}

.ticker-group {
  gap: 32px;
  padding-right: 32px;
}

.ticker-group>span:not(.ticker-separator) {
  color: #d5d6d3;
}

.ticker-separator {
  color: #656762;
  font-size: .8em;
  font-weight: 400;
}

@media(max-width:760px) {
  .discipline {
    font-size: 20px;
    padding: 22px 0;
  }

  .ticker-group {
    gap: 24px;
    padding-right: 24px;
  }

}

@media(prefers-reduced-motion:reduce) {
  .ticker-group {
    gap: 12px 20px;
    padding-right: 0;
  }

}

.services-label {
  margin-top: 20px;
  margin-bottom: 0;
}

/* Entradas suaves, activadas solo cuando JavaScript puede observar la vista. */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition-property: opacity, transform;
  transition-duration: 650ms;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

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

.hero-visual img,
.about-image img,
#viewer-image {
  transition: opacity 450ms ease-out;
}

.photo img {
  transition: opacity 450ms ease-out, filter 150ms ease-out;
}

img.image-loading {
  opacity: 0;
}

/* El contenido permanece visible si se solicita reducir el movimiento. */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  img.image-loading {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Entrada protagonista del hero, una sola vez al cargar el documento. */
.hero-entering .hero-copy {
  animation: hero-copy-enter 900ms cubic-bezier(0.2, 0, 0, 1) both;
}

.hero-entering .hero-visual {
  animation: hero-image-enter 1200ms cubic-bezier(0.2, 0, 0, 1) both;
}

.hero-entering .intro,
.hero-entering .text-link {
  animation: hero-support-enter 700ms ease-out 500ms both;
}

.type-letter {
  opacity: 0;
}

.type-letter.is-written {
  opacity: 1;
}

/* Un cursor junto a la última letra, sin cambiar la distribución del texto. */
.is-typing .type-letter.is-written {
  position: relative;
}

.is-typing .type-letter.is-written:not(:has(~ .is-written))::after {
  content: "";
  position: absolute;
  left: 100%;
  top: 0.12em;
  width: 2px;
  height: 0.85em;
  background: var(--accent);
  animation: typing-cursor 800ms step-end infinite;
}

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

@keyframes hero-image-enter {
  from { opacity: 0; transform: translateY(65px) scale(0.92); filter: blur(8px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

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

@keyframes typing-cursor {
  50% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-entering .hero-copy,
  .hero-entering .hero-visual,
  .hero-entering .intro,
  .hero-entering .text-link {
    animation: none;
  }

  .type-letter { opacity: 1; }
  .is-typing .type-letter::after { display: none; }
}

/* Recortar el contenido mientras cambia la altura del desplegable. */
.service-list details {
  overflow: hidden;
}

.service-list summary > span {
  transition: rotate 320ms cubic-bezier(0.2, 0, 0, 1), color 150ms ease-out;
}

@media (prefers-reduced-motion: reduce) {
  .service-list summary > span {
    transition: none;
  }
}
