/*
Theme Name: Alejandro Briones V2
Description: Pantalla editorial de Alejandro Briones para CMP con favicon adaptable y correo configurable.
Version: 2.0.0
Author: Studio 9 Inch
*/

@font-face {
  font-family: "Instrument Sans";
  src: url("assets/fonts/InstrumentSans-Medium.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --corner-w: clamp(42px, 5.625vw, 108px);
  --corner-h: calc(var(--corner-w) * 95 / 108);
  --bar-x: calc(var(--corner-w) * 48 / 108);
  --bar-y: calc(var(--corner-w) * 26 / 108);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { width: 100%; min-width: 0; min-height: 100%; margin: 0; }
body { overflow: hidden; background: #171717; color: #fff; font-family: "Instrument Sans", Arial, sans-serif; font-weight: 500; }

.ab-page {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

.ab-carousel, .ab-overlay, .ab-content, .ab-frame { position: absolute; inset: 0; }
.ab-carousel { z-index: 0; overflow: hidden; background: #171717; }
.ab-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  visibility: hidden;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
}
.ab-slide.is-current { visibility: visible; }
.ab-overlay { z-index: 1; background: rgba(0, 0, 0, .3); pointer-events: none; }
.ab-content { z-index: 2; }

.ab-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  display: block;
  width: clamp(250px, 45.83vw, 880px);
  max-width: calc(100vw - 2 * (var(--bar-x) + 14px));
  height: auto;
  transform: translate(-50%, -50%);
}

.ab-contact {
  position: absolute;
  right: max(calc(var(--bar-x) + 38px), calc(env(safe-area-inset-right) + var(--bar-x) + 10px));
  bottom: max(calc(var(--bar-y) + 17px), calc(env(safe-area-inset-bottom) + var(--bar-y) + 9px));
  left: max(calc(var(--bar-x) + 38px), calc(env(safe-area-inset-left) + var(--bar-x) + 10px));
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  font-size: clamp(13px, 1.0417vw, 20px);
  line-height: 1.3;
}
.ab-contact p { margin: 0; }
.ab-contact-right { min-width: 0; max-width: 60%; overflow-wrap: anywhere; text-align: right; }
.ab-contact a, .ab-contact .ab-link-look { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.ab-contact a { position: relative; z-index: 1; }
.ab-contact a:hover, .ab-contact a:focus-visible { opacity: .75; }
.ab-contact a:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.ab-frame { z-index: 3; pointer-events: none; }
.ab-corner { position: absolute; display: block; width: var(--corner-w); height: var(--corner-h); }
.ab-corner--tr { top: 0; right: 0; }
.ab-corner--br { right: 0; bottom: 0; transform: scaleY(-1); }
.ab-corner--tl { top: 0; left: 0; transform: scaleX(-1); }
.ab-corner--bl { bottom: 0; left: 0; transform: scale(-1); }
.ab-rail { position: absolute; display: block; background: #fff; }
.ab-rail--top, .ab-rail--bottom { height: var(--bar-y); left: calc(var(--corner-w) - 1px); right: calc(var(--corner-w) - 1px); }
.ab-rail--top { top: 0; }
.ab-rail--bottom { bottom: 0; }
.ab-rail--left, .ab-rail--right { width: var(--bar-x); top: calc(var(--corner-h) - 1px); bottom: calc(var(--corner-h) - 1px); }
.ab-rail--left { left: 0; }
.ab-rail--right { right: 0; }

@media (max-width: 700px) {
  .ab-logo { width: min(76vw, 520px); }
  .ab-contact {
    right: max(calc(var(--bar-x) + 15px), calc(env(safe-area-inset-right) + var(--bar-x) + 8px));
    bottom: max(calc(var(--bar-y) + 15px), calc(env(safe-area-inset-bottom) + var(--bar-y) + 9px));
    left: max(calc(var(--bar-x) + 15px), calc(env(safe-area-inset-left) + var(--bar-x) + 8px));
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    font-size: clamp(11px, 3.1vw, 15px);
  }
  .ab-contact-right { max-width: 100%; text-align: left; }
}

@media (max-height: 500px) and (orientation: landscape) {
  :root { --corner-w: clamp(36px, 9vh, 68px); }
  .ab-logo { width: min(52vw, 700px); }
  .ab-contact { bottom: calc(var(--bar-y) + 9px); align-items: flex-end; flex-direction: row; gap: 12px; font-size: 11px; }
  .ab-contact-right { text-align: right; }
}

@media (prefers-reduced-motion: reduce) {
  .ab-slide { animation: none !important; }
}
