/*
* Apesyto Corporate Website - Design System
* Colors: Graphite (#2B2B2B), Gold (#C8A95D), Warm White (#FAFAF7)
* Fonts: Playfair Display (Headings), Inter (Body)
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
    --color-primary: #2B2B2B;
    /* Deep Graphite Gray */
    --color-secondary: #C8A95D;
    /* Muted Gold */
    --color-text: #333333;
    --color-text-light: #F7F7F2;
    /* Warm Off-white */
    --color-bg-light: #FAFAF7;
    /* Warm White Background */
    --color-white: #FFFFFF;

    /* Auxiliary Colors */
    --color-grey-light: #E5E5E5;
    /* Dividers */
    --color-gold-light: #EADFC4;
    /* Subtle Highlights */

    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    --container-width: 1200px;
    --transition-base: all 0.3s ease;
}

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

html,
body {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-white);
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

h1 {
    font-size: 3.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2.5rem;
    font-weight: 600;
}

h3 {
    font-size: 1.65rem;
    font-weight: 600;
}

.section-subtitle {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 2px solid var(--color-gold-light);
    display: inline-block;
    padding-bottom: 0.5rem;
    margin-bottom: var(--spacing-md);
}

/* Ensure headings have breathing room when following text */
p+h2,
p+h3,
ul+h2,
ul+h3 {
    margin-top: 2rem;
}

p {
    margin-bottom: 1.25rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-base);
}

ul {
    list-style: none;
}

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

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.text-gold {
    color: var(--color-secondary);
}

.text-white {
    color: var(--color-white);
}

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

.bg-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.bg-dark {
    background-color: #333333;
    color: var(--color-white);
}

.bg-light {
    background-color: var(--color-bg-light);
}

/* Utilities - Spacing & Text */
.intro-text {
    font-size: 1.25rem;
    font-weight: 300;
    margin-bottom: var(--spacing-lg);
}

.mt-lg {
    margin-top: var(--spacing-lg);
}

.mt-sm {
    margin-top: var(--spacing-sm);
}

.mb-md {
    margin-bottom: var(--spacing-md);
}

.mb-lg {
    margin-bottom: var(--spacing-lg);
}

.mt-xxl {
    margin-top: calc(var(--spacing-xl) + 2rem);
}

