/* ==========================================================================
   LOCAL SCAFFOLDING LTD - Base stylesheet
   Design tokens, reset, typography
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
    /* Brand colours */
    --ls-purple: #3B1344;
    --ls-purple-dark: #28092E;
    --ls-purple-light: #F3EAF5;
    --ls-yellow: #F4C518;
    --ls-yellow-dark: #D9AE0E;
    --ls-teal: #1B7A7A;
    --ls-teal-dark: #146060;

    /* Neutrals */
    --ls-text: #1F1F2E;
    --ls-text-muted: #5F5F70;
    --ls-text-light: #8A8A98;
    --ls-white: #FFFFFF;
    --ls-off-white: #F3F3F3;
    --ls-border: #E5E5EC;
    --ls-border-dark: #C8C8D2;

    /* Semantic */
    --ls-success: #1B7A7A;
    --ls-danger: #C0392B;

    /* Typography */
    --ls-font: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;

    /* Spacing scale */
    --ls-space-xs: 4px;
    --ls-space-sm: 8px;
    --ls-space-md: 16px;
    --ls-space-lg: 24px;
    --ls-space-xl: 32px;
    --ls-space-2xl: 48px;
    --ls-space-3xl: 64px;
    --ls-space-4xl: 96px;

    /* Radius */
    --ls-radius-sm: 4px;
    --ls-radius-md: 6px;
    --ls-radius-lg: 10px;
    --ls-radius-xl: 16px;
    --ls-radius-pill: 999px;

    /* Layout */
    --ls-container: 1200px;
    --ls-container-narrow: 960px;

    /* Transitions */
    --ls-transition: 200ms ease;
    --ls-transition-slow: 350ms ease;
}

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

html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    scroll-behavior: smooth;
}

body {
    font-family: var(--ls-font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ls-text);
    background: var(--ls-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

a {
    color: var(--ls-purple);
    text-decoration: none;
    transition: color var(--ls-transition);
}

a:hover {
    color: var(--ls-purple-dark);
}

/* ---------- Typography ---------- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--ls-font);
    font-weight: 700;
    line-height: 1.2;
    color: var(--ls-text);
    letter-spacing: -0.02em;
}

h1 {
    font-size: 2.25rem;
    font-weight: 700;
}

h2 {
    font-size: 1.75rem;
    font-weight: 700;
}

h3 {
    font-size: 1.375rem;
    font-weight: 600;
}

h4 {
    font-size: 1.125rem;
    font-weight: 600;
}

/* Centred heading underline accent.
   Applied to h2, h3, h4 inside section content - NOT inside the hero,
   NOT inside cards, forms, or sidebars where it would clutter.
   Add the class `.ls-heading-underline` to opt-in. */
.ls-heading-underline {
    display: block;
    position: relative;
    padding-bottom: 14px;
    margin-bottom: 18px;
    text-align: center;
}

.ls-heading-underline::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 64px;
    height: 3px;
    border-radius: 2px;
    background: var(--ls-purple);
}

.ls-heading-underline.is-yellow::after {
    background: var(--ls-yellow);
}

.ls-heading-underline.is-teal::after {
    background: var(--ls-teal);
}

.ls-heading-underline.is-short::after {
    width: 40px;
    height: 2px;
}

p {
    margin: 0;
}

/* ---------- Internal links (in body copy) ---------- */
/* Subtle, SEO-friendly link styling. Applied inline within paragraphs.
   Excluded from hero copy via .ls-hero-lede / .ls-home-hero-lede contexts. */
.ls-prose a,
p.ls-prose a {
    color: var(--ls-purple);
    text-decoration: none;
    background-image: linear-gradient(transparent calc(100% - 2px), var(--ls-purple) 2px);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    transition: color var(--ls-transition), background-image var(--ls-transition);
    font-weight: 500;
}

.ls-prose a:hover {
    color: var(--ls-purple-dark);
    background-image: linear-gradient(transparent calc(100% - 2px), var(--ls-purple-dark) 2px);
}

/* ---------- Utility ---------- */
.ls-container {
    width: 100%;
    max-width: var(--ls-container);
    margin: 0 auto;
    padding: 0 var(--ls-space-lg);
}

.ls-container-narrow {
    width: 100%;
    max-width: var(--ls-container-narrow);
    margin: 0 auto;
    padding: 0 var(--ls-space-lg);
}

.ls-section {
    padding: var(--ls-space-3xl) 0;
}

.ls-section-bg-white {
    background: var(--ls-white);
}

.ls-section-bg-offwhite {
    background: var(--ls-off-white);
}

.ls-section-bg-purple-light {
    background: var(--ls-purple-light);
}

.ls-eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--ls-purple);
    margin-bottom: var(--ls-space-md);
}

.ls-eyebrow-teal {
    color: var(--ls-teal);
}

.ls-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;
}

