/* ============================================================================
   2% REALTY CORPORATE — THEME STYLESHEET
   Theme: 2-percent-corporate  ·  Plutonium CMS 6.x

   Self-contained: every selector is tp- prefixed so nothing here depends on
   (or collides with) another theme. It loads AFTER the CMS baseline
   (root_values.php / dynamic.php) so it wins on element defaults.

   Contents
     1. Design tokens
     2. Base + typography
     3. Layout helpers
     4. Buttons
     5. Header + navigation
     6. Page banner
     7. Content (CKEditor output)
     8. Panels + forms
     9. Footer
    10. Utilities (fade-in, skip link, 404 / thank-you)
   Home-only and news-only styles live in home.css and news.css.
   ============================================================================ */

/* 1. Design tokens
   Colours are HSL triplets WITHOUT alpha: hsl(var(--tp-green)) / hsla(var(--tp-green), .5)
   ---------------------------------------------------------------------------- */
:root {
    --tp-green:  87, 70%, 43%;
    --tp-navy:   201, 100%, 11%;
    --tp-blue:   199, 100%, 33%;
    --tp-sky:    202, 64%, 43%;
    --tp-yellow: 51, 98%, 50%;
    --tp-orange: 27, 92%, 58%;
    --tp-ink:    203, 82%, 13%;
    --tp-white:  0, 0%, 100%;
    --tp-grey:   210, 20%, 96%;

    --tp-font-body: 'Open Sans', Arial, sans-serif;
    --tp-font-head: 'Montserrat', 'Open Sans', Arial, sans-serif;
    --tp-font-ui:   'Lato', 'Open Sans', Arial, sans-serif;

    --tp-wrap-max: 1700px;
    --tp-gutter: clamp(1rem, 4vw, 2rem);
    --tp-radius: 16px;
    --tp-header-h: 96px;
    --tp-bp-nav: 1024px;
}

/* 2. Base + typography
   ---------------------------------------------------------------------------- */
.tp-body {
    margin: 0;
    padding: 0;
    font-family: var(--tp-font-body);
    font-size: 1rem;
    line-height: 1.55;
    color: hsl(var(--tp-ink));
    background: hsl(var(--tp-white));
    -webkit-font-smoothing: antialiased;
}

.tp-body *,
.tp-body *::before,
.tp-body *::after {
    box-sizing: border-box;
}

.tp-body img,
.tp-body video {
    max-width: 100%;
}

.tp-body h1,
.tp-body h2,
.tp-body h3,
.tp-body h4 {
    font-family: var(--tp-font-head);
    font-weight: 600;
    line-height: 1.2;
    color: hsl(var(--tp-ink));
}

:where(.tp-body) p {
    margin: 0 0 1em;
    font-family: var(--tp-font-body);
}

.tp-body a {
    color: hsl(var(--tp-blue));
}

.tp-body a:hover {
    color: hsl(var(--tp-green));
}

.tp-body :focus-visible {
    outline: 3px solid hsl(var(--tp-yellow));
    outline-offset: 2px;
}

/* 3. Layout helpers
   ---------------------------------------------------------------------------- */
.tp-wrap {
    width: 100%;
    max-width: var(--tp-wrap-max);
    margin: 0 auto;
    padding: 0 var(--tp-gutter);
}

.tp-main {
    display: block;
    min-height: 50vh;
}

.tp-main__inner {
    padding-top: 2rem;
    padding-bottom: 3rem;
}

.tp-page-title {
    text-align: center;
    margin: 0 0 1.2em;
}

/* 4. Buttons
   ---------------------------------------------------------------------------- */
