/* ==========================================================================
   OrtemicTheme — Main Stylesheet
   Original design preserved. WordPress nav menu + blog styles appended.
   ========================================================================== */

:root {
    --bg: #0f1418;
    --surface: rgba(21, 28, 34, 0.74);
    --surface-strong: rgba(25, 32, 38, 0.9);
    --ink: #eef1eb;
    --muted: #a6b0af;
    --accent: #8f5cff;
    --accent-deep: #d2b7ff;
    --line: rgba(238, 241, 235, 0.12);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --page-width: min(1160px, calc(100vw - 48px));
    --font-head: "Space Grotesk", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Manrope", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(143, 92, 255, 0.22), transparent 28%),
        radial-gradient(circle at right center, rgba(84, 116, 255, 0.14), transparent 24%),
        linear-gradient(180deg, #13181c 0%, var(--bg) 45%, #090d10 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
    text-decoration: none;
}

img,
video {
    display: block;
    max-width: 100%;
}

.page-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ─── Header ──────────────────────────────────────────────────────────────── */

.site-header {
    width: var(--page-width);
    margin: 0 auto;
    padding: 24px 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    position: relative;
    z-index: 5;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-head);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent) 0%, #c07cff 100%);
    color: #fff8ee;
    box-shadow: 0 10px 30px rgba(143, 92, 255, 0.35);
}

/* ─── Navigation ──────────────────────────────────────────────────────────── */

.site-nav {
    display: inline-flex;
    align-items: center;
    gap: 28px;
    font-size: 0.98rem;
    color: rgba(238, 241, 235, 0.78);
}

/* WordPress wp_nav_menu outputs a <ul> — reset it to match the original flat layout */
.site-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
}

.site-nav li {
    margin: 0;
    padding: 0;
}

.site-nav a {
    position: relative;
    color: rgba(238, 241, 235, 0.78);
    transition: color 180ms ease;
}

.site-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
    color: var(--ink);
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
    transform: scaleX(1);
}

/* Active / current page item */
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a,
.site-nav .current-menu-ancestor > a {
    color: var(--ink);
}

.site-nav .current-menu-item > a::after,
.site-nav .current_page_item > a::after,
.site-nav .current-menu-ancestor > a::after {
    transform: scaleX(1);
}

/* ─── Hero ────────────────────────────────────────────────────────────────── */

.hero {
    width: var(--page-width);
    margin: 0 auto;
    min-height: calc(100vh - 96px);
    display: grid;
    align-items: end;
    position: relative;
    padding: 24px 0 36px;
}

