/* ==========================================================================
   Grupo Aristos — Design tokens & fine-detail styles
   Tailwind (CDN) handles layout/utilities; this file covers what
   utility classes can't: textures, custom transitions, table/scrollbar
   refinement, and the photographic placeholder system.
   ========================================================================== */

:root {
  --steel: #1C2126;
  --midnight: #101826;
  --bone: #F7F6F3;
  --concrete: #E4E2DD;
  --copper: #B5652D;
  --bronze: #D89A5B;
  --graphite: #20242A;
  --ink-90: #F2F1EE;
  --line: #D1CFC9;
  --line-dark: #3A4048;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bone);
  color: var(--graphite);
  font-feature-settings: "tnum" 1, "cv11" 1;
}

::selection {
  background-color: var(--copper);
  color: var(--ink-90);
}

/* Thin steel scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bone);
}

::-webkit-scrollbar-thumb {
  background: var(--concrete);
  border-radius: 0;
  border: 2px solid var(--bone);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--copper);
}

:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 3px;
}

/* --------------------------------------------------------------------
   Grain texture — applied over dark sections for depth, never flat
   -------------------------------------------------------------------- */
.grain::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------
   Photographic placeholder system
   Marks where real project/site photography goes, styled to read as
   an intentional architectural frame rather than a broken image.
   -------------------------------------------------------------------- */
.media-block {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, var(--steel) 0%, var(--midnight) 100%);
  isolation: isolate;
}

.media-block::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.14;
  background-image:
    linear-gradient(var(--line-dark) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-dark) 1px, transparent 1px);
  background-size: 34px 34px;
}

.media-block::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Real photograph inside a .media-block — sits below the grid/grain
   texture and caption, in natural DOM/paint order (photo → scrim →
   tag → grain), so no z-index juggling is needed. */
.media-block .media-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-block .media-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to top, rgba(16, 24, 38, 0.72) 0%, rgba(16, 24, 38, 0.18) 45%, transparent 72%);
}

.media-block .media-tag {
  position: absolute;
  left: 1.25rem;
  bottom: 1.25rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-90);
}

.media-block .media-tag::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--copper);
}

/* Underline-grow link */
.link-underline {
  position: relative;
  text-decoration: none;
}

.link-underline::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s cubic-bezier(.4, 0, .2, 1);
}

.link-underline:hover::after,
.link-underline:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Scroll-reveal */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s cubic-bezier(.4, 0, .2, 1), transform 0.7s cubic-bezier(.4, 0, .2, 1);
}

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

/* Megamenu panel */
[x-cloak] {
  display: none !important;
}

.megapanel {
  box-shadow: 0 24px 48px -12px rgba(16, 24, 38, 0.28);
}

/* Minimalist data table (Inversionistas) */
.table-institutional {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.table-institutional th {
  text-align: left;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--graphite);
  opacity: 0.6;
  font-weight: 500;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.table-institutional td {
  padding: 1.1rem 1rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}

.table-institutional tbody tr {
  transition: background-color 0.2s ease;
}

.table-institutional tbody tr:hover {
  background-color: rgba(181, 101, 45, 0.05);
}

/* Counter tabular alignment */
[data-counter] {
  font-variant-numeric: tabular-nums;
}

/* Hairline card */
.card-hairline {
  border: 1px solid var(--line);
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.card-hairline:hover {
  border-color: var(--copper);
}

/* Utility bar marquee-free ticker dots */
.dot-copper {
  width: 5px;
  height: 5px;
  background: var(--copper);
  display: inline-block;
}