/* site/assets/css/styles.css — estilo de status.servireports.com: el de servireports.com (pagina 404: degradado
   calido + manchas naranja/teal, Bricolage Grotesque + DM Sans) con la lluvia con relampagos de portal-client y
   pildoras de estado flotantes. Respeta prefers-reduced-motion. */

@font-face { font-family: 'DM Sans'; src: url('../fonts/dm-sans-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('../fonts/dm-sans-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('../fonts/dm-sans-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('../fonts/dm-sans-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Bricolage Grotesque'; src: url('../fonts/bricolage-grotesque-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Bricolage Grotesque'; src: url('../fonts/bricolage-grotesque-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Bricolage Grotesque'; src: url('../fonts/bricolage-grotesque-latin-800-normal.woff2') format('woff2'); font-weight: 800; font-display: swap; }

:root {
  --primary: #D4841A; --primary-dark: #B8721A; --accent: #1A6B7A; --header: #3B2314;
  --text: #2C1810; --text-sec: #6B5B4F; --text-ter: #9A8E84; --border: #D4C8BC;
  --cream: #FAF6F0; --sec: #F5F0EB; --card: #FFFFFF;
  --ok: #16A34A; --degraded: #EAB308; --partial: #F97316; --major: #DC2626; --maint: #7C3AED; --unknown: #9A8E84;
  --radius: 18px; --shadow: 0 1px 2px rgba(59,35,20,.06), 0 8px 24px rgba(59,35,20,.06);
  --font: 'DM Sans', ui-sans-serif, system-ui, sans-serif;
  --display: 'Bricolage Grotesque', 'DM Sans', ui-sans-serif, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--text); font: 400 15px/1.55 var(--font);
  background:
    radial-gradient(circle at 20% 0%, rgba(212,132,26,.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 100%, rgba(26,107,122,.06) 0%, transparent 50%),
    var(--cream);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid rgba(212,132,26,.45); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--text-sec); }
.small { font-size: 13px; }

/* Fondo: manchas, lluvia y pildoras flotantes */
.bg { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.blob { position: absolute; border-radius: 50%; filter: blur(64px); }
.blob-a { top: -10rem; right: -8rem; width: 24rem; height: 24rem; background: rgba(212,132,26,.20); }
.blob-b { bottom: -8rem; left: -10rem; width: 28rem; height: 28rem; background: rgba(26,107,122,.15); }
.lluvia { position: absolute; inset: 0; overflow: hidden; }
.lluvia-capa { position: absolute; inset: 0; background-repeat: repeat; animation-name: lluvia-caer; animation-timing-function: linear; animation-iteration-count: infinite; }
@keyframes lluvia-caer { from { background-position: 0 0; } to { background-position: calc(var(--ancho) * -1) var(--alto); } }
.float-pill {
  display: none; position: absolute; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  background: rgba(255,255,255,.85); border: 1px solid rgba(212,200,188,.7); box-shadow: var(--shadow);
  font-size: 13px; font-weight: 600; color: var(--text-sec); animation: fadeInUp .8s ease-out both;
}
@media (min-width: 1440px) {
  .float-pill { display: inline-flex; }
  .float-1 { top: 22%; left: 6%; transform: rotate(-8deg); animation-delay: .3s; }
  .float-2 { top: 34%; right: 5%; transform: rotate(6deg); animation-delay: .5s; }
  .float-3 { bottom: 20%; left: 9%; transform: rotate(4deg); animation-delay: .7s; }
  .float-4 { bottom: 28%; right: 8%; transform: rotate(-5deg); animation-delay: .9s; }
}
@keyframes fadeInUp { from { opacity: 0; translate: 0 16px; } to { opacity: 1; translate: 0 0; } }

/* Estructura */
.wrap { position: relative; z-index: 1; max-width: 860px; margin: 0 auto; padding: 32px 16px 40px; }
.brand { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 28px; animation: fadeInUp .6s ease-out both; }
.brand-link { position: relative; isolation: isolate; display: inline-flex; align-items: center; gap: 12px; color: var(--header); }
/* Foco petroleo (#1A6B7A, accent de la paleta) que nace del centro del logo (44 px) y sobresale un poco */
.brand-link::before { content: ''; position: absolute; z-index: -1; left: -21px; top: 50%; width: 86px; height: 86px; transform: translateY(-50%); border-radius: 50%; background: radial-gradient(circle, rgba(26,107,122,.55) 0%, rgba(26,107,122,.22) 45%, rgba(26,107,122,0) 70%); filter: blur(6px); pointer-events: none; }
.brand-link:hover { text-decoration: none; }
.brand-link img { border-radius: 12px; }
.brand-link strong { display: block; font: 700 22px/1.1 var(--display); letter-spacing: -.01em; }
.brand-link small { display: block; color: var(--text-ter); font-size: 12px; }
.eyebrow { padding: 4px 12px; border-radius: 999px; background: rgba(255,255,255,.7); border: 1px solid rgba(212,200,188,.6); font-size: 12px; font-weight: 600; color: var(--text-sec); letter-spacing: .04em; text-transform: uppercase; }
main { position: relative; z-index: 1; display: grid; gap: 20px; }
.card { background: var(--card); border: 1px solid rgba(212,200,188,.7); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; animation: fadeInUp .6s ease-out .15s both; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
h2 { margin: 0; font: 700 19px/1.2 var(--display); color: var(--header); }
.card-head h2 { font-size: 26px; line-height: 40px; letter-spacing: -.01em; }

/* Estado general */
.overall { display: flex; align-items: center; gap: 18px; padding: 24px; border-radius: var(--radius); color: #fff; box-shadow: var(--shadow); animation: fadeInUp .6s ease-out .05s both; transition: background-color .4s ease; }
.overall h1 { margin: 0; font: 800 clamp(24px, 4vw, 34px)/1.1 var(--display); letter-spacing: -.02em; }
.overall p { margin: 4px 0 0; color: rgba(255,255,255,.88); }
.overall-icon { display: grid; place-items: center; width: 54px; height: 54px; flex: none; border-radius: 16px; background: rgba(255,255,255,.18); }
.overall.tone-operational { background: linear-gradient(135deg, #16A34A, #15803D); }
.overall.tone-degraded_performance { background: linear-gradient(135deg, #EAB308, #CA8A04); }
.overall.tone-partial_outage { background: linear-gradient(135deg, #F97316, #EA580C); }
.overall.tone-major_outage { background: linear-gradient(135deg, #DC2626, #B91C1C); }
.overall.tone-under_maintenance { background: linear-gradient(135deg, #7C3AED, #6D28D9); }
.overall.tone-loading, .overall.tone-unknown { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); }
.overall.changed { animation: pulse 1.6s ease-out; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(212,132,26,.55); } 100% { box-shadow: 0 0 0 18px rgba(212,132,26,0); } }
.notice { margin: 0; padding: 10px 14px; border-radius: 12px; background: #FFF7ED; border: 1px solid #FED7AA; color: #9A3412; font-size: 14px; }

/* Eventos activos */
.stack { display: grid; gap: 14px; }
.event { background: var(--card); border: 1px solid rgba(212,200,188,.7); border-left-width: 6px; border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.event.tone-degraded_performance { border-left-color: var(--degraded); background: #fff; }
.event.tone-partial_outage { border-left-color: var(--partial); background: #fff; }
.event.tone-major_outage { border-left-color: var(--major); background: #fff; }
.event.tone-under_maintenance { border-left-color: var(--maint); background: #fff; }
.event header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.event h3 { margin: 0; font: 700 17px/1.3 var(--display); color: var(--header); }
.badge { padding: 2px 10px; border-radius: 999px; background: var(--sec); color: var(--text-sec); font-size: 12px; font-weight: 600; }
.timeline { list-style: none; margin: 12px 0 0; padding: 0 0 0 14px; border-left: 2px solid var(--sec); display: grid; gap: 10px; }
.timeline p { margin: 2px 0; white-space: pre-line; }
.upd-status { font-weight: 700; font-size: 13px; color: var(--header); }

/* Componentes y pildoras */
.components { display: grid; gap: 22px; }
.component-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.component-head strong { font: 700 16px/1.2 var(--display); color: var(--header); }
.state { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.s-text-operational { color: var(--ok); } .s-text-degraded_performance { color: #A16207; } .s-text-partial_outage { color: #C2410C; }
.s-text-major_outage { color: var(--major); } .s-text-under_maintenance { color: var(--maint); }
.pills { display: grid; grid-template-columns: repeat(90, minmax(0, 1fr)); gap: 3px; height: 34px; }
.pill { border-radius: 999px; cursor: default; transition: transform .15s ease, filter .15s ease; }
.pill:hover, .pill:focus-visible { transform: scaleY(1.12); filter: brightness(1.08); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.s-operational { background: var(--ok); } .s-degraded_performance { background: var(--degraded); } .s-partial_outage { background: var(--partial); }
.s-major_outage { background: var(--major); } .s-under_maintenance { background: var(--maint); }
.component-foot { display: flex; justify-content: space-between; margin-top: 6px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 18px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 640px) { .pills { grid-template-columns: repeat(45, minmax(0, 1fr)); height: 30px; } .pills .pill:nth-child(-n+45) { display: none; } }

/* Enlaces de texto */
.link-more { color: var(--accent); font-weight: 600; }
/* "View historical uptime" e "Incident history": mismo boton que "Reload page" (a.btn-primary) con flecha */
.btn-more .arrow { transition: transform .15s ease; }
.btn-more:hover .arrow { transform: translateX(3px); }
.event h3 a, .pitem-title { color: inherit; }
.eyebrow:hover { text-decoration: none; border-color: var(--primary); color: var(--primary-dark); }

/* Ultimos 15 dias (inicio) */
.pday { padding: 14px 0; border-bottom: 1px solid var(--sec); }
.pday:first-child { padding-top: 0; }
.pday-title { margin: 0 0 6px; font: 700 15px/1.3 var(--display); color: var(--header); }
.pday p { margin: 0; }
.pitem { border-left: 4px solid var(--border); padding: 2px 0 2px 12px; }
.pitem + .pitem { margin-top: 12px; }
.pitem-title { display: inline-block; font-weight: 700; }
.pitem.tone-degraded_performance, .hitem-link.tone-degraded_performance { border-left-color: var(--degraded); }
.pitem.tone-partial_outage, .hitem-link.tone-partial_outage { border-left-color: var(--partial); }
.pitem.tone-major_outage, .hitem-link.tone-major_outage { border-left-color: var(--major); }
.pitem.tone-under_maintenance, .hitem-link.tone-under_maintenance { border-left-color: var(--maint); }
.pitem .timeline { margin-top: 6px; }
.history-link { margin-top: 16px; }

/* Subnavegacion (/history, /uptime, /incidents) */
.subnav { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.tabs { display: inline-flex; flex-wrap: wrap; gap: 10px; }
/* Botones de navegacion: estilo de "Reload page" en tamano compacto */
.subnav a.btn-primary, .subnav a.btn-secondary, a.btn-primary.btn-more { height: 40px; padding: 0 16px; gap: 8px; font-size: 14px; font-weight: 600; border-radius: 10px; }
.subnav svg, a.btn-primary.btn-more svg { width: 16px; height: 16px; flex: none; }
.pager { display: flex; align-items: center; justify-content: center; gap: 16px; }
.pager-range { margin: 0; font: 800 clamp(22px, 3.5vw, 30px)/1.1 var(--display); color: var(--header); text-align: center; }
.pager-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #fff; border: 1px solid rgba(212,200,188,.8); color: var(--header); font-size: 22px; box-shadow: var(--shadow); }
.pager-btn:hover { text-decoration: none; border-color: var(--primary); color: var(--primary-dark); }
.pager-btn[hidden] { display: grid; visibility: hidden; }

/* Historial por mes */
.month h2 { margin-bottom: 12px; }
.month p { margin: 0; }
.hitem-link { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid var(--sec); border-left: 4px solid var(--border); border-radius: 12px; color: var(--text); }
.hitem-link + .hitem-link { margin-top: 10px; }
.hitem-link:hover { text-decoration: none; background: var(--cream); }
.hitem-name { font-weight: 700; color: var(--header); }
.hitem-body { color: var(--text-sec); font-size: 14px; }

/* Calendario de disponibilidad */
.segmented { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.seg { padding: 7px 16px; border-radius: 999px; background: #fff; border: 1px solid rgba(212,200,188,.8); color: var(--text-sec); font-weight: 600; font-size: 14px; }
.seg.active { border-color: var(--primary); background: var(--primary); color: #fff; }
.seg:hover { text-decoration: none; }
.calendars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 760px) { .calendars { grid-template-columns: 1fr; } }
.cal { padding: 18px; }
.cal-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.cal-head h2 { font-size: 16px; }
.cal-pct { font-weight: 700; color: var(--ok); font-variant-numeric: tabular-nums; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.cal-wd { text-align: center; font-size: 11px; font-weight: 600; color: var(--text-ter); }
.cal-day { aspect-ratio: 1; border-radius: 8px; cursor: default; transition: transform .15s ease; }
a.cal-day { cursor: pointer; }
.cal-day:hover, .cal-day:focus-visible { transform: scale(1.12); }
.cal-nodata { background: var(--sec); }
.cal-future { background: transparent; border: 1px dashed var(--border); }
.dot.cal-nodata { border: 1px solid var(--border); }

/* Detalle de incidente */
.incident { display: grid; gap: 14px; }
.inc-title { margin: 0; font: 800 clamp(22px, 3.5vw, 30px)/1.15 var(--display); color: var(--header); text-wrap: balance; }
.inc-banner { margin: 0; padding: 12px 14px; border-radius: 12px; color: #fff; font-weight: 600; }
.inc-banner.tone-operational { background: #15803D; }
.inc-banner.tone-degraded_performance { background: #CA8A04; }
.inc-banner.tone-partial_outage { background: #EA580C; }
.inc-banner.tone-major_outage { background: var(--major); }
.inc-banner.tone-under_maintenance { background: var(--maint); }
.inc-updates { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.inc-updates li { padding-bottom: 14px; border-bottom: 1px solid var(--sec); }
.inc-updates p { margin: 4px 0; white-space: pre-line; }
.inc-affected { margin: 0; }

/* 404 (mismo estilo que servireports.com/not-found) */
.nf { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 32px 0 16px; min-height: 60vh; justify-content: center; }
.nf-icon { display: grid; place-items: center; width: 80px; height: 80px; border-radius: 24px; background: #fff; border: 1px solid rgba(212,200,188,.6); color: var(--primary); box-shadow: 0 4px 6px rgba(59,35,20,.05), 0 20px 40px rgba(59,35,20,.10); margin-bottom: 24px; animation: fadeInUp .6s ease-out both; }
.nf-code { font: 700 clamp(8rem, 22vw, 12rem)/1 var(--display); letter-spacing: -.05em; background: linear-gradient(135deg, #D4841A, #B8721A); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 16px; animation: fadeInUp .6s ease-out .1s both; }
.nf-eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 999px; background: rgba(255,255,255,.7); border: 1px solid rgba(212,200,188,.6); font-size: 12px; font-weight: 500; color: var(--text-sec); letter-spacing: .02em; animation: fadeInUp .6s ease-out .1s both; }
.nf-eyebrow svg { color: var(--primary); }
.nf-title { margin: 20px 0 0; max-width: 42rem; font: 700 clamp(30px, 5vw, 48px)/1.1 var(--display); letter-spacing: -.02em; color: var(--header); text-wrap: balance; animation: fadeInUp .6s ease-out .2s both; }
.nf-sub { margin: 16px 0 0; max-width: 36rem; font-size: clamp(16px, 2vw, 18px); line-height: 1.6; color: var(--text-sec); animation: fadeInUp .6s ease-out .2s both; }
.nf-ctas { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; animation: fadeInUp .6s ease-out .3s both; }
a.btn-primary, .btn-secondary { display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 28px; border-radius: 12px; }
.btn-secondary { font: 500 16px var(--font); }
/* Enlaces con aspecto de boton: igual que "Reload page" (font 600, sombra) */
a.btn-primary { font: 600 16px var(--font); }
a.btn-primary { color: #fff; }
a.btn-primary:hover, .btn-secondary:hover { text-decoration: none; }
.btn-secondary { background: #fff; color: var(--header); border: 1px solid var(--border); box-shadow: var(--shadow); }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary-dark); }
.float-pill.missing { border-color: rgba(220,38,38,.4); background: #FEF2F2; color: var(--major); text-decoration: line-through; text-decoration-thickness: 2px; }

/* Pie */
.foot { margin-top: 28px; text-align: center; display: grid; gap: 10px; }
.foot p { margin: 0; }
.foot-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 18px; }
.foot-links a { display: inline-flex; align-items: center; gap: 6px; color: var(--text-sec); font-size: 13px; font-weight: 500; }
.foot-links img { border-radius: 4px; }
.powered { color: var(--text-ter); }
.legal { color: var(--text-ter); }
.site-version { position: fixed; right: 10px; bottom: 8px; z-index: 2; font-size: 11px; color: var(--text-ter); font-variant-numeric: tabular-nums; pointer-events: none; }

/* Tooltip y modal */
.tooltip { position: absolute; z-index: 20; max-width: 280px; padding: 8px 10px; border-radius: 10px; background: var(--header); color: #fff; font-size: 12px; box-shadow: var(--shadow); pointer-events: none; }
.modal { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(44,24,16,.45); backdrop-filter: blur(3px); animation: fadeIn .2s ease-out; }
.modal[hidden] { display: none; }
.modal-card { display: grid; justify-items: center; gap: 12px; max-width: 420px; margin: 16px; padding: 28px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); text-align: center; }
.modal-card h2 { margin: 0; font: 700 22px/1.2 var(--display); color: var(--header); }
.modal-card p { margin: 0 0 8px; color: var(--text-sec); }
.modal-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: #FFF7ED; color: var(--primary); }
.btn-primary { border: 0; border-radius: 12px; padding: 14px 28px; background: var(--primary); color: #fff; font: 600 16px var(--font); cursor: pointer; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--primary-dark); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .lluvia { display: none; }
}