.hero-media {
    position: absolute;
    inset: 0;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.hero-video,
.hero-image,
.hero-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-video,
.hero-image {
    object-fit: cover;
}

.hero-image {
    display: none;
}

.hero-overlay {
    background:
        linear-gradient(125deg, rgba(4, 8, 11, 0.86) 16%, rgba(4, 8, 11, 0.3) 55%, rgba(4, 8, 11, 0.8) 100%),
        linear-gradient(180deg, rgba(143, 92, 255, 0.16), transparent 32%);
}

.hero-content {
    position: relative;
    z-index: 1;
    color: #fff9f1;
    max-width: 700px;
    padding: clamp(28px, 4vw, 52px);
    animation: rise-in 780ms ease-out both;
}

.eyebrow,
.section-label {
    margin: 0 0 14px;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero h1,
.section-heading h2,
.cta-panel h2 {
    margin: 0;
    font-family: var(--font-head);
    line-height: 0.97;
    letter-spacing: -0.04em;
}

.hero h1 {
    font-size: clamp(3.5rem, 8vw, 6.7rem);
    max-width: 11ch;
}

.hero-copy {
    margin: 24px 0 0;
    max-width: 58ch;
    font-size: 1.12rem;
    line-height: 1.75;
    color: rgba(255, 249, 241, 0.88);
}

.hero-actions,
.hero-metrics,
.service-grid,
.timeline,
.pillars {
    display: grid;
    gap: 18px;
}

.hero-actions {
    margin-top: 34px;
    grid-template-columns: repeat(2, max-content);
}

/* ─── Buttons ─────────────────────────────────────────────────────────────── */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 700;
    transition: transform 180ms ease, background-color 180ms ease, color 180ms ease;
}

.button:hover,
.button:focus-visible {
    transform: translateY(-2px);
}

.button-primary {
    background: linear-gradient(135deg, #c07cff 0%, var(--accent) 100%);
    color: #140d21;
}

.button-secondary {
    border: 1px solid rgba(238, 241, 235, 0.24);
    color: #fff9f1;
    background: rgba(8, 12, 16, 0.22);
    backdrop-filter: blur(16px);
}

/* ─── Hero Metrics ────────────────────────────────────────────────────────── */

.hero-metrics {
    margin: 42px 0 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hero-metrics div {
    padding: 16px 18px;
    border: 1px solid rgba(238, 241, 235, 0.14);
    border-radius: var(--radius-md);
    background: rgba(9, 14, 18, 0.34);
    backdrop-filter: blur(16px);
}

.hero-metrics dt {
    font-family: var(--font-head);
    font-size: 1.1rem;
    font-weight: 700;
}

.hero-metrics dd {
    margin: 8px 0 0;
    color: rgba(255, 249, 241, 0.8);
    line-height: 1.55;
}

/* ─── Sections ────────────────────────────────────────────────────────────── */

.section {
    width: var(--page-width);
    margin: 0 auto;
    padding: 92px 0;
}

.section-heading {
    display: grid;
    gap: 12px;
    margin-bottom: 36px;
}

.section-heading h2,
.cta-panel h2 {
    font-size: clamp(2.2rem, 5vw, 4rem);
    max-width: 14ch;
}

.section-heading p,
.card p,
.timeline p,
.pillar p,
.cta-panel p,
.quote-card p {
    line-height: 1.75;
    color: var(--muted);
}

/* ─── Services ────────────────────────────────────────────────────────────── */

.service-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card,
.timeline article,
.pillar,
.quote-card,
.cta-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
}

.card h3,
.timeline h3,
.pillar h3,
.section-heading h2,
.cta-panel h2,
.quote-card p {
    color: var(--ink);
}

.card {
    padding: 28px;
    min-height: 240px;
}

.card h3,
.timeline h3,
.pillar h3 {
    margin: 0 0 12px;
    font-family: var(--font-head);
    font-size: 1.35rem;
}

/* ─── Approach Band ───────────────────────────────────────────────────────── */

.band {
    position: relative;
}

.band::before {
    content: "";
    position: absolute;
    inset: 32px 0;
    background: rgba(13, 19, 23, 0.48);
    border-top: 1px solid rgba(238, 241, 235, 0.06);
    border-bottom: 1px solid rgba(238, 241, 235, 0.06);
    z-index: -1;
}

.narrow {
    max-width: 740px;
}

.timeline {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.timeline article {
    padding: 28px;
}

.timeline span {
    display: inline-flex;
    margin-bottom: 18px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(143, 92, 255, 0.16);
    color: var(--accent-deep);
    font-weight: 800;
    letter-spacing: 0.08em;
}

/* ─── Results ─────────────────────────────────────────────────────────────── */

.results-layout {
    display: grid;
    grid-template-columns: 1.1fr 1.4fr;
    gap: 24px;
}

.quote-card {
    padding: 34px;
    background: linear-gradient(180deg, rgba(24, 31, 37, 0.96), rgba(15, 19, 23, 0.94));
}

.quote-card p {
    margin: 0;
    font-family: var(--font-head);
    font-size: clamp(1.6rem, 3vw, 2.5rem);
    line-height: 1.18;
    letter-spacing: -0.04em;
    color: #f4ede1;
}

.pillars {
    grid-template-columns: 1fr;
}

.pillar {
    padding: 28px;
}

/* ─── CTA / Contact ───────────────────────────────────────────────────────── */

.cta-section {
    padding-top: 26px;
    padding-bottom: 120px;
}

.cta-panel {
    padding: clamp(28px, 4vw, 48px);
    background:
        radial-gradient(circle at top right, rgba(143, 92, 255, 0.24), transparent 28%),
        linear-gradient(135deg, rgba(23, 31, 37, 0.96), rgba(14, 19, 24, 0.94));
}

.cta-panel p {
    max-width: 58ch;
}

/* ─── Animation ───────────────────────────────────────────────────────────── */

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Site Footer ─────────────────────────────────────────────────────────── */

.site-footer {
    margin-top: auto;
    border-top: 1px solid var(--line);
    padding: 32px 0;
}

.footer-inner {
    width: var(--page-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-head);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--muted);
    transition: color 180ms ease;
}

.footer-brand:hover {
    color: var(--ink);
}

.footer-brand .brand-mark {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
}

.footer-copy {
    font-size: 0.82rem;
    color: var(--muted);
}

/* ─── Blog Archive ────────────────────────────────────────────────────────── */

.blog-wrap {
    width: var(--page-width);
    margin: 0 auto;
    padding-bottom: 100px;
}

.blog-header {
    padding: 72px 0 48px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 56px;
}

.blog-header h1 {
    font-family: var(--font-head);
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 10px;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.blog-header p {
    color: var(--muted);
    margin: 0;
    font-size: 1.05rem;
}

.blog-label {
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent-deep);
    margin: 0 0 14px;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.post-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    transition: transform 200ms ease, box-shadow 200ms ease;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.4);
}

.post-card-thumb {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--surface-strong);
}