.tp-body .tp-btn {
    display: inline-block;
    border: 0;
    border-radius: var(--tp-radius);
    padding: 0.35em 1.1em;
    font-family: var(--tp-font-ui);
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.tp-body .tp-btn--yellow {
    color: hsl(var(--tp-navy));
    background: hsl(var(--tp-yellow));
}

.tp-body .tp-btn--blue {
    color: hsl(var(--tp-white));
    background: hsl(var(--tp-sky));
}

.tp-body .tp-btn--green {
    color: hsl(var(--tp-white));
    background: hsl(var(--tp-green));
}

.tp-body .tp-btn--yellow:hover,
.tp-body .tp-btn--blue:hover,
.tp-body .tp-btn--green:hover {
    color: hsl(var(--tp-white));
    background: hsl(var(--tp-navy));
}

.tp-body .tp-btn--med {
    min-width: 220px;
}

/* 5. Header + navigation
   ---------------------------------------------------------------------------- */
.tp-skip {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 10001;
    padding: 0.6rem 1rem;
    background: hsl(var(--tp-navy));
    color: hsl(var(--tp-white));
    border-radius: 0 0 8px 8px;
    transition: top 0.15s ease;
}

.tp-body .tp-skip:focus {
    top: 0;
    color: hsl(var(--tp-white));
}

.tp-header {
    position: sticky;
    top: 0;
    z-index: 9999;
    background: hsl(var(--tp-white));
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.35);
}

.tp-header__inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-height: var(--tp-header-h);
}

.tp-logo {
    flex: 0 0 auto;
    display: block;
    line-height: 0;
}

.tp-logo img {
    display: block;
    height: 72px;
    width: auto;
}

.tp-nav {
    flex: 1 1 auto;
}

