/*
Theme Name: Crew Connect
Theme URI: https://crewconnect.io
Description: Maritime recruitment platform theme. Dark navy with brass accents. Mobile-first, performance-optimised.
Version: 1.0.0
Author: Crew Connect
Text Domain: crew-connect-theme
*/

/* ═══════════════════════════════════════════════════════════
   DESIGN TOKENS
═══════════════════════════════════════════════════════════ */
:root {
    --navy:      #0B1929;
    --navy-mid:  #112236;
    --navy-light:#1A3350;
    --brass:     #C8922A;
    --brass-lt:  #E0B05A;
    --brass-dk:  #9B6E1E;
    --pearl:     #F5F5F0;
    --muted:     #8A9BB0;
    --green:     #2ECC8A;
    --red:       #E05252;
    --amber:     #F0A830;

    --font-display: 'Barlow Condensed', sans-serif;
    --font-body:    'Source Serif 4', Georgia, serif;
    --font-mono:    'JetBrains Mono', monospace;

    --radius:    8px;
    --radius-lg: 16px;
    --shadow:    0 4px 24px rgba(0,0,0,.35);
    --shadow-sm: 0 2px 10px rgba(0,0,0,.2);

    --max-w:  1200px;
    --max-wn: 860px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    background: var(--navy);
    color: var(--pearl);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Subtle noise texture on body */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='.025'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
    opacity: .4;
}

.site { position: relative; z-index: 1; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brass); text-decoration: none; transition: color .15s; }
a:hover { color: var(--brass-lt); }

h1,h2,h3,h4,h5,h6 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: .5px;
    line-height: 1.15;
    color: var(--pearl);
}

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

strong { font-weight: 700; color: var(--pearl); }
code { font-family: var(--font-mono); font-size: .9em; background: rgba(200,146,42,.12); padding: 2px 6px; border-radius: 4px; }

/* ═══════════════════════════════════════════════════════════
   LAYOUT UTILITIES
═══════════════════════════════════════════════════════════ */
.container     { max-width: var(--max-w);  margin: 0 auto; padding: 0 24px; }
.container-n   { max-width: var(--max-wn); margin: 0 auto; padding: 0 24px; }
.container-full{ width: 100%; padding: 0 24px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; }

@media (max-width: 960px) { .grid-3 { grid-template-columns: 1fr 1fr; } .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 680px) { .grid-2,.grid-3,.grid-4 { grid-template-columns: 1fr; } }

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

.text-center { text-align: center; }
.text-brass  { color: var(--brass); }
.text-muted  { color: var(--muted); }
.text-green  { color: var(--green); }

/* ═══════════════════════════════════════════════════════════
   NAVIGATION
═══════════════════════════════════════════════════════════ */
#masthead {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(7,18,32,.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(200,146,42,.15);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    padding: 0 32px;
    max-width: var(--max-w);
    margin: 0 auto;
}

.site-logo {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 2px;
    color: var(--brass);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}
.site-logo:hover { color: var(--brass-lt); }
.site-logo .logo-anchor { font-size: 28px; }

#primary-navigation ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 4px;
}
#primary-navigation li { position: relative; }
#primary-navigation a {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--muted);
    padding: 8px 14px;
    border-radius: var(--radius);
    transition: color .15s, background .15s;
    display: block;
    text-decoration: none;
}
#primary-navigation a:hover,
#primary-navigation .current-menu-item > a {
    color: var(--pearl);
    background: rgba(255,255,255,.06);
}

.nav-cta {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: var(--brass);
    color: var(--navy) !important;
    padding: 9px 20px !important;
    border-radius: var(--radius) !important;
}
.nav-cta:hover { background: var(--brass-lt) !important; color: var(--navy) !important; }

.nav-cta-ghost {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: transparent;
    color: var(--brass) !important;
    padding: 9px 20px !important;
    border-radius: var(--radius) !important;
    border: 1px solid var(--brass) !important;
}
.nav-cta-ghost:hover { background: rgba(200,146,42,.12) !important; color: var(--brass) !important; }

