/*
Theme Name: Pearl Gateway Child
Theme URI: https://pearlgateway.net/
Description: Industrial warehouse automation knowledge-base child theme for Blocksy.
Author: Pearl Gateway Systems
Template: blocksy
Version: 1.0.0
Text Domain: pearl-gateway
*/

:root {
  --pg-ink: #101c24;
  --pg-navy: #153246;
  --pg-steel: #496779;
  --pg-muted: #6e7f89;
  --pg-cloud: #eef3f5;
  --pg-paper: #f8faf9;
  --pg-white: #ffffff;
  --pg-safety: #f2a900;
  --pg-safety-dark: #c98000;
  --pg-teal: #137f7a;
  --pg-line: #d5e0e4;
  --pg-shadow: 0 18px 50px rgba(16, 28, 36, .09);
  --pg-radius: 18px;
  --pg-width: 1180px;
  --pg-font: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --pg-mono: "IBM Plex Mono", "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--pg-ink);
  background: var(--pg-paper);
  font-family: var(--pg-font);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--pg-teal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--pg-navy); }
img { max-width: 100%; height: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.screen-reader-text:focus { position: fixed; z-index: 99999; top: 8px; left: 8px; width: auto; height: auto; padding: 12px 16px; clip: auto; color: var(--pg-ink); background: var(--pg-white); }

.pg-shell { width: min(calc(100% - 40px), var(--pg-width)); margin-inline: auto; }
.pg-site-header { position: sticky; top: 0; z-index: 100; border-bottom: 1px solid rgba(213, 224, 228, .9); background: rgba(248, 250, 249, .96); backdrop-filter: blur(14px); }
.pg-header-inner { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.pg-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--pg-ink); text-decoration: none; }
.pg-brand img { width: 208px; height: auto; display: block; }
.pg-nav ul { display: flex; align-items: center; gap: 26px; margin: 0; padding: 0; list-style: none; }
.pg-nav a { color: var(--pg-ink); font-size: .91rem; font-weight: 700; text-decoration: none; }
.pg-nav a:hover, .pg-nav .current-menu-item > a { color: var(--pg-teal); }
.pg-nav .menu-item:last-child a { display: inline-flex; padding: 10px 17px; border-radius: 999px; color: var(--pg-white); background: var(--pg-navy); }
.pg-mobile-nav { display: none; }