.tp-nav__list,
.tp-nav__sub {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tp-nav__list {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    align-items: center;
}

.tp-nav__item {
    position: relative;
    margin: 0;
}

.tp-body .tp-nav__link {
    display: block;
    padding: 0.9em 1em;
    font-family: var(--tp-font-head);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
    color: hsl(var(--tp-navy));
    text-decoration: none;
    transition: color 0.15s ease;
}

.tp-body .tp-nav__link:hover,
.tp-body .tp-nav__item.is-active > .tp-nav__link {
    color: hsl(var(--tp-green));
}

.tp-nav__toggle {
    display: none;
}

.tp-nav__sub {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    min-width: 240px;
    padding: 0.4rem 0;
    background: hsla(var(--tp-ink), 0.94);
    border-radius: 0 15px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.tp-nav__sub .tp-nav__sub {
    left: 100%;
    top: 0;
}

.tp-nav__item:hover > .tp-nav__sub,
.tp-nav__item:focus-within > .tp-nav__sub,
.tp-nav__item.is-open > .tp-nav__sub {
    display: block;
}

.tp-body .tp-nav__sub .tp-nav__link {
    color: hsl(var(--tp-white));
    font-weight: 400;
    padding: 0.65em 1.2em;
}

.tp-body .tp-nav__sub .tp-nav__link:hover {
    color: hsl(var(--tp-green));
}

.tp-burger {
    display: none;
    margin-left: auto;
    padding: 0.6rem;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.tp-burger span {
    display: block;
    width: 26px;
    height: 4px;
    margin: 5px 0;
    border-radius: 4px;
    background: hsl(var(--tp-ink));
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.tp-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.tp-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.tp-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

@media (max-width: 1023px) {
    .tp-header__inner {
        flex-wrap: wrap;
        gap: 0.75rem;
        min-height: 72px;
    }

    .tp-logo img {
        height: 52px;
    }

    .tp-burger {
        display: block;
        order: 3;
        margin-left: 0;
    }

    .tp-header__cta {
        order: 2;
        margin-left: auto;
        font-size: 0.9rem;
        padding: 0.25em 0.9em;
    }

    .tp-nav {
        order: 4;
        flex-basis: 100%;
        display: none;
        margin: 0 calc(var(--tp-gutter) * -1);
        max-height: calc(100vh - 72px);
        overflow-y: auto;
        background: linear-gradient(0deg, hsl(var(--tp-ink)) 0%, hsl(var(--tp-sky)) 100%);
    }

    .tp-nav.is-open {
        display: block;
    }

    .tp-nav__list {
        display: block;
    }

    .tp-nav__item {
        display: flex;
        flex-wrap: wrap;
        border-bottom: 1px solid rgba(255, 255, 255, 0.35);
    }

    .tp-body .tp-nav__link,
    .tp-body .tp-nav__sub .tp-nav__link {
        flex: 1 1 0;
        color: hsl(var(--tp-white));
        padding: 0.95em var(--tp-gutter);
    }

    .tp-body .tp-nav__link:hover,
    .tp-body .tp-nav__item.is-active > .tp-nav__link {
        color: hsl(var(--tp-yellow));
    }

    .tp-nav__toggle {
        display: block;
        flex: 0 0 56px;
        position: relative;
        background: transparent;
        border: 0;
        border-left: 1px solid rgba(255, 255, 255, 0.35);
        cursor: pointer;
    }

    .tp-nav__toggle span::before,
    .tp-nav__toggle span::after {
        content: "";
        position: absolute;
        left: 50%;
        top: 50%;
        width: 16px;
        border-top: 3px solid hsl(var(--tp-white));
        transform: translate(-50%, -50%);
        transition: transform 0.2s ease;
    }

    .tp-nav__toggle span::after {
        transform: translate(-50%, -50%) rotate(90deg);
    }

    .tp-nav__item.is-open > .tp-nav__toggle span::after {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    .tp-nav__sub,
    .tp-nav__sub .tp-nav__sub {
        position: static;
        flex: 1 1 100%;
        min-width: 0;
        border-radius: 0;
        box-shadow: none;
        background: hsl(var(--tp-green));
    }

    .tp-nav__item:hover > .tp-nav__sub,
    .tp-nav__item:focus-within > .tp-nav__sub {
        display: none;
    }

    .tp-nav__item.is-open > .tp-nav__sub {
        display: block;
    }

    .tp-nav__sub .tp-nav__item:last-child {
        border-bottom: 0;
    }
}

/* 6. Page banner
   ---------------------------------------------------------------------------- */
.tp-banner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: clamp(180px, 22vw, 340px);
    padding: 2rem var(--tp-gutter);
    background-color: hsl(var(--tp-navy));
    background-image: var(--tp-banner-img);
    background-size: cover;
    background-position: center;
    text-align: center;
}

.tp-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, hsla(var(--tp-navy), 0.15), hsla(var(--tp-navy), 0.6));
}

.tp-body .tp-banner__title {
    position: relative;
    margin: 0;
    color: hsl(var(--tp-white));
    font-size: clamp(1.8rem, 4.5vw, 3.2rem);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

/* 7. Content (CKEditor output)
   ---------------------------------------------------------------------------- */
.tp-prose {
    max-width: 1100px;
    margin: 0 auto;
}

.tp-prose--wide {
    max-width: none;
}

.tp-prose h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin: 0.2em 0 0.6em; }
.tp-prose h2 { font-size: clamp(1.5rem, 3vw, 2rem);   margin: 1.2em 0 0.5em; }
.tp-prose h3 { font-size: 1.3rem;                     margin: 1.2em 0 0.5em; }

.tp-prose ul,
.tp-prose ol {
    margin: 0 0 1em;
    padding-left: 1.4em;
}

.tp-prose li {
    margin-bottom: 0.35em;
}

.tp-prose table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.2em;
}

.tp-prose th,
.tp-prose td {
    padding: 0.6em 0.8em;
    border: 1px solid hsl(var(--tp-grey));
    text-align: left;
}

.tp-prose img {
    height: auto;
}

.tp-prose iframe {
    max-width: 100%;
}

/* 8. Panels + forms
   ---------------------------------------------------------------------------- */
.tp-panel {
    width: min(100%, 1100px);
    margin: 0 auto 2rem;
    padding: 1.4rem;
    border-radius: 0 24px;
    background: hsla(var(--tp-green), 0.7);
}

.tp-panel .tp-page-title {
    margin-bottom: 0.6em;
}

.tp-form {
    margin-top: 1rem;
}

.tp-form__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 1.5rem;
}

.tp-form__field {
    margin: 0 0 0.9rem;
}

.tp-form__field--full {
    grid-column: 1 / -1;
}

.tp-form label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
}

.tp-form input[type="text"],
.tp-form input[type="email"],
.tp-form input[type="tel"],
.tp-form select,
.tp-form textarea {
    width: 100%;
    padding: 0.65em;
    border: 0;
    border-radius: 4px;
    font: inherit;
    color: hsl(var(--tp-ink));
    background: hsl(var(--tp-white));
}

.tp-form textarea {
    min-height: 110px;
    resize: vertical;
}

.tp-form__hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.tp-form__actions {
    text-align: center;
    margin-top: 0.5rem;
}

.tp-form__status {
    margin: 1rem 0 0;
    padding: 0.8em 1em;
    border-radius: 6px;
    font-weight: 600;
    background: hsl(var(--tp-white));
}

