/* ============================================================
   Rocky Climb – Custom Stylesheet
   Typefaces : Bebas Neue · Oswald · League Spartan
   Palette   : see :root below
   ============================================================ */

/* === FONTS (loaded via base.leaf <link>) === */
/* Bebas Neue  – display / hero / prices   */
/* Oswald      – headings / nav / labels   */
/* League Spartan – body / UI / buttons    */


/* === BRAND COLOUR TOKENS ======================================= */
:root {
    /* — primary palette — */
    --rc-navy:       #040531;
    --rc-orange:     #FD8436;
    --rc-teal:       #009FB7;
    --rc-yellow:     #ECD444;
    --rc-light:      #FBFBFB;

    /* — secondary palette — */
    --rc-blue:       #1C77C3;
    --rc-cyan:       #59C3C3;
    --rc-light-cyan: #D1FAFF;
    --rc-purple:     #AA2BCE;
    --rc-dark-teal:  #0074A2;

    /* — Bootstrap overrides — */
    --bs-primary:             #FD8436;
    --bs-primary-rgb:         253, 132, 54;
    --bs-secondary:           #D1FAFF;
    --bs-secondary-rgb:       209, 250, 255;
    --bs-body-bg:             #040531;
    --bs-body-color:          #FBFBFB;
    --bs-body-font-family:    'League Spartan', system-ui, sans-serif;
    --bs-link-color:          #FD8436;
    --bs-link-color-rgb:      253, 132, 54;
    --bs-link-hover-color:    #D1FAFF;
    --bs-link-hover-color-rgb: 209, 250, 255;
}


/* === BASE ====================================================== */
body {
    background-color: var(--rc-navy);
    color: var(--rc-light);
    font-family: 'League Spartan', system-ui, sans-serif;
}

.bg-dark {
    background-color: var(--rc-navy) !important;
}

/* Ensure bg-primary utility uses our orange everywhere EXCEPT the navbar */
.bg-primary {
    background-color: var(--rc-orange) !important;
}


/* === TYPOGRAPHY ================================================ */

/* --- Display / hero --- */
h1, .h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    letter-spacing: 0.05em;
    line-height: 1.05;
    color: var(--rc-light);
}

/* --- Section headings --- */
h2, .h2 {
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--rc-orange);
}

/* --- Sub-headings --- */
h3, .h3 {
    font-family: 'Oswald', sans-serif;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--rc-light);
}

h4, .h4,
h5, .h5,
h6, .h6 {
    font-family: 'Oswald', sans-serif;
    font-weight: 400;
    letter-spacing: 0.03em;
    color: var(--rc-light);
}

/* --- Font helper classes --- */
.font-bebas {
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 0.05em;
}

.font-oswald {
    font-family: 'Oswald', sans-serif;
}

.font-spartan {
    font-family: 'League Spartan', sans-serif;
}

/* Keep .serif for cafe page headings */
.serif {
    font-family: "Georgia", Times, serif !important;
}


/* === NAVIGATION ================================================ */
.navbar {
    border-bottom: 3px solid var(--rc-orange);
}

/* Keep navbar navy even though it uses bg-primary */
.navbar.bg-primary {
    background-color: var(--rc-navy) !important;
}

.navbar-brand {
    display: flex;
    align-items: center;
}

.nav-link {
    font-family: 'Oswald', sans-serif;
    font-weight: 400;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--rc-light) !important;
    transition: color 0.2s ease;
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
    padding-bottom: 0.15rem !important;
    border-bottom: 2px solid transparent;
}

.nav-link:hover {
    color: var(--rc-orange) !important;
    border-bottom-color: var(--rc-orange);
}

.nav-link.active {
    color: var(--rc-orange) !important;
    border-bottom-color: var(--rc-orange);
}

.navbar-toggler {
    border-color: var(--rc-orange);
}

/* Make hamburger icon visible on dark background */
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28253,132,54,1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}


/* === BUTTONS =================================================== */
/*
 * LEAGUE SPARTAN VERTICAL ALIGNMENT NOTE
 * League Spartan has unusually large ascender metrics, which causes text
 * to appear raised within its line box. This affects any element using
 * uppercase League Spartan — particularly buttons, labels, and nav items.
 *
 * Fix: transfer ~3px of padding from bottom to top so the visual centre
 * matches the geometric centre. When setting padding on elements that use
 * this font, always add ~3px more top padding than bottom padding to
 * compensate (e.g. pt-2 pb-1 rather than py-2, or inline padding-top/bottom).
 */
.btn {
    font-family: 'League Spartan', sans-serif;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 3px;
    /* Compensate for League Spartan's raised baseline */
    padding-top: calc(0.375rem + 3px);
    padding-bottom: calc(0.375rem - 3px);
}