.pg-hero { position: relative; overflow: hidden; padding: 104px 0 92px; color: var(--pg-white); background: linear-gradient(130deg, #102633 0%, #173d4e 58%, #176c69 100%); }
.pg-hero::before { content: ""; position: absolute; inset: 0; opacity: .18; background-image: linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(to right, transparent, #000 35%, #000); }
.pg-hero::after { content: ""; position: absolute; right: -110px; bottom: -180px; width: 520px; height: 520px; border: 74px solid rgba(242,169,0,.18); border-radius: 50%; }
.pg-hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); gap: 76px; align-items: center; }
.pg-eyebrow { margin: 0 0 16px; color: var(--pg-safety); font-family: var(--pg-mono); font-size: .77rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.pg-hero h1 { max-width: 820px; margin: 0; color: var(--pg-white); font-size: clamp(2.7rem, 5.2vw, 5rem); line-height: 1.03; letter-spacing: -.045em; }
.pg-hero-lead { max-width: 760px; margin: 25px 0 0; color: #d9e8eb; font-size: clamp(1.05rem, 1.8vw, 1.28rem); }
.pg-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.pg-button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border: 1px solid transparent; border-radius: 8px; font-size: .92rem; font-weight: 800; text-decoration: none; transition: transform .2s ease, background .2s ease, border-color .2s ease; }
.pg-button:hover { transform: translateY(-2px); }
.pg-button-primary { color: var(--pg-ink); background: var(--pg-safety); }
.pg-button-primary:hover { color: var(--pg-ink); background: #ffc12d; }
.pg-button-ghost { color: var(--pg-white); border-color: rgba(255,255,255,.45); background: rgba(255,255,255,.06); }
.pg-button-ghost:hover { color: var(--pg-white); border-color: var(--pg-white); }
.pg-control-panel { padding: 25px; border: 1px solid rgba(255,255,255,.16); border-radius: var(--pg-radius); background: rgba(7,23,32,.42); box-shadow: 0 30px 70px rgba(0,0,0,.18); }
.pg-panel-label { margin: 0 0 18px; color: #91c7c4; font-family: var(--pg-mono); font-size: .72rem; letter-spacing: .13em; text-transform: uppercase; }
.pg-signal { display: grid; grid-template-columns: 12px 1fr; gap: 12px; align-items: start; padding: 14px 0; border-top: 1px solid rgba(255,255,255,.11); }
.pg-signal:first-of-type { border-top: 0; }
.pg-signal-dot { width: 9px; height: 9px; margin-top: 7px; border-radius: 50%; background: var(--pg-safety); box-shadow: 0 0 0 5px rgba(242,169,0,.1); }
.pg-signal strong { display: block; color: var(--pg-white); font-size: .94rem; }
.pg-signal span { color: #b9ced4; font-size: .82rem; }

.pg-section { padding: 88px 0; }
.pg-section-alt { background: var(--pg-cloud); }
.pg-section-dark { color: var(--pg-white); background: var(--pg-ink); }
.pg-section-head { display: flex; justify-content: space-between; gap: 32px; align-items: end; margin-bottom: 36px; }
.pg-section-head h2, .pg-page-copy h2 { margin: 0; color: var(--pg-ink); font-size: clamp(2rem, 3.6vw, 3.15rem); line-height: 1.08; letter-spacing: -.035em; }
.pg-section-head p { max-width: 600px; margin: 0; color: var(--pg-muted); }
.pg-section-dark .pg-section-head h2, .pg-section-dark .pg-section-head p { color: var(--pg-white); }
.pg-grid { display: grid; gap: 22px; }
.pg-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pg-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pg-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pg-card { position: relative; padding: 28px; border: 1px solid var(--pg-line); border-radius: var(--pg-radius); background: var(--pg-white); box-shadow: 0 1px 0 rgba(16,28,36,.02); transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.pg-card:hover { transform: translateY(-4px); border-color: #b8cbd1; box-shadow: var(--pg-shadow); }
.pg-card-number { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; margin-bottom: 30px; border-radius: 8px; color: var(--pg-navy); background: #dceceb; font-family: var(--pg-mono); font-size: .78rem; font-weight: 800; }
.pg-card h3 { margin: 0 0 10px; color: var(--pg-ink); font-size: 1.18rem; line-height: 1.3; }
.pg-card p { margin: 0; color: var(--pg-muted); font-size: .94rem; }
.pg-card-link { display: inline-block; margin-top: 22px; font-weight: 800; text-decoration: none; }
.pg-metrics { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--pg-line); border-radius: var(--pg-radius); overflow: hidden; background: var(--pg-white); }
.pg-metric { padding: 31px; border-left: 1px solid var(--pg-line); }
.pg-metric:first-child { border-left: 0; }
.pg-metric strong { display: block; color: var(--pg-navy); font-size: 1.75rem; line-height: 1; }
.pg-metric span { display: block; margin-top: 10px; color: var(--pg-muted); font-size: .85rem; }
.pg-topic-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.pg-topic { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 84px; padding: 18px 20px; border: 1px solid #38505d; border-radius: 12px; color: var(--pg-white); text-decoration: none; background: #162a35; }
.pg-topic:hover { color: var(--pg-white); border-color: var(--pg-safety); background: #1a3441; }
.pg-topic span:last-child { color: var(--pg-safety); font-family: var(--pg-mono); }
.pg-faq { display: grid; gap: 12px; max-width: 920px; }
.pg-faq details { padding: 20px 22px; border: 1px solid var(--pg-line); border-radius: 12px; background: var(--pg-white); }
.pg-faq summary { cursor: pointer; color: var(--pg-ink); font-weight: 800; }
.pg-faq p { margin: 14px 0 0; color: var(--pg-muted); }
.pg-cta { display: flex; justify-content: space-between; align-items: center; gap: 38px; padding: 48px; border-radius: 24px; color: var(--pg-white); background: linear-gradient(120deg, var(--pg-navy), #176963); box-shadow: var(--pg-shadow); }
.pg-cta h2 { margin: 0; color: var(--pg-white); font-size: clamp(1.8rem, 3vw, 2.7rem); }
.pg-cta p { max-width: 670px; margin: 10px 0 0; color: #d9e8eb; }

.pg-page-hero { padding: 82px 0 68px; color: var(--pg-white); background: linear-gradient(125deg, #102633, #185464); }
.pg-page-hero h1 { max-width: 880px; margin: 0; color: var(--pg-white); font-size: clamp(2.55rem, 5vw, 4.5rem); line-height: 1.04; letter-spacing: -.045em; }
.pg-page-hero p { max-width: 760px; margin: 22px 0 0; color: #d6e6e9; font-size: 1.15rem; }
.pg-page-main { padding: 72px 0 96px; }
.pg-page-copy { max-width: 900px; }
.pg-page-copy > *:first-child { margin-top: 0; }
.pg-page-copy h2 { margin-top: 56px; font-size: clamp(1.75rem, 3vw, 2.45rem); }
.pg-page-copy h3 { margin-top: 34px; color: var(--pg-navy); }
.pg-page-copy p, .pg-page-copy li { color: #40535e; }
.pg-page-copy ul, .pg-page-copy ol { padding-left: 1.4rem; }
.pg-page-copy blockquote { margin: 34px 0; padding: 22px 26px; border-left: 4px solid var(--pg-safety); background: var(--pg-cloud); }
.pg-page-copy .pg-grid { max-width: none; }
.pg-search-box { padding: 26px; border-radius: var(--pg-radius); background: var(--pg-cloud); }
.pg-search-box form { display: flex; gap: 10px; }
.pg-search-box input { min-width: 0; flex: 1; min-height: 48px; padding: 0 16px; border: 1px solid var(--pg-line); border-radius: 8px; background: var(--pg-white); }
.pg-search-box button { border: 0; cursor: pointer; }

.pg-site-footer { padding: 64px 0 28px; color: #c3d1d5; background: #0c1920; }
.pg-footer-grid { display: grid; grid-template-columns: 1.4fr .7fr .7fr; gap: 54px; }
.pg-footer-brand img { width: 210px; filter: brightness(0) invert(1); }
.pg-footer-brand p { max-width: 500px; margin: 18px 0 0; color: #9fb1b8; }
.pg-site-footer h2 { margin: 0 0 17px; color: var(--pg-white); font-family: var(--pg-mono); font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; }
.pg-site-footer ul { margin: 0; padding: 0; list-style: none; }
.pg-site-footer li + li { margin-top: 9px; }
.pg-site-footer a { color: #d5e1e4; text-decoration: none; }
.pg-site-footer a:hover { color: var(--pg-safety); }
.pg-footer-bottom { display: flex; justify-content: space-between; gap: 28px; margin-top: 52px; padding-top: 24px; border-top: 1px solid #273943; color: #81959e; font-size: .8rem; }

@media (max-width: 960px) {
  .pg-desktop-nav { display: none; }
  .pg-mobile-nav { display: block; }
  .pg-mobile-nav summary { cursor: pointer; list-style: none; padding: 9px 13px; border: 1px solid var(--pg-line); border-radius: 8px; font-weight: 800; }
  .pg-mobile-nav summary::-webkit-details-marker { display: none; }
  .pg-mobile-nav[open] ul { position: absolute; top: 68px; right: 20px; width: min(310px, calc(100vw - 40px)); display: grid; gap: 0; padding: 10px; border: 1px solid var(--pg-line); border-radius: 12px; background: var(--pg-white); box-shadow: var(--pg-shadow); }
  .pg-mobile-nav li { list-style: none; }
  .pg-mobile-nav a { display: block; padding: 11px 12px; color: var(--pg-ink); text-decoration: none; }
  .pg-hero-grid { grid-template-columns: 1fr; gap: 42px; }
  .pg-control-panel { max-width: 620px; }
  .pg-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .pg-grid-3, .pg-topic-list { grid-template-columns: repeat(2, 1fr); }
  .pg-metrics { grid-template-columns: repeat(2, 1fr); }
  .pg-metric:nth-child(3) { border-left: 0; border-top: 1px solid var(--pg-line); }
  .pg-metric:nth-child(4) { border-top: 1px solid var(--pg-line); }
}

@media (max-width: 680px) {
  .pg-shell { width: min(calc(100% - 28px), var(--pg-width)); }
  .pg-header-inner { min-height: 68px; }
  .pg-brand img { width: 176px; }
  .pg-hero { padding: 78px 0 66px; }
  .pg-hero h1 { font-size: clamp(2.45rem, 12vw, 3.6rem); }
  .pg-section { padding: 64px 0; }
  .pg-section-head, .pg-cta, .pg-footer-bottom { align-items: flex-start; flex-direction: column; }
  .pg-grid-4, .pg-grid-3, .pg-grid-2, .pg-topic-list, .pg-footer-grid { grid-template-columns: 1fr; }
  .pg-metrics { grid-template-columns: 1fr; }
  .pg-metric, .pg-metric:nth-child(3), .pg-metric:nth-child(4) { border-left: 0; border-top: 1px solid var(--pg-line); }
  .pg-metric:first-child { border-top: 0; }
  .pg-cta { padding: 32px; }
  .pg-page-hero { padding: 64px 0 54px; }
  .pg-search-box form { flex-direction: column; }
}
