@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Source+Serif+Pro:wght@300;400;600;700&display=swap');

/* Global typography refinements for 2025 trends - slimmer, more refined */
/* Base font sizing handled by Tailwind; avoid overriding root font-size */

/* Modern, CSS-native smooth scrolling for anchor links */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Mobile spacing fixes for fixed header and anchor targets */
@media (max-width: 768px) {
    /* Global anchor offset for fixed header */
    html { scroll-padding-top: 112px; }

    /* Ensure headings aren't hidden beneath fixed nav when using hash links */
    #home, #services { scroll-margin-top: 112px; }

    /* Ensure hero content clears fixed nav and is aligned from top */
    #home.hero { padding-top: 7.5rem; }
    .hero {
        margin-top: 0;
        align-items: flex-start;
        height: auto;            /* override fixed height classes */
        min-height: 32rem;                  /* slightly taller on mobile */
        padding-bottom: 1.5rem;             /* a touch more space below */
    }
    .hero h1 {
        margin-top: 0;
        padding-top: 0;
        margin-bottom: 0.5rem;   /* tighten space under heading */
    }

    /* Ensure Services heading sits comfortably below previous section */
    #services { padding-top: 2rem; margin-top: 0; }

    /* Ensure content grid stacks cleanly on mobile */
    .content-grid { grid-template-columns: 1fr; gap: 2rem; }
    .text-content { text-align: center; }
    .image-bubbles { justify-self: center; }

    /* Site-wide: increase horizontal padding slightly less than double */
    .container, .px-4 {
        padding-left: 1.75rem;
        padding-right: 1.75rem;
    }

    /* Center contact form on mobile */
    #contact form {
        max-width: 28rem;
        margin-left: auto;
        margin-right: auto;
    }
    #contact form label { text-align: center; }
    #contact form button[type="submit"] { display: block; margin-left: auto; margin-right: auto; }

    /* Mobile navbar scroll effects */
    nav {
        transition: all 0.3s ease;
    }
    
    .nav-scrolled {
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }
    

    
    #logo {
        transition: all 0.3s ease;
        transform-origin: center;
    }
    
    .nav-scrolled #logo {
        height: 3rem !important; /* Shrink from 4rem (h-16) to 3rem (h-12) */
    }
    
    /* Adjust mobile menu positioning when nav is scrolled */
    .nav-scrolled + #mobile-menu {
        top: calc(100% - 8px);
    }
}

@media (min-width: 1024px) {
    /* Let Tailwind control responsive font scale */
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', sans-serif;
    line-height: 1.5;
    font-weight: 300;
}

h1, h2, h3 {
    font-family: 'Source Serif Pro', Georgia, 'Times New Roman', Times, serif;
    letter-spacing: -0.02em;
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1 {
    line-height: 1.1;
    font-weight: 400;
}

h2 {
    line-height: 1.15;
    font-weight: 400;
}

h3 {
    line-height: 1.2;
    font-weight: 400;
}

p {
    color: #d1d5db;
    line-height: 1.7;
    margin: 0 0 1rem 0;
}

/* Base list and item rhythm aligned to paragraph sizing */
ul,
ol {
    margin: 0 0 1rem 1.25rem;
    padding: 0;
}

ul { list-style-type: disc; }
ol { list-style-type: decimal; }

li {
    line-height: 1.7;
    margin: 0.375rem 0;
}

/* Tighter spacing for nested lists */
li ul,
li ol { margin-top: 0.375rem; margin-bottom: 0.375rem; }

/* Subtle nav size refinement handled by Tailwind classes in markup */
.nav-link { font-weight: 500; letter-spacing: 0.01em; }

/* Typography scale handled in markup with Tailwind utilities */

.royal-blue {
    background-color: #0e182c;
}

.gold-text {
    color: #f4d284;
}

/* Enhanced glass nav with subtle background glass effect */
.glass-nav {
    background: rgba(10, 15, 30, 0.55);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 60;
    position: relative;
}

/* Add more padding above the Premier heading */
.hero h1 {
    margin-top: 2rem;
    padding-top: 1rem;
}

/* Seamless blend tweak: extend overlay by 1px to avoid hairline seam */
.hero {
    position: relative;
    margin-bottom: -1px;
}

.hero::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    width: 100%;
    height: calc(100% + 2px);
    background: linear-gradient(
        to bottom,
        rgba(18, 30, 52, 0.00) 0%,
        rgba(18, 30, 52, 0.25) 35%,
        rgba(18, 30, 52, 0.85) 60%,
        rgba(18, 30, 52, 1.00) 80%,
        rgba(18, 30, 52, 1.00) 100%
    );
    z-index: 1;
}

