/* ═══════════════════════════════════════════════════════════════════════════
   ASCEND ENGINEERING — Website Stylesheet
   
   COLOUR PALETTE:
   - Orange (primary):  #E8611A
   - Orange light:      #FDF0EA
   - Dark text:         #1F1E1C
   - Grey text:         #5C5955
   - Light grey bg:     #F7F5F3
   - White:             #FFFFFF
   - Border grey:       #E8E5E2
   
   FONTS:
   - Headings: "Outfit" (Google Fonts)
   - Body text: "Source Sans 3" (Google Fonts)
   
   To change colours: Find and replace the hex values above.
   To change fonts: Update the Google Fonts link in index.html and the
   font-family values below.
   ═══════════════════════════════════════════════════════════════════════════ */


/* ─── RESET & BASE ────────────────────────────────────────────────────────── */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Source Sans 3", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #1F1E1C;
    background: #FFFFFF;
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Outfit", sans-serif;
    line-height: 1.2;
}

a {
    color: inherit;
    text-decoration: none;
}

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

ul {
    list-style: none;
}


/* ─── LAYOUT ──────────────────────────────────────────────────────────────── */

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .container { padding: 0 1.5rem; }
}

@media (min-width: 1024px) {
    .container { padding: 0 2rem; }
}


/* ─── BUTTONS ─────────────────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 0.375rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: #E8611A;
    color: #FFFFFF;
    border-color: #E8611A;
    box-shadow: 0 2px 8px rgba(232, 97, 26, 0.25);
}

.btn-primary:hover {
    background: #D4570F;
    box-shadow: 0 4px 12px rgba(232, 97, 26, 0.35);
}

.btn-outline {
    background: transparent;
    color: #E8611A;
    border-color: #E8611A;
}

.btn-outline:hover {
    background: #E8611A;
    color: #FFFFFF;
}

.btn-full {
    width: 100%;
    justify-content: center;
}


/* ─── NAVIGATION ──────────────────────────────────────────────────────────── */

#site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: background 0.3s, box-shadow 0.3s;
}

#site-header.scrolled {
    background: rgba(255, 255, 255, 0.85); /* Slightly more transparent for better bleed-through */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px); /* Crucial for Safari support */
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08); /* Wider, softer shadow for depth */
}

.nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
    transition: height 0.3s ease; /* ADD THIS LINE */
}

/* Shrink the nav bar when scrolled */
#site-header.scrolled .nav-bar {
    height: 3.5rem; /* Shrinks on mobile */
}

@media (min-width: 768px) {
    #site-header.scrolled .nav-bar {
        height: 4rem; /* Shrinks from 5rem to 4rem on desktop */
    }
}

@media (min-width: 768px) {
    .nav-bar { height: 5rem; }
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Base Logo (Mobile) */
.nav-logo {
    height: 1.5rem;       /* Your desired starting height */
    width: auto;          /* Magically keeps the exact aspect ratio */
    border-radius: 0.25rem;
    transition: all 0.3s ease;
}

/* Scrolled Logo (Mobile) */
#site-header.scrolled .nav-logo {
    height: 1.25rem;      /* Shorter height for when scrolling */
}

/* Desktop Sizes */
@media (min-width: 768px) {
    /* Base Logo (Desktop) */
    .nav-logo { 
        height: 1.75rem;  /* Taller starting height for desktop */
    }
    
    /* Scrolled Logo (Desktop) */
    #site-header.scrolled .nav-logo {
        height: 1.5rem;   /* Shorter scrolled height for desktop */
    }
}

.nav-name {
    font-family: "Outfit", sans-serif;
    font-weight: 600;
    font-size: 1.125rem;
    color: #1F1E1C;
    letter-spacing: -0.01em;
}

@media (min-width: 768px) {
    .nav-name { font-size: 1.25rem; }
}

/* Desktop nav links */
.nav-links {
    display: none;
    align-items: center;
    gap: 2rem;
}

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

.nav-links a {
    position: relative;
    font-size: 0.875rem;
    font-weight: 500;
    color: #5C5955;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #E8611A;
}

/* Animated underline on hover */
.nav-links a::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #E8611A;
    transition: width 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hamburger button (mobile only) */
.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    width: 2.5rem;
    height: 2.5rem;
    background: none;
    border: none;
    cursor: pointer;
}

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

.hamburger-line {
    display: block;
    width: 1.5rem;
    height: 2px;
    background: #1F1E1C;
    border-radius: 2px;
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Hamburger open state (X shape) */
.hamburger.open .hamburger-line:first-child {
    transform: rotate(45deg) translate(2px, 2px);
}

.hamburger.open .hamburger-line:last-child {
    transform: rotate(-45deg) translate(2px, -2px);
}


/* ─── MOBILE MENU ─────────────────────────────────────────────────────────── */

.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 90;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}

.mobile-menu.open {
    pointer-events: auto;
    opacity: 1;
}

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

.mobile-menu-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
}

