/* 
   Rinosirunti Premium Design System 
   Aesthetic: Industrial Utilitarian Noir
*/

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@100;200;300;400;500;600;700;800&family=Barlow:wght@300;400;500;600;700&display=swap');

:root {
    /* PALETA CORPORATIVA OFICIAL */
    --rino-red: #AF3922;
    --rino-red-dark: #8A2B19;
    --rino-gray-carbon: #393738;
    
    /* ACENTOS POR SECTOR */
    --sector-mining: #07529C;
    --sector-construction: #dc962a;
    --sector-agri: #AF3922; /* Agricultura usa el rojo corporativo */
    --accent-lime: #A5D02F; /* Verde Lima para botones específicos */

    /* COLORES TEMA NOIR (FONDO) */
    --bg-black: #0A0A0A;
    --bg-deep: #0F0F0F;
    --bg-surface: #141414;
    
    /* TEXTO */
    --text-white: #F4F4F4;
    --text-muted: #A0A0A0;
    --text-dim: #555555;

    /* RECURSOS */
    --font-display: 'Barlow Condensed', sans-serif;
    --font-main: 'Barlow', sans-serif;

  /* Borders & Accents */
  --border-subtle: rgba(244,244,244,0.08);
  --border-active: rgba(244,244,244,0.15);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Barlow', sans-serif;
  background-color: #2D2B2C; /* Grafito cálido – canvas externo */
  color: #F4F4F4;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}


.page-frame {
  background-color: #FFFDFA; /* Off-white – consistent with section backgrounds */
  min-height: 100vh;
  position: relative;
  border-left: 1px solid rgba(244,244,244,0.08);
  border-right: 1px solid rgba(244,244,244,0.08);
  box-shadow: 0 0 60px rgba(0,0,0,0.4);
}

h1, h2, h3, .font-display {
  font-family: 'Barlow Condensed', sans-serif;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

/* --- Grain Texture Overlay --- */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.04;
  pointer-events: none;
  z-index: 9999;
}

/* --- Global Transitions --- */
a, button {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Layout Utilities --- */
.container-rino {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Custom Components --- */

/* Borde tricolor Rusia (Mejorado) */
.border-tricolor {
  position: relative;
}
.border-tricolor::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; width: 100%; height: 3px;
  background: linear-gradient(to right, #F4F4F4 0% 33%, #0039a6 33% 66%, #d52b1e 66% 100%);
}

.rounded-corporate {
  border-radius: 4px; /* Industrial is sharp, not round */
}

/* Glassmorphism for Dark Theme */
.glass-panel {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
}

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-reveal {
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Section Masks */
.mask-diagonal {
  clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  .mask-diagonal { clip-path: none; }
}

/* --- Background Animations --- */
@keyframes patternMove {
    0% { background-position: 0 0; }
    100% { background-position: 40px 40px; }
}

.bg-pattern-animated {
    animation: patternMove 10s linear infinite;
    will-change: background-position;
}

/* Industrial Blueprint Background Pattern */
.bg-industrial-blueprint {
    background-color: #DEDEDE;
    background-image: url("data:image/svg+xml,%3Csvg width='400' height='400' xmlns='http://www.w3.org/2000/svg'%3E%3Cstyle%3Etext%7Bfont-family:sans-serif;font-weight:900;font-style:italic;fill:%233B3B3B;opacity:0.04;text-transform:uppercase;%7D%3C/style%3E%3Ctext x='20' y='50' font-size='32'%3ERINUSIRUNTI%3C/text%3E%3Ctext x='250' y='180' font-size='24' transform='rotate(90, 250, 180)'%3EINDUSTRIAL%3C/text%3E%3Ctext x='50' y='250' font-size='22' transform='rotate(45, 50, 250)'%3EINDESTRUCTIBLE%3C/text%3E%3Ctext x='220' y='350' font-size='28'%3EPOTENCIA%3C/text%3E%3Ctext x='80' y='120' font-size='20' transform='rotate(-45, 80, 120)'%3EINGENIER%C3%8DA%3C/text%3E%3Ctext x='350' y='50' font-size='18' transform='rotate(90, 350, 50)'%3ETRACTOR%3C/text%3E%3Ctext x='300' y='300' font-size='20' transform='rotate(45, 300, 300)'%3ETRACCI%C3%93N%3C/text%3E%3C/svg%3E");
    background-size: 400px 400px;
}

/* Master Product Card System */
.master-product-card {
    --card-bg: #1A1A1A;
    --card-border: rgba(255,255,255,0.06);
    --sector-color: var(--rino-red); /* Default */
    
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .master-product-card { flex-direction: row; }
}

.master-product-card:hover {
    border-color: var(--sector-color);
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.6), 0 0 20px var(--sector-color-alpha, rgba(175, 57, 34, 0.1));
}

/* Visual Zone */
.card-visual-zone {
    width: 100%;
    background: #000;
    position: relative;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

@media (min-width: 768px) {
    .card-visual-zone { width: 45%; min-height: 380px; }
}

.card-visual-zone::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, var(--sector-color-alpha, rgba(175, 57, 34, 0.15)) 0%, transparent 70%);
    opacity: 0.5;
}

.card-visual-zone .product-img {
    position: relative;
    z-index: 10;
    width: 110%;
    height: 110%;
    object-fit: contain;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.8));
}

.master-product-card:hover .product-img {
    transform: scale(1.1) rotate(-2deg);
}

.sector-badge {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    z-index: 20;
    background: var(--sector-color);
    color: #FFF;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 10px;
    letter-spacing: 0.2em;
    padding: 4px 12px;
    text-transform: uppercase;
}

/* Content Zone */
.card-content-zone {
    width: 100%;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-top: 1px solid var(--card-border);
}

@media (min-width: 768px) {
    .card-content-zone { width: 55%; border-top: none; border-left: 1px solid var(--card-border); }
}

.card-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 900;
    font-style: italic;
    color: #FFF;
    line-height: 1;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.card-model {
    color: var(--sector-color);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-bottom: 2rem;
    display: block;
}

/* Specs Grid */
.specs-grid {
    display: grid;
    grid-template-cols: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.spec-item {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

.spec-item .label {
    font-size: 9px;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 4px;
}

.spec-item .value {
    font-size: 1.1rem;
    font-weight: 800;
    color: #EEE;
    font-family: var(--font-display);
}

/* Actions */
.card-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .card-actions { grid-template-columns: 1.2fr 1fr; }
}

.btn-master {
    padding: 1.25rem;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 12px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

.btn-quote {
    background: var(--sector-color);
    color: #FFF;
    border: 1px solid var(--sector-color);
}

.btn-quote:hover {
    background: #FFF;
    color: var(--sector-color);
}

.btn-specs {
    background: transparent;
    color: #FFF;
    border: 1px solid rgba(255,255,255,0.1);
}

.btn-specs:hover {
    background: rgba(255,255,255,0.05);
    border-color: #FFF;
}

/* Modal Premium Styles */
.modal-noir-premium {
    background: #FFF !important;
    border-radius: 0 !important;
    overflow: hidden;
}

.modal-header-sector {
    height: 6px;
    width: 100%;
    background: var(--sector-color);
}

.spec-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #EEE;
}

.spec-row:last-child { border-bottom: none; }

.spec-row .label {
    color: #888;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.spec-row .value {
    color: #111;
    font-size: 14px;
    font-weight: 700;
}
