/*
  MEAM Trading — Main Stylesheet
  Site: https://meamtrading.com
  Version: 1.0.0
*/

/* ========================================
   CSS CUSTOM PROPERTIES
   ======================================== */
:root {
    --mt-dark: #1e283c;
    --mt-dark-light: #2a3650;
    --mt-yellow: #fbc618;
    --mt-yellow-hover: #e5b416;
    --mt-gold: #c9a84c;
    --mt-gold-light: #d4b968;
    --mt-white: #ffffff;
    --mt-gray-light: #f2f3f5;
    --mt-gray: #6b7280;
    --mt-text: #333333;
    --mt-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --mt-max-width: 1248px;
    --mt-radius: 12px;
    --mt-radius-sm: 8px;
    --mt-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    --mt-shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.12);
    --mt-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   RESET & BASE
   ======================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--mt-font);
    font-size: 16px;
    line-height: 1.7;
    color: var(--mt-text);
    background: var(--mt-white);
    overflow-x: hidden;
}

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

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

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--mt-dark);
}

h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); }
h2 { font-size: clamp(2rem, 4vw, 2.875rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }

p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

.container {
    max-width: var(--mt-max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    font-family: var(--mt-font);
    font-size: 1rem;
    font-weight: 600;
    border: 2px solid transparent;
    border-radius: var(--mt-radius-sm);
    cursor: pointer;
    transition: all var(--mt-transition);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.5s;
}

.btn:hover::after { left: 100%; }

.btn-primary {
    background: var(--mt-yellow);
    color: var(--mt-dark);
    border-color: var(--mt-yellow);
}

.btn-primary:hover {
    background: var(--mt-yellow-hover);
    border-color: var(--mt-yellow-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(251, 198, 24, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--mt-white);
    border-color: var(--mt-white);
}

.btn-outline:hover {
    background: var(--mt-white);
    color: var(--mt-dark);
    transform: translateY(-2px);
}

/* ========================================
   HEADER
   ======================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--mt-dark);
    transition: all var(--mt-transition);
}

.site-header.scrolled {
    background: rgba(30, 40, 60, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    max-width: var(--mt-max-width);
    margin: 0 auto;
}

.site-logo img {
    height: 48px;
    width: auto;
    transition: height var(--mt-transition);
}

.scrolled .site-logo img { height: 40px; }

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 36px;
    align-items: center;
}

.main-nav a {
    color: var(--mt-white);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    position: relative;
    padding: 4px 0;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--mt-yellow);
    transition: width var(--mt-transition);
}

.main-nav a:hover::after,
.main-nav .current-menu-item a::after { width: 100%; }

/* Mobile toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--mt-white);
    transition: all var(--mt-transition);
    border-radius: 2px;
}

.mobile-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(30, 40, 60, 0.85) 0%, rgba(30, 40, 60, 0.5) 100%);
    z-index: 1;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(0deg, var(--mt-white) 0%, transparent 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    padding-top: 120px;
}

.hero h1 {
    color: var(--mt-white);
    margin-bottom: 24px;
    max-width: 700px;
}

.hero .accent-line {
    width: 80px;
    height: 4px;
    background: var(--mt-yellow);
    border-radius: 2px;
    margin-bottom: 32px;
}

.hero p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.2rem;
    max-width: 550px;
    margin-bottom: 40px;
}

/* Hero subpage version */
.hero-sub { min-height: 55vh; }
.hero-sub::after { display: none; }

/* Diagonal cut bottom */
.hero-diagonal::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 80px;
    background: var(--mt-white);
    clip-path: polygon(0 100%, 100% 0, 100% 100%);
    z-index: 2;
}

/* ========================================
   SECTIONS
   ======================================== */
.section { padding: 100px 0; }
.section-sm { padding: 60px 0; }

.section-dark {
    background: var(--mt-dark);
    color: var(--mt-white);
}

.section-dark h2,
.section-dark h3 { color: var(--mt-white); }

.section-gray { background: var(--mt-gray-light); }

.section-title {
    text-align: center;
    margin-bottom: 64px;
}

.section-title h2 { margin-bottom: 16px; }

.section-title .divider {
    width: 60px;
    height: 3px;
    background: var(--mt-yellow);
    margin: 0 auto;
    border-radius: 2px;
}

/* ========================================
   ADVANTAGES GRID
   ======================================== */
.advantages-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.advantage-card {
    text-align: center;
    padding: 40px 24px;
    border-radius: var(--mt-radius);
    background: var(--mt-white);
    transition: all var(--mt-transition);
    border: 1px solid transparent;
}

.advantage-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--mt-shadow-lg);
    border-color: var(--mt-yellow);
}

