/*
Theme Name: Saidani Engineering
Theme URI: https://saidani-engineering.com/
Author: Saidani Engineering
Description: Cyber-precision WordPress theme for Saidani Engineering.
Version: 0.2.0
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: saidani
*/

:root {
  --acid: #d9f45f;
  --canvas: #0a0b0a;
  --background: #131313;
  --surface: #111211;
  --surface-high: #1a1b1a;
  --surface-bright: #242524;
  --text: #f3f4ef;
  --muted: #a1a1aa;
  --border: rgba(217, 244, 95, .16);
  --border-strong: rgba(217, 244, 95, .42);
  --max-width: 1280px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  overflow-x: clip;
}
body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(to right, rgba(217,244,95,.035) 1px, transparent 1px), linear-gradient(to bottom, rgba(217,244,95,.035) 1px, transparent 1px);
  background-size: 40px 40px;
  content: "";
  pointer-events: none;
}
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
p { margin-top: 0; }
.container { width: min(calc(100% - 48px), var(--max-width)); margin-inline: auto; }
.skip-link { position: fixed; left: -9999px; top: 12px; z-index: 100; }
.skip-link:focus { left: 12px; padding: 10px 16px; background: var(--acid); color: #000; }

h1, h2, h3 {
  margin-top: 0;
  font-family: "Hanken Grotesk", Inter, ui-sans-serif, system-ui, sans-serif;
  line-height: 1.08;
  letter-spacing: -.035em;
}
h1 { font-size: clamp(3.1rem, 7vw, 5.7rem); }
h2 { font-size: clamp(2.25rem, 4.6vw, 4rem); }
h3 { font-size: 1.35rem; }

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 11, 10, .86);
  backdrop-filter: blur(20px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 80px; gap: 28px; }
