* {
  box-sizing: border-box;
}

:root {
  --sidebar-width: 320px;
  --menu-bar-width: 60px;
  --transition-speed: 0.3s;

  --bg: #ffffff;
  --text: #111111;
  --sidebar-bg: #313131;
  --border: #d9d9d9;
  --menu-toggle-bg: #202020;

  --content-padding-y: 40px;
  --content-padding-x: 48px;

  --font-main: 'IBM Plex Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  --text-base: 1rem;
  --text-small: 0.92rem;
  --text-caption: 0.88rem;
  --text-large: 1.1rem;
  --text-title: 1.35rem;

  --leading-base: 1.6;
  --leading-tight: 1.3;
  --leading-small: 1.45;
  --leading-relaxed: 1.75;

  --tracking-base: 0.01em;
  --tracking-small: 0.005em;
}

/* =========================================================
   BASE GLOBAL
========================================================= */

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-main);
  font-size: var(--text-base);
  font-weight: 300;
  line-height: var(--leading-base);
  letter-spacing: var(--tracking-base);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body,
button,
input,
textarea,
select {
  font-family: var(--font-main);
}

button,
input,
textarea,
select {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
}

a {
  color: inherit;
  text-decoration: none;
  font-family: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
}

/* =========================================================
   TIPOGRAFÍA MAESTRA
========================================================= */

p {
  margin-top: 0;
  font-family: var(--font-main);
  font-size: var(--text-base);
  font-weight: 300;
  line-height: var(--leading-base);
  letter-spacing: var(--tracking-base);
  text-align: justify;
  text-justify: inter-word;

  hyphens: none;
  -webkit-hyphens: none;
  -ms-hyphens: none;

  word-break: normal;
  overflow-wrap: normal;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-top: 0;
  font-family: var(--font-main);
  font-weight: 400;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-small);
}

strong,
b {
  font-weight: 500;
}

em,
i {
  font-style: italic;
}

/* =========================================================
   SIDEBAR
========================================================= */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  overflow-y: auto;
  background: var(--sidebar-bg);
  transform: translateX(-100%);
  transition: transform var(--transition-speed) ease;
  z-index: 1000;
}

body.sidebar-open .sidebar {
  transform: translateX(0);
}

.sidebar-inner {
  padding: 28px 22px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
  align-items: flex-end;
  text-align: right;
}

.sidebar-nav a {
  display: block;
  padding: 5px 0;
  color: #ffffff;
  opacity: 0.4;
  text-decoration: none;
  border-radius: 10px;
  transition:
    opacity 0.3s ease,
    transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
  text-align: right;
}

.sidebar-nav a:hover {
  opacity: 1;
  transform: translateX(-4px);
}

.grueso {
  font-size: 1.05rem;
  font-weight: inherit;
}

.linea {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin: 8px 0;
  opacity: 0.2;
  border: none;
}

/* =========================================================
   BOTÓN MENÚ
========================================================= */

.menu-toggle {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--menu-bar-width);
  height: 100vh;
  border: none;
  background: var(--menu-toggle-bg);
  padding: 18px 0 0 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition:
    left var(--transition-speed) ease,
    background-color var(--transition-speed) ease;
  z-index: 1100;
}

body.sidebar-open .menu-toggle {
  left: var(--sidebar-width);
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #ffffff;
}

/* =========================================================
   CONTENIDO GENERAL
========================================================= */

.content {
  margin-left: var(--menu-bar-width);
  padding: var(--content-padding-y) var(--content-padding-x);
  min-height: 100vh;
  transition: margin-left var(--transition-speed) ease;
}

body.sidebar-open .content {
  margin-left: calc(var(--sidebar-width) + var(--menu-bar-width));
}

.main-inner {
  width: 100%;
  max-width: none;
  margin: 0;
}

.main-header {
  width: 100%;
  margin-bottom: 32px;
  text-align: right;
}

.site-title-main {
  margin: 0;
  font-size: 1rem;
  line-height: 1.2;
  font-weight: 300;
  color: rgba(0, 0, 0, 0.3);
}