.tp-form__status[hidden] {
    display: none;
}

.tp-form__status.is-error {
    color: #b42318;
}

.tp-form__status.is-success {
    color: hsl(var(--tp-navy));
}

@media (max-width: 767px) {
    .tp-form__grid {
        grid-template-columns: 1fr;
    }
}

/* 9. Footer
   ---------------------------------------------------------------------------- */
.tp-footer {
    position: relative;
    z-index: 10;
    background: hsl(var(--tp-white));
}

.tp-hiring {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.35);
}

.tp-hiring__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 1.5rem;
    padding-top: 1.2rem;
    padding-bottom: 1.2rem;
}

.tp-hiring__pitch {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    font-family: var(--tp-font-ui);
    font-size: clamp(1.1rem, 2.5vw, 2.2rem);
    line-height: 1.15;
    color: hsl(var(--tp-sky));
}

.tp-hiring__pitch p {
    margin: 0;
}

.tp-hiring__badge img {
    display: block;
    width: 100px;
    height: auto;
}

.tp-hiring__links {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.6rem;
}

.tp-hiring__brand {
    width: min(55%, 420px);
    height: auto;
}

.tp-footer__main {
    padding-top: 1rem;
}

.tp-footer__grid {
    display: grid;
    grid-template-columns: 8% 1fr 30%;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 0;
}

.tp-footer__logo img {
    display: block;
    width: 100%;
    max-width: 100px;
    height: auto;
}

.tp-footer__tagline img {
    display: block;
    width: min(100%, 700px);
    height: auto;
}

.tp-footer__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.2rem;
    margin-top: 0.8rem;
    font-size: 0.9rem;
}

.tp-footer__address {
    font-style: normal;
    text-align: right;
    line-height: 1.4;
}

.tp-body .tp-footer__address h3 {
    margin: 0.6rem 0 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: hsl(var(--tp-green));
}

.tp-footer__address p {
    margin: 0.2rem 0 0.6rem;
    font-size: 0.9rem;
}

.tp-body .tp-footer a:not(.tp-btn) {
    color: hsl(var(--tp-green));
}

.tp-body .tp-footer a:not(.tp-btn):hover {
    color: hsl(var(--tp-navy));
}

.tp-footer__legal {
    padding: 1rem 0 3rem;
    font-size: 0.65rem;
    line-height: 1.5;
}

.tp-footer__legal p {
    margin: 0 0 0.6em;
}

@media (max-width: 1023px) {
    .tp-hiring__inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .tp-hiring__pitch {
        justify-content: center;
    }

    .tp-hiring__links {
        align-items: center;
    }

    .tp-footer__grid {
        grid-template-columns: 90px 1fr;
    }

    .tp-footer__tagline {
        grid-column: 1 / -1;
        order: 3;
    }
}

@media (max-width: 767px) {
    .tp-hiring__pitch {
        flex-direction: column;
        font-size: 1.4rem;
    }

    .tp-footer__address {
        font-size: 0.9rem;
    }
}

/* 10. Utilities
   ---------------------------------------------------------------------------- */
.tp-js .tp-fade {
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.tp-js .tp-fade.is-visible {
    opacity: 1;
}

.tp-notice {
    padding: 3rem 0;
    text-align: center;
}

.tp-feature {
    margin: 2rem auto;
    padding: clamp(1.2rem, 4vw, 3rem) clamp(1rem, 6vw, 20vw) clamp(4rem, 20vw, 14rem) clamp(1rem, 3vw, 2rem);
    border-radius: 10px;
    background-size: cover;
    background-position: center;
}

.tp-feature__card {
    width: min(100%, 50%);
    padding: 1.25rem;
    border-radius: 10px;
    color: hsl(var(--tp-white));
    background: hsla(var(--tp-green), 0.85);
}

.tp-body .tp-feature__card h1,
.tp-body .tp-feature__card h2,
.tp-body .tp-feature__card a {
    color: hsl(var(--tp-white));
}

@media (max-width: 767px) {
    .tp-feature__card {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tp-fade,
    .tp-body * {
        transition: none !important;
        animation: none !important;
    }

    .tp-js .tp-fade {
        opacity: 1;
    }
}
