/*
 Theme Name: Canadian Energy - The Journey
 Theme URI: https://canadianenergy.ca
 Author: Canadian Energy Digital
 Author URI: https://canadianenergy.ca
 Description: A cinematic parallax storytelling WordPress theme that tells the compelling story of Canadian gas and oil, from extraction to global delivery. Features scroll-driven animations, dynamic backgrounds, and immersive visuals inspired by documentary filmmaking.
 Version: 1.0.0
 Requires at least: 6.0
 Tested up to: 6.6
 Requires PHP: 8.0
 License: GNU General Public License v2 or later
 License URI: http://www.gnu.org/licenses/gpl-2.0.html
 Text Domain: canadian-energy
 Tags: one-page, parallax, dark, full-width-template, custom-background, featured-images
*/

/* ============================================================
   DESIGN SYSTEM: Northern Luminescence
   - Primary Background: #0a1628 (Deep Navy)
   - Accent Warm: #d4920a (Aurora Amber)
   - Accent Cool: #00b4d8 (Arctic Cyan)
   - Neutral: #94a3b8 (Warm Slate)
   - Highlight: #f0f4f8 (Aurora White)
   - Display Font: Playfair Display
   - Body Font: Inter
   - Mono Font: JetBrains Mono
   ============================================================ */

:root {
  --ce-navy: #0a1628;
  --ce-navy-light: #0f1d32;
  --ce-amber: #d4920a;
  --ce-amber-light: #e5a31b;
  --ce-cyan: #00b4d8;
  --ce-slate: #94a3b8;
  --ce-white: #f0f4f8;
  --ce-border: #1e293b;
  --ce-font-display: 'Playfair Display', serif;
  --ce-font-body: 'Inter', sans-serif;
  --ce-font-mono: 'JetBrains Mono', monospace;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--ce-font-body);
  font-weight: 300;
  color: var(--ce-white);
  background-color: var(--ce-navy);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--ce-font-display);
  font-weight: 700;
  line-height: 0.9;
}

a {
  color: var(--ce-amber);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--ce-amber-light);
}

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

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--ce-navy);
}
::-webkit-scrollbar-thumb {
  background: var(--ce-amber);
  border-radius: 4px;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.ce-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 2rem;
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.ce-nav.scrolled {
  background: rgba(10, 22, 40, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(212, 146, 10, 0.2);
}

.ce-nav__inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ce-nav__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ce-nav__logo {
  height: 40px;
  width: 40px;
}

.ce-nav__title {
  font-family: var(--ce-font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--ce-white);
  letter-spacing: 0.05em;
}

.ce-nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.ce-nav__links a {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ce-slate);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  transition: color 0.3s ease;
}

.ce-nav__links a:hover {
  color: var(--ce-amber);
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.ce-hero {
  position: relative;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.ce-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.ce-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.1s linear;
}

.ce-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10,22,40,0.4), transparent 50%, var(--ce-navy));
}

.ce-hero__content {
  position: relative;
  z-index: 10;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.ce-hero__chapter {
  font-family: var(--ce-font-mono);
  font-size: 0.75rem;
  color: var(--ce-amber);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.ce-hero__title {
  font-size: clamp(3rem, 8vw, 6rem);
  color: var(--ce-white);
  margin-bottom: 1.5rem;
}

.ce-hero__title span {
  color: var(--ce-amber);
}

.ce-hero__subtitle {
  font-size: 1.125rem;
  color: var(--ce-slate);
  max-width: 560px;
  line-height: 1.7;
  font-weight: 300;
}

.ce-hero__scroll {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  animation: float 2s ease-in-out infinite;
}

.ce-hero__scroll span {
  font-size: 0.625rem;
  color: var(--ce-slate);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.5rem;
}

.ce-hero__scroll-line {
  width: 1px;
  height: 3rem;
  margin: 0 auto;
  background: linear-gradient(to bottom, var(--ce-amber), transparent);
}

@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(10px); }
}

/* ============================================================
   SECTIONS (Shared)
   ============================================================ */
.ce-section {
  position: relative;
  min-height: 100vh;
  padding: 8rem 0;
  overflow: hidden;
}

.ce-section__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.ce-section__bg img {
  width: 100%;
  height: 120%;
  object-fit: cover;
}

.ce-section__bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, var(--ce-navy), rgba(10,22,40,0.85), var(--ce-navy));
}