.post-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 300ms ease;
}

.post-card:hover .post-card-thumb img {
    transform: scale(1.04);
}

.post-card-body {
    padding: 24px 28px 28px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-card-meta {
    font-size: 0.8rem;
    color: var(--accent-deep);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    margin-bottom: 10px;
}

.post-card-title {
    font-family: var(--font-head);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.35;
    margin: 0 0 10px;
}

.post-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 180ms ease;
}

.post-card-title a:hover {
    color: var(--accent-deep);
}

.post-card-excerpt {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.65;
    flex: 1;
    margin-bottom: 20px;
}

.post-card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.87rem;
    font-weight: 600;
    color: var(--accent-deep);
    text-decoration: none;
    transition: gap 180ms ease, color 180ms ease;
}

.post-card-link:hover {
    gap: 10px;
    color: var(--ink);
}

/* No posts message */
.no-posts {
    text-align: center;
    padding: 80px 24px;
    color: var(--muted);
}

/* ─── Pagination ──────────────────────────────────────────────────────────── */

.pagination-wrap {
    padding: 48px 0 24px;
    display: flex;
    justify-content: center;
}

.pagination-wrap .nav-links {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pagination-wrap .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
    border: 1px solid var(--line);
    transition: all 180ms ease;
}

.pagination-wrap .page-numbers:hover {
    color: var(--ink);
    border-color: var(--accent);
}

.pagination-wrap .page-numbers.current {
    background: var(--accent);
    color: #0f1418;
    border-color: var(--accent);
}

/* ─── Single Post ─────────────────────────────────────────────────────────── */

.post-wrap {
    width: var(--page-width);
    margin: 0 auto;
    padding: 60px 0 100px;
}

.post-layout {
    max-width: 760px;
    margin: 0 auto;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.87rem;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
    margin-bottom: 36px;
    transition: color 180ms ease;
}

.back-link:hover {
    color: var(--ink);
}

.post-eyebrow {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 800;
    color: var(--accent-deep);
    margin: 0 0 16px;
}

.post-title {
    font-family: var(--font-head);
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 700;
    color: var(--ink);
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin: 0 0 28px;
}

.post-hero-image {
    width: 100%;
    border-radius: var(--radius-lg);
    margin-bottom: 48px;
    display: block;
}

.post-content {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.8;
}

.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5 {
    font-family: var(--font-head);
    color: var(--ink);
    margin-top: 2em;
    margin-bottom: 0.5em;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.post-content h2 { font-size: 1.75rem; }
.post-content h3 { font-size: 1.4rem; }
.post-content h4 { font-size: 1.15rem; }

.post-content p { margin-bottom: 1.4em; }

.post-content a {
    color: var(--accent-deep);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 180ms ease;
}

.post-content a:hover { color: var(--ink); }

.post-content ul,
.post-content ol {
    padding-left: 1.5em;
    margin-bottom: 1.4em;
}

.post-content li { margin-bottom: 0.4em; }

.post-content blockquote {
    border-left: 3px solid var(--accent);
    margin: 2em 0;
    padding: 16px 24px;
    background: var(--surface);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    backdrop-filter: blur(10px);
}

.post-content blockquote p {
    font-family: var(--font-head);
    font-size: 1.1rem;
    color: var(--ink);
    font-style: italic;
    margin: 0;
}

.post-content img {
    max-width: 100%;
    border-radius: var(--radius-md);
    margin: 1.5em 0;
}

.post-content code {
    background: var(--surface-strong);
    border: 1px solid var(--line);
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 0.88em;
    color: var(--accent-deep);
}

.post-content pre {
    background: var(--surface-strong);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    overflow-x: auto;
    margin-bottom: 1.4em;
}

.post-content pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.92em;
}