.advantage-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, var(--mt-yellow), #ffd84d);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--mt-dark);
}

.advantage-card h3 { margin-bottom: 16px; }

.advantage-card p {
    color: var(--mt-gray);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ========================================
   PRODUCT ROWS
   ======================================== */
.product-row {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 60px;
    align-items: center;
    padding: 60px 0;
}

.product-row:nth-child(even) { direction: rtl; }
.product-row:nth-child(even) > * { direction: ltr; }

.product-info h3 {
    margin-bottom: 12px;
    color: var(--mt-dark);
}

.product-info .product-specs {
    font-weight: 600;
    color: var(--mt-yellow-hover);
    margin-bottom: 16px;
    font-size: 0.95rem;
}

.product-info p {
    color: var(--mt-gray);
    line-height: 1.8;
}

.product-image {
    position: relative;
    border-radius: var(--mt-radius);
    overflow: hidden;
}

.product-image img {
    width: 100%;
    border-radius: var(--mt-radius);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-image:hover img { transform: scale(1.03); }

.product-image::before {
    content: '';
    position: absolute;
    top: 16px;
    left: 16px;
    right: -16px;
    bottom: -16px;
    background: var(--mt-yellow);
    border-radius: var(--mt-radius);
    z-index: -1;
    opacity: 0.15;
    transition: all var(--mt-transition);
}

.product-image:hover::before {
    opacity: 0.25;
    top: 12px;
    left: 12px;
}

/* ========================================
   ABOUT PAGE
   ======================================== */
.about-content {
    position: relative;
    padding: 100px 0;
    color: var(--mt-white);
}

.about-content .container { max-width: 900px; }

.about-card {
    background: rgba(10, 18, 35, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--mt-radius);
    padding: 64px 56px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.4);
}

.about-card h2 {
    color: var(--mt-white);
    text-align: center;
    margin-bottom: 16px;
}

.about-card .divider {
    width: 120px;
    height: 2px;
    background: var(--mt-yellow);
    margin: 0 auto 48px;
    border-radius: 2px;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.85;
    color: rgba(255, 255, 255, 0.92);
    text-align: center;
}

.about-text p { margin-bottom: 24px; }

/* ========================================
   CONTACT PAGE
   ======================================== */
.contact-section { padding: 100px 0; }

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.contact-info h2 { margin-bottom: 40px; }

.contact-detail {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    font-size: 1.25rem;
}

.contact-detail-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--mt-yellow), #ffd84d);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--mt-dark);
    flex-shrink: 0;
}

.contact-detail a:hover { color: var(--mt-yellow-hover); }