.ce-section__content {
  position: relative;
  z-index: 10;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.ce-section__chapter {
  font-family: var(--ce-font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.ce-section__chapter--amber { color: var(--ce-amber); }
.ce-section__chapter--cyan { color: var(--ce-cyan); }

.ce-section__title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  color: var(--ce-white);
  margin-bottom: 1.5rem;
}

.ce-section__title span {
  display: block;
}

.ce-section__title .accent-amber { color: var(--ce-amber); }
.ce-section__title .accent-cyan { color: var(--ce-cyan); }

.ce-section__text {
  font-size: 1rem;
  color: var(--ce-slate);
  line-height: 1.7;
  max-width: 560px;
}

/* Grid layouts */
.ce-grid {
  display: grid;
  gap: 2rem;
}

.ce-grid--12 {
  grid-template-columns: repeat(12, 1fr);
}

@media (max-width: 1024px) {
  .ce-grid--12 {
    grid-template-columns: 1fr;
  }
}

.ce-col-7 { grid-column: span 7; }
.ce-col-6 { grid-column: span 6; }
.ce-col-5 { grid-column: span 5; }

@media (max-width: 1024px) {
  .ce-col-7, .ce-col-6, .ce-col-5 {
    grid-column: span 1;
  }
}

/* ============================================================
   STATS
   ============================================================ */
.ce-stats {
  display: flex;
  align-items: flex-end;
  gap: 2rem;
  border-top: 1px solid var(--ce-border);
  padding-top: 2rem;
  margin-top: 2.5rem;
}

.ce-stats__divider {
  width: 1px;
  height: 3rem;
  background: var(--ce-border);
}

.ce-stats__value {
  font-family: var(--ce-font-mono);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 700;
  line-height: 1;
}

.ce-stats__value--amber { color: var(--ce-amber); }
.ce-stats__value--cyan { color: var(--ce-cyan); }
.ce-stats__value--white { color: var(--ce-white); }

.ce-stats__label {
  font-family: var(--ce-font-mono);
  font-size: 0.625rem;
  color: var(--ce-slate);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: 0.5rem;
}

/* Stats strip (horizontal) */
.ce-stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--ce-border);
}

.ce-stats-strip__item {
  background: var(--ce-navy);
  padding: 1.5rem;
  text-align: center;
}

@media (max-width: 768px) {
  .ce-stats-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================================
   IMAGE FRAMES (Technical brackets)
   ============================================================ */
.ce-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(212, 146, 10, 0.1);
}

.ce-frame--cyan {
  border-color: rgba(0, 180, 216, 0.1);
}

.ce-frame::before,
.ce-frame::after,
.ce-frame .corner-tl,
.ce-frame .corner-tr {
  content: '';
  position: absolute;
  width: 1.5rem;
  height: 1.5rem;
  z-index: 10;
}

.ce-frame::before {
  top: 0; left: 0;
  border-top: 2px solid rgba(212, 146, 10, 0.4);
  border-left: 2px solid rgba(212, 146, 10, 0.4);
}

.ce-frame::after {
  bottom: 0; right: 0;
  border-bottom: 2px solid rgba(212, 146, 10, 0.4);
  border-right: 2px solid rgba(212, 146, 10, 0.4);
}

.ce-frame--cyan::before {
  border-color: rgba(0, 180, 216, 0.4);
}

.ce-frame--cyan::after {
  border-color: rgba(0, 180, 216, 0.4);
}

.ce-frame__label {
  position: absolute;
  top: 1rem;
  left: 2rem;
  font-family: var(--ce-font-mono);
  font-size: 0.625rem;
  color: rgba(212, 146, 10, 0.6);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  z-index: 10;
}

.ce-frame__label--cyan {
  color: rgba(0, 180, 216, 0.6);
}

/* ============================================================
   DATA PANELS (Digital section)
   ============================================================ */
.ce-panels {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
}

.ce-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 180, 216, 0.1);
  background: rgba(10, 22, 40, 0.6);
  backdrop-filter: blur(12px);
  padding: 1.5rem;
}

.ce-panel--wide { grid-column: span 7; }
.ce-panel--narrow { grid-column: span 5; }

@media (max-width: 1024px) {
  .ce-panels {
    grid-template-columns: 1fr;
  }
  .ce-panel--wide, .ce-panel--narrow {
    grid-column: span 1;
  }
}

.ce-panel__scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,180,216,0.1) 2px, rgba(0,180,216,0.1) 4px);
}

.ce-panel__glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,180,216,0.4), transparent);
}

.ce-panel__sys {
  font-family: var(--ce-font-mono);
  font-size: 0.625rem;
  color: rgba(0, 180, 216, 0.6);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.ce-panel__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--ce-white);
  margin-bottom: 0.5rem;
  font-family: var(--ce-font-body);
}

