/* Shared styles for pinewoodleaseandhire.com
   Loaded by index.html and the four legal pages. */

:root {
    --brand: #e65100;
    --background: #faf5ee;
    --surface: #ffffff;
    --on-surface: #3a302a;
    --secondary: #78706a;
    --outline-variant: #d8d0c8;
    --header-offset: 88px;
}

/* ---------------------------------------------------------------- anchors */

html {
    scroll-behavior: smooth;
}

/* The header is sticky, so anchor targets must reserve space for it or the
   heading lands underneath the orange bar. */
[id] {
    scroll-margin-top: var(--header-offset);
}

/* ------------------------------------------------------- scroll reveal */

/* Guarded by .js so that if the script never runs the content is simply
   visible rather than stuck at opacity 0. */
.js .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition:
        opacity 1.2s cubic-bezier(0.21, 0.45, 0.32, 0.9),
        transform 1.2s cubic-bezier(0.21, 0.45, 0.32, 0.9);
    will-change: opacity, transform;
}

.js .reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Children cascade in after their section rather than all at once. */
.js .reveal[data-reveal-delay="1"] { transition-delay: 0.12s; }
.js .reveal[data-reveal-delay="2"] { transition-delay: 0.24s; }
.js .reveal[data-reveal-delay="3"] { transition-delay: 0.36s; }
.js .reveal[data-reveal-delay="4"] { transition-delay: 0.48s; }

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .js .reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* --------------------------------------------------------- photo hover */

/* Sits in black and white, returns to colour on hover. Kept in a stylesheet
   rather than an inline style so the hover state can actually win. */
.photo-duotone {
    filter: grayscale(100%);
    transition: filter 0.75s ease-in-out;
}

.photo-duotone:hover,
.photo-duotone:focus-within {
    filter: grayscale(0%);
}

@media (hover: none) {
    .photo-duotone {
        filter: none;
    }
}

/* ------------------------------------------------------- mobile menu */

#mobile-menu[hidden] {
    display: none;
}

/* ================================================================
   Legal pages
   ================================================================ */

.legal-page {
    margin: 0;
    background: var(--background);
    color: var(--on-surface);
    font-family: Manrope, system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.legal-page *,
.legal-page *::before,
.legal-page *::after {
    box-sizing: border-box;
}

.legal-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
}

@media (min-width: 768px) {
    .legal-shell {
        padding: 0 48px;
    }
}

/* Header ---------------------------------------------------------- */

.legal-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--brand);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.legal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 16px;
    padding-bottom: 16px;
}

.legal-wordmark {
    color: #fff;
    font-weight: 300;
    font-size: 1.5rem;
    letter-spacing: 0.05em;
    line-height: 1.2;
    text-decoration: none;
}

.legal-nav-links {
    display: none;
    gap: 24px;
    align-items: center;
}

@media (min-width: 768px) {
    .legal-nav-links {
        display: flex;
    }
}

.legal-nav-links a {
    color: #fff;
    font-family: Inter, system-ui, sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
    padding: 4px 12px;
    transition: background-color 0.2s;
}

.legal-nav-links a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.legal-nav-links a.is-cta {
    background: #fff;
    color: var(--brand);
    padding: 8px 24px;
    border-radius: 8px;
}

.legal-nav-links a.is-cta:hover {
    background: rgba(255, 255, 255, 0.9);
}

.menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 0;
    color: #fff;
    cursor: pointer;
    padding: 4px;
}

@media (min-width: 768px) {
    .menu-toggle {
        display: none;
    }
}

.legal-menu-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--brand);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 24px rgba(58, 48, 42, 0.18);
}

@media (min-width: 768px) {
    .legal-menu-panel {
        display: none;
    }
}

.legal-menu-panel ul {
    list-style: none;
    margin: 0;
    padding: 8px 16px 16px;
}

.legal-menu-panel a {
    display: block;
    padding: 12px 0;
    color: #fff;
    font-family: Inter, system-ui, sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
}

.legal-menu-panel a:hover {
    text-decoration: underline;
}

/* Body ------------------------------------------------------------ */

.legal-main {
    padding: 56px 0 80px;
}

.legal-doc {
    max-width: 800px;
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--outline-variant);
    padding: 32px 24px;
}

@media (min-width: 768px) {
    .legal-doc {
        padding: 56px 64px;
    }
}

.legal-eyebrow {
    display: block;
    font-family: Inter, system-ui, sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: 12px;
}

.legal-doc h1 {
    font-family: Montserrat, system-ui, sans-serif;
    font-size: 32px;
    line-height: 1.25;
    font-weight: 700;
    margin: 0 0 12px;
}

@media (min-width: 768px) {
    .legal-doc h1 {
        font-size: 40px;
    }
}

.legal-lede {
    font-size: 18px;
    line-height: 1.65;
    color: var(--secondary);
    margin: 0 0 8px;
}

.legal-updated {
    font-family: Inter, system-ui, sans-serif;
    font-size: 14px;
    color: var(--secondary);
    margin: 0;
}

.legal-rule {
    border: 0;
    border-top: 1px solid var(--outline-variant);
    margin: 32px 0;
}

.legal-doc h2 {
    font-family: Montserrat, system-ui, sans-serif;
    font-size: 20px;
    line-height: 1.35;
    font-weight: 600;
    margin: 40px 0 12px;
}

.legal-doc h2:first-of-type {
    margin-top: 0;
}

.legal-doc h2 .legal-num {
    color: var(--brand);
    margin-right: 10px;
}

.legal-doc h3 {
    font-family: Inter, system-ui, sans-serif;
    font-size: 16px;
    font-weight: 600;
    margin: 24px 0 8px;
}

.legal-doc p {
    margin: 0 0 16px;
    color: var(--secondary);
}

.legal-doc ul {
    margin: 0 0 16px;
    padding-left: 20px;
    color: var(--secondary);
}

.legal-doc li {
    margin-bottom: 8px;
}

.legal-doc a {
    color: var(--brand);
}

.legal-doc table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 16px;
    font-size: 15px;
    color: var(--secondary);
}

.legal-doc th,
.legal-doc td {
    border: 1px solid var(--outline-variant);
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
}

.legal-doc th {
    background: #f6f0e8;
    color: var(--on-surface);
    font-family: Inter, system-ui, sans-serif;
    font-size: 14px;
    font-weight: 600;
}

.legal-back {
    display: inline-block;
    margin-top: 8px;
    font-family: Inter, system-ui, sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--brand);
}

/* Footer ---------------------------------------------------------- */

.legal-footer {
    background: var(--brand);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 48px 0;
    color: #fff;
}

.legal-footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

@media (min-width: 768px) {
    .legal-footer-inner {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

.legal-footer-name {
    font-family: Montserrat, system-ui, sans-serif;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.legal-footer p {
    margin: 0;
    max-width: 28rem;
    color: rgba(255, 255, 255, 0.8);
}

.legal-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    margin-top: 32px;
}

@media (min-width: 768px) {
    .legal-footer-links {
        margin-top: 0;
    }
}

.legal-footer-links a {
    font-family: Inter, system-ui, sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: underline;
}

.legal-footer-links a:hover,
.legal-footer-links a[aria-current="page"] {
    color: #fff;
}
