/* ============================================================
   Tekwaro redesign — shared wireframe system (mid-fi)
   Grayscale + single accent. Type hierarchy real, color minimal.

   Table of contents
   01. Design tokens
   02. Reset & base
   03. Layout — container
   04. Primitives — placeholders
   05. Buttons, chips & eyebrow
   06. Navigation
   07. Navigation — hamburger toggle (mobile)
   08. Page sections
   09. Content components (cards, stats, footer)
   10. Wireframe annotations
   11. Wireframe chrome (frame switcher)
   12. AI assistant widget
   13. Accessibility — skip link
   14. Consent banner
   15. Scroll-to-top button
   16. Responsive — tablet (≤760px)
   17. Responsive — phone (≤480px)
   ============================================================ */

/* ============================================================
   01. Design tokens
   ============================================================ */
:root {
    /* warm charcoal neutral scale — Tekwaro brand (#4A4747) */
    --ink: #4a4747;
    --ink-deep: #36302f;
    --ink-2: #6a615f;
    --slate-700: #5a5251;
    --slate-500: #837a78;
    --slate-400: #a89f9d;
    --slate-300: #cdc5c3;
    --slate-200: #e4dedc;
    --slate-100: #f1eceb;
    --slate-50: #faf7f6;
    --paper: #ffffff;

    /* primary action / emphasis — Tekwaro brand red */
    --accent: #2a5b8c;
    --accent-ink: #1f4368;
    --accent-50: #eaf0f6;

    /* brand decorative palette */
    --amber: #e7a555;
    --amber-ink: #b9742c;
    --amber-50: #fbf0e1;
    --blue: #7db6d5;
    --blue-ink: #3f7e9e;
    --blue-50: #e8f2f8;
    --yellow: #f9ea99;
    --yellow-50: #fdf8e2;

    /* wireframe annotation color — deliberately off-brand (violet) so notes read as markup */
    --note: #6d28d9;

    /* layout */
    --maxw: 1200px;
    --radius: 4px;
    --gap: 24px;

    /* type */
    --font-head: "Space Grotesk", system-ui, sans-serif;
    --font-body: "IBM Plex Sans", system-ui, sans-serif;
    --font-mono: "IBM Plex Mono", ui-monospace, monospace;
    --font-note: "Caveat", cursive;
}

/* ============================================================
   02. Reset & base
   ============================================================ */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding-bottom: 64px; /* room for chrome toolbar */
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--paper);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
    margin: 0;
    font-family: var(--font-head);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.01em;
}

p {
    margin: 0;
}

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

/* ============================================================
   03. Layout — container
   ============================================================ */
.container {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 0px;
}

/* ============================================================
   04. Primitives — placeholders
   ============================================================ */
.ph {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0;
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius);
    color: var(--slate-500);
    font-family: var(--font-mono);
    font-size: 12px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
