/* ──────────────────────────────────────────────────────────────────────────
   OmniStudio · Blog stylesheet (standalone, no build step)
   Mirrors the app palette (teal / magenta / lime, Inter) so the blog feels
   native to omnistudio.cl while staying fully static & crawlable.
   ────────────────────────────────────────────────────────────────────────── */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #fafbfa;
  --ink: #3e4543;
  --muted: #5e6764;
  --muted-2: #8c9591;
  --line: #e7eae9;
  --line-strong: #d8dddb;
  --brand: #1f8f88;
  --brand-bright: #2db5ac;
  --magenta: #d10074;
  --lime: #d8f24a;
  --ink-btn: #3e4543;
  --ink-btn-hover: #2c3230;
  --radius: 18px;
  --radius-sm: 12px;
  --pill: 999px;
  --shadow: 0 1px 2px rgba(62, 69, 67, 0.05), 0 10px 30px rgba(62, 69, 67, 0.06);
  --shadow-lg: 0 24px 60px rgba(62, 69, 67, 0.16);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; }
body {
  background:
    radial-gradient(800px 420px at 92% -8%, rgba(45, 181, 172, 0.12), transparent 70%),
    radial-gradient(720px 420px at 4% 102%, rgba(209, 0, 116, 0.07), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  line-height: 1.65;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Nav ─────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1080px; margin: 0 auto; padding: 0.85rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand { display: flex; align-items: center; gap: 0.55rem; }
.brand-name {
  font-weight: 800; font-size: 1.18rem; letter-spacing: -0.03em; color: var(--ink);
}
.brand-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--brand); display: inline-block; }
.nav-links { display: flex; align-items: center; gap: 1.1rem; }
.nav-links a { color: var(--muted); font-weight: 600; font-size: 0.95rem; }
.nav-links a:hover { color: var(--ink); text-decoration: none; }

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-block; border: none; border-radius: var(--pill);
  padding: 0.72rem 1.4rem; font: inherit; font-weight: 600; cursor: pointer;
  text-align: center; text-decoration: none;
  transition: transform 160ms cubic-bezier(0.23,1,0.32,1), background 150ms ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--ink-btn); color: #fff; }
