/*
 * Theme Name: Bearing Aviation
 * Version: 2.0
 * Description: Custom wordpress theme configured for sites made with Site Builder by Corporate Tools
 * Author: Bearing Aviation
 */

/* =========================================================
   Bearing Aviation — design tokens
   ========================================================= */
:root {
    --ba-ink: #17181C;
    --ba-paper: #F4F2EC;
    --ba-bg: #F1EEE7;
    --ba-muted: rgba(23, 24, 28, 0.66);
    --ba-muted-strong: rgba(23, 24, 28, 0.72);
    --ba-line: rgba(23, 24, 28, 0.08);
    --ba-maxw: 1120px;
    --ba-pad-x: clamp(20px, 5vw, 44px);
    --ba-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* =========================================================
   Base
   ========================================================= */
html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--ba-bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Warm paper gradient across the whole page; on .wp-site-blocks so the
   theme.json root background-color can't override it. */
.wp-site-blocks {
    padding: 0;
    min-height: 100vh;
    background: linear-gradient(180deg, #F6F4EE 0%, #F1EEE7 40%, #ECE8E0 100%);
    background-attachment: fixed;
}

:where(.wp-site-blocks) > * {
    margin-block-start: 0;
}

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

/* Link + focus polish */
a {
    text-decoration-thickness: 1px !important;
    text-underline-offset: 0.1em;
}

:where(.wp-site-blocks *:focus) {
    outline: 2px solid var(--ba-ink);
    outline-offset: 2px;
}

input:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--ba-ink) inset !important;
}

h1, h2, h3, h4, h5, h6, blockquote, p {
    text-wrap: pretty;
}

.ba-mono {
    font-family: var(--ba-mono);
}

/* =========================================================
   Section scaffolding
   ========================================================= */
.ba-section {
    padding-left: var(--ba-pad-x);
    padding-right: var(--ba-pad-x);
}

/* Cap inner content to the design container width and centre it */
.ba-section > .alignwide,
.ba-section > * > .alignwide {
    max-width: var(--ba-maxw);
    margin-left: auto;
    margin-right: auto;
}

/* Give anchored sections breathing room under the sticky header */
#top, #about, #services, #contact {
    scroll-margin-top: 96px;
}

/* =========================================================
   Floating glass header
   ========================================================= */
.ba-header {
    position: sticky;
    top: 16px;
    z-index: 60;
    padding: 0 clamp(14px, 4vw, 32px);
    background: transparent;
}

.ba-header__bar {
    max-width: var(--ba-maxw);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: rgba(255, 255, 255, 0.66);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    backdrop-filter: saturate(180%) blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 12px 40px -16px rgba(23, 24, 28, 0.3);
    border-radius: 24px;
    padding: 11px 12px 11px 20px;
}

.admin-bar .ba-header {
    top: 48px;
}

@media screen and (max-width: 782px) {
    .admin-bar .ba-header {
        top: 62px;
    }
}

@media screen and (max-width: 600px) {
    .admin-bar .ba-header {
        top: 16px;
    }
}

/* Brand lockup */
.ba-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--ba-ink);
    flex: none;
}

.ba-brand__mark {
    flex: none;
}

.ba-brand__word {
    line-height: 1;
    display: block;
}

.ba-brand__l1 {
    display: block;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.17em;
}

.ba-brand__l2 {
    display: block;
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 0.34em;
    text-indent: 0.34em;
}

.ba-brand__word--lg .ba-brand__l1,
.ba-brand__word--lg .ba-brand__l2 {
    font-size: 17px;
}

/* Nav */
.ba-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.ba-nav__link {
    text-decoration: none;
    color: var(--ba-ink);
    font-size: 15px;
    padding: 10px 16px;
    border-radius: 999px;
    transition: background 0.2s ease;
}

.ba-nav__link:hover {
    background: rgba(23, 24, 28, 0.06);
}