/* Hamburger */
.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    background: none;
    border: none;
}
.nav-hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--pearl);
    border-radius: 2px;
    transition: all .2s;
}
.nav-hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

#mobile-nav {
    display: none;
    background: var(--navy-mid);
    border-top: 1px solid rgba(200,146,42,.15);
    padding: 16px 24px;
}
#mobile-nav.open { display: block; }
#mobile-nav ul { list-style: none; }
#mobile-nav li { border-bottom: 1px solid rgba(255,255,255,.06); }
#mobile-nav a {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--muted);
    padding: 14px 0;
    display: block;
    text-decoration: none;
}
#mobile-nav a:hover { color: var(--pearl); }

@media (max-width: 900px) {
    #primary-navigation { display: none; }
    .nav-hamburger { display: flex; }
}

/* ═══════════════════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════════════════ */
.hero {
    position: relative;
    min-height: 92vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--navy);
}

/* Animated ocean grid */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(200,146,42,.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(200,146,42,.04) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: grid-drift 20s linear infinite;
}
@keyframes grid-drift { from { transform: translate(0,0); } to { transform: translate(60px,60px); } }

/* Radial glow */
.hero::after {
    content: '';
    position: absolute;
    top: 20%;
    right: -10%;
    width: 60%;
    height: 70%;
    background: radial-gradient(ellipse at center, rgba(200,146,42,.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    z-index: 2;
    padding: 80px 32px;
    max-width: var(--max-w);
    margin: 0 auto;
    width: 100%;
}

.hero-eyebrow {
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--brass);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.hero-eyebrow::before {
    content: '';
    display: block;
    width: 32px;
    height: 2px;
    background: var(--brass);
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(48px, 7vw, 88px);
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1;
    text-transform: uppercase;
    margin-bottom: 24px;
    max-width: 700px;
}
.hero-title em {
    font-style: normal;
    color: var(--brass);
    display: block;
}

.hero-sub {
    font-size: 18px;
    line-height: 1.6;
    color: var(--muted);
    max-width: 520px;
    margin-bottom: 40px;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 64px;
}

.hero-stats {
    display: flex;
    gap: 48px;
    flex-wrap: wrap;
    padding-top: 40px;
    border-top: 1px solid rgba(200,146,42,.2);
}
.hero-stat-n {
    font-family: var(--font-display);
    font-size: 40px;
    font-weight: 900;
    color: var(--brass);
    line-height: 1;
    margin-bottom: 4px;
}
.hero-stat-l {
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--muted);
    font-family: var(--font-display);
}

/* Scroll indicator */
.hero-scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-family: var(--font-display);
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: bob 2s ease-in-out infinite;
}
@keyframes bob { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(6px)} }
.hero-scroll::after {
    content: '';
    display: block;
    width: 1px;
    height: 32px;
    background: linear-gradient(var(--brass), transparent);
}

@media (max-width: 680px) {
    .hero-inner { padding: 60px 20px; }
    .hero-stats  { gap: 32px; }
    .hero-stat-n { font-size: 30px; }
}

/* ═══════════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════════ */
.btn {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 14px 28px;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all .15s;
    text-decoration: none;
    white-space: nowrap;
}
.btn-primary { background: var(--brass); color: var(--navy); }
.btn-primary:hover { background: var(--brass-lt); color: var(--navy); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(200,146,42,.3); }
.btn-outline { background: transparent; color: var(--pearl); border: 1px solid rgba(200,146,42,.4); }
.btn-outline:hover { border-color: var(--brass); color: var(--brass); background: rgba(200,146,42,.06); }
.btn-ghost  { background: rgba(255,255,255,.07); color: var(--pearl); border: 1px solid rgba(255,255,255,.12); }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.btn-sm { padding: 9px 18px; font-size: 11px; }
.btn-lg { padding: 18px 36px; font-size: 15px; }

