/*
Theme Name: MetaKreate Circuit
Theme URI: https://metakreate.space
Author: MetaKreate LLC
Description: A responsive circuit-inspired WordPress theme based on MetaKreate's full-bleed business card identity.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: metakreate-circuit
*/

:root {
  --mk-ink: #001c2d;
  --mk-ink-2: #00354b;
  --mk-panel: rgba(4, 40, 58, .76);
  --mk-cyan: #00b9e8;
  --mk-teal: #18d5d3;
  --mk-ice: #eef9ff;
  --mk-muted: #a8c6d5;
  --mk-line: rgba(0, 185, 232, .46);
  --mk-max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--mk-ice);
  background:
    radial-gradient(circle at 50% -20%, rgba(0, 185, 232, .18), transparent 40rem),
    linear-gradient(145deg, #001725 0%, var(--mk-ink) 48%, #00283b 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  min-height: 100vh;
}
body::before, body::after {
  content: "";
  position: fixed;
  width: 130px;
  height: 130px;
  z-index: -1;
  opacity: .8;
  pointer-events: none;
}
body::before { left: 0; top: 0; border-left: 4px solid var(--mk-cyan); border-top: 4px solid var(--mk-cyan); clip-path: polygon(0 0,100% 0,100% 12%,24% 12%,12% 24%,12% 100%,0 100%); }
body::after { right: 0; bottom: 0; border-right: 4px solid var(--mk-cyan); border-bottom: 4px solid var(--mk-cyan); clip-path: polygon(88% 0,100% 0,100% 100%,0 100%,0 88%,76% 88%,88% 76%); }
a { color: var(--mk-teal); text-underline-offset: .2em; }
a:hover { color: #fff; }
img { max-width: 100%; height: auto; }
.mk-shell { width: min(calc(100% - 2rem), var(--mk-max)); margin-inline: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.screen-reader-text:focus { width: auto; height: auto; clip: auto; z-index: 100000; background: #fff; color: #111; padding: .75rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(0, 28, 45, .88);
  border-bottom: 1px solid var(--mk-line);
  backdrop-filter: blur(16px);
}
.admin-bar .site-header { top: 32px; }
.mk-header-inner { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.site-branding { display: flex; align-items: center; gap: .85rem; color: white; text-decoration: none; min-width: max-content; }
.custom-logo, .mk-logo { width: 54px; height: 54px; object-fit: contain; filter: drop-shadow(0 0 12px rgba(24,213,211,.2)); }
.mk-wordmark { font-size: clamp(1.15rem, 2vw, 1.45rem); letter-spacing: .025em; }
.mk-wordmark strong { color: var(--mk-cyan); font-weight: 500; }
.mk-wordmark small { color: var(--mk-muted); font-size: .64em; }
.mk-menu { display: flex; align-items: center; gap: .3rem 1.35rem; list-style: none; margin: 0; padding: 0; }
.mk-menu li { list-style: none; }
.mk-menu a { color: var(--mk-ice); text-decoration: none; font-size: .92rem; letter-spacing: .03em; }
.mk-menu a:hover, .mk-menu .current-menu-item > a, .mk-menu .current_page_item > a { color: var(--mk-cyan); }
.menu-toggle { display: none; border: 1px solid var(--mk-line); background: rgba(0,185,232,.08); color: #fff; border-radius: 4px; padding: .65rem .8rem; font: inherit; }

.site-main { padding: clamp(3rem, 7vw, 6rem) 0; min-height: 64vh; }
.mk-content { position: relative; }
.mk-page-header { margin: 0 0 2.2rem; max-width: 850px; }
.mk-eyebrow { color: var(--mk-cyan); text-transform: uppercase; letter-spacing: .18em; font-size: .76rem; font-weight: 700; }
h1, h2, h3, h4 { color: #fff; line-height: 1.16; letter-spacing: -.02em; }
h1 { font-size: clamp(2.35rem, 6vw, 4.8rem); margin: .35rem 0 1rem; font-weight: 650; }
h2 { font-size: clamp(1.65rem, 3.6vw, 2.65rem); margin-top: 2.3rem; }
h3 { font-size: clamp(1.25rem, 2.4vw, 1.7rem); }
.entry-content > :first-child { margin-top: 0; }
.entry-content > * { max-width: 900px; }
.entry-content > .alignwide { max-width: 1100px; }
.entry-content > .alignfull { max-width: none; width: 100vw; margin-left: calc(50% - 50vw); }
.entry-content p, .entry-summary { color: #d7e9f1; }
.entry-content hr { border: 0; height: 1px; background: linear-gradient(90deg, var(--mk-cyan), transparent); margin: 2.5rem 0; }
.entry-content blockquote { margin: 2rem 0; padding: .4rem 0 .4rem 1.3rem; border-left: 3px solid var(--mk-teal); color: var(--mk-muted); }

.mk-panel, .entry-content > .wp-block-group, .post-card {
  position: relative;
  background: linear-gradient(135deg, rgba(5,52,72,.86), rgba(0,24,39,.9));
  border: 1px solid rgba(0,185,232,.28);
  border-radius: 7px;
  box-shadow: 0 24px 60px rgba(0,0,0,.28), inset 0 1px rgba(255,255,255,.035);
  padding: clamp(1.3rem, 3vw, 2.5rem);
}
.entry-content > .wp-block-group::before, .post-card::before {
  content: ""; position: absolute; inset: 10px; border: 1px solid rgba(24,213,211,.12); pointer-events: none;
  clip-path: polygon(0 0,46px 0,58px 12px,100% 12px,100% 100%,0 100%);
}
.wp-block-button__link, .mk-button, button, input[type="submit"] {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--mk-cyan); border-radius: 3px;
  background: linear-gradient(135deg, var(--mk-cyan), #008cb8);
  color: #001927; text-decoration: none; font-weight: 750; letter-spacing: .025em;
  padding: .8rem 1.15rem; box-shadow: 0 0 22px rgba(0,185,232,.17); transition: .2s ease;
}
.wp-block-button__link:hover, .mk-button:hover, input[type="submit"]:hover { color: #001927; transform: translateY(-2px); box-shadow: 0 0 30px rgba(0,185,232,.3); }
.wp-block-image img, .wic-thumb-frontend { border-radius: 5px; border: 1px solid rgba(0,185,232,.28); }
.wp-block-gallery, .wic-gallery-grid { gap: 1rem; }
input, textarea, select { width: 100%; max-width: 680px; padding: .85rem 1rem; color: #fff; background: rgba(0,18,30,.8); border: 1px solid rgba(0,185,232,.4); border-radius: 4px; font: inherit; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--mk-teal); outline-offset: 2px; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,300px),1fr)); gap: 1.25rem; }
.post-card h2 { margin: .3rem 0 .8rem; font-size: 1.55rem; }
.post-card h2 a { color: #fff; text-decoration: none; }
.post-card h2 a:hover { color: var(--mk-cyan); }
.entry-meta { color: var(--mk-muted); font-size: .82rem; letter-spacing: .04em; text-transform: uppercase; }
.navigation.pagination { margin-top: 2rem; }

.site-footer { position: relative; margin-top: 3rem; border-top: 1px solid var(--mk-line); background: rgba(0,15,26,.72); }
.site-footer::before { content: ""; display: block; width: min(70%, 680px); height: 2px; background: linear-gradient(90deg, transparent, var(--mk-cyan), transparent); margin: -1px auto 0; }
.mk-footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 2rem; padding: 3rem 0; }
.mk-footer-title { color: #fff; font-size: 1.1rem; margin: 0 0 .8rem; }
.mk-footer-copy, .mk-footer-meta { color: var(--mk-muted); font-size: .9rem; }
.mk-footer-menu { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.mk-footer-menu a { text-decoration: none; }
.mk-footer-bottom { border-top: 1px solid rgba(0,185,232,.16); padding: 1rem 0; text-align: center; color: var(--mk-muted); font-size: .8rem; }

@media (max-width: 820px) {
  .admin-bar .site-header { top: 46px; }
  .menu-toggle { display: inline-flex; }
  .primary-navigation { display: none; position: absolute; top: 78px; left: 0; right: 0; background: rgba(0,24,39,.98); border-bottom: 1px solid var(--mk-line); padding: 1rem; }
  .primary-navigation.is-open { display: block; }
  .mk-menu { width: min(calc(100% - 2rem), var(--mk-max)); margin: auto; align-items: stretch; flex-direction: column; }
  .mk-menu a { display: block; padding: .55rem 0; }
  .mk-footer-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