.ba-nav__cta {
    text-decoration: none;
    color: var(--ba-paper);
    background: var(--ba-ink);
    font-size: 15px;
    font-weight: 500;
    padding: 11px 22px;
    border-radius: 999px;
    margin-left: 6px;
    box-shadow: 0 8px 20px -8px rgba(23, 24, 28, 0.5);
    transition: transform 0.2s ease;
}

.ba-nav__cta:hover {
    transform: translateY(-1px);
    color: var(--ba-paper);
}

/* =========================================================
   Eyebrows (mono labels)
   ========================================================= */
.ba-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    align-self: flex-start;
    width: fit-content;
    margin: 0 0 22px;
    font-family: var(--ba-mono);
    font-size: 12px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(23, 24, 28, 0.55);
    border-radius: 999px;
    padding: 8px 15px;
    line-height: 1;
}

.ba-eyebrow--dot {
    color: rgba(23, 24, 28, 0.6);
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--ba-line);
    box-shadow: 0 6px 18px -12px rgba(23, 24, 28, 0.4);
    margin-bottom: 26px;
}

.ba-eyebrow--dot::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ba-ink);
    display: inline-block;
}

.ba-eyebrow--chip {
    background: var(--ba-bg);
}

.ba-eyebrow--card {
    background: #fff;
    box-shadow: 0 6px 18px -12px rgba(23, 24, 28, 0.35);
}

/* =========================================================
   Headings & text
   ========================================================= */
.ba-hero__title {
    margin: 0;
    font-size: clamp(38px, 5.6vw, 70px);
    line-height: 1.02;
    font-weight: 600;
    letter-spacing: -0.028em;
    text-wrap: balance;
    color: var(--ba-ink);
}

.ba-h2 {
    margin: 0 0 22px;
    font-size: clamp(27px, 3.3vw, 44px);
    line-height: 1.08;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--ba-ink);
}

.ba-lead {
    font-size: clamp(17px, 1.5vw, 20px);
    line-height: 1.6;
    color: var(--ba-muted);
    margin: 0;
}

.ba-prose {
    font-size: clamp(15.5px, 1.3vw, 18px);
    line-height: 1.68;
    color: var(--ba-muted-strong);
    margin: 0 0 18px;
}

.ba-prose:last-child {
    margin-bottom: 0;
}

/* =========================================================
   Media (rounded images)
   ========================================================= */
.ba-media {
    margin: 0;
    border-radius: 28px;
    overflow: hidden;
}

.ba-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* =========================================================
   Cards
   ========================================================= */
.ba-card {
    background: #fff;
    border: 1px solid rgba(23, 24, 28, 0.06);
    border-radius: 28px;
    box-shadow: 0 20px 50px -28px rgba(23, 24, 28, 0.4);
    padding: clamp(28px, 3.5vw, 48px);
}

/* =========================================================
   Hero
   ========================================================= */
.ba-hero-section {
    padding-top: clamp(40px, 6vw, 72px);
    padding-bottom: clamp(36px, 5vw, 64px);
}

.ba-hero {
    align-items: center;
    margin-top: 0;
    margin-bottom: 0;
}

.ba-hero__copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.ba-hero__lead {
    margin-top: 26px;
    max-width: 44ch;
}

.ba-hero__ctas {
    margin-top: 36px;
    gap: 14px;
}

/* Hero photo with gradient foot */
.ba-hero__media {
    position: relative;
    border-radius: 30px;
    aspect-ratio: 4 / 5;
    box-shadow: 0 34px 70px -28px rgba(23, 24, 28, 0.55);
    background: #d8d4ca;
}

.ba-hero__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(23, 24, 28, 0) 55%, rgba(23, 24, 28, 0.35) 100%);
    pointer-events: none;
}

/* =========================================================
   Buttons
   ========================================================= */
.ba-btn .wp-block-button__link {
    font-size: 16px;
    font-weight: 500;
    padding: 16px 32px;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: transform 0.2s ease, background 0.2s ease;
    text-decoration: none;
}