/* ═══════════════════════════════════════════════════════════
   SECTIONS
═══════════════════════════════════════════════════════════ */
.section { padding: 96px 0; }
.section-sm { padding: 60px 0; }
.section-dark { background: var(--navy); }
.section-mid  { background: var(--navy-mid); }
.section-light{ background: rgba(255,255,255,.02); }

.section-label {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--brass);
    margin-bottom: 12px;
}
.section-title {
    font-family: var(--font-display);
    font-size: clamp(32px, 4vw, 52px);
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 16px;
    letter-spacing: -.5px;
}
.section-sub {
    font-size: 17px;
    color: var(--muted);
    max-width: 560px;
    line-height: 1.6;
}
.section-header { margin-bottom: 56px; }
.section-header.center { text-align: center; }
.section-header.center .section-sub { margin: 0 auto; }

/* Decorative divider */
.divider {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(200,146,42,.3), transparent);
    margin: 0;
}

/* ═══════════════════════════════════════════════════════════
   CARDS
═══════════════════════════════════════════════════════════ */
.card {
    background: var(--navy-mid);
    border: 1px solid rgba(200,146,42,.12);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: border-color .2s, transform .2s;
}
.card:hover {
    border-color: rgba(200,146,42,.3);
    transform: translateY(-3px);
}

.card-icon {
    font-size: 32px;
    margin-bottom: 16px;
}
.card-title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    margin-bottom: 10px;
    color: var(--pearl);
}
.card-body {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.6;
}

/* Horizontal feature card */
.feature-card {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    padding: 28px;
    background: var(--navy-mid);
    border: 1px solid rgba(200,146,42,.1);
    border-radius: var(--radius-lg);
    transition: border-color .2s;
}
.feature-card:hover { border-color: rgba(200,146,42,.3); }
.feature-icon {
    font-size: 28px;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    background: rgba(200,146,42,.12);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Stat card */
.stat-card {
    background: rgba(200,146,42,.06);
    border: 1px solid rgba(200,146,42,.15);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    text-align: center;
}
.stat-number {
    font-family: var(--font-display);
    font-size: 48px;
    font-weight: 900;
    color: var(--brass);
    line-height: 1;
    margin-bottom: 6px;
}
.stat-label {
    font-family: var(--font-display);
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--muted);
}

/* ═══════════════════════════════════════════════════════════
   HOW IT WORKS STEPS
═══════════════════════════════════════════════════════════ */
.steps { position: relative; }
.step {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    padding: 28px 0;
    border-bottom: 1px solid rgba(200,146,42,.1);
    position: relative;
}
.step:last-child { border: none; }
.step-num {
    font-family: var(--font-display);
    font-size: 48px;
    font-weight: 900;
    color: rgba(200,146,42,.2);
    line-height: 1;
    width: 60px;
    flex-shrink: 0;
    text-align: right;
}
.step-content h3 {
    font-family: var(--font-display);
    font-size: 20px;
    text-transform: uppercase;
    margin-bottom: 8px;
    color: var(--pearl);
}
.step-content p { color: var(--muted); font-size: 15px; margin: 0; }

/* ═══════════════════════════════════════════════════════════
   TESTIMONIALS
═══════════════════════════════════════════════════════════ */
.testimonial {
    background: var(--navy-mid);
    border: 1px solid rgba(200,146,42,.12);
    border-radius: var(--radius-lg);
    padding: 32px;
}
.testimonial-quote {
    font-size: 16px;
    line-height: 1.7;
    color: var(--pearl);
    margin-bottom: 20px;
    position: relative;
    padding-top: 20px;
}
.testimonial-quote::before {
    content: '"';
    font-family: var(--font-display);
    font-size: 64px;
    color: var(--brass);
    opacity: .4;
    position: absolute;
    top: -16px;
    left: -8px;
    line-height: 1;
}
.testimonial-author {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--brass);
}
.testimonial-role {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
}

/* ═══════════════════════════════════════════════════════════
   PAGE HERO (inner pages)
═══════════════════════════════════════════════════════════ */
.page-hero {
    background: var(--navy-mid);
    border-bottom: 1px solid rgba(200,146,42,.15);
    padding: 60px 0;
}
.page-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -.5px;
    margin-bottom: 8px;
}
.page-hero p { color: var(--muted); font-size: 16px; margin: 0; }

