/*
Theme Name: The Spark Media
Theme URI: https://thesparkmedia.ae
Author: The Spark Media
Description: Creative-agency theme for The Spark Media. Dark/gold brand with light & dark mode, an editable homepage, a Work portfolio you manage in the admin, an Instagram feed area, and a built-in contact form. From Spark to Impact.
Version: 1.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: thesparkmedia
*/


  :root{
    /* ---- Brand tokens (from The Spark Media brand sheet) ---- */
    --black:        #0F0F10;   /* Deep Black  */
    --surface:      #161619;   /* raised panels */
    --surface-2:    #1D1D21;   /* cards */
    --graphite:     #34333A;   /* Graphite Grey — borders */
    --soft-grey:    #F4F4F4;   /* Soft Grey */
    --muted:        #9A9AA2;   /* muted body text */
    --spark:        #FFC700;   /* Spark Yellow — primary accent */
    --electric:     #FFE869;   /* Electric Yellow — highlight */
    --white:        #FFFFFF;

    --maxw: 1180px;
    --radius: 14px;
    --ease: cubic-bezier(.22,.61,.36,1);
  }

  *{ box-sizing:border-box; margin:0; padding:0; }
  html{ scroll-behavior:smooth; }
  body{
    background:var(--black);
    color:var(--soft-grey);
    font-family:'Poppins', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    font-weight:300;
    line-height:1.65;
    overflow-x:hidden;
    -webkit-font-smoothing:antialiased;
  }
  a{ color:inherit; text-decoration:none; }
  img{ max-width:100%; display:block; }
  h1,h2,h3,h4{ font-family:'Montserrat', system-ui, sans-serif; color:var(--white); line-height:1.08; }

  .wrap{ width:100%; max-width:var(--maxw); margin:0 auto; padding:0 24px; }

  .eyebrow{
    font-family:'Montserrat',sans-serif; font-weight:700; font-size:.74rem;
    letter-spacing:.28em; text-transform:uppercase; color:var(--spark);
    display:inline-flex; align-items:center; gap:10px;
  }
  .eyebrow::before{ content:""; width:26px; height:2px; background:var(--spark); display:inline-block; }

  /* ---------- Buttons ---------- */
  .btn{
    display:inline-flex; align-items:center; gap:10px;
    font-family:'Montserrat',sans-serif; font-weight:700; font-size:.86rem;
    letter-spacing:.02em; padding:14px 26px; border-radius:999px;
    cursor:pointer; border:1px solid transparent; transition:transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease), color .25s var(--ease);
  }
  .btn--primary{ background:var(--spark); color:#1a1a05; box-shadow:0 0 0 rgba(255,199,0,0); }
  .btn--primary:hover{ background:var(--electric); transform:translateY(-2px); box-shadow:0 12px 30px -10px rgba(255,199,0,.55); }
  .btn--ghost{ background:transparent; color:var(--white); border-color:var(--graphite); }
  .btn--ghost:hover{ border-color:var(--spark); color:var(--spark); transform:translateY(-2px); }

  /* ---------- Logo (your original logo, embedded) ---------- */
  .logo{ display:inline-flex; align-items:center; }
  .logo-img{ background-repeat:no-repeat; background-position:center; background-size:contain; }
  .logo-dark{ background-image:url('assets/logo-dark.png'); display:block; }
  .logo-light{ background-image:url('assets/logo-light.png'); display:none; }
  [data-theme="light"] .logo-dark{ display:none; }
  [data-theme="light"] .logo-light{ display:block; }
  .logo .logo-img{ height:40px; width:73px; background-position:left center; }
  footer .logo .logo-img{ height:46px; width:84px; }
  .hero-logo.logo-img{ width:min(360px,76vw); aspect-ratio:346 / 190; height:auto; filter:drop-shadow(0 0 30px rgba(255,199,0,.28)); }

  /* ---------- Header ---------- */
  header{
    position:fixed; inset:0 0 auto 0; z-index:50;
    transition:background .3s var(--ease), border-color .3s var(--ease), backdrop-filter .3s;
    border-bottom:1px solid transparent;
  }
  header.scrolled{ background:rgba(15,15,16,.82); backdrop-filter:blur(12px); border-bottom-color:rgba(52,51,58,.7); }
  .nav{ display:flex; align-items:center; justify-content:space-between; height:76px; }
  .nav-links{ display:flex; align-items:center; gap:34px; }
  .nav-links a{
    font-family:'Poppins',sans-serif; font-weight:400; font-size:.92rem; color:var(--soft-grey);
    position:relative; padding:4px 0; transition:color .2s var(--ease);
  }
  .nav-links a::after{ content:""; position:absolute; left:0; bottom:-2px; width:0; height:2px; background:var(--spark); transition:width .28s var(--ease); }
  .nav-links a:hover{ color:var(--white); }
  .nav-links a:hover::after{ width:100%; }
  .nav-cta{ display:flex; align-items:center; gap:18px; }
  .menu-btn{ display:none; background:none; border:0; cursor:pointer; padding:8px; }
  .menu-btn span{ display:block; width:24px; height:2px; background:var(--white); margin:5px 0; transition:.3s var(--ease); }

  /* ---------- Hero ---------- */
  .hero{ position:relative; min-height:100vh; display:flex; align-items:center; overflow:hidden; padding:120px 0 80px; }
  .hero-glow{
    position:absolute; width:760px; height:760px; right:-120px; top:50%; transform:translateY(-50%);
    background:radial-gradient(circle, rgba(255,199,0,.18), rgba(255,199,0,.04) 38%, transparent 64%);
    filter:blur(10px); pointer-events:none; z-index:0;
  }
  .streaks{ position:absolute; inset:0; pointer-events:none; z-index:0; overflow:hidden; }
  .streaks i{
    position:absolute; height:2px; background:linear-gradient(90deg, transparent, var(--spark));
    transform:rotate(-32deg); transform-origin:right center; opacity:.5; border-radius:2px;
  }
  .streaks i:nth-child(1){ width:340px; right:-40px; top:24%; opacity:.55; }
  .streaks i:nth-child(2){ width:220px; right:60px; top:34%; opacity:.32; height:1.5px; }
  .streaks i:nth-child(3){ width:430px; right:-90px; top:46%; opacity:.6; }
  .streaks i:nth-child(4){ width:160px; right:120px; top:58%; opacity:.25; height:1.5px; }

  .hero .wrap{ position:relative; z-index:2; }
  .hero-grid{ display:grid; grid-template-columns:1.15fr .85fr; gap:40px; align-items:center; }
  .hero h1{
    font-weight:900; font-size:clamp(2.6rem, 6vw, 4.5rem); letter-spacing:-.01em; margin:22px 0 0;
  }
  .hero h1 .spark-word{ color:var(--spark); }
  .hero p.lead{ color:var(--muted); font-size:clamp(1rem,1.4vw,1.18rem); max-width:33ch; margin:24px 0 36px; }
  .hero-actions{ display:flex; flex-wrap:wrap; gap:14px; }

  /* Big animated bolt in hero */
  .hero-bolt{ display:flex; justify-content:center; align-items:center; }
  .hero-bolt svg{ width:min(330px, 70vw); height:auto; filter:drop-shadow(0 0 26px rgba(255,199,0,.35)); }
  .hero-bolt .bolt-main{ animation:pulse 3.4s var(--ease) infinite; transform-origin:center; }
  @keyframes pulse{ 0%,100%{ filter:none; opacity:1; } 50%{ opacity:.86; } }

  /* ---------- Section frame ---------- */
  .section{ padding:104px 0; position:relative; }
  .section--alt{ background:linear-gradient(180deg, var(--black), var(--surface) 50%, var(--black)); }
  .section-head{ max-width:660px; margin-bottom:54px; }
  .section-head h2{ font-weight:800; font-size:clamp(1.9rem,3.6vw,2.9rem); margin-top:16px; letter-spacing:-.01em; }
  .section-head p{ color:var(--muted); margin-top:16px; font-size:1.02rem; }

  /* divider streak */
  .rule{ height:2px; width:100%; background:linear-gradient(90deg, var(--spark), transparent); opacity:.5; }

  /* ---------- Intro band ---------- */
  .band{ text-align:center; padding:78px 0; }
  .band h3{ font-weight:700; font-size:clamp(1.5rem,3vw,2.3rem); }
  .band h3 .hi{ color:var(--spark); }
  .band p{ color:var(--muted); max-width:60ch; margin:18px auto 0; }

  /* ---------- Solutions ---------- */
  .grid-sol{ display:grid; grid-template-columns:repeat(4,1fr); gap:20px; }
  .card{
    background:var(--surface-2); border:1px solid var(--graphite); border-radius:var(--radius);
    padding:30px 26px; transition:transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
    position:relative; overflow:hidden;
  }
  .card::before{
    content:""; position:absolute; top:-1px; left:-1px; right:-1px; height:3px;
    background:linear-gradient(90deg, var(--spark), var(--electric)); transform:scaleX(0); transform-origin:left; transition:transform .35s var(--ease);
  }
  .card:hover{ transform:translateY(-6px); border-color:rgba(255,199,0,.4); box-shadow:0 24px 50px -28px rgba(0,0,0,.9); }
  .card:hover::before{ transform:scaleX(1); }
  .card .ic{ width:48px; height:48px; border-radius:12px; background:rgba(255,199,0,.1); display:flex; align-items:center; justify-content:center; margin-bottom:20px; }
  .card .ic svg{ width:26px; height:26px; stroke:var(--spark); fill:none; stroke-width:1.7; }
  .card h3{ font-weight:700; font-size:1.18rem; margin-bottom:10px; }
  .card p{ color:var(--muted); font-size:.94rem; }

  /* ---------- Work / Instagram ---------- */
  .work-top{ display:flex; align-items:flex-end; justify-content:space-between; gap:24px; flex-wrap:wrap; margin-bottom:46px; }
  .ig-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
  .ig-card{
    aspect-ratio:1/1; border-radius:var(--radius); border:1px solid var(--graphite);
    background:radial-gradient(circle at 30% 25%, rgba(255,199,0,.08), transparent 60%), var(--surface-2);
    position:relative; overflow:hidden; display:flex; flex-direction:column; justify-content:flex-end;
    padding:20px; transition:transform .3s var(--ease), border-color .3s var(--ease);
  }
  .ig-card:hover{ transform:translateY(-4px); border-color:rgba(255,199,0,.45); }
  .ig-card .bolt-bg{ position:absolute; top:14px; right:14px; width:30px; opacity:.5; }
  .ig-card .ig-cap{ font-size:.82rem; color:var(--soft-grey); position:relative; z-index:1; }
  .ig-card .ig-tag{ font-family:'Montserrat',sans-serif; font-weight:700; font-size:.66rem; letter-spacing:.18em; text-transform:uppercase; color:var(--spark); margin-bottom:8px; }
  .ig-note{
    margin-top:26px; font-size:.82rem; color:var(--muted); text-align:center;
    border:1px dashed var(--graphite); border-radius:10px; padding:14px 18px;
  }
  .ig-note code{ color:var(--electric); font-family:ui-monospace,Menlo,Consolas,monospace; font-size:.78rem; }

  /* ---------- About ---------- */
  .about-grid{ display:grid; grid-template-columns:1.1fr .9fr; gap:54px; align-items:center; }
  .about-grid p{ color:var(--muted); margin-bottom:18px; }
  .values{ display:grid; grid-template-columns:1fr 1fr; gap:14px; }
  .value{ background:var(--surface-2); border:1px solid var(--graphite); border-radius:12px; padding:20px; }
  .value .v-ic{ color:var(--spark); font-weight:800; font-family:'Montserrat',sans-serif; font-size:1.1rem; }
  .value h4{ font-size:.98rem; margin:10px 0 4px; }
  .value span{ color:var(--muted); font-size:.84rem; }

  /* ---------- Contact ---------- */
  .contact-grid{ display:grid; grid-template-columns:1fr 1fr; gap:48px; }
  .field{ margin-bottom:18px; }
  .field label{ display:block; font-size:.82rem; color:var(--soft-grey); margin-bottom:8px; font-weight:400; }
  .field input, .field textarea{
    width:100%; background:var(--surface); border:1px solid var(--graphite); border-radius:10px;
    color:var(--white); font-family:'Poppins',sans-serif; font-size:.95rem; padding:13px 15px; transition:border-color .2s var(--ease), box-shadow .2s var(--ease);
  }
  .field input:focus, .field textarea:focus{ outline:none; border-color:var(--spark); box-shadow:0 0 0 3px rgba(255,199,0,.14); }
  .field textarea{ resize:vertical; min-height:130px; }
  .contact-info{ }
  .contact-info h3{ font-size:1.3rem; margin-bottom:6px; }
  .mail-row{ display:flex; align-items:center; gap:12px; padding:16px 0; border-bottom:1px solid var(--graphite); }
  .mail-row:last-of-type{ border-bottom:0; }
  .mail-row .m-ic{ width:40px;height:40px;flex:none;border-radius:10px;background:rgba(255,199,0,.1);display:flex;align-items:center;justify-content:center; }
  .mail-row .m-ic svg{ width:20px;height:20px;stroke:var(--spark);fill:none;stroke-width:1.7; }
  .mail-row .m-label{ font-size:.78rem; color:var(--muted); }
  .mail-row .m-val{ font-weight:500; color:var(--white); font-size:.96rem; }
  .mail-row .m-val:hover{ color:var(--spark); }
  .ig-follow{ display:inline-flex; align-items:center; gap:10px; margin-top:24px; }

  /* ---------- Footer ---------- */
  footer{ border-top:1px solid var(--graphite); padding:54px 0 40px; }
  .foot-grid{ display:flex; align-items:center; justify-content:space-between; gap:24px; flex-wrap:wrap; }
  .foot-tag{ color:var(--spark); font-family:'Montserrat',sans-serif; font-weight:600; font-size:.86rem; letter-spacing:.02em; margin-top:14px; }
  .foot-meta{ color:var(--muted); font-size:.82rem; text-align:right; }
  .foot-links{ display:flex; gap:22px; margin-top:10px; }
  .foot-links a{ color:var(--muted); font-size:.86rem; }
  .foot-links a:hover{ color:var(--spark); }

  /* ---------- Reveal animation ---------- */
  .reveal{ opacity:0; transform:translateY(22px); transition:opacity .7s var(--ease), transform .7s var(--ease); }
  .reveal.in{ opacity:1; transform:none; }

  /* ---------- Mobile menu panel ---------- */
  .mobile-panel{
    position:fixed; inset:76px 0 auto 0; background:rgba(15,15,16,.97); backdrop-filter:blur(14px);
    border-bottom:1px solid var(--graphite); transform:translateY(-120%); transition:transform .4s var(--ease); z-index:49; padding:18px 24px 28px;
  }
  .mobile-panel.open{ transform:translateY(0); }
  .mobile-panel a{ display:block; padding:14px 0; font-size:1.05rem; border-bottom:1px solid rgba(52,51,58,.5); }
  .mobile-panel .btn{ width:100%; justify-content:center; margin-top:18px; }

  /* ---------- Responsive ---------- */
  @media (max-width: 900px){
    .hero-grid{ grid-template-columns:1fr; }
    .hero-bolt{ order:-1; margin-bottom:6px; }
    .hero-bolt svg{ width:170px; }
    .hero{ min-height:auto; padding:130px 0 70px; }
    .grid-sol{ grid-template-columns:1fr 1fr; }
    .ig-grid{ grid-template-columns:1fr 1fr; }
    .about-grid, .contact-grid{ grid-template-columns:1fr; gap:34px; }
    .nav-links, .nav-cta .btn{ display:none; }
    .menu-btn{ display:block; }
  }
  @media (max-width: 540px){
    .grid-sol, .ig-grid, .values{ grid-template-columns:1fr; }
    .foot-grid{ flex-direction:column; align-items:flex-start; }
    .foot-meta{ text-align:left; }
  }
  @media (prefers-reduced-motion: reduce){
    *{ animation:none !important; transition:none !important; }
    html{ scroll-behavior:auto; }
    .reveal{ opacity:1; transform:none; }
  }
  /* ================= LIGHT / DARK THEME ================= */
  .theme-toggle{
    width:42px; height:42px; border-radius:50%; border:1px solid var(--graphite);
    background:transparent; color:var(--soft-grey); cursor:pointer; flex:none;
    display:flex; align-items:center; justify-content:center;
    transition:border-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
  }
  .theme-toggle:hover{ border-color:var(--spark); color:var(--spark); transform:translateY(-1px); }
  .theme-toggle svg{ width:18px; height:18px; }
  .theme-toggle .t-moon{ display:none; }
  [data-theme="light"] .theme-toggle .t-sun{ display:none; }
  [data-theme="light"] .theme-toggle .t-moon{ display:block; }

  html{ transition:background .4s var(--ease); }
  body{ transition:background .4s var(--ease), color .4s var(--ease); }

  [data-theme="light"]{
    --black:#F7F7F5;     /* page background */
    --surface:#FFFFFF;   /* alt sections */
    --surface-2:#FFFFFF; /* cards */
    --graphite:#E6E6E2;  /* borders */
    --soft-grey:#3C3C42; /* body text */
    --muted:#6C6C74;     /* muted text */
    --white:#16161A;     /* headings */
  }
  [data-theme="light"] .eyebrow,
  [data-theme="light"] .hero h1 .spark-word,
  [data-theme="light"] .band h3 .hi,
  [data-theme="light"] .ig-card .ig-tag,
  [data-theme="light"] .value .v-ic,
  [data-theme="light"] .foot-tag,
  [data-theme="light"] .btn--ghost:hover,
  [data-theme="light"] .mail-row .m-val:hover,
  [data-theme="light"] .foot-links a:hover,
  [data-theme="light"] .ig-note code{ color:#9A7500; }
  [data-theme="light"] .eyebrow::before{ background:#9A7500; }
  [data-theme="light"] .nav-links a::after{ background:#9A7500; }
  [data-theme="light"] .card .ic svg,
  [data-theme="light"] .mail-row .m-ic svg{ stroke:#9A7500; }
  [data-theme="light"] .foot-meta a{ color:#9A7500 !important; }
  [data-theme="light"] header.scrolled{ background:rgba(255,255,255,.86); border-bottom-color:#E6E6E2; }
  [data-theme="light"] .mobile-panel{ background:rgba(255,255,255,.97); border-bottom-color:#E6E6E2; }
  [data-theme="light"] .hero-glow{ opacity:.45; }
  [data-theme="light"] .card:hover{ box-shadow:0 24px 50px -28px rgba(0,0,0,.18); }
  [data-theme="light"] .ig-card{ background:radial-gradient(circle at 30% 25%, rgba(255,199,0,.10), transparent 60%), #FFFFFF; }
  /* ================= LIGHTBOX (expand Our Work media) ================= */
  body:not(.admin-on) .ig-card{ cursor:pointer; }
  .lightbox{
    position:fixed; inset:0; z-index:200; display:none;
    align-items:center; justify-content:center; padding:24px;
    background:rgba(6,6,8,.93); backdrop-filter:blur(8px);
  }
  .lightbox.show{ display:flex; }
  .lb-close{
    position:fixed; top:18px; right:18px; z-index:210;
    width:48px; height:48px; border-radius:50%;
    background:rgba(30,30,33,.92); color:#fff; border:1px solid rgba(255,255,255,.25);
    font-size:1.7rem; line-height:1; cursor:pointer; display:flex; align-items:center; justify-content:center;
    transition:background .2s var(--ease), transform .3s var(--ease), color .2s var(--ease);
  }
  .lb-close:hover{ background:var(--spark); color:#1a1a05; border-color:var(--spark); transform:rotate(90deg); }
  .lb-content{ max-width:min(1000px,94vw); max-height:88vh; display:flex; align-items:center; justify-content:center; }
  .lb-content img, .lb-content video{ max-width:100%; max-height:88vh; width:auto; height:auto; border-radius:12px; display:block; box-shadow:0 30px 80px -20px rgba(0,0,0,.85); background:#000; }
  .lb-panel{
    width:min(560px,92vw); aspect-ratio:1/1; max-height:88vh; border-radius:18px;
    background:radial-gradient(circle at 30% 25%, rgba(255,199,0,.12), transparent 60%), #1D1D21;
    border:1px solid #34333A; position:relative; display:flex; flex-direction:column; justify-content:flex-end; padding:36px;
  }
  .lb-panel .bolt-bg{ position:absolute; top:26px; right:26px; width:54px; opacity:.55; }
  .lb-panel .lb-tag{ font-family:'Montserrat',sans-serif; font-weight:700; font-size:.78rem; letter-spacing:.18em; text-transform:uppercase; color:var(--spark); margin-bottom:12px; }
  .lb-panel .lb-cap{ font-size:1.2rem; color:#fff; line-height:1.4; }
  @media (max-width:540px){ .lb-close{ top:12px; right:12px; width:44px; height:44px; } }
  /* Contact form status message */
  .form-status{ margin-top:14px; font-size:.88rem; color:var(--spark); min-height:20px; line-height:1.5; }
  .form-status.error{ color:#ff6b6b; }
  [data-theme="light"] .form-status{ color:#9A7500; }
  [data-theme="light"] .form-status.error{ color:#d33; }
  /* Empty state for the Our Work feed */
  .ig-empty{ text-align:center; padding:56px 20px; border:1px dashed var(--graphite); border-radius:var(--radius); color:var(--muted); }
  .ig-empty .ig-empty-bolt{ width:38px; margin:0 auto 16px; opacity:.85; display:block; }
  .ig-empty p{ font-size:.96rem; max-width:44ch; margin:0 auto; }
  .ig-empty strong{ color:var(--white); }