/* faint crosshatch for media placeholders */
.ph.media {
    background-image: repeating-linear-gradient(
            45deg,
            var(--slate-100) 0 10px,
            var(--slate-50) 10px 20px
    );
}
.ph.dark {
    background: var(--ink);
    border-color: var(--ink-2);
    color: var(--slate-400);
}
.ph.dark.media {
    background-image: repeating-linear-gradient(45deg, #565150 0 12px, #4a4747 12px 24px);
}
.ph .ph-label {
    padding: 4px 10px;
    background: var(--paper);
    border: 1px solid var(--slate-200);
    border-radius: 2px;
}
.ph.dark .ph-label {
    background: rgba(0, 0, 0, 0.4);
    border-color: var(--ink-2);
}

.icon-ph {
    display: grid;
    flex: none;
    place-items: center;
    width: 44px;
    height: 44px;
    background: var(--slate-100);
    border: 1px solid var(--slate-200);
    border-radius: 8px;
    color: var(--slate-400);
    font-family: var(--font-mono);
    font-size: 18px;
}
/* brand-tinted icon tiles */
.icon-ph.i-amber {
    background: var(--amber-50);
    border-color: #eccfa3;
    color: var(--amber-ink);
}
.icon-ph.i-blue {
    background: var(--blue-50);
    border-color: #bcdaea;
    color: var(--blue-ink);
}
.icon-ph.i-red {
    background: var(--accent-50);
    border-color: #e7c4c3;
    color: var(--accent);
}
.icon-ph.i-yellow {
    background: var(--yellow-50);
    border-color: #ecd98a;
    color: #a98b1f;
}

/* ============================================================
   05. Buttons, chips & eyebrow
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    background: transparent;
    border: 1px solid var(--ink);
    border-radius: var(--radius);
    color: var(--ink);
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 14px;
    line-height: 1;
    white-space: nowrap;
}
.btn.solid {
    background: var(--ink);
    color: #fff;
}
.btn.accent {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.btn.ghost {
    border-color: var(--slate-300);
    color: var(--slate-700);
}
.btn.lg {
    padding: 15px 28px;
    font-size: 15px;
}
.btn.on-dark {
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}
.btn.on-dark.solid {
    background: #fff;
    border-color: #fff;
    color: var(--ink);
}

.chip {
    display: inline-block;
    padding: 5px 11px;
    background: var(--accent-50);
    border: 1px solid #d9e0fd;
    border-radius: 100px;
    color: var(--accent-ink);
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.eyebrow {
    margin-bottom: 18px;
    color: var(--slate-500);
    font-family: var(--font-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

/* ============================================================
   06. Navigation
   ============================================================ */
.nav {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.86);
    border-bottom: 1px solid var(--slate-200);
    backdrop-filter: blur(10px);
}
.nav .row {
    display: flex;
    align-items: center;
    gap: 32px;
    height: 72px;
    max-width: none;
    width: 100%;
    padding: 0 32px; /* small breathing room from the literal edge */
}
.nav .links {
    display: flex;
    gap: 42px;
}

 .nav .links a {
    color: var(--slate-700);
    font-size: 14px;
    font-weight: 500;
}
.nav .links a:hover,
.nav .links a.active {
    color: var(--accent);
}
.nav .spacer {
    flex: 1;
}
.nav .actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* logo */
.logo {
    display: flex;
    align-items: center;
    /*gap: 11px;*/
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 19px;
    letter-spacing: -0.02em;
}
.logo .mark {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    background: var(--ink);
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
}
.logo .mark-img {
    display: block;
    width: auto;
    height: 38px;
}
.logo .wordmark {
    color: var(--ink);
}
.nav.dark .logo .wordmark,
.foot .logo .wordmark {
    color: #fff;
}

/* dark nav variant */
.nav.dark {
    background: rgba(20, 23, 28, 0.82);
    border-bottom-color: var(--ink-2);
}
.nav.dark .logo {
    color: #fff;
}
.nav.dark .logo .mark {
    background: #fff;
    color: var(--ink);
}
.nav.dark .links a {
    color: var(--slate-300);
}
.nav.dark .links a:hover {
    color: #fff;
}

/* ============================================================
   07. Navigation — hamburger toggle (mobile)
   ============================================================ */
/* Mobile-only nav items — hidden on desktop, shown in hamburger dropdown */
.nav .links .mobile-action {
    display: none;
}

.nav-toggle {
    display: none;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius);
    color: var(--ink);
    cursor: pointer;
}
.nav-toggle:hover {
    background: var(--slate-50);
}
.nav-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.nav-toggle .bars {
    display: flex;
    flex-direction: column;
    gap: 5px;
    pointer-events: none;
}
.nav-toggle .bar {
    display: block;
    width: 20px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition:
            transform 0.2s ease,
            opacity 0.15s ease;
}
.nav-toggle[aria-expanded="true"] .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================
   08. Page sections
   ============================================================ */
section {
    position: relative;
}
.pad {
    padding-top: 96px;
    padding-bottom: 96px;
}
.pad-sm {
    padding-top: 64px;
    padding-bottom: 64px;
}
.section-dark {
    background: var(--ink);
    color: #fff;
}
.section-dark h1,
.section-dark h2,
.section-dark h3 {
    color: #fff;
}
.section-tint {
    background: var(--slate-50);
}

.lead {
    color: var(--slate-700);
    font-size: 20px;
    line-height: 1.6;
}
.section-dark .lead {
    color: var(--slate-300);
}

/* ============================================================
   09. Content components (cards, stats, footer)
   ============================================================ */
/* card grid */
.grid {
    display: grid;
    gap: var(--gap);
}
.card {
    padding: 28px;
    background: var(--paper);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius);
}
.card.tint {
    background: var(--slate-50);
}
.card h3 {
    margin-bottom: 8px;
    font-size: 19px;
}
.card p {
    color: var(--slate-500);
    font-size: 14.5px;
}

