/*
Theme Name: Codia Tech
Theme URI: https://codia.tech
Author: Codia Tech
Author URI: https://codia.tech
Description: Custom theme for Codia Tech. Software development, creative design, digital solutions. "Signal" design system, derived from the Codia wordmark.
Version: 1.0.0
Requires at least: 6.3
Tested up to: 6.8
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: codia
*/

/* ============================================================
   CODIA TECH — "Signal" design system
   Tokens, reset, base typography, shared utilities.
   Section styles live in assets/css/components.css.

   Colour is taken from the wordmark itself. The violet-to-cyan
   gradient is rationed: it appears on the mark, the live
   indicator, the row sweep, and nowhere else. Everything else
   is ink, hairline and cool white.
   ============================================================ */

:root {
    /* Surfaces — near-black with a faint blue-violet cast, so it sits with the gradient. */
    --void:        #06060A;
    --void-lift:   #0A0A11;
    --surface:     #0D0D15;
    --surface-2:   #12121C;

    /* Hairlines — the primary structural device of the whole site. */
    --hair:        rgba(255, 255, 255, 0.08);
    --hair-strong: rgba(255, 255, 255, 0.16);
    --hair-faint:  rgba(255, 255, 255, 0.04);

    /* Text — cool whites and greys, never pure #fff on body copy.
       Every grey that carries words clears 4.5:1 against --void.
       --ghost is the one exception: it is only ever used for marks that carry
       no meaning (separator dots, hover arrows), never for text a reader needs. */
    --ice:         #F2F5FA;  /* 17.1:1 */
    --ice-dim:     #C3C8D4;  /* 11.0:1 */
    --mute:        #848B9E;  /*  5.9:1 */
    --mute-deep:   #757C90;  /*  4.9:1 */
    --ghost:       #5B6172;  /*  3.3:1 — decoration only */

    /* Brand gradient, sampled from the wordmark. */
    --violet:      #A64AFF;
    --azure:       #5298FF;
    --cyan:        #00D2FF;
    --cyan-hot:    #00E8FF;
    --dot-violet:  #B224FF;
    --dot-cyan:    #01EEFF;

    --grad:        linear-gradient(90deg, #A64AFF 0%, #7A7DFF 30%, #2FADFF 55%, #04D0FF 78%, #00E8FF 100%);
    --grad-tight:  linear-gradient(90deg, #A64AFF 0%, #2FADFF 55%, #00E8FF 100%);

    /* Status */
    --live:        #33E6A0;

    /* Type */
    --display:     'Jost', 'Century Gothic', 'Futura', system-ui, sans-serif;
    --body:        'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --mono:        'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

    /* Metrics */
    --container:   1240px;
    --measure:     62ch;
    --radius:      2px;
    --radius-lg:   4px;

    --ease:        cubic-bezier(0.22, 1, 0.36, 1);
    --ease-io:     cubic-bezier(0.65, 0, 0.35, 1);
    --t-fast:      160ms var(--ease);
    --t-mid:       320ms var(--ease);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--body);
    font-size: 16px;
    line-height: 1.62;
    color: var(--ice-dim);
    background: var(--void);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

/* ===== Display type — Jost, light, wide. The wordmark's own voice. ===== */

h1, h2, h3 {
    font-family: var(--display);
    font-weight: 300;
    line-height: 1.06;
    color: var(--ice);
    letter-spacing: -0.005em;
    text-wrap: balance;
}

h1 {
    font-size: clamp(2.6rem, 6.4vw, 5.1rem);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2rem, 3.9vw, 3.1rem);
    letter-spacing: -0.015em;
}

h3 {
    font-size: clamp(1.25rem, 1.9vw, 1.6rem);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

h4 {
    font-family: var(--body);
    font-size: 1rem;
    font-weight: 600;
    color: var(--ice);
    line-height: 1.35;
}

p { color: var(--ice-dim); }
p + p { margin-top: 1.1em; }

strong { color: var(--ice); font-weight: 600; }

a {
    color: var(--ice);
    text-decoration: none;
    transition: color var(--t-fast), opacity var(--t-fast);
}

img, svg { max-width: 100%; display: block; }
img { height: auto; }

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

/* ===== Utilities ===== */

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 28px;
}

.section {
    padding-block: clamp(80px, 10vw, 148px);
}

.section--tight { padding-block: clamp(60px, 7vw, 96px); }

.lede {
    font-size: clamp(1.05rem, 1.35vw, 1.25rem);
    line-height: 1.6;
    color: var(--ice-dim);
    max-width: var(--measure);
}

/* The mono eyebrow. Used for every structural label on the site. */
.eyebrow {
    font-family: var(--mono);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--mute);
}

/* Section head: hairline rule + mono label, sitting above the heading. */
.rule-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--hair);
    margin-bottom: clamp(36px, 4.5vw, 64px);
}

.rule-head__count {
    font-family: var(--mono);
    font-size: 0.6875rem;
    letter-spacing: 0.12em;
    color: var(--mute-deep);
    white-space: nowrap;
}

/* Gradient text. Reserved for the single accented word in a heading. */
.grad-text {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

/* ===== Buttons — flat, hairline, no gradient fills. ===== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 15px 26px;
    border: 1px solid var(--hair-strong);
    border-radius: var(--radius);
    background: transparent;
    color: var(--ice);
    cursor: pointer;
    transition: border-color var(--t-fast), background-color var(--t-fast), color var(--t-fast);
    line-height: 1;
    white-space: nowrap;
}

.btn:hover {
    border-color: var(--ice);
    background: var(--ice);
    color: var(--void);
}

.btn--ghost { border-color: var(--hair); color: var(--mute); }
.btn--ghost:hover { border-color: var(--hair-strong); background: transparent; color: var(--ice); }

.btn__arrow { transition: transform var(--t-fast); }
.btn:hover .btn__arrow { transform: translateX(3px); }

/* ===== Accessibility floor ===== */

.skip-link {
    position: absolute;
    left: -9999px;
    top: 8px;
    background: var(--ice);
    color: var(--void);
    padding: 12px 18px;
    z-index: 10000;
    font-family: var(--mono);
    font-size: 0.75rem;
}
.skip-link:focus { left: 12px; }

:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 3px;
    border-radius: 1px;
}

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        /* Zero the delay too. Killing only the duration still leaves the
           manifest's staggered boot sequence waiting out its delays, so a
           reduced-motion visitor sits in front of blank rows for half a
           second and gets no animation to show for it. */
        animation-delay: 0ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