/* ---------- Buttons ---------- */
.ls-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    font-family: var(--ls-font);
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1;
    border-radius: var(--ls-radius-md);
    border: 2px solid transparent;
    cursor: pointer;
    transition: background var(--ls-transition), border-color var(--ls-transition), color var(--ls-transition), transform var(--ls-transition);
    text-decoration: none;
    white-space: nowrap;
}

.ls-btn-primary {
    background: var(--ls-yellow);
    color: var(--ls-text);
    border-color: var(--ls-yellow);
}

.ls-btn-primary:hover {
    background: var(--ls-yellow-dark);
    border-color: var(--ls-yellow-dark);
    color: var(--ls-text);
    transform: translateY(-1px);
}

.ls-btn-secondary {
    background: var(--ls-purple);
    color: var(--ls-white);
    border-color: var(--ls-purple);
}

.ls-btn-secondary:hover {
    background: var(--ls-purple-dark);
    border-color: var(--ls-purple-dark);
    color: var(--ls-white);
    transform: translateY(-1px);
}

.ls-btn-teal {
    background: var(--ls-teal);
    color: var(--ls-white);
    border-color: var(--ls-teal);
}

.ls-btn-teal:hover {
    background: var(--ls-teal-dark);
    border-color: var(--ls-teal-dark);
    color: var(--ls-white);
    transform: translateY(-1px);
}

.ls-btn-white {
    background: var(--ls-white);
    color: var(--ls-purple);
    border-color: var(--ls-white);
}

.ls-btn-white:hover {
    background: var(--ls-off-white);
    border-color: var(--ls-off-white);
    color: var(--ls-purple-dark);
    transform: translateY(-1px);
}

.ls-btn-lg {
    padding: 16px 32px;
    font-size: 1rem;
}

/* ---------- Skip link ---------- */
/* ---------- Shared section header (eyebrow above h2, centred) ---------- */
.ls-section-header {
    text-align: center;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: var(--ls-space-2xl);
}

.ls-section-header .ls-eyebrow {
    display: block;
    margin-bottom: var(--ls-space-sm);
}

.ls-section-header h2 {
    display: inline-block;
    position: relative;
    padding-bottom: 14px;
    margin-bottom: var(--ls-space-md);
}

.ls-section-header h2::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 64px;
    height: 3px;
    border-radius: 2px;
    background: var(--ls-purple);
}

.ls-section-header h2.is-yellow::after {
    background: var(--ls-yellow);
}

.ls-section-header h2.is-teal::after {
    background: var(--ls-teal);
}

.ls-section-header p {
    font-size: 1.0625rem;
    color: var(--ls-text-muted);
    line-height: 1.6;
    margin-left: auto;
    margin-right: auto;
    max-width: 620px;
}

/* ---------- Focus ---------- */
*:focus-visible {
    outline: 2px solid var(--ls-purple);
    outline-offset: 2px;
}

/* ==========================================================================
   RESPONSIVE - base
   Section padding, container padding, section header scale down on smaller screens.
   ========================================================================== */

@media (max-width: 960px) {
    .ls-section {
        padding: var(--ls-space-2xl) 0;
    }

    .ls-section-header {
        margin-bottom: var(--ls-space-xl);
    }

    .ls-section-header h2 {
        font-size: 1.625rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.625rem;
    }
}

@media (max-width: 540px) {
    .ls-container,
    .ls-container-narrow {
        padding: 0 var(--ls-space-md);
    }

    .ls-section {
        padding: var(--ls-space-xl) 0;
    }

    .ls-section-header {
        margin-bottom: var(--ls-space-lg);
    }

    .ls-section-header h2 {
        font-size: 1.5rem;
    }

    .ls-section-header p {
        font-size: 1rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .ls-btn {
        padding: 12px 20px;
        font-size: 0.875rem;
    }

    .ls-btn-lg {
        padding: 14px 24px;
        font-size: 0.9375rem;
    }
}

/* ==========================================================================
   FORM ELEMENTS (shared)
   ========================================================================== */

.ls-form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ls-text);
    margin-bottom: 6px;
}

.ls-form-required {
    color: var(--ls-purple);
    margin-left: 2px;
    font-weight: 700;
}

.ls-form-input,
.ls-form-textarea {
    width: 100%;
    padding: 12px 14px;
    font-family: var(--ls-font);
    font-size: 0.9375rem;
    color: var(--ls-text);
    background: var(--ls-white);
    border: 1px solid var(--ls-border);
    border-radius: var(--ls-radius-md);
    transition: border-color var(--ls-transition), box-shadow var(--ls-transition);
}

.ls-form-input:focus,
.ls-form-textarea:focus {
    outline: none;
    border-color: var(--ls-purple);
    box-shadow: 0 0 0 3px rgba(59, 19, 68, 0.15);
}

.ls-form-input::placeholder,
.ls-form-textarea::placeholder {
    color: var(--ls-text-light);
}

.ls-form-textarea {
    min-height: 140px;
    resize: vertical;
    font-family: var(--ls-font);
    line-height: 1.5;
}

/* Honeypot - visually hidden but available to bots */
.ls-form-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
