/* ══════════════════════════════════════════════
   CONTROL SOFTWARE — SHARED STYLES
   ══════════════════════════════════════════════ */

:root {
  --bg: #FAF9F6;
  --bg-warm: #F0EDE6;
  --bg-deep: #1A1714;
  --bg-deep-raised: #242019;
  --bg-card: #FFFFFF;
  --border: #E2DFD8;
  --border-strong: #C8C3B8;
  --text: #3A3632;
  --text-secondary: #6B6560;
  --text-light: #908A82;
  --heading: #1A1714;
  --green: #8B9E3C;
  --green-soft: rgba(139, 158, 60, 0.12);
  --amber: #D4964F;
  --amber-soft: rgba(212, 150, 79, 0.12);
  --copper: #C4793C;
  --copper-soft: rgba(196, 121, 60, 0.1);
  --red: #B54B3A;
  --red-soft: rgba(181, 75, 58, 0.1);
  --font-serif: 'Newsreader', Georgia, serif;
  --font-sans: 'Outfit', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --max-w: 740px;
  --max-w-wide: 1060px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

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

/* ── NAV ── */
#nav-toggle { display: none; }
nav {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 1.75rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}
.nav-hamburger {
  display: none;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}
.nav-logo-bars {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.nav-logo-bars .bar {
  width: 20px;
  height: 5px;
  border-radius: 2px;
}
.nav-logo-bars .bar:nth-child(1) { background: var(--green); }
.nav-logo-bars .bar:nth-child(2) { background: var(--amber); }
.nav-logo-bars .bar:nth-child(3) { background: var(--red); }
.nav-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.nav-logo-text .primary {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--heading);
  letter-spacing: -0.01em;
}
.nav-logo-text .secondary {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 0.62rem;
  color: var(--text-light);
  letter-spacing: 0.06em;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.nav-link {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-link:hover { color: var(--heading); }
.nav-link.active { color: var(--heading); }
.nav-cta {
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff !important;
  background: var(--heading);
  text-decoration: none;
  padding: 0.55rem 1.2rem;
  border-radius: 6px;
  transition: opacity 0.2s;
}
.nav-cta:hover { opacity: 0.85; }

/* ── SHARED ELEMENTS ── */
.section-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--text-light);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.section-label::before {
  content: '';
  width: 16px; height: 2px;
  background: var(--amber);
  border-radius: 1px;
}

.gradient-bar {
  height: 4px;
  background: linear-gradient(90deg, var(--green), var(--amber), var(--red));
}

/* ── BREADCRUMB (all pages) ── */
.breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-light);
  margin-bottom: 2rem;
  letter-spacing: 0.04em;
}
.breadcrumb a { color: var(--text-light); text-decoration: none; }
.breadcrumb a:hover { color: var(--heading); }

/* ── SERVICE PAGE SHARED ── */
.page-hero {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 3.5rem 2.5rem 0;
}
.page-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 400;
  line-height: 1.25;
  color: var(--heading);
  margin-bottom: 1.5rem;
}
.page-hero h1 em { font-style: italic; color: var(--copper); }
.page-hero-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.85;
}

.page-body {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 4rem 2.5rem;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 5rem;
  align-items: start;
}
.page-content h2 {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 400;
  color: var(--heading);
  line-height: 1.35;
  margin-bottom: 1.25rem;
  margin-top: 3rem;
}
.page-content h2:first-of-type { margin-top: 0; }
.page-content p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.85;
}
.page-content p + p { margin-top: 1.25rem; }

.callout {
  background: var(--bg-warm);
  border-left: 3px solid var(--amber);
  padding: 1.5rem 1.75rem;
  border-radius: 0 8px 8px 0;
  margin: 2.5rem 0;
}
.callout p {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-style: italic;
  color: var(--heading);
  line-height: 1.65;
}

.page-sidebar { position: sticky; top: 2rem; }
.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  margin-bottom: 1.25rem;
}
.sidebar-card h4 {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  color: var(--text-light);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.sidebar-card ul { list-style: none; }
.sidebar-card li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 0.3rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.sidebar-card li::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sidebar-article {
  display: block;
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  margin-bottom: 1.25rem;
  text-decoration: none;
  transition: border-color 0.3s;
}
.sidebar-article:hover { border-color: var(--border-strong); }
.sidebar-article-label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 500;
  color: var(--text-light);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}
.sidebar-article h4 {
  font-family: var(--font-serif);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--heading);
  line-height: 1.35;
  margin-bottom: 0.4rem;
}
.sidebar-article p {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.sidebar-cta {
  background: var(--bg-deep);
  border-radius: 12px;
  padding: 1.75rem;
}
.sidebar-cta h4 { font-size: 0.95rem; font-weight: 600; color: #fff; margin-bottom: 0.6rem; }
.sidebar-cta p { font-size: 0.82rem; color: rgba(255,255,255,0.5); line-height: 1.65; margin-bottom: 1.25rem; }
.sidebar-cta a {
  display: block; text-align: center; padding: 0.65rem;
  background: linear-gradient(135deg, var(--amber), var(--copper));
  color: #fff; border-radius: 6px; font-weight: 600; font-size: 0.82rem;
  text-decoration: none; transition: opacity 0.2s;
}
.sidebar-cta a:hover { opacity: 0.85; }

/* ── ARTICLE PAGE SHARED ── */
.article-hero {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3.5rem 2rem 0;
}
.article-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 400;
  line-height: 1.25;
  color: var(--heading);
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}
.article-meta-bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}
.article-author { font-size: 0.85rem; color: var(--text-secondary); }
.article-author strong { color: var(--heading); font-weight: 600; }
.article-date, .article-read-time {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-light);
  letter-spacing: 0.04em;
}