/* ═══════════════════════════════════════════════════════════
   CONTENT AREA (for WP page content + shortcodes)
═══════════════════════════════════════════════════════════ */
.entry-content {
    padding: 60px 0 80px;
}

/* Full-width pages (portal, search, dashboard) */
.page-template-full-width .entry-content,
.page-template-full-width .page-hero + div {
    padding: 40px 0;
}

/* Ensure shortcode areas are edge-to-edge */
.full-width-shortcode {
    margin: 0 -24px;
}

/* ═══════════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════════ */
#colophon {
    background: rgba(5,12,20,.95);
    border-top: 1px solid rgba(200,146,42,.15);
    padding: 64px 0 32px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 48px;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-brand .site-logo { font-size: 20px; margin-bottom: 14px; }
.footer-brand p { font-size: 14px; color: var(--muted); line-height: 1.6; max-width: 280px; }

.footer-col h4 {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--brass);
    margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 9px; }
.footer-col a {
    font-size: 14px;
    color: var(--muted);
    text-decoration: none;
    transition: color .15s;
}
.footer-col a:hover { color: var(--pearl); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.06);
    padding-top: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: var(--muted);
}
.footer-bottom a { color: var(--muted); }
.footer-bottom a:hover { color: var(--brass); }

/* ═══════════════════════════════════════════════════════════
   ANNOUNCE BAR (optional top strip)
═══════════════════════════════════════════════════════════ */
.announce-bar {
    background: var(--brass);
    color: var(--navy);
    text-align: center;
    padding: 9px 20px;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
}
.announce-bar a { color: var(--navy); text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════
   WORDPRESS CORE OVERRIDES
═══════════════════════════════════════════════════════════ */
.wp-block-image { margin: 24px 0; }
.alignfull { margin-left: calc(-50vw + 50%); max-width: 100vw; }
.alignwide { margin-left: -48px; max-width: calc(100% + 96px); }

/* WP menus integration */
.menu { list-style: none; padding: 0; margin: 0; }

/* ═══════════════════════════════════════════════════════════
   UTILITY CLASSES
═══════════════════════════════════════════════════════════ */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: 8px; }
.mb-16{ margin-bottom: 16px; }
.mb-32{ margin-bottom: 32px; }
.gap-8 { gap: 8px; }
.gap-16{ gap: 16px; }

/* ═══════════════════════════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════════════════════════ */
@keyframes fadeUp   { from { opacity:0; transform:translateY(24px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeIn   { from { opacity:0; } to { opacity:1; } }
@keyframes shimmer  { 0%{background-position:-200% 0} 100%{background-position:200% 0} }

.animate-fade-up { animation: fadeUp .5s ease forwards; }
.animate-fade-in { animation: fadeIn .4s ease forwards; }

/* Stagger children on scroll */
.stagger > * { opacity: 0; transform: translateY(20px); transition: opacity .4s ease, transform .4s ease; }
.stagger.visible > *:nth-child(1) { opacity:1;transform:none;transition-delay:.05s; }
.stagger.visible > *:nth-child(2) { opacity:1;transform:none;transition-delay:.12s; }
.stagger.visible > *:nth-child(3) { opacity:1;transform:none;transition-delay:.19s; }
.stagger.visible > *:nth-child(4) { opacity:1;transform:none;transition-delay:.26s; }
.stagger.visible > *:nth-child(5) { opacity:1;transform:none;transition-delay:.33s; }
.stagger.visible > *:nth-child(6) { opacity:1;transform:none;transition-delay:.40s; }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE HELPERS
═══════════════════════════════════════════════════════════ */
@media (max-width: 680px) {
    .section { padding: 64px 0; }
    .container, .container-n { padding: 0 16px; }
    .hero-actions { flex-direction: column; }
    .btn { width: 100%; justify-content: center; }
    .footer-bottom { flex-direction: column; text-align: center; }
}
