/*
Theme Name: Flutegrid
Theme URI: https://flutegrid.com
Author: Flutegrid
Author URI: https://flutegrid.com
Description: Official Flutegrid theme — energy intelligence for commercial real estate. Includes dedicated Flutegrid UK and Flutegrid UAE page templates, a modules marketplace template, and a contact template.
Version: 1.0
Requires at least: 6.0
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: flutegrid
*/

/* ===================================================================
   Everything below is the site's visual design. Structural WordPress
   requirements (menus, widgets, etc.) are handled in functions.php —
   this file only controls appearance.
=================================================================== */

  :root{
    --navy:#0A0F1E; --panel:#101F35; --panel2:#0E1A2C; --line:#1E3A5F; --line-soft:#16283F;
    --white:#F2F6FA; --gray-tag:#9FB4C9; --gray-faint:#6B7E93;
    --sky:#38BDF8; --sky-deep:#0EA5E9; --sky-dim:#1E5A78;
    --ink:#101826; --cloud:#F5F7FA; --cloud-line:#E3E8EF;
  }
  *{box-sizing:border-box; margin:0; padding:0;}
  html{ scroll-behavior:smooth; }
  body{
    font-family:'IBM Plex Sans', sans-serif;
    background: var(--navy); color: var(--white);
    line-height:1.5;
  }
  .mono{ font-family:'IBM Plex Mono', monospace; }
  a{ color:inherit; text-decoration:none; }
  img,svg{ display:block; }
  .wrap{ max-width:1180px; margin:0 auto; padding:0 32px; }
  section{ position:relative; }
  ::selection{ background: rgba(56,189,248,0.25); }

  /* ---------- reveal-on-scroll ---------- */
  .reveal{ opacity:0; transform:translateY(18px); transition: opacity .7s ease, transform .7s ease; }
  .reveal.is-visible{ opacity:1; transform:translateY(0); }
  @media (prefers-reduced-motion: reduce){
    .reveal{ opacity:1; transform:none; transition:none; }
    html{ scroll-behavior:auto; }
  }

  /* ================= NAV ================= */
  .nav{
    position:sticky; top:0; z-index:50;
    background: rgba(10,15,30,0.85); backdrop-filter: blur(10px);
    border-bottom:1px solid var(--line-soft);
  }
  .nav .wrap{ height:72px; display:flex; align-items:center; justify-content:space-between; }
  .brand{ display:flex; align-items:center; gap:10px; }
  .brand-icon{
    width:34px; height:34px; border-radius:8px; flex-shrink:0;
    background: linear-gradient(160deg, #13233d 0%, #0A121F 100%);
    border:1px solid #1c2f4d; display:flex; align-items:center; justify-content:center;
  }
  .brand-icon svg{ width:21px; height:21px; }
  .brand-word{ font-weight:700; font-size:17px; }
  .brand-word .grid{ color:var(--sky); }
  .nav-links{ display:flex; align-items:center; gap:36px; }
  .nav-links a{ font-size:14px; color:var(--gray-tag); transition: color .15s ease; }
  .nav-links a:hover{ color:var(--white); }
  .nav-cta{
    background: var(--sky); color:#06202E; font-weight:600; font-size:13.5px;
    padding:10px 20px; border-radius:8px; transition: background .15s ease;
  }
  .nav-cta:hover{ background:#63cdfb; }
  .nav-toggle{ display:none; background:none; border:none; color:var(--white); font-size:24px; cursor:pointer; line-height:1; padding:4px; }
  .nav-toggle:focus-visible{ outline:2px solid var(--sky); outline-offset:2px; }
  .mobile-menu{
    display:none; flex-direction:column; background: var(--navy); border-top:1px solid var(--line-soft);
    max-height:0; overflow:hidden; transition: max-height .25s ease;
  }
  .mobile-menu.open{ max-height:300px; }
  .mobile-menu a{ padding:16px 32px; font-size:15px; color:var(--gray-tag); border-bottom:1px solid var(--line-soft); }
  .mobile-menu a:hover{ color:var(--white); }

  /* ================= HERO ================= */
  .hero{
    padding: 96px 0 80px 0;
    background:
      radial-gradient(900px 500px at 15% -10%, rgba(56,189,248,0.10) 0%, transparent 60%),
      radial-gradient(circle at 1px 1px, rgba(56,189,248,0.05) 1px, transparent 0);
    background-size: auto, 26px 26px;
  }
  .hero .wrap{ display:grid; grid-template-columns: 1.05fr 0.95fr; gap:56px; align-items:center; }
  .eyebrow{
    font-family:'IBM Plex Mono',monospace; font-size:12px; color:var(--sky);
    letter-spacing:2.5px; text-transform:uppercase; margin-bottom:18px; display:inline-flex; align-items:center; gap:8px;
  }
  .eyebrow .dot{ width:6px; height:6px; border-radius:50%; background:var(--sky); box-shadow:0 0 0 3px rgba(56,189,248,0.18); }
  .hero h1{
    font-size:50px; font-weight:700; letter-spacing:-1px; line-height:1.08; color:var(--white); margin-bottom:22px;
  }
  .hero h1 .accent{ color:var(--sky); }
  .hero p.sub{ font-size:17px; color:var(--gray-tag); max-width:520px; margin-bottom:34px; line-height:1.6; }
  .btn-row{ display:flex; gap:14px; flex-wrap:wrap; }
  .btn{
    display:inline-flex; align-items:center; gap:8px; font-weight:600; font-size:14.5px;
    padding:14px 26px; border-radius:9px; transition: all .15s ease; border:1px solid transparent;
  }
  .btn-primary{ background:var(--sky); color:#06202E; }
  .btn-primary:hover{ background:#63cdfb; transform:translateY(-1px); }
  .btn-ghost{ border-color:var(--line); color:var(--white); }
  .btn-ghost:hover{ border-color:var(--sky-dim); background:var(--panel); }

  /* ---- hero gauge visual (signature element) ---- */
  .gauge-card{
    background: linear-gradient(160deg, var(--panel) 0%, var(--panel2) 100%);
    border:1px solid var(--line); border-radius:18px; padding:36px 32px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.35);
  }
  .gauge-card .label{ font-family:'IBM Plex Mono',monospace; font-size:11px; color:var(--gray-faint); letter-spacing:1.5px; text-transform:uppercase; margin-bottom:18px; }
  .gauge-wrap{ display:flex; justify-content:center; margin-bottom:8px; }
  .gauge-readout{ text-align:center; }
  .gauge-readout .num{ font-family:'IBM Plex Mono',monospace; font-size:34px; font-weight:700; color:var(--white); }
  .gauge-readout .num .unit{ font-size:16px; color:var(--sky); margin-left:4px; }
  .gauge-readout .delta{ font-family:'IBM Plex Mono',monospace; font-size:12.5px; color:var(--sky); margin-top:4px; }
  .gauge-rows{ margin-top:24px; border-top:1px solid var(--line-soft); padding-top:18px; display:flex; flex-direction:column; gap:12px; }
  .gauge-row{ display:flex; justify-content:space-between; font-size:12.5px; }
  .gauge-row .k{ color:var(--gray-tag); }
  .gauge-row .v{ font-family:'IBM Plex Mono',monospace; color:var(--white); }
  .gauge-row .v.good{ color:var(--sky); }

  /* ================= SECTION HEADERS ================= */
  .sec-head{ max-width:640px; margin-bottom:56px; }
  .sec-eyebrow{ font-family:'IBM Plex Mono',monospace; font-size:11.5px; letter-spacing:2px; text-transform:uppercase; margin-bottom:14px; }
  .sec-head h2{ font-size:34px; font-weight:700; letter-spacing:-0.6px; line-height:1.15; }
  .sec-head p{ font-size:15.5px; margin-top:14px; line-height:1.6; }

  /* ================= LIGHT SECTIONS ================= */
  .light{ background: var(--cloud); color: var(--ink); }
  .light .sec-eyebrow{ color: var(--sky-deep); }
  .light p{ color:#3A4658; }
  .dark .sec-eyebrow{ color: var(--sky); }
  .dark p{ color: var(--gray-tag); }

  section{ padding: 100px 0; }

  /* ================= PROBLEM ================= */
  .problem-grid{ display:grid; grid-template-columns: repeat(4,1fr); gap:20px; }
  .problem-card{
    background:#FFFFFF; border:1px solid var(--cloud-line); border-radius:14px; padding:26px 22px;
    box-shadow: 0 10px 26px rgba(20,30,50,0.05);
  }
  .problem-card .num{ font-family:'IBM Plex Mono',monospace; font-size:12px; color:var(--sky-deep); font-weight:700; margin-bottom:12px; }
  .problem-card h3{ font-size:16.5px; font-weight:700; margin-bottom:10px; line-height:1.3; }
  .problem-card p{ font-size:13.5px; line-height:1.55; }

  /* ================= PLATFORM CHAIN ================= */
  .chain{ display:flex; gap:16px; flex-wrap:wrap; }
  .chain-step{
    flex:1; min-width:170px;
    background: var(--panel); border:1px solid var(--line); border-radius:14px; padding:24px 20px;
    position:relative;
  }
  .chain-step .n{ font-family:'IBM Plex Mono',monospace; color:var(--sky-deep); font-size:12px; font-weight:700; margin-bottom:10px; }
  .chain-step h3{ font-size:16.5px; font-weight:700; margin-bottom:8px; color:var(--white); }
  .chain-step p{ font-size:12.5px; }
  .chain-arrow{ display:flex; align-items:center; color:var(--sky); font-size:20px; }

  /* ================= MODULES ================= */
  .module-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
  .module-card{
    background:#FFFFFF; border:1px solid var(--cloud-line); border-radius:14px; padding:26px 24px;
    box-shadow: 0 10px 26px rgba(20,30,50,0.05); transition: transform .18s ease, box-shadow .18s ease;
  }
  .module-card:hover{ transform: translateY(-3px); box-shadow: 0 16px 34px rgba(20,30,50,0.09); }
  .module-icon{
    width:42px; height:42px; border-radius:10px; background: linear-gradient(160deg,#13233d,#0A121F);
    display:flex; align-items:center; justify-content:center; margin-bottom:16px;
  }
  .module-icon svg{ width:24px; height:24px; }
  .module-card h3{ font-size:16px; font-weight:700; margin-bottom:8px; }
  .module-card p{ font-size:13px; line-height:1.55; }
  .module-tag{ display:inline-block; font-family:'IBM Plex Mono',monospace; font-size:9.5px; letter-spacing:0.5px; color:var(--sky-deep); background:rgba(14,165,233,0.08); border:1px solid rgba(14,165,233,0.25); border-radius:20px; padding:3px 10px; margin-top:14px; }
  .modules-footnote{ margin-top:28px; font-size:13px; color:#5B6B80; text-align:center; }

  /* ================= REGIONS ================= */
  .region-grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:22px; }
  .region-card{
    background: linear-gradient(160deg, var(--panel) 0%, var(--panel2) 100%);
    border:1px solid var(--line); border-radius:16px; padding:34px 32px;
  }
  .region-lockup{ display:flex; align-items:center; gap:14px; margin-bottom:22px; }
  .region-icon{ width:48px; height:48px; border-radius:11px; background: linear-gradient(160deg,#13233d,#0A121F); border:1px solid #1c2f4d; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
  .region-icon svg{ width:29px; height:29px; }
  .region-word{ font-weight:700; font-size:20px; }
  .region-word .grid{ color:var(--sky); }
  .region-word .tag{ font-size:0.38em; font-weight:600; color:var(--sky-deep); vertical-align:super; margin-left:4px; }
  .region-card p{ font-size:14px; margin-bottom:20px; }
  .region-list{ display:flex; flex-direction:column; gap:10px; margin-bottom:24px; }
  .region-list div{ font-size:13px; color:var(--gray-tag); display:flex; align-items:center; gap:10px; }
  .region-list div::before{ content:""; width:5px; height:5px; border-radius:50%; background:var(--sky-deep); flex-shrink:0; }
  .region-link{ font-family:'IBM Plex Mono',monospace; font-size:13px; color:var(--sky); display:inline-flex; align-items:center; gap:6px; }

  /* ================= ADVISOR ================= */
  .advisor{ display:grid; grid-template-columns:1fr 1fr; gap:56px; align-items:center; }
  .chat-bubble{ border-radius:12px; padding:16px 18px; font-size:13.5px; margin-bottom:14px; max-width:88%; line-height:1.5; }
  .chat-bubble.q{ background:#FFFFFF; border:1px solid var(--cloud-line); color:var(--ink); margin-left:auto; }
  .chat-bubble.a{ background: var(--navy); color: var(--sky); border:1px solid var(--sky-dim); }

  /* ================= WHY ================= */
  .why-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:20px; }
  .why-card{ padding:4px 0; }
  .why-card .bar{ width:32px; height:3px; background:var(--sky); border-radius:2px; margin-bottom:16px; }
  .why-card h3{ font-size:16px; font-weight:700; margin-bottom:8px; }
  .why-card p{ font-size:13px; line-height:1.55; }

  /* ================= CTA ================= */
  .cta{
    background: linear-gradient(160deg, var(--panel) 0%, var(--navy) 100%);
    border-top:1px solid var(--line-soft); border-bottom:1px solid var(--line-soft);
    text-align:center; padding:90px 0;
  }
  .cta h2{ font-size:32px; font-weight:700; letter-spacing:-0.5px; margin-bottom:16px; }
  .cta p{ color:var(--gray-tag); font-size:15.5px; max-width:480px; margin:0 auto 32px auto; }

  /* ================= FOOTER ================= */
  footer{ padding:56px 0 40px 0; }
  .footer-top{ display:flex; justify-content:space-between; align-items:flex-start; flex-wrap:wrap; gap:32px; margin-bottom:40px; }
  .footer-cols{ display:flex; gap:64px; flex-wrap:wrap; }
  .footer-col h4{ font-family:'IBM Plex Mono',monospace; font-size:11px; letter-spacing:1.5px; color:var(--gray-faint); text-transform:uppercase; margin-bottom:14px; }
  .footer-col a{ display:block; font-size:13.5px; color:var(--gray-tag); margin-bottom:10px; transition:color .15s ease; }
  .footer-col a:hover{ color:var(--white); }
  .footer-bottom{ border-top:1px solid var(--line-soft); padding-top:24px; display:flex; justify-content:space-between; flex-wrap:wrap; gap:12px; }
  .footer-bottom p{ font-size:12px; color:var(--gray-faint); }

  /* ================= RESPONSIVE ================= */
  @media (max-width: 900px){
    .hero .wrap{ grid-template-columns:1fr; }
    .hero h1{ font-size:36px; }
    .problem-grid, .module-grid, .why-grid{ grid-template-columns:repeat(2,1fr); }
    .region-grid, .advisor{ grid-template-columns:1fr; }
    .nav-links{ display:none; }
    .nav-toggle{ display:block; }
    .mobile-menu{ display:flex; }
  }
  @media (max-width: 560px){
    .problem-grid, .module-grid, .why-grid{ grid-template-columns:1fr; }
    .chain{ flex-direction:column; }
    .chain-arrow{ display:none; }
    .hero h1{ font-size:30px; }
    section{ padding:70px 0; }
  }

/* ================= WORDPRESS STANDARDS ================= */
.screen-reader-text{
  border:0; clip:rect(1px,1px,1px,1px); clip-path:inset(50%);
  height:1px; margin:-1px; overflow:hidden; padding:0; position:absolute!important; width:1px; word-wrap:normal!important;
}
.screen-reader-text:focus{
  background:#F2F6FA; clip:auto!important; clip-path:none; color:#101826; display:block; font-size:14px;
  height:auto; left:8px; line-height:normal; padding:12px 16px; text-decoration:none; top:8px; width:auto; z-index:100000;
}

/* ================= INNER PAGE HERO (UK / UAE / Modules / Contact) ================= */
.page-hero{ padding:80px 0 60px 0; }
.page-hero .sec-eyebrow{ margin-bottom:16px; }
.page-hero h1{ font-size:42px; font-weight:700; letter-spacing:-0.8px; line-height:1.15; }
.page-hero p.sub{ font-size:16px; color:var(--gray-tag); max-width:600px; margin-top:16px; line-height:1.6; }

/* ================= MODULES DIRECTORY PAGE ================= */
.mod-cat{ margin-bottom:48px; }
.mod-cat h2{ font-size:20px; font-weight:700; margin-bottom:6px; }
.mod-cat .count{ font-family:'IBM Plex Mono',monospace; font-size:11.5px; color:var(--gray-faint); margin-bottom:20px; display:block; }

/* ================= CONTACT PAGE ================= */
.contact-grid{ display:grid; grid-template-columns:1fr 1fr; gap:48px; }
.contact-card{ background:#FFFFFF; border:1px solid var(--cloud-line); border-radius:14px; padding:32px; box-shadow:0 10px 26px rgba(20,30,50,0.05); }
.contact-card h3{ font-size:17px; font-weight:700; margin-bottom:16px; }
.contact-row{ display:flex; justify-content:space-between; padding:12px 0; border-bottom:1px solid var(--cloud-line); font-size:14px; }
.contact-row:last-child{ border-bottom:none; }
.contact-row .k{ color:#5B6B80; }
.contact-row .v{ font-weight:600; color:var(--ink); }
.wp-form input, .wp-form textarea{
  width:100%; padding:12px 14px; border:1px solid var(--cloud-line); border-radius:8px; font-family:'IBM Plex Sans',sans-serif;
  font-size:14px; margin-bottom:14px; background:#FFFFFF; color:var(--ink);
}
.wp-form label{ font-size:13px; font-weight:600; color:var(--ink); display:block; margin-bottom:6px; }
.wp-form textarea{ min-height:120px; resize:vertical; }
.form-note{ font-size:12.5px; color:#5B6B80; margin-top:10px; line-height:1.5; }

@media (max-width:900px){
  .contact-grid{ grid-template-columns:1fr; }
}

/* wp_nav_menu() still wraps each link in <li> even when the outer <ul> is
   stripped via items_wrap — neutralise those <li> elements so the flex/flow
   layout behaves exactly like the flat <a> markup this design was built for. */
.nav-links li, .mobile-menu li{ list-style:none; display:contents; }