.my-md {
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.text-justify {
    text-align: justify;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.max-w-820 {
    max-width: 820px;
}

.max-w-800 {
    max-width: 800px;
}

.max-w-700 {
    max-width: 700px;
}

/* Typography Utilities */
.text-sm {
    font-size: 0.8rem;
}

.text-base {
    font-size: 1rem;
}

.text-lg {
    font-size: 1.1rem;
}

.text-xl {
    font-size: 1.25rem;
}

.text-value-heading {
    font-size: 1.4rem;
}

.text-tagline {
    font-size: 1.5rem;
}

.text-2xl {
    font-size: 2rem;
}

.font-light {
    font-weight: 300;
}

.font-normal {
    font-weight: 400;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.text-muted {
    opacity: 0.5;
}

.text-white-opaque {
    color: rgba(255, 255, 255, 0.7);
}

.opacity-90 {
    opacity: 0.9;
}

.hover-opacity {
    transition: opacity 0.3s ease;
}

.hover-opacity:hover {
    opacity: 0.8 !important;
}

.underline {
    text-decoration: underline !important;
    text-underline-offset: 4px;
}

.underline-subtle {
    text-decoration: underline;
    text-decoration-color: rgba(0, 0, 0, 0.2);
    text-underline-offset: 4px;
    transition: var(--transition-base);
}

.underline-subtle:hover {
    text-decoration-color: var(--color-secondary);
}

.hover-indent {
    display: inline-block;
    transition: var(--transition-base);
}

.hover-indent:hover {
    transform: translateX(5px);
}

.cursor-default {
    cursor: default;
}

/* Layout Utilities */
.w-full {
    width: 100%;
}

.h-auto {
    height: auto;
}

.d-flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.gap-sm {
    gap: 0.5rem;
}

.gap-md {
    gap: 1rem;
}

.gap-20 {
    gap: 20px;
}

.flex-wrap {
    flex-wrap: wrap;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

/* Visual Utilities */
.rounded {
    border-radius: 4px;
}

.shadow-sm {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px solid var(--color-secondary);
    color: var(--color-secondary);
    transition: var(--transition-base);
    background: transparent;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--color-secondary);
    color: var(--color-primary);
}

.btn-primary {
    background-color: var(--color-secondary);
    color: var(--color-primary);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--color-secondary);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-primary);
    /* Default for light backgrounds */
    border: 1px solid var(--color-secondary);
    padding: 10px 25px;
    /* Slightly smaller */
    font-size: 0.85rem;
    letter-spacing: 2px;
}

.btn-outline:hover {
    background-color: var(--color-secondary);
    color: var(--color-primary);
}

/* Header */
header {
    background-color: var(--color-white);
    padding: var(--spacing-sm) 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: 2px;
}

.logo img {
    max-width: 180px;
    height: auto;
}

nav ul {
    display: flex;
    gap: 1.5rem;
    /* Reduced from 2rem (spacing-md) */
    align-items: center;
}

nav a {
    font-size: 0.8rem;
    /* Reduced from 0.9rem */
    font-weight: 500;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    /* Reduced from 1px */
    position: relative;
    white-space: nowrap;
    /* Prevent line breaks */
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--color-secondary);
    transition: var(--transition-base);
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

/* Hero Section */
.hero {
    height: 80vh;
    background-color: var(--color-primary);
    display: flex;
    align-items: center;
    background-image: url('images/hero_background_v2.webp');
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    margin-top: 90px;
    /* Header height offset */
}

/* Subtle gradient overlay */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(250, 250, 247, 0.85) 0%, rgba(250, 250, 247, 0.6) 100%);
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
    color: var(--color-primary);
    max-width: 800px;
    /* Focus reading */
}

.hero h1 {
    margin-bottom: var(--spacing-md);
}

.hero p.lead,
.page-hero p.lead {
    font-size: 1.25rem;
    font-weight: 300;
    margin-bottom: var(--spacing-lg);
    opacity: 0.9;
}

.hero .btn-outline {
    border-color: var(--color-primary);
    color: var(--color-primary);
    padding: 12px 30px;
    text-decoration: none;
    border: 1px solid var(--color-primary);
    font-weight: 500;
    transition: all 0.3s ease;
}

.hero .btn-outline:hover {
    background-color: var(--color-primary);
    color: var(--color-text-light);
    text-decoration: none;
}

/* Page Hero */
section.page-hero {
    min-height: 35vh;
    height: auto;
    padding: 3rem 1rem;
    background-color: var(--color-primary);
    background-image: url('images/subpage_hero_bg.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 90px;
    text-align: center;
}

section.page-hero h1 {
    color: var(--color-white);
    margin-bottom: 0;
}

section.page-hero p.lead {
    margin-bottom: 0;
    margin-top: 1rem;
}

/* Sections */
section {
    padding: var(--spacing-xl) 0;
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.section-title.text-left {
    text-align: left;
}

.section-title span {
    display: block;
    font-family: var(--font-body);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-secondary);
    margin-bottom: var(--spacing-xs);
}

/* Values Grid */
.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

.value-card {
    padding: var(--spacing-md);
    background: var(--color-white);
    border: 1px solid #eee;
    transition: var(--transition-base);
    text-align: center;
}

.value-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border-color: var(--color-secondary);
}

.value-icon {
    font-size: 2rem;
    color: var(--color-secondary);
    margin-bottom: var(--spacing-sm);
    display: block;
}

/* Content Split (Image + Text) */
.split-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.split-content h2 {
    margin-bottom: var(--spacing-md);
}

/* Text Content - Typography emphasis */
.text-content p {
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    color: #555;
    text-align: justify;
}

