/* ============================================================
   INSIGHTS — Editorial-tech publication
   Shared design system · dark-first
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,300..800;1,6..72,300..700&family=Schibsted+Grotesk:ital,wght@0,400..800;1,400..700&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  /* ---- surfaces (warm paper white) ---- */
  --bg:        oklch(0.988 0.004 75);
  --bg-raised: oklch(0.963 0.006 70);
  --bg-sunk:   oklch(0.945 0.006 70);
  --bg-card:   oklch(0.997 0.002 75);

  /* ---- ink (warm near-black) ---- */
  --ink:    oklch(0.205 0.006 55);
  --ink-2:  oklch(0.405 0.008 55);
  --ink-3:  oklch(0.545 0.008 55);
  --ink-4:  oklch(0.660 0.007 55);

  /* ---- accent: signal orange (the mic detail) ---- */
  --accent:    oklch(0.705 0.175 50);   /* vivid fill */
  --accent-hi: oklch(0.585 0.165 46);   /* text-safe on white */
  --accent-dim:oklch(0.705 0.175 50 / 0.14);

  /* ---- lines ---- */
  --line:    oklch(0 0 0 / 0.11);
  --line-2:  oklch(0 0 0 / 0.055);
  --line-3:  oklch(0 0 0 / 0.20);

  /* ---- type ---- */
  --serif: 'Newsreader', Georgia, serif;
  --sans:  'Schibsted Grotesk', system-ui, -apple-system, sans-serif;
  --mono:  'JetBrains Mono', ui-monospace, monospace;

  /* ---- layout ---- */
  --page: 1280px;
  --gutter: clamp(20px, 4vw, 56px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv01";
  overflow-x: hidden;
}

/* grain / paper texture overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

::selection { background: var(--accent); color: #fff; }

a { color: inherit; text-decoration: none; }

img { display: block; max-width: 100%; }

/* ---------- shared utilities ---------- */
.wrap { max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }
.rule { height: 1px; background: var(--line); border: 0; }

.kicker {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-hi);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.kicker.muted { color: var(--ink-3); }
.kicker::before {
  content: "";
  width: 6px; height: 6px;
  background: currentColor;
  border-radius: 1px;
  flex: none;
}
.kicker.nodot::before { display: none; }

.meta {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}

/* ============================================================
   MASTHEAD
   ============================================================ */
.masthead {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in oklch, var(--bg) 86%, transparent);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-bottom: 1px solid var(--line);
}
.masthead__edition {
  border-bottom: 1px solid var(--line-2);
}
.masthead__edition .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 30px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.masthead__edition .live {
  color: var(--accent-hi);
  display: inline-flex; align-items: center; gap: 7px;
}
.masthead__edition .live::before {
  content:""; width:6px; height:6px; border-radius:50%;
  background: var(--accent); box-shadow: 0 0 0 0 var(--accent);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 oklch(0.705 0.175 50 / 0.5); }
  70% { box-shadow: 0 0 0 7px oklch(0.705 0.175 50 / 0); }
  100% { box-shadow: 0 0 0 0 oklch(0.705 0.175 50 / 0); }
}

.masthead__bar .wrap {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 68px;
}
.masthead__nav {
  display: flex;
  gap: 26px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
}
.masthead__nav a { transition: color .18s; position: relative; }
.masthead__nav a:hover { color: var(--ink); }
.masthead__nav a.active { color: var(--ink); }

.wordmark {
  display: flex;
  justify-content: center;
  align-items: center;
  line-height: 0;
}
.wordmark img {
  height: 25px;
  width: auto;
  display: block;
}

.masthead__actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
}
.icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-2);
  cursor: pointer;
  background: transparent;
  transition: border-color .18s, color .18s;
}
.icon-btn:hover { border-color: var(--line-3); color: var(--ink); }
.icon-btn svg { width: 16px; height: 16px; }

.masthead__link {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
  transition: color .18s;
}
.masthead__link:hover { color: var(--accent-hi); }

.btn-sub {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--bg);
  background: var(--ink);
  border: 0;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .18s, background .18s;
}
.btn-sub:hover { background: oklch(0 0 0); transform: translateY(-1px); }

/* category filter strip */
.catbar {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.catbar .wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 46px;
  overflow-x: auto;
  scrollbar-width: none;
}
.catbar .wrap::-webkit-scrollbar { display: none; }
.catbar__label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-right: 18px;
  flex: none;
}
.cat {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: color .16s, background .16s, border-color .16s;
}
.cat:hover { color: var(--ink); }
.cat.active {
  color: var(--accent-hi);
  border-color: oklch(0.705 0.175 50 / 0.45);
  background: var(--accent-dim);
}

/* ============================================================
   BUTTONS / LINKS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans);
  font-weight: 600; font-size: 14px;
  padding: 13px 22px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .18s, background .18s, border-color .18s;
}
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--accent-hi); transform: translateY(-1px); }
.btn--ghost { border-color: var(--line-3); color: var(--ink); }
.btn--ghost:hover { background: oklch(0 0 0 / 0.045); transform: translateY(-1px); }
.btn svg { width: 16px; height: 16px; }

.txtlink {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 8px;
  transition: gap .2s, color .2s;
}
.txtlink:hover { color: var(--accent-hi); gap: 12px; }

/* ============================================================
   IMAGE PLACEHOLDER (for cards without real photos)
   ============================================================ */