/* Contact form */
.contact-form .form-group { margin-bottom: 16px; }

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 16px 20px;
    font-family: var(--mt-font);
    font-size: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: var(--mt-radius-sm);
    background: var(--mt-gray-light);
    color: var(--mt-text);
    transition: all var(--mt-transition);
    outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--mt-yellow);
    background: var(--mt-white);
    box-shadow: 0 0 0 4px rgba(251, 198, 24, 0.1);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder { color: #9ca3af; }

.contact-form textarea {
    resize: vertical;
    min-height: 150px;
}

.contact-form .btn {
    width: 100%;
    justify-content: center;
    font-size: 1.05rem;
    padding: 16px;
}

.form-message {
    padding: 14px 20px;
    border-radius: var(--mt-radius-sm);
    margin-top: 16px;
    font-weight: 500;
    display: none;
}

.form-message.success {
    background: #d1fae5;
    color: #065f46;
    display: block;
}

.form-message.error {
    background: #fee2e2;
    color: #991b1b;
    display: block;
}

/* ========================================
   MISSION & GOAL SECTION
   ======================================== */
.mission-goal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}

.mission-goal-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--mt-radius);
    padding: 48px 40px;
    transition: all var(--mt-transition);
}

.mission-goal-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(251, 198, 24, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

.mission-goal-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--mt-yellow), #ffd84d);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mt-dark);
    margin-bottom: 24px;
}

.mission-goal-card h2 {
    color: var(--mt-white);
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 16px;
}

.mission-goal-card .divider {
    width: 60px;
    height: 3px;
    background: var(--mt-yellow);
    border-radius: 2px;
    margin-bottom: 24px;
}

.mission-goal-card p {
    color: rgba(255, 255, 255, 0.82);
    font-size: 1rem;
    line-height: 1.85;
}

/* ========================================
   CTA SECTION
   ======================================== */
.cta-section {
    text-align: center;
    padding: 80px 0;
}

.cta-section .btn {
    font-size: 1.1rem;
    padding: 18px 48px;
}

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
    background: var(--mt-dark);
    padding: 60px 0;
    color: var(--mt-white);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
}

.footer-logo img {
    height: 44px;
    width: auto;
}

.footer-copy {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer-actions {
    display: flex;
    gap: 12px;
}

.footer-icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mt-white);
    font-size: 18px;
    transition: all var(--mt-transition);
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.footer-icon-btn:hover {
    background: var(--mt-yellow);
    color: var(--mt-dark);
    transform: translateY(-3px);
}

/* ========================================
   SCROLL TO TOP
   ======================================== */
.scroll-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    background: var(--mt-yellow);
    color: var(--mt-dark);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--mt-transition);
    z-index: 999;
    box-shadow: 0 4px 16px rgba(251, 198, 24, 0.3);
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(251, 198, 24, 0.4);
}

/* ========================================
   ANIMATIONS
   ======================================== */
.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.fade-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.25s; }
.stagger-3 { transition-delay: 0.4s; }

/* ========================================
   404 PAGE
   ======================================== */
.page-404 {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 80px;
}

.page-404 h1 {
    font-size: 8rem;
    color: var(--mt-yellow);
    line-height: 1;
    margin-bottom: 16px;
}

.page-404 p {
    font-size: 1.25rem;
    color: var(--mt-gray);
    margin-bottom: 32px;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
    .advantages-grid { grid-template-columns: repeat(2, 1fr); }
    .product-row { grid-template-columns: 1fr; gap: 32px; }
    .product-row:nth-child(even) { direction: ltr; }
    .contact-grid { grid-template-columns: 1fr; gap: 48px; }
    .mission-goal-grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 768px) {
    .mobile-toggle { display: flex; }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--mt-dark);
        padding: 100px 32px 32px;
        transition: right var(--mt-transition);
        box-shadow: -8px 0 32px rgba(0, 0, 0, 0.3);
    }

    .main-nav.active { right: 0; }
    .main-nav ul { flex-direction: column; gap: 24px; align-items: flex-start; }
    .main-nav a { font-size: 1.1rem; }
    .advantages-grid { grid-template-columns: 1fr; }
    .hero { min-height: 85vh; }
    .hero-sub { min-height: 45vh; }
    .section { padding: 64px 0; }
    .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    .hero-content { padding-top: 100px; }
    .btn { padding: 12px 24px; font-size: 0.9rem; }
}