.btn-lg {
    padding-top: calc(0.5rem + 3px);
    padding-bottom: calc(0.5rem - 3px);
}

.btn-sm {
    padding-top: calc(0.25rem + 3px);
    padding-bottom: calc(0.25rem - 3px);
}

.btn-primary {
    background-color: var(--rc-orange);
    border-color: var(--rc-orange);
    color: var(--rc-navy);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: #e07028;
    border-color: #e07028;
    color: var(--rc-navy);
}

.btn-secondary {
    background-color: var(--rc-light-cyan);
    border-color: var(--rc-light-cyan);
    color: var(--rc-navy);
}

.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:active {
    background-color: var(--rc-cyan);
    border-color: var(--rc-cyan);
    color: var(--rc-navy);
}

.btn-outline-primary {
    color: var(--rc-orange);
    border-color: var(--rc-orange);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    background-color: var(--rc-orange);
    color: var(--rc-navy);
    border-color: var(--rc-orange);
}

.btn-outline-secondary {
    color: var(--rc-light-cyan);
    border-color: var(--rc-light-cyan);
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.btn-outline-secondary:active {
    background-color: var(--rc-light-cyan);
    color: var(--rc-navy);
    border-color: var(--rc-light-cyan);
}


/* === LINKS ===================================================== */
a {
    color: var(--rc-orange);
}

a:hover {
    color: var(--rc-light-cyan);
}


/* === TEXT UTILITIES ============================================ */
.text-secondary {
    color: var(--rc-light-cyan) !important;
}

.text-accent-orange {
    color: var(--rc-orange) !important;
}

.text-accent-yellow {
    color: var(--rc-yellow) !important;
}

.text-accent-teal {
    color: var(--rc-light-cyan) !important;
}

.text-accent-cyan {
    color: var(--rc-cyan) !important;
}


/* === TOPOLOGY BACKGROUND ======================================= */
.topology-gradient {
    background:
        linear-gradient(rgba(4, 5, 49, 0.88), rgba(4, 5, 49, 0.92)),
        url("../images/topology.svg");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}


/* === FORMS ===================================================== */
.form-control {
    color: var(--rc-light);
    background-color: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
}

.form-control:focus {
    color: var(--rc-light);
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--rc-orange);
    box-shadow: 0 0 0 0.2rem rgba(253, 132, 54, 0.25);
}

.form-label {
    font-family: 'Oswald', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--rc-light-cyan) !important;
}


/* === ACCORDION ================================================= */
.accordion .accordion-button {
    font-family: 'Oswald', sans-serif;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--rc-navy);
    background-color: var(--rc-orange);
}

.accordion .accordion-button:not(.collapsed) {
    background-color: #e07028;
    color: var(--rc-navy);
    box-shadow: none;
}

.accordion .accordion-button::after {
    filter: invert(1);
}

.accordion-body {
    color: var(--rc-light);
    background-color: rgba(255, 255, 255, 0.04);
}


/* === PRICING CARDS ============================================= */
.price-tag {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 4.5rem;
    line-height: 1;
    letter-spacing: 0.03em;
    color: var(--rc-navy);
}


/* === LIST GROUPS =============================================== */
.list-group-item {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--rc-light);
    border-color: rgba(255, 255, 255, 0.1);
}

.list-group-item a {
    color: var(--rc-cyan);
}

/* list-group-item-primary variant used in cafe / about pages */
.list-group-item-primary {
    background-color: rgba(253, 132, 54, 0.12);
    color: var(--rc-light);
    border-color: rgba(253, 132, 54, 0.25);
}


/* === QUOTES ==================================================== */
.quote {
    font-size: 1.25rem;
}

.quote::before {
    font-family: 'Bebas Neue', sans-serif;
    content: "\201C";
    color: var(--rc-orange);
    font-size: 4em;
    position: relative;
    left: 10px;
    top: -10px;
}

.quote::after {
    content: "";
}

.otro-blockquote {
    font-size: 1.2em;
    font-style: italic;
    color: #1a1a1a;
    padding: 0.8em 30px 0.5em 75px;
    border-left: 8px solid var(--rc-orange);
    line-height: 1.6;
    position: relative;
    background: var(--rc-light-cyan);
}

.otro-blockquote::before {
    content: "\201C";
    color: var(--rc-orange);
    font-size: 4em;
    position: absolute;
    left: 10px;
    top: -10px;
}

.otro-blockquote::after {
    content: '';
}

.otro-blockquote span {
    display: block;
    color: #111111;
    font-style: normal;
    font-weight: bold;
    margin-top: 1em;
}


