/*
Theme Name: Pixenco Studio v2
Theme URI: https://pixencostudio.com
Author: Pixenco Studio
Description: Dark, fast, custom-coded theme for Pixenco Studio. Built on the design-system/pixenco/MASTER.md tokens. No page builder, no CSS framework, no CDN scripts.
Version: 2.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pixenco-studio
*/

/*
 * Design tokens come from design-system/pixenco/MASTER.md (UI/UX Pro Max).
 * The brief asked for this system, so the catalog tells it matches are intentional:
 * avoid-ai-design-ignore-file: SD2, T2
 */
:root {
    --bg: #000000;
    --fg: #fafafa;
    --card: #0c0c0c;
    --muted: #94a3b8;
    --border: #3f3f46;
    --accent: #f8fafc;
    --on-accent: #0f172a;
    --ring: #ffffff;
    --signal: #40b48f; /* Pixenco teal: logo slashes, active states, links. Not a CTA colour. */

    --font-display: 'Archivo', system-ui, sans-serif;
    --font-body: 'Space Grotesk', system-ui, sans-serif;

    --radius: 8px;
    --wrap: 1180px;
    --gutter: clamp(20px, 5vw, 48px);
    --ease: 200ms ease;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; background: var(--bg); }

body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--signal); text-underline-offset: 3px; transition: color var(--ease); }
a:hover { color: var(--fg); }

:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 800;
    line-height: 1.06;
    letter-spacing: -0.025em;
    margin: 0;
    text-wrap: balance;
}

p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.sr-only, .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;
}

.skip-link {
    position: absolute; left: 12px; top: -60px; z-index: 100;
    background: var(--accent); color: var(--on-accent); padding: 10px 16px; border-radius: var(--radius);
}
.skip-link:focus { top: 12px; }

/* Reading progress (chapter indicator for the long page) */
.progress {
    position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60;
    background: var(--signal); transform: scaleX(0); transform-origin: left;
}