.article-body {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}
.article-body h2 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--heading);
  line-height: 1.35;
  margin-top: 3rem;
  margin-bottom: 1.25rem;
}
.article-body h2:first-child { margin-top: 0; }
.article-body p {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.9;
}
.article-body p + p { margin-top: 1.25rem; }
.article-body code {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  background: var(--bg-warm);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  color: var(--copper);
}

.article-end {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem 4rem;
}
.article-author-box {
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  display: flex;
  gap: 1.5rem;
  align-items: start;
}
.author-avatar {
  width: 56px; height: 56px;
  background: var(--bg-deep);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.author-avatar .bars { display: flex; flex-direction: column; gap: 2px; }
.author-avatar .bars .bar { width: 16px; height: 3.5px; border-radius: 1px; }
.author-avatar .bars .bar:nth-child(1) { background: var(--green); }
.author-avatar .bars .bar:nth-child(2) { background: var(--amber); }
.author-avatar .bars .bar:nth-child(3) { background: var(--red); }
.author-info h4 { font-size: 0.95rem; font-weight: 600; color: var(--heading); margin-bottom: 0.3rem; }
.author-info p { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.65; }
.author-info a {
  font-family: var(--font-mono); font-size: 0.72rem; color: var(--copper);
  text-decoration: none; margin-top: 0.5rem; display: inline-block;
}

/* ── FOOTER ── */
.site-footer-dark {
  background: var(--bg-deep);
  padding: 5.5rem 2.5rem 0;
  position: relative;
}
.site-footer-dark::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--green), var(--amber), var(--red));
}
.footer-inner {
  max-width: var(--max-w-wide);
  margin: 0 auto;
}
.footer-cta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
  padding-bottom: 4rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-cta-main .section-label { color: rgba(255,255,255,0.3); }
.footer-cta-main h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  font-weight: 400;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 1.25rem;
}
.footer-cta-main > p {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.85;
}
.footer-contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2.5rem;
}
.footer-contact-block label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 500;
  color: rgba(255,255,255,0.25);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.footer-contact-block a, .footer-contact-block span {
  font-size: 0.92rem;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-contact-block a:hover { color: var(--amber); }

.footer-form {
  background: var(--bg-deep-raised);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 2.25rem;
}
.footer-form h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  margin-bottom: 0.75rem;
}
.footer-form > p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
  line-height: 1.7;
  margin-bottom: 1.75rem;
}
.footer-form .form-group { margin-bottom: 0.85rem; }
.footer-form label {
  display: block;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.4);
  margin-bottom: 0.3rem;
  font-weight: 500;
}
.footer-form input, .footer-form textarea {
  width: 100%;
  padding: 0.6rem 0.8rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  color: rgba(255,255,255,0.85);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s;
}
.footer-form input:focus, .footer-form textarea:focus { border-color: var(--amber); }
.footer-form textarea { resize: vertical; min-height: 80px; }
.footer-form button {
  width: 100%;
  padding: 0.7rem;
  background: linear-gradient(135deg, var(--amber), var(--copper));
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: opacity 0.2s;
  margin-top: 0.5rem;
}
.footer-form button:hover { opacity: 0.85; }

.footer-bottom {
  padding: 2rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-bottom-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}
.footer-bottom-logo .bars {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.footer-bottom-logo .bars .bar {
  width: 12px;
  height: 3px;
  border-radius: 1px;
}
.footer-bottom-logo .bars .bar:nth-child(1) { background: var(--green); }
.footer-bottom-logo .bars .bar:nth-child(2) { background: var(--amber); }
.footer-bottom-logo .bars .bar:nth-child(3) { background: var(--red); }
.footer-bottom-logo span {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.35);
}
.footer-bottom p {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.25);
}
.footer-nav {
  display: flex;
  gap: 1.5rem;
}
.footer-nav a {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-nav a:hover { color: rgba(255,255,255,0.7); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .page-body { grid-template-columns: 1fr; gap: 3rem; }
  .page-sidebar { position: static; }
  .footer-cta { grid-template-columns: 1fr; gap: 2.5rem; }
  .nav-right { gap: 1rem; }
}
@media (max-width: 640px) {
  nav { padding: 1.25rem 1.5rem; flex-wrap: wrap; }

  /* Mobile hamburger menu */
  .nav-hamburger {
    display: flex;
    cursor: pointer;
    padding: 0.25rem;
    order: -1;
  }
  .nav-hamburger .nav-logo-bars .bar { transition: opacity 0.3s; }
  #nav-toggle:checked ~ .nav-hamburger .nav-logo-bars .bar { opacity: 0.45; }
  .nav-logo .nav-logo-bars { display: none; }

  .nav-right {
    flex-basis: 100%;
    max-height: 0;
    overflow: hidden;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    transition: max-height 0.3s ease;
  }
  #nav-toggle:checked ~ .nav-right {
    max-height: 400px;
  }
  .nav-link {
    display: block;
    padding: 0.85rem 0;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
  }
  .nav-right .nav-cta {
    display: block;
    text-align: center;
    margin: 0.85rem 0;
  }

  .breadcrumb { display: none; }
  .page-hero { padding: 2.5rem 1.5rem 0; }
  .page-body { padding: 3rem 1.5rem; }
  .article-hero { padding: 2.5rem 1.5rem 0; }
  .article-body { padding: 2.5rem 1.5rem 4rem; }
  .article-end { padding: 0 1.5rem 3rem; }
  .article-meta-bar { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .article-author-box { flex-direction: column; }
  .site-footer-dark { padding: 4rem 1.5rem 0; }
  .footer-contact-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 1rem; }
  .footer-nav { flex-wrap: wrap; justify-content: center; }
}