/* stats band */
.stat .num {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 56px;
    line-height: 1;
    letter-spacing: -0.03em;
}
.stat .lbl {
    margin-top: 12px;
    color: var(--slate-500);
    font-family: var(--font-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.section-dark .stat .lbl {
    color: var(--slate-400);
}

/* footer */
.foot {
    padding: 72px 0 40px;
    background: var(--ink);
    color: var(--slate-300);
}
.foot h4 {
    margin-bottom: 16px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.foot a {
    display: block;
    padding: 5px 0;
    color: var(--slate-400);
    font-size: 14px;
}
.foot a:hover {
    color: #fff;
}
.foot .bottom {
    display: flex;
    justify-content: space-between;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--ink-2);
    color: var(--slate-500);
    font-size: 13px;
}

/* ============================================================
   10. Wireframe annotations
   ============================================================ */
.note {
    position: absolute;
    z-index: 30;
    max-width: 220px;
    color: var(--note);
    font-family: var(--font-note);
    font-size: 18px;
    line-height: 1.2;
    pointer-events: none;
}
.note::before {
    content: "✎ ";
    font-family: var(--font-mono);
    font-size: 12px;
}
.note.b {
    /* boxed flag */
    padding: 6px 10px;
    background: #fff5ef;
    border: 1px dashed var(--note);
    border-radius: 4px;
    font-size: 15px;
}
body.no-notes .note {
    display: none;
}

/* annotation tag inline (for placeholders) */
.tag {
    color: var(--note);
    font-family: var(--font-note);
    font-size: 16px;
}
body.no-notes .tag {
    display: none;
}

/* ============================================================
   11. Wireframe chrome (frame switcher)
   ============================================================ */
.wf-chrome {
    position: fixed;
    bottom: 16px;
    left: 50%;
    z-index: 200;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 6px 6px 16px;
    background: var(--ink);
    border-radius: 100px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.28);
    color: #fff;
    font-family: var(--font-body);
    transform: translateX(-50%);
}
.wf-chrome .wf-title {
    margin-right: 8px;
    color: var(--slate-400);
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.wf-chrome a {
    padding: 7px 13px;
    border-radius: 100px;
    color: var(--slate-300);
    font-size: 12.5px;
    font-weight: 500;
    white-space: nowrap;
}
.wf-chrome a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}
.wf-chrome a.cur {
    background: #fff;
    color: var(--ink);
    font-weight: 600;
}
.wf-chrome .div {
    width: 1px;
    height: 20px;
    margin: 0 4px;
    background: var(--ink-2);
}
.wf-chrome .toggle {
    padding: 7px 12px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 100px;
    color: var(--slate-300);
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.04em;
    user-select: none;
}
.wf-chrome .toggle .dot {
    color: var(--note);
}
body.no-notes .wf-chrome .toggle .dot {
    color: var(--slate-500);
}

/* ============================================================
   12. AI assistant widget
   ============================================================ */
.ai-fab {
    position: fixed;
    right: 24px;
    bottom: 84px;
    z-index: 150;
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    background: var(--accent);
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 10px 28px rgba(42, 91, 140, 0.4);
    color: #fff;
    cursor: pointer;
}
.ai-fab .av {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 18px;
}
.ai-fab .pulse {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 14px;
    height: 14px;
    background: #29c267;
    border: 2px solid #fff;
    border-radius: 50%;
}

.ai-win {
    position: fixed;
    right: 24px;
    bottom: 84px;
    z-index: 151;
    display: flex;
    flex-direction: column;
    width: 320px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--slate-200);
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}
.ai-win .head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: var(--ink);
    color: #fff;
}
.ai-win .head .av {
    display: grid;
    flex: none;
    place-items: center;
    width: 32px;
    height: 32px;
    background: var(--accent);
    border-radius: 50%;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 13px;
}
.ai-win .head .who {
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.2;
}
.ai-win .head .who small {
    display: block;
    color: var(--slate-400);
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.04em;
}
.ai-win .head .x {
    margin-left: auto;
    color: var(--slate-400);
    font-size: 18px;
    cursor: pointer;
}
.ai-win .body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 150px;
    padding: 16px;
    background: var(--slate-50);
}
.ai-win .ctx {
    color: var(--slate-500);
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.04em;
    text-align: center;
}
.ai-win .input {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: #fff;
    border-top: 1px solid var(--slate-200);
}
.ai-win .input .field {
    flex: 1;
    color: var(--slate-400);
    font-family: var(--font-body);
    font-size: 13px;
}
.ai-win .input .send {
    color: var(--accent-ink);
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.04em;
}

.bubble {
    max-width: 84%;
    padding: 10px 13px;
    border-radius: 14px;
    font-size: 13.5px;
    line-height: 1.45;
}
.bubble.bot {
    align-self: flex-start;
    background: #fff;
    border: 1px solid var(--slate-200);
    border-bottom-left-radius: 4px;
}
.bubble.me {
    align-self: flex-end;
    background: var(--accent);
    border-bottom-right-radius: 4px;
    color: #fff;
}