h1 {
    background: linear-gradient(to bottom, #f9dc94, #ffffff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 500;
}

h2, h3 {
    background: linear-gradient(to bottom, #f9dc94, #ffffff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 500;
}

.commodity-card {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.commodity-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.commodity-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    z-index: 1;
}

.commodity-card h3 {
    position: absolute;
    bottom: 16px;
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 2;
}

#logo-container {
    position: relative;
    display: inline-block;
}

#sparkle-svg {
    position: absolute;
    top: -20px;
    left: 10px;
    width: 170px;
    height: 182px;
    pointer-events: none;
}

.sparkles path {
    fill: #f4d284;
    transform-origin: 50% 50%;
    transform-box: fill-box;
    animation: sparkle var(--duration) var(--delay) infinite ease-in-out;
}

@keyframes sparkle {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(0); opacity: 0; }
    70% { transform: scale(-1, 0); opacity: 0.8; }
    80% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0); opacity: 0; }
}

.circle-img {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto;
}

.circle-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Modern nav links */
.nav-link {
    position: relative;
    padding: 0.5rem 0.75rem;
    border-radius: 9999px;
    color: #e5e7eb; /* tailwind gray-200 */
    transition: background-color 200ms ease, color 200ms ease, transform 150ms ease;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #f4d284; /* gold */
}

/* CTA pill button */
.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(180deg, #f9dc94, #c19d4f);
    color: #0e182c;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(241, 196, 15, 0.25);
    transition: transform 120ms ease, box-shadow 200ms ease, filter 200ms ease;
    white-space: nowrap;
}

.cta-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(241, 196, 15, 0.35);
    filter: brightness(1.02);
}

/* Back to Top button */
.back-to-top {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 60;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 9999px;
    background: linear-gradient(180deg, #f9dc94, #c19d4f);
    color: #0e182c;
    box-shadow: 0 10px 24px rgba(241, 196, 15, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}

.back-to-top:hover { box-shadow: 0 14px 30px rgba(241, 196, 15, 0.45); }

.back-to-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .back-to-top { transition: none; }
}

/* Mobile menu link polish */
.mobile-link {
    transition: background-color 200ms ease, color 200ms ease;
}

.mobile-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #f4d284;
}

/* Simple commodity card styling without hover effects */
.commodity-card {
    transition: none;
}

.commodity-card img {
    transition: none;
}

.commodity-card h3 {
    transition: none;
}



/* Legacy petroleum product styles removed - now using Tailwind classes */