/* === WALL GEOMETRY DESIGN SYSTEM ================================
 *
 * Built from the Rocky Climb wall panel geometry — a diagonal that
 * rises steeply from the lower-left and flattens toward the upper-right,
 * matching the faceted plywood panels of the actual bouldering wall.
 *
 * The clip-path polygon points are derived from wallSlice.svg
 * (1279×719). Normalised to % of element size, the dividing line runs:
 *   0%→100%   28%→100%   50%→45%   68%→21%   80%→18%   100%→10%
 *
 * Add more SVG panel variants (different angles) and swap them into
 * the __svg slot — the CSS classes stay the same.
 * ================================================================ */

/*
 * Full-bleed section header.
 * Breaks out of .container, clips its bottom edge to the wall diagonal,
 * and hosts an inline SVG accent as the background texture.
 *
 * Usage:
 *   <div class="wall-panel-header">
 *     <svg class="wall-panel-header__svg" …/>   ← accent SVG
 *     <div class="container position-relative">  ← re-constrain text
 *       content…
 *     </div>
 *   </div>
 */
.wall-panel-header {
    /* break out of Bootstrap .container */
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);

    position: relative;
    overflow: hidden;

    /* matches body — header blends in, only the orange SVG shape is visible */
    background: var(--rc-navy);
    padding-top: 2.5rem;
    padding-bottom: 3rem;
}

/* The inline SVG that provides the warm panel accent */
.wall-panel-header__svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/*
 * Thin diagonal SVG rule.
 * Place an <svg class="wall-rule"> between sections as an alternative
 * to a flat <hr>. The line follows the wall geometry angle.
 *
 * Usage:
 *   <svg class="wall-rule" viewBox="0 0 1200 16" preserveAspectRatio="none">
 *     <line x1="0" y1="14" x2="1200" y2="2" …/>
 *   </svg>
 */
.wall-rule {
    display: block;
    width: 100%;
    height: 12px;
    overflow: visible;
}

/*
 * Section with a wall-angled top edge (complement of wall-panel-header).
 * Use for CTA bands, pricing panels, etc. that should "slot in" below
 * the header with a matching diagonal top.
 *
 * Usage: add to a sibling div immediately after .wall-panel-header
 */