.ba-btn--solid .wp-block-button__link {
    background: var(--ba-ink);
    color: var(--ba-paper);
    box-shadow: 0 14px 34px -12px rgba(23, 24, 28, 0.55);
}

.ba-btn--solid .wp-block-button__link:hover {
    transform: translateY(-2px);
    color: var(--ba-paper);
}

.ba-btn--outline .wp-block-button__link {
    background: rgba(255, 255, 255, 0.6);
    color: var(--ba-ink);
    border-color: rgba(23, 24, 28, 0.16);
}

.ba-btn--outline .wp-block-button__link:hover {
    background: #fff;
    transform: translateY(-2px);
    color: var(--ba-ink);
}

/* =========================================================
   About
   ========================================================= */
.ba-about-section {
    padding-top: clamp(48px, 7vw, 96px);
    padding-bottom: clamp(48px, 7vw, 96px);
}

.ba-about {
    align-items: stretch;
}

.ba-about__media-col,
.ba-about__card {
    align-self: stretch;
}

.ba-about__media {
    height: 100%;
    min-height: 420px;
    box-shadow: 0 30px 60px -30px rgba(23, 24, 28, 0.5);
}

.ba-about__card {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* =========================================================
   Mission band
   ========================================================= */
.ba-mission-section {
    padding-top: clamp(8px, 2vw, 24px);
    padding-bottom: clamp(48px, 7vw, 88px);
}

.ba-mission {
    position: relative;
    max-width: var(--ba-maxw);
    margin: 0 auto;
    border-radius: 34px;
    overflow: hidden;
    min-height: clamp(360px, 44vw, 520px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 40px 80px -34px rgba(23, 24, 28, 0.6);
    background: var(--ba-ink);
}

.ba-mission__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ba-mission__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(23, 24, 28, 0.35) 0%, rgba(23, 24, 28, 0.68) 100%);
}

.ba-mission__inner {
    position: relative;
    padding: clamp(40px, 6vw, 80px) clamp(24px, 5vw, 64px);
    max-width: 760px;
    color: #fff;
}

.ba-mission__mark {
    margin-bottom: 26px;
    opacity: 0.95;
}

.ba-mission__quote {
    margin: 0;
    font-size: clamp(23px, 3vw, 40px);
    line-height: 1.22;
    font-weight: 500;
    letter-spacing: -0.015em;
    text-wrap: balance;
    color: #fff;
}

.ba-mission__label {
    margin-top: 26px;
    font-size: 12.5px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
}

/* =========================================================
   Services
   ========================================================= */
.ba-services-section {
    padding-bottom: clamp(48px, 7vw, 96px);
}

.ba-services__head {
    align-items: flex-end;
    gap: 24px;
    margin-bottom: clamp(30px, 4vw, 48px);
}

.ba-services__head-left {
    flex: 1 1 auto;
}

.ba-services__head .ba-h2 {
    margin-bottom: 0;
}

.ba-services__intro {
    margin: 0;
    max-width: 38ch;
    font-size: 16px;
    line-height: 1.6;
    color: rgba(23, 24, 28, 0.6);
}

.ba-services__grid {
    gap: clamp(16px, 2vw, 24px);
}

.ba-service-card {
    border-radius: 26px;
    padding: 34px 30px 38px;
    box-shadow: 0 18px 44px -26px rgba(23, 24, 28, 0.4);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ba-service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 34px 60px -28px rgba(23, 24, 28, 0.5);
}

.ba-service-card__icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: var(--ba-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.ba-service-card__icon svg {
    width: 30px;
    height: 30px;
}

.ba-service-card__num {
    font-family: var(--ba-mono);
    font-size: 12px;
    letter-spacing: 0.18em;
    color: rgba(23, 24, 28, 0.4);
    margin: 0 0 12px;
}

.ba-service-card__title {
    margin: 0 0 12px;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--ba-ink);
}

.ba-service-card__desc {
    font-size: 15.5px;
    line-height: 1.62;
    color: rgba(23, 24, 28, 0.66);
    margin: 0;
}

