/* ===========================
   Cybercraft — Shared Styles
   =========================== */

/* CSS VARIABLES */
:root {
    --cc-navy: #1a1a2e;
    --cc-navy-mid: #16213e;
    --cc-navy-light: #0f3460;
    --cc-purple: #7B5EA7;
    --cc-purple-dark: #5D4580;
    --cc-purple-deeper: #3D2E60;
    --cc-gold: #e2b340;
    --cc-gold-light: #f4d47c;
    --bg-white: #ffffff;
    --bg-light: #f7f5fb;
    --bg-lavender: #EDE9F5;
    --text-heading: #1E2A4A;
    --text-body: #4A4A6A;
    --text-muted: #7A7A9A;
    --text-white: #ffffff;
    --text-white-muted: rgba(255,255,255,0.7);
    --border-light: rgba(123, 94, 167, 0.12);
    --border-card: rgba(123, 94, 167, 0.08);
    --shadow-sm: 0 1px 3px rgba(30, 42, 74, 0.06);
    --shadow-md: 0 4px 16px rgba(30, 42, 74, 0.08);
    --shadow-lg: 0 8px 32px rgba(30, 42, 74, 0.12);
    --section-pad: 80px;
    --container-max: 1200px;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* BASE RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: var(--text-body); line-height: 1.65; background: var(--bg-white); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 32px; }

/* HEADER */
.site-header { background: var(--bg-white); border-bottom: 1px solid var(--border-light); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 16px 32px; max-width: var(--container-max); margin: 0 auto; }
.logo-link { display: flex; align-items: center; }
.logo-link img { height: 36px; width: auto; }
.main-nav { display: flex; align-items: center; gap: 2px; }
.nav-item { position: relative; }
.nav-link { display: flex; align-items: center; gap: 4px; padding: 8px 14px; font-size: 14px; font-weight: 500; color: var(--text-body); border-radius: 6px; transition: all 0.2s var(--ease); white-space: nowrap; }
.nav-link:hover, .nav-link.active { color: var(--cc-purple); background: var(--bg-lavender); }
.nav-link .chevron { width: 12px; height: 12px; transition: transform 0.2s var(--ease); }
.nav-dropdown { position: absolute; top: calc(100% + 8px); left: -100px; background: var(--bg-white); border: 1px solid var(--border-light); border-radius: 14px; box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transition: all 0.2s var(--ease); width: 780px; display: flex; overflow: hidden; }
.nav-item:hover .nav-dropdown { opacity: 1; visibility: visible; }
.nav-item:hover .chevron { transform: rotate(180deg); }

/* MEGA MENU */
.mega-left { width: 220px; background: var(--bg-light); padding: 16px 12px; border-right: 1px solid var(--border-light); flex-shrink: 0; }
.mega-tier-btn { display: block; width: 100%; text-align: left; padding: 12px 14px; font-size: 13px; font-weight: 700; color: var(--text-body); border: none; background: none; border-radius: 8px; cursor: pointer; transition: all 0.15s var(--ease); font-family: inherit; margin-bottom: 2px; }
.mega-tier-btn:hover, .mega-tier-btn.active { color: var(--cc-purple); background: var(--bg-white); box-shadow: var(--shadow-sm); }
.mega-tier-btn small { display: block; font-size: 11px; font-weight: 500; color: var(--text-muted); margin-top: 2px; }
.mega-tier-btn.active small { color: var(--cc-purple); opacity: 0.7; }
.mega-right { flex: 1; padding: 20px 24px; }
.mega-panel { display: none; }
.mega-panel.active { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.mega-panel.three-col.active { grid-template-columns: 1fr 1fr 1fr; }
.mega-service { display: flex; gap: 12px; padding: 12px; border-radius: 8px; transition: all 0.15s var(--ease); align-items: flex-start; }
.mega-service:hover { background: var(--bg-lavender); }
.mega-service-icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; background: var(--bg-light); }
.mega-service-text { min-width: 0; }
.mega-service-text strong { display: block; font-size: 13px; font-weight: 700; color: var(--text-heading); line-height: 1.3; }
.mega-service-text span { display: block; font-size: 11.5px; color: var(--text-muted); line-height: 1.4; margin-top: 2px; }
.nav-cta { display: inline-flex; align-items: center; padding: 8px 20px; font-size: 14px; font-weight: 600; color: var(--text-white) !important; background: linear-gradient(135deg, var(--cc-purple) 0%, var(--cc-purple-dark) 100%); border-radius: 8px; margin-left: 8px; transition: all 0.2s var(--ease); }
.nav-cta:hover { background: linear-gradient(135deg, var(--cc-purple-dark) 0%, var(--cc-purple-deeper) 100%) !important; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(123, 94, 167, 0.3); }
.nav-toggle { display: none; background: none; border: none; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text-heading); margin: 5px 0; border-radius: 2px; }