.site-title-main a {
  display: inline-block;
  color: rgba(0, 0, 0, 0.7);
  text-decoration: none;
  opacity: 0.75;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.site-title-main a:visited,
.site-title-main a:active {
  color: #111111;
  text-decoration: none;
}

.site-title-main a:hover {
  opacity: 1;
  transform: translateX(4px);
}

/* =========================================================
   HOME GRID
========================================================= */

.grid-home {
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  gap: 10px;
  height: calc(100vh - 80px - 72px);
  width: 100%;
  padding-left: -30px;
  padding-right: -30px;
}

.grid-item {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 0;
  min-height: 150px;
  background: #333333;
}

.grid-item img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;

  opacity: 0.2;
  filter: grayscale(100%) brightness(1.25) contrast(0.82);

  transition:
    opacity 0.45s ease,
    filter 0.45s ease,
    transform 0.5s ease;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-end;
  gap: 10px;
  color: #ffffff;
  text-align: right;
  background: linear-gradient(
    to top left,
    rgba(0,0,0,0.58),
    rgba(0,0,0,0.18),
    transparent
  );
}

.grid-overlay h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 500;
}

.grid-btn {
  display: inline-block;
  font-size: var(--text-caption);
  padding: 6px 0;
  border: none;
  border-radius: 0;
  color: #ffffff;
  background: none;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.grid-item:hover img {
  transform: scale(1.05);
}

.grid-item:hover .grid-btn {
  color: #ffffff;
  background: none;
  transform: translateX(-2px);
}

/* Escritorio: rollover a color y opacidad completa */

@media (hover: hover) and (pointer: fine) {
  .grid-item:hover img {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.05);
  }
}

/* Tableta y celular: sin rollover, gris */

@media (hover: none), (pointer: coarse) {
  .grid-item img {
    opacity: 0.8;
    filter: grayscale(100%);
    transform: none;
  }

  .grid-item:hover img {
    opacity: 0.8;
    filter: grayscale(100%);
    transform: none;
  }
}

/* =========================================================
   TABLETA
========================================================= */

@media (max-width: 1024px) {
  :root {
    --sidebar-width: 280px;
    --menu-bar-width: 56px;
    --content-padding-y: 32px;
    --content-padding-x: 24px;
  }

  body {
    font-size: var(--text-base);
  }

  .sidebar-inner {
    padding: 24px 18px;
  }

  .sidebar-nav {
    gap: 5px;
  }

  .sidebar-nav a {
    font-size: var(--text-base);
    padding: 5px 0;
  }

  .grueso {
    font-size: var(--text-base);
  }

  .grid-home {
    gap: 8px;
    padding-left: 8px;
    padding-right: 8px;
  }

  .grid-overlay {
    padding: 24px;
  }

  .grid-overlay h3 {
    font-size: 1.1rem;
  }

  .grid-btn {
    font-size: var(--text-caption);
  }

  .site-title-main {
    font-size: var(--text-title);
    line-height: 1;
    font-weight: 300;
  }
}

/* =========================================================
   CELULAR
========================================================= */

@media (max-width: 768px) {
  :root {
    --menu-bar-width: 52px;
    --sidebar-width: calc(100vw - var(--menu-bar-width));
    --content-padding-y: 22px;
    --content-padding-x: 12px;
  }

  body {
    font-size: var(--text-base);
    line-height: var(--leading-base);
    letter-spacing: var(--tracking-small);
  }

  p {
    font-size: var(--text-base);
    line-height: var(--leading-base);
    letter-spacing: var(--tracking-small);
    text-align: justify;

    hyphens: none;
    -webkit-hyphens: none;
    -ms-hyphens: none;

    word-break: normal;
    overflow-wrap: normal;
  }

  .sidebar {
    height: auto;
    min-height: 100svh;
    bottom: 0;
  }

  .sidebar-inner {
    padding: 20px 16px;
  }

  .sidebar-nav {
    gap: 4px;
  }

  .sidebar-nav a {
    font-size: var(--text-caption);
    padding: 4px 4px;
  }

  .grueso {
    font-size: var(--text-caption);
  }

  .linea {
    margin: 6px 0;
  }

  .menu-toggle {
    height: auto;
    min-height: 100svh;
    bottom: 0;
    padding-top: 14px;
  }

  .menu-toggle span {
    width: 20px;
  }

  body.sidebar-open .content {
    margin-left: 100vw;
  }

  .site-title-main {
    font-size: 1rem;
    font-weight: 300;
  }

  .main-header {
    margin-bottom: 24px;
  }

  .grid-home {
    grid-template-rows: repeat(4, 210px);
    gap: 8px;
    height: auto;
    padding-left: 8px;
    padding-right: 8px;
  }

  .grid-overlay {
    padding: 20px;
    gap: 8px;
  }

  .grid-overlay h3 {
    font-size: 0.88rem;
  }

  .grid-btn {
    font-size: var(--text-caption);
    padding: 4px 0;
  }
}