.brand { display: inline-flex; align-items: center; min-width: max-content; gap: 12px; text-decoration: none; }
.brand img { width: 52px; }
.brand-terminal { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--acid); color: var(--acid); font: 700 .86rem ui-monospace, monospace; }
.brand-copy { display: grid; color: var(--text); font: 700 .82rem/1.25 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; }
.brand-copy small { color: var(--acid); font-size: .58rem; font-weight: 500; }
.site-nav ul { display: flex; align-items: center; gap: 28px; margin: 0; padding: 0; list-style: none; }
.site-nav a { padding: 8px 0; color: #c7c9c1; font-size: .88rem; font-weight: 600; text-decoration: none; }
.site-nav a:hover, .site-nav a:focus-visible { color: var(--acid); }

main { padding-top: 80px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 11px 22px; border: 1px solid transparent; border-radius: 3px; font: 700 .78rem/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .025em; text-align: center; text-decoration: none; transition: background .2s, border-color .2s, color .2s, transform .2s; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--acid); color: #0b0c08; }
.button-primary:hover { background: #fff; }
.button-secondary { border-color: var(--border-strong); background: rgba(17,18,17,.5); color: var(--acid); }
.button-secondary:hover { border-color: var(--acid); background: rgba(217,244,95,.08); }
.button-dark { background: #090a08; color: var(--acid); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.section-grid { position: relative; }
.section-grid::before { position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, rgba(217,244,95,.035), transparent 35%); content: ""; }
.hero { min-height: calc(100vh - 80px); display: flex; align-items: center; padding: 104px 0; }
.hero-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr); align-items: center; gap: clamp(48px, 7vw, 96px); }
.hero-layout > * { min-width: 0; }
.hero-copy { min-width: 0; }
.status-pill { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 30px; padding: 7px 13px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font: .72rem ui-monospace, SFMono-Regular, Consolas, monospace; }
.status-pill span { color: var(--acid); text-transform: uppercase; }
.status-pill b { color: var(--muted); font-weight: 400; }
.hero h1 { max-width: 960px; margin-bottom: 28px; font-size: clamp(3rem, 5.7vw, 5.2rem); overflow-wrap: normal; hyphens: auto; }
.hero h1 em { color: var(--acid); font-style: normal; }
.hero-lead { max-width: 760px; color: #b4b5b0; font-size: clamp(1.05rem, 1.7vw, 1.25rem); overflow-wrap: anywhere; }
.proof-list { display: grid; gap: 11px; margin: 36px 0 0; padding: 0; color: #c8cac3; font: .8rem ui-monospace, SFMono-Regular, Consolas, monospace; list-style: none; }
.proof-list li { position: relative; padding-left: 18px; }
.proof-list li::before { position: absolute; left: 0; color: var(--acid); content: "—"; }

.terminal-window { overflow: hidden; min-height: 510px; border: 1px solid var(--border-strong); border-radius: 5px; background: rgba(8,9,8,.92); box-shadow: 0 30px 100px rgba(0,0,0,.42), inset 0 0 80px rgba(217,244,95,.025); }
.terminal-bar { display: flex; align-items: center; gap: 7px; padding: 14px 18px; border-bottom: 1px solid var(--border); background: var(--surface-high); }
.terminal-bar b { color: #aeb0a8; font: 500 .67rem ui-monospace, monospace; text-transform: uppercase; }
.terminal-body { padding: 30px; color: #aeb0a8; font: .74rem/1.85 ui-monospace, SFMono-Regular, Consolas, monospace; }
.terminal-body p { margin-bottom: 8px; }
.terminal-body i, .terminal-body b { color: var(--acid); font-style: normal; }
.terminal-body b { float: right; }
.terminal-command { margin-bottom: 25px !important; color: var(--acid); }
.terminal-metric { display: flex; justify-content: space-between; margin-top: 10px; padding: 12px 0; border-top: 1px solid var(--border); }
.terminal-metric strong { color: #fff; font-size: 1.05rem; }

.section { padding: 116px 0; }
.section-surface { border-block: 1px solid var(--border); background: rgba(17,18,17,.92); }
.section-heading { max-width: 820px; margin-bottom: 56px; }
.eyebrow, .terminal-label, .post-meta { display: block; margin-bottom: 18px; color: var(--acid); font: 700 .72rem/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .1em; text-transform: uppercase; }
.section-heading h2 { margin-bottom: 22px; }
.section-lead { max-width: 760px; color: var(--muted); font-size: 1.08rem; }
.service-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.service-card { min-width: 0; padding: 28px; border: 1px solid var(--border); border-radius: 4px; background: var(--background); transition: border-color .2s, background .2s, transform .2s; }
.service-card:hover { transform: translateY(-4px); border-color: var(--border-strong); background: var(--surface-high); }
.card-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 28px; border: 1px solid var(--border); background: var(--surface-high); color: var(--acid); font: 700 1rem ui-monospace, monospace; }
.service-card .post-meta { margin-bottom: 10px; font-size: .66rem; }
.service-card h3 { min-height: 58px; margin-bottom: 18px; color: #fff; font: 700 1.1rem/1.25 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: -.02em; text-transform: uppercase; }
.service-card p, .service-card li { color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
.service-card ul { display: grid; gap: 10px; margin: 24px 0 0; padding: 20px 0 0; border-top: 1px solid var(--border); list-style: none; }
.service-card li { position: relative; padding-left: 16px; }
.service-card li::before { position: absolute; left: 0; color: var(--acid); content: ">"; font-family: monospace; }

.split-heading { display: grid; grid-template-columns: 1.15fr .85fr; align-items: end; gap: 64px; margin-bottom: 50px; }
.split-heading h2 { margin-bottom: 0; }
.problem-grid { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--border); border-left: 1px solid var(--border); }
.problem-grid article { min-height: 220px; padding: 34px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); background: rgba(10,11,10,.52); }
.problem-grid article > span { color: var(--acid); font: .72rem ui-monospace, monospace; }
.problem-grid h3 { margin: 38px 0 12px; font-size: 1.4rem; }
.problem-grid p { max-width: 520px; color: var(--muted); }

.process-grid { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.process-grid::before { position: absolute; top: 24px; right: 5%; left: 5%; height: 1px; background: var(--border); content: ""; }
.process-grid article { position: relative; z-index: 1; }
.process-grid article > span { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 28px; border: 1px solid var(--border); border-radius: 3px; background: var(--surface); color: #aaa; font: .75rem ui-monospace, monospace; }
.process-grid article:first-child > span { border-color: var(--acid); color: var(--acid); box-shadow: 0 0 24px rgba(217,244,95,.08); }
.process-grid h3 { font: 700 1rem ui-monospace, monospace; text-transform: uppercase; }
.process-grid p { color: var(--muted); font-size: .9rem; }

.stack-section { background: var(--canvas); }
.stack-layout { display: grid; grid-template-columns: .8fr 1.2fr; align-items: start; gap: clamp(60px, 9vw, 120px); }
.tech-console { border: 1px solid var(--border); background: var(--surface); }
.tech-console > div { display: grid; grid-template-columns: 150px 1fr; gap: 24px; padding: 23px 26px; border-bottom: 1px solid var(--border); }
.tech-console > div:last-child { border-bottom: 0; }
.tech-console span { color: var(--acid); font: .7rem ui-monospace, monospace; text-transform: uppercase; }
.tech-console p { margin: 0; color: #babcb5; font: .78rem/1.6 ui-monospace, monospace; }

.blog-grid, .grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid > * { min-width: 0; }
.post-card, .card { min-width: 0; padding: 28px; border: 1px solid var(--border); border-radius: 4px; background: var(--background); }
.post-card { display: flex; flex-direction: column; min-height: 330px; }
.post-card .post-meta { font-size: .66rem; }
.post-card h2, .post-card h3 { margin-bottom: 20px; font-size: clamp(1.3rem, 1.8vw, 1.65rem); overflow-wrap: normal; word-break: normal; hyphens: auto; }
.post-card h2 a, .post-card h3 a { text-decoration: none; }
.post-card h2 a:hover, .post-card h3 a:hover { color: var(--acid); }
.post-card p, .card p, .card li { color: var(--muted); overflow-wrap: anywhere; }
.post-card img { width: calc(100% + 56px); max-width: none; margin: -28px -28px 24px; aspect-ratio: 16 / 9; object-fit: cover; }
.text-link { margin-top: auto; padding-top: 20px; color: var(--acid); font: .74rem ui-monospace, monospace; text-decoration: none; }
.all-posts { margin-top: 28px; }

.cta-section { position: relative; overflow: hidden; padding: 104px 0; background: var(--acid); color: #0a0b08; }
.cta-section::before { position: absolute; inset: 0; opacity: .12; background-image: linear-gradient(to right, #000 1px, transparent 1px), linear-gradient(to bottom, #000 1px, transparent 1px); background-size: 40px 40px; content: ""; }
.cta-inner { position: relative; }
.cta-section .eyebrow { color: #22270d; }
.cta-section h2 { max-width: 980px; margin-bottom: 24px; }
.cta-section p { max-width: 720px; font-size: 1.08rem; }
.cta-mail { align-self: center; font: 700 .76rem ui-monospace, monospace; }

.site-footer { padding: 82px 0 26px; border-top: 1px solid var(--border); background: #070807; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 52px; }
.site-footer h2 { color: #fff; font-size: .88rem; letter-spacing: 0; }
.footer-brand h2 { margin-bottom: 18px; font-size: 1.65rem; }
.footer-brand p { max-width: 430px; }
.site-footer p { font-size: .88rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--acid); }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 58px; padding-top: 22px; border-top: 1px solid var(--border); font: .7rem ui-monospace, monospace; }
.site-version { color: #b9bab4; text-transform: uppercase; }
.system-online { display: flex; align-items: center; gap: 8px; color: var(--acid); text-transform: uppercase; }

.article { max-width: 840px; padding: 96px 0; }
.article h1 { font-size: clamp(2.5rem, 6vw, 4.8rem); overflow-wrap: normal; hyphens: auto; }
.article-content { color: #d4d4d0; font-size: 1.08rem; }
.article-content h2, .article-content h3 { margin-top: 52px; color: #fff; }
.article-content h2 { font-size: clamp(1.8rem, 3.5vw, 2.65rem); }
.article-content h3 { font-size: clamp(1.3rem, 2.2vw, 1.65rem); }
.article-content a { color: var(--acid); }
.article-content pre { overflow-x: auto; padding: 20px; background: #000; }
.article-content blockquote { margin: 32px 0; padding: 20px 24px; border-left: 3px solid var(--acid); background: var(--surface); }
.article-content ol, .article-content ul { padding-left: 24px; }
.legal-page { max-width: 920px; }
.legal-meta { color: var(--acid); font: .75rem ui-monospace, SFMono-Regular, Consolas, monospace; text-transform: uppercase; }
.legal-intro { color: #f0f1eb; font-size: 1.2rem; }
.legal-note { margin: 32px 0; padding: 22px 24px; border: 1px solid var(--border-strong); background: var(--surface); color: #d7d8d2; }
.legal-note strong { color: var(--acid); }
.error-page { display: flex; align-items: center; min-height: calc(100vh - 80px); padding: 96px 0; }
.error-content { max-width: 960px; }
.error-content h1 { max-width: 850px; margin-bottom: 24px; }
.error-content p { max-width: 640px; color: var(--muted); font-size: 1.1rem; }
.article figure { margin: 32px 0; }
.article hr { margin: 64px 0; border: 0; border-top: 1px solid var(--border); }
.section-related { margin-top: 80px; }
.pagination { display: flex; justify-content: center; width: 100%; margin-top: 44px; }
.pagination .nav-links { display: flex; width: 100%; justify-content: center; align-items: center; gap: 8px; margin-top: 0; }
.pagination .page-numbers { display: inline-grid; place-items: center; min-width: 42px; min-height: 42px; padding: 8px 13px; border: 1px solid var(--border-strong); border-radius: 3px; background: var(--surface); color: #d7d8d2; font: 700 .74rem/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.pagination a.page-numbers:hover, .pagination a.page-numbers:focus-visible { border-color: var(--acid); background: rgba(217,244,95,.08); color: var(--acid); }
.pagination .page-numbers.current { border-color: var(--acid); background: var(--acid); color: #0b0c08; }
.pagination .prev, .pagination .next { padding-inline: 17px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.nav-links a, .nav-links span { padding: 8px 12px; border: 1px solid var(--border); text-decoration: none; }

@media (min-width: 1101px) {
  .blog-grid > :last-child:nth-child(3n + 1) { grid-column: 2; }
}

.consent-banner { position: fixed; right: 24px; bottom: 24px; z-index: 70; width: min(440px, calc(100% - 32px)); padding: 22px; border: 1px solid var(--border-strong); background: rgba(15,16,15,.96); box-shadow: 0 18px 60px rgba(0,0,0,.55); backdrop-filter: blur(18px); }
.consent-banner p { margin: 0 0 16px; color: #d4d4d0; font-size: .9rem; }
.consent-banner .actions { margin-top: 0; }
.consent-banner[hidden] { display: none; }
.consent-banner button { cursor: pointer; font: inherit; }

@media (max-width: 1100px) {
  .header-cta { display: none; }
  .hero-layout { grid-template-columns: 1.35fr .65fr; gap: 38px; }
  .terminal-window { min-height: 470px; }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1.5fr repeat(3, 1fr); gap: 30px; }
}

@media (max-width: 820px) {
  .container { width: min(calc(100% - 32px), var(--max-width)); }
  .header-inner { min-height: 72px; }
  .brand-copy small { display: none; }
  .site-nav { overflow-x: auto; margin-left: auto; }
  .site-nav ul { gap: 16px; }
  .site-nav li:nth-child(2), .site-nav li:nth-child(4) { display: none; }
  main { padding-top: 72px; }
  .hero { min-height: auto; padding: 80px 0; }
  .hero-layout { grid-template-columns: 1fr; }
  .terminal-window { min-height: 430px; }
  .section { padding: 82px 0; }
  .split-heading, .stack-layout { grid-template-columns: 1fr; gap: 28px; }
  .problem-grid { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: repeat(2, 1fr); row-gap: 42px; }
  .process-grid::before { display: none; }
  .blog-grid { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .post-card { min-height: 0; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  h1 { font-size: clamp(2.4rem, 10.5vw, 3.2rem); }
  h2 { font-size: clamp(2rem, 10vw, 2.8rem); }
  .brand-copy { display: none; }
  .site-nav { overflow: visible; }
  .site-nav ul { gap: 0; }
  .site-nav li { display: none !important; }
  .site-nav li:nth-child(3) { display: block !important; }
  .site-nav a { font-size: .78rem; }
  .hero-layout, .hero-copy, .hero-lead { width: 100%; max-width: 100%; }
  .hero h1 em { display: block; }
  .status-pill b { display: none; }
  .actions .button { width: 100%; }
  .service-grid, .process-grid, .footer-grid { grid-template-columns: 1fr; }
  .terminal-window { min-height: 400px; }
  .terminal-body { padding: 22px; font-size: .68rem; }
  .problem-grid article { min-height: 0; padding: 26px; }
  .tech-console > div { grid-template-columns: 1fr; gap: 8px; }
  .cta-section { padding: 78px 0; }
  .footer-bottom { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