.mobile-menu-panel {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 18rem;
    background: #FFFFFF;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.mobile-menu.open .mobile-menu-panel {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
    padding: 0 1.5rem;
}

.mobile-menu-title {
    font-family: "Outfit", sans-serif;
    font-weight: 600;
    font-size: 1.125rem;
    color: #1F1E1C;
}

.mobile-close {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: #5C5955;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-nav-links {
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mobile-nav-links a {
    display: block;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    color: #1F1E1C;
    border-radius: 0.375rem;
    border-left: 3px solid transparent;
    transition: all 0.2s cubic-bezier(0.23, 1, 0.32, 1);
}

.mobile-nav-links a:hover {
    background: #F7F5F3;
    color: #E8611A;
    border-left-color: #E8611A;
    padding-left: 1.25rem;
}

.mobile-menu-cta {
    margin-top: auto;
    padding: 1.5rem;
}


/* ─── HERO SECTION ────────────────────────────────────────────────────────── */

.hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-image: url("https://d2xsxph8kpxj0f.cloudfront.net/310419663030766481/CAeDLuXBGkzvnFTJ59pQBv/hero-bg-mtoyivQdEViYevX8sgRd8P.webp");
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.3);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding-top: 6rem;
    padding-bottom: 4rem;
}

.hero-label {
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #E8611A;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1F1E1C;
    max-width: 48rem;
}

@media (min-width: 768px) {
    .hero-title { font-size: 3.25rem; }
}

@media (min-width: 1024px) {
    .hero-title { font-size: 3.75rem; }
}

.hero-subtitle {
    margin-top: 1.5rem;
    font-size: 1.125rem;
    color: #5C5955;
    max-width: 38rem;
    line-height: 1.7;
}

@media (min-width: 768px) {
    .hero-subtitle { font-size: 1.25rem; }
}

.hero .btn {
    margin-top: 2.5rem;
}

.hero-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    line-height: 0;
}

.hero-divider svg {
    width: 100%;
    height: 50px;
}

@media (min-width: 768px) {
    .hero-divider svg { height: 70px; }
}


/* ─── SECTIONS (shared) ───────────────────────────────────────────────────── */

.section {
    padding: 5rem 0;
}

@media (min-width: 768px) {
    .section { padding: 7rem 0; }
}

.section-grey {
    background: #F7F5F3;
}

.section-narrow {
    max-width: 48rem;
    margin: 0 auto;
    text-align: center;
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #E8611A;
    background: #FDF0EA;
    border-radius: 9999px;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1F1E1C;
}

@media (min-width: 768px) {
    .section-title { font-size: 2.25rem; }
}

.section-subtitle {
    margin-top: 1rem;
    font-size: 1.125rem;
    color: #5C5955;
    max-width: 38rem;
    margin-left: auto;
    margin-right: auto;
}

.section-text {
    margin-top: 1.5rem;
    font-size: 1.125rem;
    color: #5C5955;
    line-height: 1.7;
}

.section-text.centered {
    text-align: center;
}


/* ─── CAPABILITIES GRID ───────────────────────────────────────────────────── */

.capabilities-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

@media (min-width: 640px) {
    .capabilities-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .capabilities-grid { grid-template-columns: repeat(4, 1fr); }
}

.card {
    background: #FFFFFF;
    border: 1px solid #E8E5E2;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: transform 0.25s cubic-bezier(0.23, 1, 0.32, 1),
                box-shadow 0.25s cubic-bezier(0.23, 1, 0.32, 1);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.card-icon {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FDF0EA;
    border-radius: 0.375rem;
    color: #E8611A;
    transition: background 0.25s, color 0.25s;
}

.card-icon svg {
    width: 1.75rem;
    height: 1.75rem;
}

.card:hover .card-icon {
    background: #E8611A;
    color: #FFFFFF;
}

.card-title {
    margin-top: 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: #1F1E1C;
}

.card-text {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #5C5955;
    line-height: 1.6;
}


/* ─── APPROACH GRID ───────────────────────────────────────────────────────── */

.approach-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 52rem;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .approach-grid { grid-template-columns: repeat(2, 1fr); }
}

.approach-item {
    padding-left: 1.25rem;
    border-left: 3px solid #E8611A;
}

.approach-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1F1E1C;
}

.approach-text {
    margin-top: 0.5rem;
    color: #5C5955;
    line-height: 1.6;
}


/* ─── CONTACT ─────────────────────────────────────────────────────────────── */

.contact-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 2.5rem;
}

@media (min-width: 640px) {
    .contact-buttons { flex-direction: row; justify-content: center; }
}


/* ─── FOOTER ──────────────────────────────────────────────────────────────── */

.footer {
    background: #1F1E1C;
    padding: 2rem 0;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: #A8A5A0;
}

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

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-logo {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.25rem;
    opacity: 0.8;
}


/* ─── SCROLL ANIMATIONS (optional — remove if not wanted) ─────────────────── */

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s cubic-bezier(0.23, 1, 0.32, 1),
                transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