/* =========================================================
   CELULAR HORIZONTAL
========================================================= */

@media (max-width: 768px) and (orientation: landscape) {
  .sidebar-inner {
    padding: 16px 14px;
  }

  .sidebar-nav {
    gap: 4px;
  }

  .sidebar-nav a {
    font-size: 0.9rem;
    padding: 4px 4px;
  }

  .menu-toggle {
    padding-top: 10px;
  }

  .content {
    padding-top: 18px;
    padding-bottom: 24px;
  }

  .site-title-main {
    font-size: 1.25rem;
  }

  .grid-home {
    grid-template-rows: repeat(4, 190px);
  }
}

/* =========================================================
   HOME VIDEO RANDOM
========================================================= */

.home-page .content {
  padding: 0;
  min-height: 100svh;
  overflow: hidden;
}

.home-page .main-header {
  position: fixed;
  top: 28px;
  right: 32px;
  left: auto;
  width: auto;
  max-width: calc(100vw - var(--menu-bar-width) - 48px);
  z-index: 50;
  margin: 0;
  text-align: right;
}

.home-page .site-title-main {
  margin: 0;
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.25;
  text-align: right;
  white-space: normal;
}

.home-page .site-title-main a {
  display: inline-block;
  color: rgba(255,255,255,0.88);
  text-decoration: none;
}

.home-page .site-title-main a:hover {
  color: #ffffff;
}

.home-page .main-inner {
  width: 100%;
  height: 100svh;
  margin: 0;
}

.home-video {
  position: relative;
  width: 100%;
  height: 100svh;
  overflow: hidden;
  background: #000;
}

.home-video-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.home-video-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(
      to top left,
      rgba(0,0,0,0.72),
      rgba(0,0,0,0.28),
      rgba(0,0,0,0.08)
    );
}

.home-video-info {
  position: absolute;
  right: 32px;
  bottom: 32px;
  z-index: 20;
  max-width: 520px;
  text-align: right;
  color: #ffffff;
}

.home-video-info h2 {
  margin: 0 0 10px 0;
  font-size: var(--text-title);
  font-weight: 500;
  line-height: var(--leading-tight);
}

.home-video-btn {
  display: inline-block;
  color: #ffffff;
  font-size: var(--text-base);
  text-decoration: none;
}

.home-video-btn:hover {
  text-decoration: underline;
}

/* TABLETA */

@media (max-width: 1024px) {

  .home-page .main-header {
    top: 24px;
    right: 24px;
    left: auto;
    max-width: calc(100vw - var(--menu-bar-width) - 40px);
  }

  .home-video-info {
    right: 24px;
    bottom: 24px;
    max-width: 420px;
  }
}

/* CELULAR */

@media (max-width: 768px) {

  .home-page .content {
    padding: 0;
  }

  .home-page .main-header {
    top: 18px;
    right: 16px;
    left: auto;
    width: auto;
    max-width: calc(100vw - var(--menu-bar-width) - 24px);
    z-index: 60;
  }

  .home-page .site-title-main {
    font-size: 0.95rem;
    line-height: 1.2;
    white-space: nowrap;
  }

  .home-video {
    height: 100svh;
  }

  .home-video-bg {
    object-fit: cover;
    object-position: center center;
  }

  .home-video-info {
    right: 16px;
    left: auto;
    bottom: 22px;
    max-width: calc(100vw - var(--menu-bar-width) - 32px);
  }

  .home-video-info h2 {
    font-size: 1rem;
  }

  .home-video-btn {
    font-size: 0.88rem;
  }
}