.ai-notice {
    padding: 8px 12px;
    background: var(--amber-50);
    border: 1px solid #eccfa3;
    border-radius: 6px;
    color: var(--amber-ink);
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.04em;
    text-align: center;
}

/* ============================================================
   13. Accessibility — skip link
   ============================================================ */
.skip-link {
    position: absolute;
    top: 0;
    left: -9999px;
    z-index: 9999;
    padding: 10px 18px;
    background: var(--accent);
    border-radius: 0 0 6px 0;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}
.skip-link:focus {
    left: 0;
    outline: 3px solid var(--accent-ink);
    outline-offset: 2px;
}

/* ============================================================
   14. Consent banner
   ============================================================ */
.consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 18px 40px;
    background: var(--ink-deep);
    border-top: 1px solid var(--ink-2);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.24);
    color: var(--slate-300);
    font-size: 13.5px;
    line-height: 1.5;
}
.consent-banner .consent-msg {
    flex: 1;
}
.consent-banner .consent-msg strong {
    color: #fff;
}
.consent-banner .consent-actions {
    display: flex;
    flex: none;
    gap: 10px;
}
.consent-banner .consent-actions .btn {
    padding: 9px 20px;
    font-size: 13px;
}

/* ============================================================
   15. Scroll-to-top button
   ============================================================ */
.scroll-top {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 140;
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--ink);
    border: 2px solid var(--ink-2);
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
    color: #fff;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    transition:
            background 0.15s,
            transform 0.15s;
}
.scroll-top:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-2px);
}
.scroll-top:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}
.scroll-top.visible {
    display: flex;
}

/* ============================================================
   16. Responsive — tablet (≤760px)
   ============================================================ */
@media (max-width: 760px) {
    /* layout */
    .container {
        padding: 0 20px;
    }

    /* nav → hamburger */
    .nav-toggle {
        display: flex;
        margin-left: auto;
    }
    .nav .spacer {
        display: none;
    }
    .nav .actions {
        display: none;
    }
    /* mobile nav panel — slides down from header */
    .nav .links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 39;
        display: none;
        flex-direction: column;
        gap: 0;
        padding: 8px 20px 20px;
        background: rgba(255, 255, 255, 0.98);
        border-bottom: 1px solid var(--slate-200);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
        backdrop-filter: blur(12px);
    }
    .nav .links.open {
        display: flex;
    }
    .nav .links a {
        display: block;
        padding: 14px 0;
        border-bottom: 1px solid var(--slate-100);
        font-size: 16px;
    }
    .nav .links a:last-child {
        border-bottom: none;
    }
    .nav .actions .btn {
        padding: 9px 16px;
        font-size: 13px;
    }
    /* Register / Login moves into hamburger; hide header action buttons */
    .nav .links .mobile-action {
        display: inline-flex !important;
        align-self: flex-start;
        margin-top: 6px;
        padding: 12px 20px !important;
        border-bottom: none !important;
        color: #ffffff;
    }
    .nav .links .mobile-action:hover {
        color: white;
    }

    /* section padding scale-down: 96px → 56px, 64px → 36px */
    .pad {
        padding-top: 56px;
        padding-bottom: 56px;
    }
    .pad-sm {
        padding-top: 36px;
        padding-bottom: 36px;
    }

    /* 2-col split sections (hero, callout, commitment) → 1-col */
    .resp-split {
        grid-template-columns: 1fr !important;
        gap: 32px !important;
    }
    /* cap placeholder image height when stacked */
    .resp-split .ph {
        max-height: 220px;
    }

    /* pricing / tier 2-col → 1-col (full-width to read each tier properly) */
    .resp-grid-2 {
        grid-template-columns: 1fr !important;
    }

    /* 3-col and 4-col card grids → 2-col at tablet width */
    .resp-grid-3,
    .resp-grid-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* footer: 4-col → 1-col */
    .foot-cols {
        grid-template-columns: 1fr !important;
        gap: 28px !important;
    }

    /* floating chrome */
    .wf-chrome {
        flex-wrap: wrap;
        justify-content: center;
        max-width: calc(100vw - 24px);
    }
    .consent-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        padding: 16px 20px;
    }
}

/* ============================================================
   17. Responsive — phone (≤480px)
   ============================================================ */
@media (max-width: 480px) {
    /* card grids drop from 2-col to 1-col */
    .resp-grid-3,
    .resp-grid-4 {
        grid-template-columns: 1fr !important;
    }
    .resp-stats {
        grid-template-columns: 1fr !important;
        gap: 28px !important;
    }
}