/* SEARCH BUTTON */
.nav-search-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; background: none; border: 1px solid rgba(0,0,0,0.12); border-radius: 8px; color: var(--text-muted); cursor: pointer; margin-left: 4px; flex-shrink: 0; transition: all 0.2s; }
.nav-search-btn:hover { background: var(--bg-light); border-color: var(--cc-purple); color: var(--cc-purple); }

/* SEARCH MODAL */
:root {
    --pagefind-ui-scale: 1;
    --pagefind-ui-primary: #7B5EA7;
    --pagefind-ui-text: #1a1a2e;
    --pagefind-ui-background: #ffffff;
    --pagefind-ui-border: rgba(0,0,0,0.1);
    --pagefind-ui-tag: #e2b340;
    --pagefind-ui-border-width: 1px;
    --pagefind-ui-border-radius: 8px;
    --pagefind-ui-image-border-radius: 6px;
    --pagefind-ui-image-box-ratio: 3 / 2;
    --pagefind-ui-font: 'Plus Jakarta Sans', sans-serif;
}
.search-modal { display: flex; position: fixed; inset: 0; z-index: 9000; align-items: flex-start; justify-content: center; padding: 64px 16px 16px; visibility: hidden; opacity: 0; pointer-events: none; transition: opacity 0.15s, visibility 0.15s; }
.search-modal.open { visibility: visible; opacity: 1; pointer-events: auto; }
.search-modal-backdrop { position: fixed; inset: 0; background: rgba(10,10,30,0.65); backdrop-filter: blur(4px); }
.search-modal-inner { position: relative; background: #fff; border-radius: 16px; padding: 20px 24px 16px; width: 100%; max-width: 680px; max-height: calc(100vh - 96px); overflow-y: auto; box-shadow: 0 24px 80px rgba(0,0,0,0.35); display: flex; flex-direction: column; gap: 12px; }
.search-modal-header { display: flex; align-items: center; justify-content: space-between; }
.search-modal-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-muted); }
.search-modal-close { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; background: var(--bg-light); border: none; border-radius: 6px; color: var(--text-muted); cursor: pointer; transition: all 0.15s; }
.search-modal-close:hover { background: rgba(123,94,167,0.1); color: var(--cc-purple); }
.search-modal-hint { font-size: 11.5px; color: var(--text-muted); margin: 4px 0 0; }
.search-modal-hint kbd { display: inline-block; padding: 1px 5px; font-size: 11px; font-family: inherit; background: var(--bg-light); border: 1px solid rgba(0,0,0,0.12); border-radius: 4px; color: var(--text-muted); }
body.search-open { overflow: hidden; }
@media (max-width: 768px) { .search-modal { padding: 16px; align-items: center; } .search-modal-inner { max-height: 90vh; } .search-modal-hint { display: none; } }

/* AUSTRALIA MAP WATERMARK */
body::before {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 110vw;
    height: 110vh;
    pointer-events: none;
    z-index: 0;
    background: url("/images/australia-outline.svg") center center no-repeat;
    background-size: contain;
    opacity: 0.05;
}

/* ACKNOWLEDGEMENT */
.acknowledgement { background: #0a0a1e; padding: 0; text-align: center; position: relative; }
.acknowledgement-art-top { width: 100%; height: 80px; background: url('/images/acknowledgement-art-top.jpg') center/cover no-repeat; }
.acknowledgement-art-bottom { width: 100%; height: 80px; background: url('/images/acknowledgement-art-bottom.jpg') center/cover no-repeat; }
.acknowledgement-body { padding: 40px 0; }
.acknowledgement-inner { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; }
.acknowledgement-flags { display: flex; gap: 8px; justify-content: center; margin-bottom: 20px; }
.acknowledgement h3 { font-size: 20px; font-weight: 700; color: var(--text-white); margin-bottom: 12px; }
.acknowledgement p { font-size: 14px; color: var(--text-white-muted); line-height: 1.7; }

/* FOOTER */
.site-footer { background: var(--cc-navy); padding: 48px 0 32px; }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; }
.footer-brand img { height: 28px; margin-bottom: 12px; }
.footer-brand p { font-size: 13px; color: var(--text-white-muted); max-width: 280px; }
.footer-links h4 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,0.4); margin-bottom: 12px; }
.footer-links a { display: block; font-size: 14px; color: var(--text-white-muted); padding: 4px 0; transition: color 0.2s; }
.footer-links a:hover { color: var(--text-white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); margin-top: 40px; padding-top: 24px; display: flex; justify-content: space-between; align-items: center; }
.footer-bottom p { font-size: 12px; color: rgba(255,255,255,0.3); }
.footer-bottom a { font-size: 12px; color: rgba(255,255,255,0.3); transition: color 0.2s; }
.footer-bottom a:hover { color: var(--text-white-muted); }

