/* ============================================================
   rigs.work — content-page layer (hubs, articles, glossary,
   basins, day-rates, FAQ, blog, resources, tools)
   Loads AFTER styles.css and reuses its design tokens.
   ============================================================ */

/* ---------- Shared content shell ---------- */
.content-main { background: var(--bg-1); color: var(--white); min-height: 60vh; }
.content-hero {
  position: relative; padding: 64px 0 48px; overflow: hidden;
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border-bottom: 1px solid var(--line-d);
}
.content-hero::before {
  content:""; position:absolute; inset:0; z-index:0; opacity:.7; pointer-events:none;
  background: radial-gradient(900px 380px at 80% -20%, rgba(59,139,255,.2), transparent 66%);
}
.content-hero .wrap { position: relative; z-index: 1; }
.content-hero.has-img::after {
  content:""; position:absolute; inset:0; z-index:0; opacity:.16; pointer-events:none;
  background-size: cover; background-position: center;
}
.content-hero[data-img="rig"]::after { background-image: url("../img/rig-site.jpg"); }
.content-hero[data-img="equipment"]::after { background-image: url("../img/opsflo-dashboard.png"); }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--muted-d); margin-bottom: 22px; font-family: var(--mono); }
.breadcrumbs a { color: var(--muted-d); transition: color .15s; }
.breadcrumbs a:hover { color: var(--accent-3); }
.breadcrumbs span.sep { opacity: .5; }
.breadcrumbs span.current { color: #cdd9e8; }

.content-eyebrow { display:inline-flex; align-items:center; gap:9px; font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-3); margin-bottom: 16px; padding: 6px 13px; border: 1px solid var(--accent-soft); border-radius: 100px; background: var(--accent-soft); }
.content-hero h1 { font-family: var(--display); font-size: clamp(30px, 4.4vw, 50px); font-weight: 800; letter-spacing: -.035em; line-height: 1.05; max-width: 18ch; }
.content-lede { margin-top: 18px; font-size: 18px; color: var(--muted-d-2); max-width: 64ch; line-height: 1.62; }
.content-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 20px; font-size: 13px; color: var(--muted-d); font-family: var(--mono); }
.content-meta span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Article body ---------- */
.article-layout { display: grid; grid-template-columns: minmax(0,1fr) 270px; gap: 56px; padding: 56px 0 80px; }
.article-body { max-width: 760px; font-size: 17.5px; line-height: 1.75; color: var(--muted-d-2); }
.article-body > * + * { margin-top: 20px; }
.article-body h2 { font-family: var(--display); font-size: 28px; font-weight: 800; color: #fff; letter-spacing: -.02em; margin-top: 48px; scroll-margin-top: 90px; }
.article-body h3 { font-family: var(--display); font-size: 21px; font-weight: 700; color: #fff; margin-top: 34px; scroll-margin-top: 90px; }
.article-body p { color: var(--muted-d-2); }
.article-body strong { color: #fff; font-weight: 700; }
.article-body a:not(.btn) { color: var(--accent-3); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(111,176,255,.4); transition: text-decoration-color .2s; }
.article-body a:not(.btn):hover { text-decoration-color: var(--accent-3); }
.article-body ul, .article-body ol { padding-left: 24px; color: var(--muted-d-2); }
.article-body li { margin-top: 8px; }
.article-body li::marker { color: var(--accent); }
.article-body blockquote, .callout { position: relative; padding: 22px 26px; border-left: 3px solid var(--accent); background: var(--bg-2); border-radius: 0 12px 12px 0; margin: 28px 0; color: var(--muted-d-2); }
.callout strong { color: #fff; }
.callout.warn { border-left-color: var(--amber); }
.callout.tip { border-left-color: var(--green); }
.article-body figure { margin: 28px 0; }
.article-body figure img { border-radius: var(--radius-lg); border: 1px solid var(--line-d); }
.article-body figcaption { margin-top: 10px; font-size: 13px; color: var(--muted-d); font-family: var(--mono); }

/* data tables */
.data-table { width: 100%; border-collapse: collapse; margin: 28px 0; font-size: 14.5px; border: 1px solid var(--line-d); border-radius: var(--radius-lg); overflow: hidden; }
.data-table thead { background: var(--bg-3); }
.data-table th { text-align: left; padding: 13px 16px; font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-3); font-weight: 700; }
.data-table td { padding: 13px 16px; border-top: 1px solid var(--line-d); color: var(--muted-d-2); vertical-align: top; }
.data-table tbody tr:hover { background: rgba(59,139,255,.05); }
.data-table strong { color: #fff; }

/* key-facts box */
.keyfacts { background: linear-gradient(180deg, var(--bg-3), var(--bg-2)); border: 1px solid var(--line-d); border-radius: var(--radius-lg); padding: 22px 24px; margin: 8px 0 24px; }
.keyfacts h3 { font-family: var(--display); font-size: 15px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-3); margin-bottom: 14px; }
.keyfacts dl { display: grid; grid-template-columns: auto 1fr; gap: 9px 18px; margin: 0; font-size: 14px; }
.keyfacts dt { color: var(--muted-d); white-space: nowrap; }
.keyfacts dd { margin: 0; color: #fff; font-weight: 600; }

/* ---------- TOC sidebar ---------- */
.article-aside { position: sticky; top: 90px; align-self: start; }
.toc { border: 1px solid var(--line-d); border-radius: var(--radius-lg); padding: 20px; background: rgba(255,255,255,.02); }
.toc h4 { font-family: var(--mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-d); margin: 0 0 12px; }
.toc ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.toc a { display: block; padding: 7px 10px; border-radius: 8px; font-size: 13.5px; color: var(--muted-d-2); border-left: 2px solid transparent; transition: .15s; }
.toc a:hover { color: #fff; background: rgba(59,139,255,.06); }
.toc a.active { color: #fff; border-left-color: var(--accent); background: rgba(59,139,255,.08); }
.aside-cta { margin-top: 18px; padding: 22px; border-radius: var(--radius-lg); background: linear-gradient(160deg, var(--bg-3), var(--bg-2)); border: 1px solid rgba(59,139,255,.25); }
.aside-cta strong { display: block; font-family: var(--display); font-size: 17px; color: #fff; margin-bottom: 6px; }
.aside-cta p { font-size: 13.5px; color: var(--muted-d); margin-bottom: 14px; }

/* ---------- Hub pages ---------- */
.hub-section { padding: 56px 0; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.hub-card {
  position: relative; display: flex; flex-direction: column; padding: 26px 24px;
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2)); border: 1px solid var(--line-d);
  border-radius: var(--radius-lg); transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s, border-color .25s; overflow: hidden;
}
.hub-card::before { content:""; position:absolute; inset:0 0 auto; height:3px; background:linear-gradient(90deg,var(--accent),var(--accent-3)); transform:scaleX(0); transform-origin:left; transition:transform .3s; }
.hub-card:hover { transform: translateY(-6px); border-color: transparent; box-shadow: 0 28px 60px -22px rgba(2,8,20,.7); }
.hub-card:hover::before { transform: scaleX(1); }
.hub-card .tag { font-family: var(--mono); font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--accent-3); margin-bottom: 12px; }
.hub-card h3 { font-family: var(--display); font-size: 19px; font-weight: 700; color: #fff; }
.hub-card p { margin-top: 10px; font-size: 14.5px; color: var(--muted-d); flex: 1; }
.hub-card .more { margin-top: 16px; font-size: 13.5px; font-weight: 700; color: var(--accent-3); display: inline-flex; align-items: center; gap: 6px; transition: gap .2s; }
.hub-card:hover .more { gap: 11px; }

.hub-pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.pillar-card { padding: 28px 24px; border-radius: var(--radius-lg); background: rgba(255,255,255,.02); border: 1px solid var(--line-d); transition: .25s; }
.pillar-card:hover { border-color: rgba(59,139,255,.4); transform: translateY(-4px); }
.pillar-card .pn { font-family: var(--mono); font-size: 12px; color: var(--accent-3); }
.pillar-card h3 { font-family: var(--display); font-size: 19px; color: #fff; margin: 10px 0 8px; }
.pillar-card p { font-size: 14px; color: var(--muted-d); }
.pillar-card ul { list-style: none; margin: 14px 0 0; padding: 0; }
.pillar-card li a { display: block; padding: 5px 0; font-size: 13.5px; color: var(--muted-d-2); transition: color .15s, padding-left .15s; }
.pillar-card li a:hover { color: var(--accent-3); padding-left: 4px; }

/* section intro on dark content pages */
.csection-head { max-width: 720px; margin-bottom: 34px; }
.csection-head h2 { font-family: var(--display); font-size: clamp(24px,3vw,34px); font-weight: 800; color: #fff; letter-spacing: -.02em; }
.csection-head p { margin-top: 12px; font-size: 16.5px; color: var(--muted-d); }

/* ---------- Glossary ---------- */
.glossary-search { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 26px; }
.glossary-search input { flex: 1; min-width: 240px; padding: 13px 16px; border-radius: 11px; border: 1px solid var(--line-d); background: var(--bg-2); color: #fff; font-size: 15px; }
.glossary-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.alpha-nav { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 30px; }
.alpha-nav a { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; font-size: 13px; font-weight: 700; color: var(--muted-d-2); border: 1px solid var(--line-d); transition: .15s; }
.alpha-nav a:hover { background: var(--accent); color: #fff; border-color: transparent; }
.alpha-nav a.empty { opacity: .3; pointer-events: none; }
.glossary-list { display: grid; gap: 14px; }
.glossary-group h2 { font-family: var(--display); font-size: 24px; color: var(--accent-3); margin: 26px 0 12px; scroll-margin-top: 90px; }
.term-card { padding: 20px 22px; background: linear-gradient(180deg, var(--bg-3), var(--bg-2)); border: 1px solid var(--line-d); border-radius: var(--radius-lg); transition: border-color .2s; }
.term-card:hover { border-color: rgba(59,139,255,.35); }
.term-card dt { font-family: var(--display); font-size: 18px; font-weight: 700; color: #fff; }
.term-card dd { margin: 8px 0 0; font-size: 15px; color: var(--muted-d-2); line-height: 1.6; }
.term-card .term-cat { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-3); margin-left: 10px; }
.no-results { padding: 30px; text-align: center; color: var(--muted-d); font-family: var(--mono); }

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: 12px; max-width: 860px; }
.faq-item { border: 1px solid var(--line-d); border-radius: var(--radius-lg); background: rgba(255,255,255,.02); overflow: hidden; }
.faq-q { width: 100%; text-align: left; padding: 20px 24px; font-family: var(--display); font-size: 17px; font-weight: 700; color: #fff; background: none; border: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq-q .chev { flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent-3); transition: transform .25s; }
.faq-item.open .faq-q .chev { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a-inner { padding: 0 24px 22px; font-size: 15.5px; color: var(--muted-d-2); line-height: 1.65; }
.faq-a-inner a { color: var(--accent-3); text-decoration: underline; }

/* ---------- Blog ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px,1fr)); gap: 20px; }
.post-card { display: flex; flex-direction: column; background: linear-gradient(180deg, var(--bg-3), var(--bg-2)); border: 1px solid var(--line-d); border-radius: var(--radius-lg); overflow: hidden; transition: transform .25s, box-shadow .25s, border-color .25s; }
.post-card:hover { transform: translateY(-5px); border-color: rgba(59,139,255,.35); box-shadow: var(--shadow); }
.post-card .post-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.post-cat { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-3); }
.post-card h3 { font-family: var(--display); font-size: 19px; color: #fff; margin: 10px 0; }
.post-card p { font-size: 14.5px; color: var(--muted-d); flex: 1; }
.post-card .post-meta { margin-top: 16px; font-size: 12.5px; color: var(--muted-d); font-family: var(--mono); }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.tag-row a { font-size: 13px; padding: 7px 14px; border-radius: 100px; border: 1px solid var(--line-d); color: var(--muted-d-2); transition: .15s; }
.tag-row a:hover, .tag-row a.active { background: var(--accent); color: #fff; border-color: transparent; }

/* ---------- Tools ---------- */
.tool-card { background: var(--paper-2); color: var(--ink); border-radius: var(--radius-xl); padding: 30px; border: 1px solid var(--line-l); box-shadow: var(--shadow); }
.tool-card h2 { font-family: var(--display); color: var(--ink); }
.tool-result { margin-top: 22px; padding: 24px; border-radius: var(--radius-lg); background: linear-gradient(160deg, var(--bg-2), var(--bg-1)); color: #fff; text-align: center; }
.tool-result .big { font-family: var(--display); font-size: 40px; font-weight: 800; background:linear-gradient(180deg,#fff,#a9c8f5); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; }

/* ---------- related / next links ---------- */
.related { padding: 40px 0 0; border-top: 1px solid var(--line-d); margin-top: 48px; }
.related h3 { font-family: var(--display); font-size: 20px; color: #fff; margin-bottom: 18px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 14px; }
.related-grid a { padding: 18px 20px; border: 1px solid var(--line-d); border-radius: var(--radius-lg); transition: .2s; }
.related-grid a:hover { border-color: rgba(59,139,255,.4); transform: translateY(-3px); background: rgba(59,139,255,.04); }
.related-grid .tag { font-family: var(--mono); font-size: 11px; color: var(--accent-3); text-transform: uppercase; }
.related-grid strong { display: block; margin-top: 6px; color: #fff; font-size: 15px; font-family: var(--display); }

/* ---------- inline CTA band ---------- */
.cta-band { margin: 48px 0 0; padding: 36px 40px; border-radius: var(--radius-xl); background: linear-gradient(120deg, var(--bg-2), var(--bg-3)); border: 1px solid rgba(59,139,255,.25); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px; }
.cta-band h3 { font-family: var(--display); font-size: 22px; color: #fff; }
.cta-band p { margin-top: 8px; color: var(--muted-d); max-width: 520px; font-size: 15px; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .article-layout { grid-template-columns: 1fr; gap: 32px; }
  .article-aside { position: static; display: none; }
  .hub-pillars { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .hub-pillars { grid-template-columns: 1fr; }
  .content-hero { padding: 44px 0 36px; }
  .article-body { font-size: 16.5px; }
  .data-table { font-size: 13px; display: block; overflow-x: auto; }
  .cta-band { padding: 26px; }
}