.ph {
  position: relative;
  display: grid;
  place-items: center;
  background:
    radial-gradient(120% 120% at 70% 15%, oklch(1 0 0 / 0.4), transparent 60%),
    var(--bg-raised);
  overflow: hidden;
}
.ph[data-tint="ai"]      { background-color: oklch(0.93 0.045 50); }
.ph[data-tint="sistemas"]{ background-color: oklch(0.93 0.03 245); }
.ph[data-tint="procesos"]{ background-color: oklch(0.935 0.038 150); }
.ph[data-tint="cloud"]   { background-color: oklch(0.93 0.04 225); }
.ph[data-tint="devops"]  { background-color: oklch(0.93 0.045 300); }

/* concept line-icon (referential imagery per post) */
.ico {
  width: clamp(58px, 28%, 116px);
  height: auto;
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.88;
}
.ico .acc { stroke: var(--accent); }
.ico .dot { fill: var(--accent); stroke: none; }

.ph__tag {
  position: absolute;
  left: 13px; bottom: 11px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  background: oklch(1 0 0 / 0.45);
  padding: 2px 7px;
  border-radius: 3px;
  backdrop-filter: blur(2px);
}
.ph__tag::before { content: ""; }

/* ---- author avatars (real photos) ---- */
.av-fede, .av-juan, .av-valen { background-size: cover; }
.av-fede  { background-image: url("img/fede-portrait.jpg"); background-position: 50% 16%; }
.av-juan  { background-image: url("img/juan.jpg");          background-position: 42% 30%; }
.av-valen { background-image: url("img/valentin.jpg");      background-position: 50% 34%; }

/* ---- article card component (shared by hub grid + read-more) ---- */
.card {
  background: var(--bg);
  padding: 0 0 26px;
  display: flex; flex-direction: column;
  transition: background .2s;
}
.card.hidden { display: none; }
.card:hover { background: var(--bg-raised); }
.card__media { aspect-ratio: 16/10; margin-bottom: 18px; }
.card__body { padding: 0 24px; }
.card__kick { margin-bottom: 12px; }
.card h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.16;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
  text-wrap: pretty;
}
.card:hover h3 { color: var(--accent-hi); }
.card p { color: var(--ink-2); font-size: 14.5px; line-height: 1.55; margin-bottom: 16px; }
.card__foot {
  margin-top: auto;
  display: flex; align-items: center; gap: 10px;
  padding-top: 4px;
}
.card__av {
  width: 26px; height: 26px; border-radius: 50%;
  background-color: var(--bg-raised); border: 1px solid var(--line);
  flex: none; background-size: cover;
}
.card__who { font-size: 12.5px; color: var(--ink-2); }
.card__who b { font-weight: 600; color: var(--ink); }
.card__who .role { color: var(--ink-4); }
.card__date { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--ink-4); }

/* ============================================================
   FOOTER
   ============================================================ */
.foot {
  border-top: 1px solid var(--line);
  background: var(--bg-sunk);
  margin-top: 90px;
}
.foot__top { padding: 64px 0 48px; }
.foot__grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1.18fr 0.85fr 1fr;
  gap: 36px;
}
.foot__col2 { display: flex; flex-direction: column; gap: 32px; }
.foot h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: 18px;
  font-weight: 500;
}
.foot ul { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.foot ul a { color: var(--ink-2); font-size: 14px; transition: color .16s; }
.foot ul a:hover { color: var(--ink); }
.foot__brand .wordmark { justify-content: flex-start; margin-bottom: 18px; }
.foot__brand .wordmark img { height: 30px; }
.foot__brand p { color: var(--ink-3); font-size: 14px; max-width: 32ch; line-height: 1.6; }
.foot__news { display: flex; gap: 8px; margin-top: 20px; max-width: 320px; }
.foot__news input {
  flex: 1;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 16px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13px;
}
.foot__news input::placeholder { color: var(--ink-4); }
.foot__news input:focus { outline: none; border-color: var(--line-3); }
.foot__bar {
  border-top: 1px solid var(--line-2);
  padding: 22px 0;
}
.foot__bar .wrap {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono);
  font-size: 11px; letter-spacing: 0.06em;
  color: var(--ink-4); text-transform: uppercase;
}
.foot__bar .soc { display: flex; gap: 20px; }
.foot__bar .soc a:hover { color: var(--ink-2); }

/* ============================================================
   ENTRANCE ANIMATION
   ============================================================ */
/* ============================================================
   ENTRANCE — none: resting state is always visible.
   (Entrance animations are intentionally omitted so content
   can never be trapped hidden by a frozen animation clock.)
   ============================================================ */

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
  .foot__grid { grid-template-columns: repeat(4, 1fr); gap: 34px 28px; }
  .foot__brand { grid-column: 1 / -1; }
  .foot__brand p { max-width: 48ch; }
}
@media (max-width: 900px) {
  .masthead__nav { display: none; }
}
@media (max-width: 820px) {
  .foot__grid { grid-template-columns: 1fr 1fr; gap: 30px 28px; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .masthead__bar .wrap { grid-template-columns: auto 1fr auto; }
  .wordmark { text-align: left; font-size: 24px; }
}
@media (max-width: 440px) {
  .foot__grid { grid-template-columns: 1fr; }
}