/* PAGE HERO (shared across non-homepage pages) */
.page-hero { background: linear-gradient(135deg, var(--cc-navy) 0%, var(--cc-navy-mid) 40%, var(--cc-purple-deeper) 100%); padding: 80px 0 60px; }
.page-hero h1 { font-size: 38px; font-weight: 800; color: var(--text-white); line-height: 1.2; margin-bottom: 16px; letter-spacing: -0.5px; }
.page-hero p { font-size: 17px; color: var(--text-white-muted); line-height: 1.7; max-width: 680px; }

/* SECTION SHARED */
.section-label { display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--cc-purple); margin-bottom: 12px; }
.section-heading { font-size: 32px; font-weight: 800; color: var(--text-heading); margin-bottom: 12px; letter-spacing: -0.3px; }
.section-desc { font-size: 16px; color: var(--text-muted); max-width: 620px; margin-bottom: 40px; line-height: 1.7; }

/* FAQ */
.faq-section { padding: var(--section-pad) 0; background: var(--bg-light); }
.faq-grid { max-width: 800px; }
.faq-item { background: var(--bg-white); border: 1px solid var(--border-light); border-radius: 12px; margin-bottom: 12px; overflow: hidden; }
.faq-question { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; font-size: 16px; font-weight: 700; color: var(--text-heading); background: none; border: none; cursor: pointer; text-align: left; font-family: inherit; transition: background 0.2s; }
.faq-question:hover { background: var(--bg-light); }
.faq-toggle { width: 24px; height: 24px; flex-shrink: 0; transition: transform 0.2s var(--ease); color: var(--cc-purple); }
.faq-answer { padding: 0 24px 20px; font-size: 15px; color: var(--text-body); line-height: 1.7; display: none; }
.faq-item.open .faq-answer { display: block; }
.faq-item.open .faq-toggle { transform: rotate(45deg); }

/* BOTTOM CTA */
.bottom-cta { background: linear-gradient(135deg, var(--cc-navy) 0%, var(--cc-navy-mid) 40%, var(--cc-purple-deeper) 100%); padding: 80px 0; text-align: center; }
.bottom-cta h2 { font-size: 32px; font-weight: 800; color: var(--text-white); margin-bottom: 16px; }
.bottom-cta p { font-size: 17px; color: var(--text-white-muted); margin-bottom: 32px; max-width: 500px; margin-left: auto; margin-right: auto; }
.cta-btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 28px; font-size: 16px; font-weight: 700; color: var(--cc-navy); background: var(--cc-gold); border-radius: 8px; transition: all 0.2s var(--ease); border: none; cursor: pointer; font-family: inherit; }
.cta-btn:hover { background: var(--cc-gold-light); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(226,179,64,0.3); }

/* MOBILE SHARED */
@media (max-width: 768px) {
    .nav-toggle { display: block; }
    .main-nav { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg-white); border-bottom: 1px solid var(--border-light); padding: 16px; box-shadow: var(--shadow-lg); }
    .main-nav.open { display: flex; }
    .nav-dropdown { position: static; transform: none; box-shadow: none; border: none; padding: 0; opacity: 1; visibility: visible; display: none; width: 100%; flex-direction: column; border-radius: 0; }
    .nav-item:hover .nav-dropdown, .nav-item.open .nav-dropdown { display: flex; }
    .mega-left { width: 100%; border-right: none; border-bottom: 1px solid var(--border-light); display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; }
    .mega-tier-btn { flex: 1; min-width: 120px; text-align: center; padding: 8px 10px; font-size: 12px; }
    .mega-tier-btn small { display: none; }
    .mega-right { padding: 12px; }
    .mega-panel.active, .mega-panel.three-col.active { grid-template-columns: 1fr; }
    .page-hero { padding: 50px 0 40px; }
    .page-hero h1 { font-size: 28px; }
    .section-heading { font-size: 26px; }
    .nav-cta { margin-left: 0; margin-top: 8px; text-align: center; justify-content: center; }
    .footer-inner { flex-direction: column; }
}