.arrow-link {
    color: var(--color-primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-base);
}

.arrow-link:hover {
    color: var(--color-secondary);
}

.arrow-link i {
    transition: transform 0.3s ease;
}

.arrow-link:hover i {
    transform: translateX(5px);
}

.highlight-box {
    border-left: 4px solid var(--color-secondary);
    padding-left: var(--spacing-md);
    margin: var(--spacing-md) 0;
    font-style: italic;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--color-primary);
}

/* Footer */
footer {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 2rem 0;
    font-size: 0.9rem;
}

footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: var(--spacing-md);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
}

.footer-links a:hover {
    color: var(--color-secondary);
}

.copyright {
    opacity: 0.5;
    font-size: 0.8rem;
    margin-top: var(--spacing-md);
}

/* Responsive */
/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 0;
}

.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--color-primary);
    transition: var(--transition-base);
}

/* Responsive */
@media (max-width: 900px) {
    section {
        padding: var(--spacing-md) 0;
    }

    .hero {
        height: 60vh;
        margin-top: 75px;
    }

    section.page-hero {
        min-height: auto;
        padding: 3rem 1rem 3rem 1rem;
        margin-top: 75px;
    }

    .values-grid,
    .split-section {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    /* Mobile Header */
    .mobile-menu-btn {
        display: flex;
    }

    header .container {
        flex-direction: row;
        /* Keep logo and burger in row */
        justify-content: space-between;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: var(--color-bg-light);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: var(--transition-base);
        z-index: 1000;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.05);
    }

    nav.active {
        right: 0;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        padding: 0;
        margin: 0;
        width: 100%;
    }

    nav li {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    nav a {
        display: inline-block;
        font-size: 1.15rem;
        font-weight: 600;
        white-space: normal;
        text-align: center;
        padding: 0.5rem 1rem;
        margin: 0 auto;
        max-width: 90%;
        line-height: 1.4;
    }

    /* Hamburger Animation */
    .mobile-menu-btn.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: calc(var(--spacing-xl) * 1.5);
    align-items: flex-start;
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
}

.form-control {
    background: transparent;
    border: none;
    border-bottom: 1px solid #E5E5E5;
    border-radius: 0;
    font-family: var(--font-body);
    font-size: 1.05rem;
    color: var(--color-text);
    padding: 0.75rem 0;
    transition: border-color var(--transition-base);
}

.form-control:focus {
    border-color: var(--color-secondary);
    outline: none;
}

.contact-form label {
    font-family: var(--font-body);
    color: var(--color-primary);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

.contact-form textarea {
    resize: vertical;
}


.list-styled {
    list-style-type: none;
    padding-left: 0;
}


.border-light {
    border: 1px solid #ddd;
}

.p-sm {
    padding: var(--spacing-sm);
}

.d-block {
    display: block;
}


.p-md {
    padding: var(--spacing-md);
}

.p-lg {
    padding: var(--spacing-lg);
}

.p-xl {
    padding: var(--spacing-xl);
}

@media (max-width: 768px) {
    .p-md {
        padding: var(--spacing-sm);
    }

    .p-lg {
        padding: 1.5rem;
    }

    .p-xl {
        padding: var(--spacing-md);
    }

    .mb-lg {
        margin-bottom: var(--spacing-md);
    }

    .mt-lg {
        margin-top: var(--spacing-md);
    }

    .intro-text {
        font-size: 1.1rem;
        margin-bottom: var(--spacing-md);
    }
}

.border-radius-sm {
    border-radius: 4px;
}


/* 2x2 Grid for Desktop */
.values-grid-2x2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

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


/* Utilities */
.aspect-4-3 {
    object-fit: cover;
    aspect-ratio: 4/3;
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Stagger delays for multiple items in a row (e.g., grids) */
.delay-100 {
    transition-delay: 100ms;
}

.delay-200 {
    transition-delay: 200ms;
}

.delay-300 {
    transition-delay: 300ms;
}

.delay-400 {
    transition-delay: 400ms;
}