/*
Theme Name: Laydn
Theme URI: https://laydn.co.uk
Author: Mako Digital
Author URI: https://makodigital.co.uk
Description: Bespoke WordPress theme for Laydn — the UK freight exchange. Hand-coded, no page builders, inline styles on page templates.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
Text Domain: laydn
*/

/* ============================================================
   BRAND TOKENS
   Volt is the lead accent. Fire secondary. Cyan tertiary.
   ============================================================ */
:root {
    --graphite:   #212121;   /* page background          */
    --graphite-2: #2a2a2a;   /* raised surfaces / cards  */
    --graphite-3: #181818;   /* header / deep panels     */
    --volt:       #C8F135;   /* PRIMARY accent / CTAs     */
    --fire:       #ff5c35;   /* secondary accent          */
    --cyan:       #00C9A7;   /* tertiary / data + status  */
    --white:      #F2F2F2;   /* text / headings           */
    --muted:      rgba(242,242,242,0.55); /* body / secondary text */
    --line:       rgba(242,242,242,0.10); /* hairline borders      */

    --font-head:  "Anta", system-ui, sans-serif;
    --font-body:  "Inter", system-ui, -apple-system, sans-serif;

    --header-h:   72px;
    --container:  1440px;
    --radius:     10px;
}

/* ============================================================
   RESET / BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

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

html {
    background: #181818;
    min-height: 100%;
}

body {
    margin: 0;
    padding-top: var(--header-h);
    background: transparent;
    color: var(--white);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    font-weight: 400;
    line-height: 1.05;
    margin: 0 0 0.4em;
    letter-spacing: -0.01em;
}

p { margin: 0 0 1.1em; color: var(--muted); }

a { color: var(--volt); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--fire); }

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

::selection { background: var(--volt); color: var(--graphite); }

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

/* ============================================================
   ANIMATED BACKGROUND (Vanta.NET layer)
   Sits behind everything. Body Graphite is the fallback.
   ============================================================ */
#vanta-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: #181818; /* fallback while three/vanta load */
}
#vanta-overlay {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.55); /* darkens the net so content reads cleanly */
}
.site-content,
.site-footer { position: relative; z-index: 1; }

/* ============================================================
   BUTTONS
   ============================================================ */
/* ============================================================
   BUTTONS — global rules, used by the MARKETING SITE ONLY
   (header.php, template-home.php).
   App shell pages declare their own per-page button classes
   (.dash-btn-volt, .post-btn-volt, .ld-btn-primary, .ml-btn-award)
   in their own inline <style> blocks so the cascade can't bite.
   ============================================================ */
.btn,
.btn:link,
.btn:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-family: var(--font-head);
    font-size: 15px;
    line-height: 1;
    padding: 13px 22px;
    border-radius: var(--radius);
    border: 1.5px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.12s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 9px 14px; font-size: 13px; gap: 7px; }
.btn i { font-size: 0.85em; }

.btn.btn-primary,
.btn.btn-primary:link,
.btn.btn-primary:visited,
.btn.btn-primary:hover,
.btn.btn-primary:focus,
.btn.btn-primary:active {
    color: #212121 !important;
    background: #C8F135;
    border-color: #C8F135;
}
.btn.btn-primary:hover,
.btn.btn-primary:focus { background: #d6ff52; border-color: #d6ff52; }
.btn.btn-primary i { color: #212121 !important; }

.btn.btn-ghost,
.btn.btn-ghost:link,
.btn.btn-ghost:visited,
.btn.btn-ghost:hover,
.btn.btn-ghost:focus,
.btn.btn-ghost:active {
    color: #F2F2F2 !important;
    background: transparent;
    border-color: rgba(255,255,255,0.18);
}
.btn.btn-ghost:hover,
.btn.btn-ghost:focus {
    border-color: #C8F135;
    background: rgba(200,241,53,0.04);
}
.btn.btn-ghost i { color: #C8F135 !important; }

/* ============================================================
   HEADER (fixed) + SLIDE-OUT DRAWER
   ============================================================ */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-h);
    z-index: 1000;
    background: rgba(24,24,24,0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    transition: border-color 0.2s ease, background 0.2s ease;
}
.site-header.scrolled { border-bottom-color: rgba(242,242,242,0.18); }

.header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

/* Brand */
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand:hover { color: var(--white); }
.brand svg { flex: none; }
.brand .wordmark {
    font-family: var(--font-head);
    font-size: 23px;
    letter-spacing: 0.02em;
    color: var(--white);
    line-height: 1;
}

/* Desktop nav */
.primary-nav { display: flex; align-items: center; gap: 30px; }
.primary-nav ul {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
    margin: 0; padding: 0;
}
.primary-nav a {
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
    color: var(--muted);
    position: relative;
}
.primary-nav a:hover { color: var(--white); }
.primary-nav .current-menu-item > a { color: var(--white); }

.header-actions { display: flex; align-items: center; gap: 14px; }
.header-actions .login {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 15px;
    color: var(--white);
}
.header-actions .login:hover { color: var(--volt); }

/* Hamburger */
.nav-toggle {
    display: none;
    background: none;
    border: 0;
    color: var(--white);
    font-size: 24px;
    cursor: pointer;
    padding: 6px;
    line-height: 1;
}

/* Drawer */
.drawer {
    position: fixed;
    top: 0; right: 0;
    width: min(86vw, 360px);
    height: 100%;
    background: var(--graphite-3);
    border-left: 1px solid var(--line);
    z-index: 1100;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    padding: 24px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.drawer-close { background: none; border: 0; color: var(--white); font-size: 26px; cursor: pointer; line-height: 1; }
.drawer ul { list-style: none; margin: 0 0 24px; padding: 0; }
.drawer li { border-bottom: 1px solid var(--line); }
.drawer li a {
    display: block;
    padding: 16px 2px;
    font-family: var(--font-head);
    font-size: 20px;
    color: var(--white);
}
.drawer li a:hover { color: var(--volt); }
.drawer .drawer-cta { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.drawer .drawer-cta .btn { justify-content: center; }

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.overlay.open { opacity: 1; visibility: visible; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: var(--graphite-3);
    border-top: 1px solid var(--line);
    padding: 56px 0 28px;
    margin-top: 80px;
}
.footer-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 32px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--line);
}
.footer-brand { max-width: 320px; }
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand p { font-size: 14px; color: var(--muted); margin: 0; }

.footer-cols { display: flex; flex-wrap: wrap; gap: 56px; }
.footer-col h4 {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--volt);
    margin-bottom: 16px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 11px; }
.footer-col a { font-size: 14px; color: var(--muted); }
.footer-col a:hover { color: var(--white); }

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-top: 24px;
}
.footer-bottom p { font-size: 13px; color: var(--muted); margin: 0; }
.mako-credit { font-size: 13px; color: var(--muted); }
.mako-credit a { color: var(--white); font-weight: 500; }
.mako-credit a:hover { color: var(--volt); }