.post-content hr {
    border: none;
    border-top: 1px solid var(--line);
    margin: 2.5em 0;
}

/* Post navigation (prev / next) */
.post-nav {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    border-top: 1px solid var(--line);
    padding-top: 40px;
    margin-top: 60px;
}

.post-nav a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.5;
    transition: color 180ms ease;
    max-width: 46%;
}

.post-nav a:hover { color: var(--ink); }

.post-nav .nav-prev { text-align: left; }
.post-nav .nav-next { text-align: right; margin-left: auto; }

.post-nav-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-deep);
    margin-bottom: 4px;
}

/* ─── Generic Page ────────────────────────────────────────────────────────── */

.page-wrap {
    width: var(--page-width);
    margin: 0 auto;
    padding: 80px 0 100px;
    max-width: 860px;
}

.page-title {
    font-family: var(--font-head);
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 40px;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.page-content {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.8;
}

.page-content h2,
.page-content h3,
.page-content h4 {
    font-family: var(--font-head);
    color: var(--ink);
    margin-top: 2em;
    margin-bottom: 0.5em;
    letter-spacing: -0.02em;
}

.page-content h2 { font-size: 1.75rem; }
.page-content h3 { font-size: 1.4rem; }

.page-content p { margin-bottom: 1.4em; }

.page-content a {
    color: var(--accent-deep);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.page-content ul,
.page-content ol {
    padding-left: 1.5em;
    margin-bottom: 1.4em;
}

/* ─── 404 Page ────────────────────────────────────────────────────────────── */

.not-found {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 24px;
    width: var(--page-width);
    margin: 0 auto;
}

.not-found-code {
    font-family: var(--font-head);
    font-size: clamp(6rem, 18vw, 14rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    line-height: 1;
    letter-spacing: -0.04em;
}

.not-found h2 {
    font-family: var(--font-head);
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    color: var(--ink);
    margin: 16px 0 12px;
    letter-spacing: -0.02em;
}

.not-found p {
    color: var(--muted);
    max-width: 44ch;
    margin: 0 auto 32px;
    line-height: 1.7;
}

/* ─── Responsive Breakpoints ──────────────────────────────────────────────── */

@media (max-width: 1080px) {
    .service-grid,
    .timeline,
    .results-layout {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .results-layout {
        align-items: start;
    }

    .post-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 820px) {
    :root {
        --page-width: min(100vw - 28px, 1000px);
    }

    .site-header {
        padding-top: 18px;
        flex-direction: column;
        align-items: flex-start;
    }

    .site-nav {
        gap: 18px;
        flex-wrap: wrap;
    }

    .site-nav ul {
        gap: 18px;
    }

    .hero {
        min-height: auto;
    }

    .hero h1 {
        font-size: clamp(2.9rem, 13vw, 4.6rem);
    }

    .hero-actions,
    .hero-metrics,
    .service-grid,
    .timeline,
    .results-layout {
        grid-template-columns: 1fr;
    }

    .post-grid {
        grid-template-columns: 1fr;
    }

    .post-nav {
        flex-direction: column;
        gap: 16px;
    }

    .post-nav a {
        max-width: 100%;
        text-align: left !important;
        margin-left: 0 !important;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

@media (max-width: 640px) {
    .hero {
        padding-top: 8px;
    }

    .hero-media {
        min-height: 680px;
    }

    .hero-video {
        display: none;
    }

    .hero-image {
        display: block;
    }

    .hero-content {
        padding: 28px 22px;
    }

    .hero-actions {
        grid-template-columns: 1fr;
    }

    .button {
        width: 100%;
    }

    .section {
        padding: 74px 0;
    }

    .card,
    .timeline article,
    .pillar,
    .quote-card,
    .cta-panel {
        padding: 22px;
    }

    .page-wrap {
        padding-top: 56px;
        padding-bottom: 72px;
    }

    .post-wrap {
        padding-top: 40px;
        padding-bottom: 72px;
    }
}