/* Alternating royal navy section backgrounds */
.section-navy-1 { background: #0e182c; }
.section-navy-2 { background: #101d36; }
.section-navy-3 { background: #0c1526; }
.section-navy-4 { background: #11203d; }

/* Ensure section spacing reads well on dark backgrounds */
.section-navy-1, .section-navy-2, .section-navy-3, .section-navy-4 {
    color: #e5e7eb;
}

/* Override any conflicting background classes */
.section-navy-3.bg-gray-900\/50 {
    background: #0c1526;
}

/* Legacy content grid and image bubble styles removed - now using Tailwind classes */

/* SVG World Map Responsiveness */
#global-representation svg {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    overflow: visible;
}

/* Ensure markers scale properly with the SVG */
#global-representation .location-marker {
    vector-effect: non-scaling-stroke;
    transition: r 0.2s ease;
}

/* Tooltip styling */
#global-representation .location-tooltip-bg,
#global-representation .location-tooltip-text {
    transition: opacity 0.3s ease;
    pointer-events: none;
}

/* Responsive marker sizing */
@media (max-width: 768px) {
    #global-representation .location-marker {
        r: 6 !important; /* Bigger markers on mobile */
    }
    
    #global-representation .location-glow {
        r: 12 !important; /* Bigger glow on mobile */
    }
    
    #global-representation .location-marker + text {
        font-size: 12px !important; /* Bigger text on mobile */
    }
    
    /* Ensure SVG container is properly sized on mobile */
    #global-representation .relative {
        width: 100%;
        overflow: visible;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    #global-representation .location-marker {
        r: 4 !important; /* Keep consistent size on tablet */
    }
    
    #global-representation .location-marker + text {
        font-size: 10px !important; /* Keep consistent text size on tablet */
    }
}

/* Ensure SVG maintains aspect ratio and markers stay positioned correctly */
#global-representation svg {
    preserveAspectRatio: xMinYMin meet;
}

/* Stock Chart Backdrop for Services Section */
.stock-chart-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
    opacity: 0.15;
}

.stock-chart-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.stock-chart-svg {
    width: 100%;
    height: 100%;
}

.chart-line {
    fill: none;
    stroke: #f4d284;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 1;
}

.chart-area {
    fill: url(#stockGradient);
    opacity: 0.3;
}

.chart-dots {
    fill: rgba(244, 210, 132, 0.8);
    opacity: 0;
    animation: dotPulse 3s ease-in-out infinite;
}

.peak-dot {
    fill: rgba(34, 197, 94, 0.9);
    stroke: rgba(244, 210, 132, 0.6);
    stroke-width: 1;
    animation: peakPulse 2s ease-in-out infinite;
}

.chart-grid {
    stroke: rgba(244, 210, 132, 0.1);
    stroke-width: 1;
    stroke-dasharray: 2,2;
}

@keyframes drawLine {
    from {
        stroke-dashoffset: 100%;
    }
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes fillArea {
    0% {
        opacity: 0;
    }
    50% {
        opacity: 0;
    }
    100% {
        opacity: 0.3;
    }
}

@keyframes dotPulse {
    0%, 80% {
        opacity: 0;
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0.8;
    }
}

@keyframes peakPulse {
    0% {
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
    80% {
        opacity: 1;
    }
    100% {
        opacity: 0.8;
    }
}

@keyframes chartPulse {
    0%, 50% {
        opacity: 0.06;
    }
    75% {
        opacity: 0.12;
    }
    100% {
        opacity: 0.08;
    }
}

/* Responsive chart adjustments */
@media (max-width: 768px) {
    .stock-chart-backdrop {
        opacity: 0.05;
    }
    
    .chart-line {
        stroke-width: 1.5;
    }
}

/* Modern Hamburger Menu */
.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    cursor: pointer;
    padding: 0;
    border: none;
    background: transparent;
}

.hamburger-line {
    display: block;
    height: 2px;
    width: 100%;
    background: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger.active .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.active .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile menu enhancements */
#mobile-menu {
    position: fixed;
    left: 0;
    width: 100vw;
    background: rgba(14, 24, 44, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: all 0.3s ease;
    z-index: 50;
}

#mobile-menu.hidden {
    display: none;
}

#mobile-menu:not(.hidden) {
    display: flex;
}

#mobile-menu a {
    font-size: 1.5rem;
    font-weight: 500;
    padding: 1rem 2rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 200px;
}

#mobile-menu a:hover {
    background: rgba(244, 210, 132, 0.2);
    transform: scale(1.05);
    color: #f4d284;
}

.bg-goldbutton {
    background: #debd72;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0px 4px 10px #e4ca8582;
}