/* ============================================================
   FORMS — shared .laydn-form rules used by signup, post-load, etc.
   ============================================================ */
.laydn-form-grid { display:grid; gap:18px; }
.laydn-form-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.laydn-form-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.laydn-form-grid.cols-route { grid-template-columns: 2fr 1fr; }
@media (max-width: 720px) {
    .laydn-form-grid.cols-2,
    .laydn-form-grid.cols-3,
    .laydn-form-grid.cols-route { grid-template-columns: 1fr; }
}

.laydn-form label {
    display: block;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
}
.laydn-form label .req { color: var(--volt); margin-left: 4px; }

.laydn-form input[type="text"],
.laydn-form input[type="password"],
.laydn-form input[type="number"],
.laydn-form input[type="tel"],
.laydn-form input[type="email"],
.laydn-form input[type="date"],
.laydn-form input[type="time"],
.laydn-form select,
.laydn-form textarea {
    width: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--line);
    color: var(--white);
    font-family: var(--font-body);
    font-size: 15px;
    padding: 12px 14px;
    border-radius: 8px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
}
.laydn-form textarea { font-family: var(--font-body); line-height: 1.55; min-height: 90px; resize: vertical; }

.laydn-form input:focus,
.laydn-form select:focus,
.laydn-form textarea:focus {
    outline: 0;
    border-color: var(--volt);
    background: rgba(255,255,255,0.06);
    box-shadow: 0 0 0 3px rgba(200,241,53,0.15);
}

.laydn-form input::placeholder,
.laydn-form textarea::placeholder { color: rgba(242,242,242,0.35); }

.laydn-form input[type="date"]::-webkit-calendar-picker-indicator,
.laydn-form input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(1) brightness(0.85); cursor: pointer;
}

.laydn-form select {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'><path fill='%23C8F135' d='M7 8L0 0h14z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
}
.laydn-form select option { background: #181818; color: var(--white); }

.laydn-form .helper {
    display: block; margin-top: 6px;
    font-size: 12px; color: rgba(242,242,242,0.45);
}

.laydn-form .section-head {
    display: flex; align-items: center; gap: 12px;
    margin: 36px 0 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}
.laydn-form .section-head:first-child { margin-top: 0; }
.laydn-form .section-head .num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px;
    border: 1px solid var(--volt);
    border-radius: 50%;
    font-family: var(--font-head); font-size: 13px;
    color: var(--volt);
}
.laydn-form .section-head h3 {
    font-family: var(--font-head);
    font-size: 20px;
    color: var(--white);
    margin: 0;
}

/* Custom checkbox/radio — for terms, remember, user-type radios */
.laydn-form .check-row {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 4px 0;
}
.laydn-form .check-row input[type="checkbox"],
.laydn-form .check-row input[type="radio"] {
    appearance: none; -webkit-appearance: none;
    width: 18px; height: 18px;
    border: 1.5px solid var(--line);
    background: rgba(255,255,255,0.04);
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
    position: relative;
    transition: border-color 0.15s, background 0.15s;
}
.laydn-form .check-row input[type="radio"] { border-radius: 50%; }
.laydn-form .check-row input[type="checkbox"]:checked,
.laydn-form .check-row input[type="radio"]:checked {
    border-color: var(--volt);
    background: var(--volt);
}
.laydn-form .check-row input[type="checkbox"]:checked::after {
    content: ""; position: absolute;
    left: 4px; top: 0px;
    width: 6px; height: 12px;
    border: solid var(--graphite);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.laydn-form .check-row input[type="radio"]:checked::after {
    content: ""; position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: var(--graphite);
}
.laydn-form .check-row label {
    margin: 0;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
    font-size: 14px;
    color: var(--white);
    cursor: pointer;
}

/* ============================================================
   GLASS CARDS — frosted glass surface over the Vanta net
   ============================================================ */
.glass {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ============================================================
   FEATURES GRID — 3 on desktop, 2 on tablet, 1 on mobile
   ============================================================ */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
@media (max-width: 900px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .features-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .primary-nav, .header-actions .login, .header-actions .btn { display: none; }
    .nav-toggle { display: inline-flex; }
    .footer-top { flex-direction: column; }
    .footer-cols { gap: 36px; }
}