.wall-angle-top {
    /*
     * Teal-tinted band — clearly different from the body navy so the
     * wall-angled top edge reads as a deliberate panel transition.
     */
    background: linear-gradient(160deg, #012a32 0%, #030f20 100%);
    clip-path: polygon(0 12%, 28% 6%, 50% 2%, 68% 0, 100% 0, 100% 100%, 0 100%);
    padding-top: 3.5rem;
    padding-bottom: 2rem;
    margin-top: -2rem;
}

/*
 * Scroll-reveal — sections fade + rise into view via IntersectionObserver.
 * JS should add .is-visible when the element enters the viewport.
 *
 * Stagger siblings with --wall-reveal-delay:
 *   <div class="wall-reveal" style="--wall-reveal-delay: 0.15s">…</div>
 */
.wall-reveal {
    opacity: 0;
    transform: translateY(22px);
    transition:
        opacity  0.65s ease var(--wall-reveal-delay, 0s),
        transform 0.65s ease var(--wall-reveal-delay, 0s);
}

.wall-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Clip individual images/cards to the wall panel shape */
.wall-clip {
    clip-path: polygon(0 0, 100% 0, 100% 78%, 68% 92%, 28% 100%, 0 88%);
}


/* === WALL PARALLAX PANEL GALLERY ================================
 *
 * Photos sit on a background layer clipped to the wall-panel polygon
 * shapes. The background scrolls at a reduced rate (parallax), giving
 * the impression the photos are behind the page content.
 *
 * The left panel uses the dark/painted region of the wall geometry;
 * the right uses the warm/timber region. Together they tile seamlessly
 * along the same diagonal boundary.
 *
 * Clip-path coordinates are derived from wallSlice.svg (1279×719).
 * The dividing line: (27.8%,100%) (49.7%,45.5%) (68.3%,21.3%)
 *                    (80.5%,17.5%) (100%,10%)
 *
 * Usage:
 *   <div class="wall-parallax-gallery">          ← full-bleed wrapper
 *     <div class="wall-parallax-pair">            ← one row
 *       <div class="wall-panel-window wall-panel-window--left"
 *            data-src="/img.jpg" data-title="…">
 *         <div class="wall-panel-window__bg"
 *              style="background-image:url("../img.jpg")"></div>
 *         <div class="wall-panel-window__caption">…</div>
 *       </div>
 *       <div class="wall-panel-window wall-panel-window--right" …>…</div>
 *     </div>
 *   </div>
 * ================================================================ */

.wall-parallax-gallery {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.wall-parallax-pair {
    position: relative;
    height: 300px;
    margin-bottom: 4px;
}

.wall-panel-window {
    position: absolute;
    inset: 0;
    overflow: hidden;
    cursor: pointer;
}

/* Dark/painted panel — upper-left region */
.wall-panel-window--left {
    clip-path: polygon(
        0%     0%,
        100%   0%,
        100%   10%,
        80.5%  17.5%,
        68.3%  21.3%,
        49.7%  45.5%,
        27.8%  100%,
        0%     100%
    );
}

/* Warm/timber panel — lower-right region */
.wall-panel-window--right {
    clip-path: polygon(
        27.8%  100%,
        49.7%  45.5%,
        68.3%  21.3%,
        80.5%  17.5%,
        100%   10%,
        100%   100%
    );
}

/* Background image — oversized vertically so the parallax has room to travel */
.wall-panel-window__bg {
    position: absolute;
    top: -25%;
    left: 0;
    right: 0;
    bottom: -25%;
    background-size: cover;
    background-position: center;
    will-change: transform;
    transition: filter 0.3s ease;
}

.wall-panel-window--left .wall-panel-window__bg {
    filter: brightness(0.75);
}

.wall-panel-window--right .wall-panel-window__bg {
    filter: brightness(0.95);
}

.wall-panel-window:hover .wall-panel-window__bg {
    filter: brightness(1.1) !important;
}

/* Caption fades in on hover */
.wall-panel-window__caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.6rem 1.25rem;
    background: linear-gradient(transparent, rgba(4, 5, 49, 0.88));
    color: var(--rc-light);
    font-family: 'Oswald', sans-serif;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.wall-panel-window:hover .wall-panel-window__caption {
    opacity: 1;
}


/* === ALTERNATING WALL PHOTO ROWS ==================================
 *
 * Each row is full-bleed. The photo sits on a slow-scrolling
 * background layer (parallax). A solid navy overlay clips to one
 * half of the wall-panel shape, creating the dark foreground where
 * text lives. The diagonal boundary IS the wall geometry line.
 *
 * Rows alternate: --photo-left puts the photo on the left,
 * --photo-right puts it on the right, text always on the opposite side.
 *
 * Clip boundary: (60%,0%) → (40%,100%)  ← derived from wallSlice angle
 *
 * Usage:
 *   <div class="wall-photo-row wall-photo-row--photo-left"
 *        data-src="…" data-title="…">
 *     <div class="wall-photo-row__bg" style="background-image:url(…)"></div>
 *     <div class="wall-photo-row__overlay">
 *       <div class="wall-photo-row__text">…</div>
 *     </div>
 *   </div>
 * ================================================================ */

.wall-photo-gallery {
    width: 100vw;
    margin-left: calc(50% - 50vw);
}

.wall-photo-row {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

/* Background photo layer — oversized so parallax has room to travel */
.wall-photo-row__bg {
    position: absolute;
    top: -60%;
    left: 0;
    right: 0;
    bottom: -60%;
    background-size: cover;
    background-position: center;
    will-change: transform;
    transition: filter 0.3s ease;
}

.wall-photo-row:hover .wall-photo-row__bg {
    filter: brightness(1.12);
}

/* Foreground overlay — clipped to wall-panel shape, carries the text.
   position: relative so it expands with content and drives the row height.
   The absolutely-positioned background scales with the row automatically. */
.wall-photo-row__overlay {
    position: relative;
    width: 100%;
    min-height: 300px;
    background: var(--rc-navy);
    display: flex;
    align-items: center;
    z-index: 1;
    padding-top: 2rem;
    padding-bottom: 2rem;
    box-sizing: border-box;
}

/*
 * Photo LEFT: overlay covers right panel.
 * Padding pushes text clear of the diagonal at all heights.
 * At the tightest point (top, x=60%), content starts at 64% — safely inside.
 */
.wall-photo-row--photo-left .wall-photo-row__overlay {
    clip-path: polygon(60% 0%, 100% 0%, 100% 100%, 40% 100%);
    padding-left: 64%;
    padding-right: 4%;
}

/*
 * Photo RIGHT: overlay covers left panel.
 * Content ends at 36% — safely inside the clip at all heights (min 40%).
 */
.wall-photo-row--photo-right .wall-photo-row__overlay {
    clip-path: polygon(0% 0%, 60% 0%, 40% 100%, 0% 100%);
    padding-left: 4%;
    padding-right: 64%;
}

.wall-photo-row__text {
    color: var(--rc-light);
    width: 100%;
}


/* === FOOTER ==================================================== */
footer,
.footer-section {
    border-top: 1px solid rgba(253, 132, 54, 0.3);
    padding-top: 2rem;
    margin-top: 3rem;
}