/* Scroll reveal: only hides content when script is running */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease-out, transform .5s ease-out; transition-delay: var(--d, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 48px; padding: 0 22px; cursor: pointer;
    font: 600 1rem/1 var(--font-body);
    border: 1.5px solid transparent; border-radius: var(--radius);
    text-decoration: none;
    transition: background-color var(--ease), color var(--ease), border-color var(--ease);
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: #fff; color: var(--on-accent); }
.btn-ghost { border-color: #71717a; color: var(--fg); background: transparent; }
.btn-ghost:hover { border-color: var(--fg); color: var(--fg); }
.btn-dark { background: var(--on-accent); color: #fff; }
.btn-dark:hover { background: #000; color: #fff; }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: .95rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: wait; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--border); }
.header-row { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.brand { display: inline-flex; align-items: center; color: var(--fg); text-decoration: none; }
.brand-mark { width: 120px; height: 30px; }
.brand-mark text { font: 800 38px var(--font-display); letter-spacing: -1px; fill: currentColor; }

.site-nav { display: flex; align-items: center; gap: 28px; }
.nav-list { display: flex; gap: 28px; }
.nav-list a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: .98rem; }
.nav-list a:hover,
.nav-list a[aria-current="page"],
.nav-list .current-menu-item > a { color: var(--fg); }
.nav-list a[aria-current="page"],
.nav-list .current-menu-item > a { text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 8px; }
.nav-cta { min-height: 44px; padding: 0 18px; font-size: .95rem; }

.menu-toggle { display: none; width: 44px; height: 44px; padding: 0; background: none; border: 0; border-radius: var(--radius); cursor: pointer; position: relative; }
.menu-bars, .menu-bars::before, .menu-bars::after {
    content: ''; position: absolute; left: 11px; width: 22px; height: 2px; background: var(--fg); border-radius: 2px;
    transition: transform var(--ease), background-color var(--ease);
}
.menu-bars { top: 21px; }
.menu-bars::before { top: -7px; left: 0; }
.menu-bars::after { top: 7px; left: 0; }
.menu-toggle[aria-expanded="true"] .menu-bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-bars::before { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-bars::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
    .menu-toggle { display: block; }
    .site-nav {
        display: none; position: absolute; top: 72px; left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 8px;
        padding: 8px var(--gutter) 24px; background: var(--bg); border-bottom: 1px solid var(--border);
    }
    .site-nav.is-open { display: flex; }
    .nav-list { flex-direction: column; gap: 0; }
    .nav-list a { display: block; padding: 14px 0; border-bottom: 1px solid var(--border); font-size: 1.05rem; color: var(--fg); }
    .nav-cta { margin-top: 12px; }
}

/* Hero */
.hero { padding: clamp(48px, 8vw, 104px) 0 clamp(56px, 8vw, 96px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 4.6vw, 3.9rem); }
.lead { margin-top: 24px; max-width: 32em; font-size: 1.2rem; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.hero-project { margin: 0; }
.hero-project img { width: 100%; border: 1px solid var(--border); border-radius: var(--radius); }
.hero-project figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 14px; color: var(--muted); font-size: .95rem; }
.hero-project strong { color: var(--fg); font-weight: 600; }

@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }

/* Sections */
.section { padding: clamp(64px, 9vw, 112px) 0; border-top: 1px solid var(--border); }
.section-head { max-width: 40rem; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head h1, .section-head h2 { font-size: clamp(2rem, 4vw, 3rem); }
.section-head p { margin-top: 16px; color: var(--muted); }
.section-foot { margin-top: 40px; }

/* Services: a ruled list, because these are rows of the same kind of thing */
.service-list { border-top: 1px solid var(--fg); }
.service-row {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, .7fr);
    gap: 24px; align-items: baseline;
    padding: 28px 0; border-bottom: 1px solid var(--border);
}
.service-row h3 { font-size: 1.5rem; font-weight: 700; }
.service-row p { color: var(--muted); max-width: 34em; }
.service-tech { color: var(--signal); font-weight: 500; font-size: .95rem; }

@media (max-width: 860px) { .service-row { grid-template-columns: 1fr; gap: 8px; padding: 22px 0; } }

/* Work: screenshots keep their real ratio, so columns instead of a cropped grid */
.work-grid { columns: 3; column-gap: 28px; }
.work-item { break-inside: avoid; margin-bottom: 40px; }
.work-item[hidden] { display: none; }
.work-card { margin: 0; }
.work-shot { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); transition: border-color var(--ease); }
.work-shot img { width: 100%; }
.work-card:hover .work-shot { border-color: var(--fg); }
.work-card figcaption { display: grid; gap: 2px; padding-top: 14px; }
.work-title { font: 700 1.15rem/1.25 var(--font-display); letter-spacing: -0.01em; }
.work-meta { color: var(--muted); font-size: .95rem; }
.work-note { margin-top: 4px; font-size: .95rem; }
.work-link { justify-self: start; margin-top: 6px; font-weight: 500; font-size: .95rem; }

@media (max-width: 960px) { .work-grid { columns: 2; } }
@media (max-width: 560px) { .work-grid { columns: 1; } }

.page-intro { border-top: 0; padding-top: clamp(48px, 7vw, 88px); }
.filters { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-bottom: 36px; border-bottom: 1px solid var(--border); }
.filter {
    min-height: 44px; padding: 0 2px; cursor: pointer;
    font: 600 1rem/1 var(--font-body); color: var(--muted);
    background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px;
    transition: color var(--ease), border-color var(--ease);
}
.filter:hover { color: var(--fg); }
.filter.is-active { color: var(--fg); border-bottom-color: var(--signal); }

/* Packages: a comparison, so a table */
.table-scroll { position: relative; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.table-scroll:focus-visible { outline-offset: 2px; }
.plans { width: 100%; min-width: 760px; border-collapse: collapse; font-size: .98rem; }
.plans th, .plans td { padding: 14px 18px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.plans thead th { vertical-align: top; padding-top: 24px; padding-bottom: 20px; font-weight: 400; }
.plans tbody th { font-weight: 600; color: var(--fg); position: sticky; left: 0; background: var(--bg); }
.plans td { color: var(--fg); }
.plans tbody td:not(.is-best) { color: #cbd5e1; }
.plans tfoot td { border-bottom: 0; padding-top: 20px; padding-bottom: 20px; }
.plans .is-best { background: var(--card); }
.plan-name { display: block; font: 700 1.1rem/1.2 var(--font-display); }
.plan-price { display: block; margin-top: 8px; font: 800 2rem/1 var(--font-display); letter-spacing: -0.03em; }
.plan-price span { margin-right: 6px; font-size: .95rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.plan-best { display: block; margin-top: 8px; color: var(--signal); font-weight: 600; font-size: .9rem; }

/* FAQ */
.faq-layout { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.faq-layout .section-head { margin-bottom: 0; position: sticky; top: 104px; }
.faq-list { border-top: 1px solid var(--fg); }
details { border-bottom: 1px solid var(--border); }
summary {
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
    min-height: 44px; padding: 22px 0; cursor: pointer; list-style: none;
    font: 700 1.2rem/1.3 var(--font-display); letter-spacing: -0.01em;
}
summary::-webkit-details-marker { display: none; }
summary::after {
    content: ''; flex: none; width: 10px; height: 10px;
    border: solid var(--fg); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform var(--ease);
}
details[open] summary::after { transform: rotate(-135deg); }
details p { padding: 0 2rem 24px 0; color: var(--muted); max-width: 40em; }

@media (max-width: 860px) {
    .faq-layout { grid-template-columns: 1fr; }
    .faq-layout .section-head { position: static; margin-bottom: 24px; }
}

/* Contact: the one inverted section, where the page asks for the enquiry */
.section-invert { background: var(--accent); color: var(--on-accent); border-top: 0; --ring: #0f172a; }
.section-invert a { color: var(--on-accent); text-decoration: underline; }
.section-invert a:hover { color: #000; }
.contact-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.contact-copy h2 { font-size: clamp(2rem, 4vw, 3rem); }
.contact-copy p { margin-top: 18px; color: #334155; max-width: 30em; }

.contact-form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
label { font-weight: 600; font-size: .95rem; }
input, select, textarea {
    width: 100%; min-height: 48px; padding: 11px 14px;
    font: 400 1rem/1.4 var(--font-body); color: var(--on-accent);
    background: #fff; border: 1.5px solid #64748b; border-radius: var(--radius);
    transition: border-color var(--ease);
}
textarea { resize: vertical; min-height: 130px; }
input:focus, select:focus, textarea:focus { border-color: var(--on-accent); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: #b91c1c; }
.field-error { color: #b91c1c; font-size: .92rem; font-weight: 500; }
.field-error[hidden] { display: none; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.chips button {
    min-height: 44px; padding: 0 14px; cursor: pointer;
    font: 500 .92rem/1 var(--font-body); color: var(--on-accent);
    background: transparent; border: 1.5px solid #64748b; border-radius: var(--radius);
    transition: border-color var(--ease), background-color var(--ease);
}
.chips button:hover { border-color: var(--on-accent); background: #fff; }

.form-message { padding: 12px 14px; border-radius: var(--radius); font-weight: 500; font-size: .95rem; }
.form-message[hidden] { display: none; }
.form-message.is-ok { background: #dcfce7; color: #14532d; }
.form-message.is-error { background: #fee2e2; color: #7f1d1d; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 28px 0; font-size: .95rem; color: var(--muted); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--fg); text-decoration: none; }
.footer-links a:hover { color: var(--signal); }

/* Plain content (posts, pages, 404) */
.prose { max-width: 46rem; }
.prose h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 20px; }
.prose p, .entry-content > * { margin-bottom: 1.1em; }
.prose .actions { margin-top: 28px; }
.entry-content h2 { font-size: 1.6rem; margin-top: 1.6em; margin-bottom: .6em; }
.entry-meta { color: var(--muted); font-size: .95rem; }
.post-list { border-top: 1px solid var(--fg); margin-top: 28px; }
.post-row { padding: 26px 0; border-bottom: 1px solid var(--border); }
.post-row h2 { font-size: 1.5rem; margin-bottom: 4px; }
.post-row h2 a { color: var(--fg); text-decoration: none; }
.post-row h2 a:hover { color: var(--signal); }
.post-row p:last-child { margin: 8px 0 0; color: var(--muted); }
.nav-links { display: flex; gap: 16px; margin-top: 32px; font-weight: 600; }

/* WordPress core alignment classes */
.aligncenter { display: block; margin: 1.5rem auto; }
.alignleft { float: left; margin: .5rem 1.5rem 1.5rem 0; }
.alignright { float: right; margin: .5rem 0 1.5rem 1.5rem; }
.wp-caption-text { font-size: .9rem; color: var(--muted); }

/* Reduced motion: every chapter renders in its final, readable state */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .progress { display: none; }
    .js .reveal { opacity: 1; transform: none; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