/* =========================================================
   BOTÓN CONTACTO EN SIDEBAR
========================================================= */

.sidebar-contact {
  display: block;
  padding: 5px 0;
  border: none;
  background: transparent;
  color: #ffffff;
  opacity: 0.4;
  font-family: var(--font-main);
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  text-align: right;
  cursor: pointer;

  transition:
    opacity 0.3s ease,
    transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-contact:hover {
  opacity: 1;
  transform: translateX(-4px);
}


/* =========================================================
   MODAL CONTACTO
========================================================= */

.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 4000;

  display: none;
  align-items: center;
  justify-content: center;

  padding: 24px;

  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.contact-modal.is-open {
  display: flex;
}


/* PANEL */

.contact-modal-panel {
  position: relative;

  width: min(520px, 100%);
  min-height: 300px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 64px 54px;

  background: #111111;
  color: #ffffff;

  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.55);
}


/* CONTENIDO */

.contact-modal-content {
  width: 100%;
  text-align: center;
}

.contact-modal-content h2 {
  margin: 0 0 12px 0;

  font-family: var(--font-main);
  font-size: var(--text-title);
  font-weight: 500;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-small);

  color: #ffffff;
  text-align: center;
}

.contact-modal-email {
  margin: 0 0 34px 0;

  font-size: var(--text-base);
  font-weight: 300;
  line-height: var(--leading-base);
  letter-spacing: var(--tracking-base);

  color: rgba(255, 255, 255, 0.72);

  text-align: center;

  hyphens: none;
  -webkit-hyphens: none;
  word-break: normal;
  overflow-wrap: normal;
}


/* BOTONES */

.contact-modal-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
}

.contact-action-btn {
  display: inline-block;

  padding: 7px 0;

  border: none;
  background: transparent;

  color: #ffffff;

  font-family: var(--font-main);
  font-size: var(--text-caption);
  font-weight: 200;
  line-height: var(--leading-small);
  letter-spacing: var(--tracking-small);

  text-decoration: none;
  cursor: pointer;

  opacity: 0.72;

  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.contact-action-btn:hover {
  opacity: 1;
  transform: translateY(-1px);
  text-decoration: underline;
}


/* MENSAJE COPIADO */

.contact-copy-status {
  min-height: 20px;
  margin: 18px 0 0 0;

  color: rgba(255,255,255,0.55);

  font-size: var(--text-caption);
  line-height: var(--leading-small);
  letter-spacing: var(--tracking-small);

  text-align: center;
}


/* CERRAR */

.contact-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;

  width: 40px;
  height: 40px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0;

  border: none;
  border-radius: 50%;

  background: rgba(255,255,255,0.1);
  color: #ffffff;

  font-family: var(--font-main);
  font-size: 1.7rem;
  font-weight: 300;
  line-height: 1;

  cursor: pointer;

  transition:
    background-color 0.25s ease,
    opacity 0.25s ease;
}

.contact-modal-close:hover {
  background: rgba(255,255,255,0.2);
}


/* =========================================================
   TABLETA
========================================================= */

@media (max-width: 1024px) {

  .contact-modal-panel {
    width: min(500px, 92vw);
    padding: 58px 44px;
  }

}


/* =========================================================
   CELULAR
========================================================= */

@media (max-width: 768px) {

  .sidebar-contact {
    font-size: var(--text-caption);
    padding: 4px;
  }

  .contact-modal {
    padding: 18px;
  }

  .contact-modal-panel {
    width: 100%;
    min-height: 280px;

    padding:
      58px
      22px
      44px;
  }

  .contact-modal-content h2 {
    font-size: var(--text-base);
    line-height: var(--leading-tight);
  }

  .contact-modal-email {
    margin-bottom: 28px;

    font-size: var(--text-caption);
    line-height: var(--leading-small);
  }

  .contact-modal-actions {
    flex-direction: column;
    gap: 10px;
  }

  .contact-action-btn {
    font-size: var(--text-caption);
  }

  .contact-modal-close {
    top: 10px;
    right: 10px;

    width: 46px;
    height: 46px;

    font-size: 2rem;
  }

}