.btn-primary:hover { background: var(--ink-btn-hover); color: #fff; }
.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-bright); color: #fff; }
.btn-ghost { background: transparent; border: 1.5px solid var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-small { padding: 0.5rem 1rem; font-size: 0.88rem; }
.btn-lg { padding: 0.95rem 1.7rem; font-size: 1.02rem; }

/* ── Layout ──────────────────────────────────────────── */
.wrap { max-width: 760px; margin: 0 auto; padding: 0 1.25rem; }
.wrap-wide { max-width: 1080px; margin: 0 auto; padding: 0 1.25rem; }
main { display: block; }

/* ── Breadcrumb ──────────────────────────────────────── */
.crumbs { font-size: 0.85rem; color: var(--muted-2); margin: 1.6rem 0 0.4rem; }
.crumbs a { color: var(--muted); font-weight: 600; }
.crumbs span { margin: 0 0.4rem; }

/* ── Post hero ───────────────────────────────────────── */
.hero {
  border-radius: var(--radius); padding: 2.4rem 2rem; margin: 0.6rem 0 1.8rem;
  color: #fff; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.hero .eyebrow { color: rgba(255,255,255,0.9); }
.hero h1 { color: #fff; }
.hero-teal    { background: linear-gradient(135deg, #1f8f88 0%, #2db5ac 100%); }
.hero-magenta { background: linear-gradient(135deg, #b00063 0%, #d10074 100%); }
.hero-ocean   { background: linear-gradient(135deg, #15616d 0%, #1f8f88 60%, #2db5ac 100%); }
.hero-sunset  { background: linear-gradient(135deg, #d10074 0%, #ef7d3a 100%); }
.hero-night   { background: linear-gradient(135deg, #2c3230 0%, #1f8f88 130%); }
.hero-lime    { background: linear-gradient(135deg, #1f8f88 0%, #6aa84f 70%, #a8c94a 100%); }

.eyebrow {
  text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.74rem;
  font-weight: 700; margin: 0 0 0.7rem; opacity: 0.95;
}
h1 {
  font-size: clamp(1.7rem, 4.4vw, 2.55rem); line-height: 1.08;
  font-weight: 800; letter-spacing: -0.03em; margin: 0 0 0.5rem;
}
.post-meta { font-size: 0.85rem; opacity: 0.92; margin-top: 0.9rem; }

/* ── Article body ────────────────────────────────────── */
article { font-size: 1.06rem; color: #34403c; }
.lead { font-size: 1.2rem; color: var(--muted); margin: 0 0 1.6rem; line-height: 1.55; }
article h2 {
  font-size: clamp(1.35rem, 3vw, 1.7rem); font-weight: 800; letter-spacing: -0.02em;
  margin: 2.3rem 0 0.7rem; line-height: 1.18; scroll-margin-top: 80px;
}
article h3 {
  font-size: 1.18rem; font-weight: 700; margin: 1.6rem 0 0.5rem; color: var(--ink);
}
article p { margin: 0 0 1.1rem; }
article ul, article ol { margin: 0 0 1.2rem; padding-left: 1.3rem; }
article li { margin: 0.4rem 0; }
article strong { color: var(--ink); font-weight: 700; }
article a { color: var(--brand); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
article a:hover { color: var(--magenta); }
article img { max-width: 100%; border-radius: var(--radius-sm); }
hr { border: none; border-top: 1px solid var(--line); margin: 2.2rem 0; }

/* ── Callouts ────────────────────────────────────────── */
.callout {
  background: var(--surface-2); border: 1px solid var(--line);
  border-left: 4px solid var(--brand); border-radius: var(--radius-sm);
  padding: 1rem 1.2rem; margin: 1.4rem 0;
}
.callout p:last-child { margin-bottom: 0; }
.callout-tip { border-left-color: var(--magenta); background: rgba(209,0,116,0.04); }
.callout-key { border-left-color: var(--brand-bright); background: rgba(45,181,172,0.06); }

/* ── Tables ──────────────────────────────────────────── */
.table-scroll { overflow-x: auto; margin: 1.4rem 0; }
table.data {
  width: 100%; border-collapse: collapse; font-size: 0.96rem;
  background: var(--surface); border-radius: var(--radius-sm); overflow: hidden;
  box-shadow: var(--shadow);
}
table.data th, table.data td { padding: 0.7rem 0.9rem; text-align: left; border-bottom: 1px solid var(--line); }
table.data thead th { background: var(--surface-2); font-weight: 700; color: var(--ink); }
table.data tbody tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: rgba(45,181,172,0.04); }

/* ── FAQ ─────────────────────────────────────────────── */
.faq { margin-top: 2.4rem; }
.faq h2 { margin-bottom: 1rem; }
.faq details {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0.2rem 1.1rem; margin: 0.6rem 0; background: var(--surface);
}
.faq summary {
  cursor: pointer; font-weight: 700; padding: 0.85rem 0; list-style: none;
  display: flex; justify-content: space-between; gap: 1rem; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font-weight: 700; }
.faq details[open] summary::after { content: "–"; }
.faq details[open] summary { border-bottom: 1px solid var(--line); }
.faq details p { margin: 0.9rem 0; color: var(--muted); }

/* ── CTA box ─────────────────────────────────────────── */
.cta {
  margin: 2.6rem 0 1rem; padding: 2rem 1.8rem; border-radius: var(--radius);
  background: linear-gradient(135deg, #2c3230 0%, #1f8f88 140%); color: #fff;
  box-shadow: var(--shadow-lg);
}
.cta h2 { color: #fff; margin: 0 0 0.5rem; font-size: 1.5rem; }
.cta p { color: rgba(255,255,255,0.92); margin: 0 0 1.2rem; }
.cta .btn-brand { background: var(--lime); color: #2c3230; }
.cta .btn-brand:hover { background: #e6ff63; color: #2c3230; }
.cta-inline { margin: 1.6rem 0; }

/* ── Related posts ───────────────────────────────────── */
.related { margin: 2.6rem 0 1rem; }
.related h2 { font-size: 1.3rem; margin-bottom: 0.9rem; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.9rem; }
.related-card {
  display: block; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 1rem 1.1rem; background: var(--surface); transition: box-shadow 160ms ease, transform 160ms ease;
}
.related-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); text-decoration: none; }
.related-card .rc-cat { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--brand); font-weight: 700; }
.related-card .rc-title { font-weight: 700; color: var(--ink); margin-top: 0.25rem; line-height: 1.25; }

/* ── Blog index ──────────────────────────────────────── */
.index-hero { text-align: center; padding: 3rem 1.25rem 1.5rem; }
.index-hero h1 { font-size: clamp(2rem, 5vw, 2.9rem); }
.index-hero p { color: var(--muted); font-size: 1.15rem; max-width: 620px; margin: 0.7rem auto 0; }
.cat-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin: 1.6rem 0 0.5rem; }
.cat-chip {
  font-size: 0.82rem; font-weight: 600; padding: 0.4rem 0.85rem; border-radius: var(--pill);
  border: 1px solid var(--line-strong); color: var(--muted); background: var(--surface);
}
.post-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.3rem; margin: 2rem 0 3rem;
}
.card {
  display: flex; flex-direction: column; border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; background: var(--surface);
  transition: box-shadow 180ms ease, transform 180ms ease;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); text-decoration: none; }
.card-banner { height: 120px; }
.card-body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; flex: 1; }
.card-cat { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--brand); font-weight: 700; }
.card-title { font-size: 1.12rem; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); margin: 0.35rem 0 0.5rem; line-height: 1.22; }
.card-desc { color: var(--muted); font-size: 0.94rem; margin: 0; flex: 1; }
.card-meta { color: var(--muted-2); font-size: 0.8rem; margin-top: 0.9rem; }

/* ── Footer ──────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); margin-top: 3rem; padding: 2.4rem 1.25rem; background: var(--surface-2); }
.footer-inner { max-width: 1080px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: space-between; }
.footer-col h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted-2); margin: 0 0 0.7rem; }
.footer-col a { display: block; color: var(--muted); font-size: 0.92rem; margin: 0.3rem 0; }
.footer-col a:hover { color: var(--ink); text-decoration: none; }
.footer-bottom { max-width: 1080px; margin: 1.8rem auto 0; padding-top: 1.2rem; border-top: 1px solid var(--line); color: var(--muted-2); font-size: 0.85rem; }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 640px) {
  .hero { padding: 1.8rem 1.3rem; }
  article { font-size: 1.02rem; }
  .nav-links { gap: 0.8rem; }
  .nav-links .nav-hide { display: none; }
}