.ce-panel__desc {
  font-size: 0.875rem;
  color: var(--ce-slate);
  line-height: 1.6;
}

.ce-panel__stat {
  font-family: var(--ce-font-mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--ce-cyan);
  line-height: 1;
}

.ce-panel__stat-label {
  font-family: var(--ce-font-mono);
  font-size: 0.625rem;
  color: var(--ce-slate);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: 0.25rem;
}

/* ============================================================
   PRODUCT BARS (Refinery section)
   ============================================================ */
.ce-bars {
  margin-top: 2rem;
}

.ce-bars__header {
  font-family: var(--ce-font-mono);
  font-size: 0.625rem;
  color: var(--ce-slate);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.ce-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.ce-bar__name {
  width: 7rem;
  font-family: var(--ce-font-mono);
  font-size: 0.75rem;
  color: var(--ce-slate);
}

.ce-bar__track {
  flex: 1;
  height: 6px;
  background: var(--ce-border);
  overflow: hidden;
}

.ce-bar__fill {
  height: 100%;
  transition: width 1.2s cubic-bezier(0.23, 1, 0.32, 1);
}

.ce-bar__value {
  width: 2.5rem;
  text-align: right;
  font-family: var(--ce-font-mono);
  font-size: 0.75rem;
  color: var(--ce-white);
}

/* ============================================================
   PROCESS FLOW
   ============================================================ */
.ce-flow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.ce-flow__step {
  font-family: var(--ce-font-mono);
  font-size: 0.625rem;
  color: var(--ce-slate);
  letter-spacing: 0.15em;
  background: var(--ce-navy-light);
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--ce-border);
  white-space: nowrap;
}

.ce-flow__arrow {
  color: var(--ce-amber);
  font-size: 0.875rem;
  animation: pulse-arrow 1.5s ease-in-out infinite;
}

@keyframes pulse-arrow {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(4px); }
}

/* ============================================================
   SECTION DIVIDER
   ============================================================ */
.ce-divider {
  position: relative;
  padding: 2rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ce-divider__line {
  height: 1px;
  width: 100%;
  max-width: 28rem;
  background: linear-gradient(90deg, transparent, var(--ce-amber), var(--ce-cyan), transparent);
}

.ce-divider__dot {
  position: absolute;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--ce-amber);
}

/* ============================================================
   FOOTER
   ============================================================ */
.ce-footer {
  padding: 6rem 0 3rem;
  border-top: 1px solid var(--ce-border);
}

.ce-footer__closing {
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--ce-white);
  max-width: 48rem;
  line-height: 1.2;
  margin-bottom: 4rem;
}

.ce-footer__closing span {
  color: var(--ce-amber);
}

.ce-footer__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 4rem;
}

@media (max-width: 768px) {
  .ce-footer__grid {
    grid-template-columns: 1fr;
  }
}

.ce-footer__col h4 {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ce-white);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
  font-family: var(--ce-font-body);
}

.ce-footer__col p {
  font-size: 0.875rem;
  color: var(--ce-slate);
  line-height: 1.6;
}

.ce-footer__col nav a {
  display: block;
  font-size: 0.875rem;
  color: var(--ce-slate);
  margin-bottom: 0.5rem;
}

.ce-footer__bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--ce-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.ce-footer__bottom p {
  font-size: 0.75rem;
  color: var(--ce-slate);
}

.ce-footer__bottom .mono {
  font-family: var(--ce-font-mono);
}

/* ============================================================
   SCROLL PROGRESS
   ============================================================ */
.ce-scroll-progress {
  position: fixed;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.ce-scroll-progress__track {
  width: 2px;
  height: 12rem;
  background: var(--ce-border);
  border-radius: 1px;
  overflow: hidden;
  position: relative;
}

.ce-scroll-progress__fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to bottom, var(--ce-amber), var(--ce-cyan));
  border-radius: 1px;
  transition: height 0.1s linear;
}

.ce-scroll-progress__dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--ce-amber);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212, 146, 10, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(212, 146, 10, 0); }
}

@media (max-width: 1024px) {
  .ce-scroll-progress { display: none; }
}

/* ============================================================
   ANIMATIONS (Scroll-triggered via JS)
   ============================================================ */
.ce-animate {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.23, 1, 0.32, 1),
              transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.ce-animate--left {
  transform: translateX(-60px);
}

.ce-animate--right {
  transform: translateX(60px);
}

.ce-animate.visible {
  opacity: 1;
  transform: translate(0, 0);
}

/* Parallax helper */
.ce-parallax {
  will-change: transform;
  transition: transform 0.1s linear;
}