/* =========================================================
   Contact
   ========================================================= */
.ba-contact-section {
    padding-bottom: clamp(56px, 8vw, 104px);
}

.ba-contact {
    border-radius: 32px;
    box-shadow: 0 30px 70px -34px rgba(23, 24, 28, 0.5);
    padding: clamp(28px, 4vw, 56px);
    align-items: stretch;
}

.ba-contact__info {
    display: flex;
    flex-direction: column;
}

.ba-contact__info .ba-lead {
    margin-bottom: 30px;
    max-width: 40ch;
}

.ba-contact__email {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    align-self: flex-start;
    text-decoration: none;
    color: var(--ba-ink);
    font-size: clamp(16px, 1.6vw, 20px);
    font-weight: 500;
    background: var(--ba-bg);
    border-radius: 999px;
    padding: 12px 20px;
    transition: background 0.2s ease;
}

.ba-contact__email:hover {
    background: #E9E5DC;
}

/* Fluent Form restyle to match the design's form */
.ba-contact__form .fluentform {
    margin: 0;
}

.ba-contact__form .ff-el-input--label label,
.ba-contact__form .ff-el-form-control + .ff-el-is-error,
.ba-contact__form .ff-el-input--label {
    font-family: var(--ba-mono);
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(23, 24, 28, 0.5);
}

.ba-contact__form .ff-el-form-control {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    color: var(--ba-ink);
    background: var(--ba-paper);
    border: 1px solid rgba(23, 24, 28, 0.06);
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: none;
}

.ba-contact__form textarea.ff-el-form-control {
    resize: vertical;
}

form.fluent_form_3 .ff-btn-submit {
    background-color: var(--ba-ink) !important;
    color: var(--ba-paper) !important;
    border: none !important;
    font-family: 'Outfit', sans-serif !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    padding: 15px 34px !important;
    border-radius: 999px !important;
    box-shadow: 0 14px 30px -12px rgba(23, 24, 28, 0.55) !important;
    transition: transform 0.2s ease !important;
}

form.fluent_form_3 .ff-btn-submit:hover {
    transform: translateY(-2px);
}

/* =========================================================
   Footer
   ========================================================= */
.ba-footer {
    background: var(--ba-ink);
    color: var(--ba-paper);
    border-radius: 36px 36px 0 0;
}

.ba-footer__inner {
    max-width: var(--ba-maxw);
    margin: 0 auto;
    padding: clamp(44px, 6vw, 72px) var(--ba-pad-x);
}

.ba-footer__top {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    justify-content: space-between;
    align-items: flex-start;
}

.ba-brand--light {
    color: var(--ba-paper);
    gap: 14px;
}

.ba-footer__nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ba-footer__nav a {
    text-decoration: none;
    color: rgba(244, 242, 236, 0.8);
    font-size: 15px;
    padding: 9px 16px;
    border-radius: 999px;
    transition: background 0.2s ease;
}

.ba-footer__nav a:hover {
    background: rgba(244, 242, 236, 0.1);
    color: var(--ba-paper);
}

.ba-footer__bottom {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid rgba(244, 242, 236, 0.14);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    font-size: 12px;
    letter-spacing: 0.08em;
    color: rgba(244, 242, 236, 0.5);
}

/* =========================================================
   Blog / query loop (inherits the same look)
   ========================================================= */
.wp-block-post-title,
.wp-block-post-title a {
    color: var(--ba-ink);
    text-decoration: none;
}

.wp-block-separator {
    border: none !important;
    border-top: 1px solid var(--ba-line) !important;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 860px) {
    .ba-hero__title {
        font-size: clamp(34px, 8vw, 48px);
    }

    .ba-about__media {
        min-height: 300px;
    }
}

@media (max-width: 600px) {
    .ba-header__bar {
        flex-wrap: wrap;
        border-radius: 20px;
    }

    .ba-nav {
        width: 100%;
        justify-content: center;
    }
}
