/* Shared base for case-study pages: tokens, topbar, nav, footer, cookie banner, reveal, responsive.
   Extracted from Our work.html. */

    /* =========================================================
           ROOT
        ========================================================== */

    :root {
      --primary: #0d6efd;
      --primary-dark: #0757c9;
      --dark: #07111f;
      --dark-2: #0b1728;
      --text: #536174;
      --light: #f5f8fc;
      --white: #ffffff;
      --border: #e5ebf2;
      --green: #12b886;
      --radius: 18px;
      --shadow: 0 20px 50px rgba(7, 17, 31, .09);

      /* ---- adaptive theme tokens (flip in dark mode) ---- */
      --surface: #ffffff;
      --card-bg: #ffffff;
      --nav-bg: rgba(255, 255, 255, .94);
      --icon-bg: #edf5ff;
      --heading: var(--dark);
    }

    html[data-theme="dark"] {
      --surface: #0b1220;
      --card-bg: #131b2c;
      --nav-bg: rgba(11, 18, 32, .92);
      --light: #0e1524;
      --text: #a7b3c6;
      --heading: #f1f5f9;
      --border: #232e42;
      --icon-bg: rgba(13, 110, 253, .16);
      --shadow: 0 20px 50px rgba(0, 0, 0, .35);
    }

    html[data-theme="dark"] body {
      background: var(--surface);
    }


    /* =========================================================
           GLOBAL
        ========================================================== */

    * {
      box-sizing: border-box;
    }

    html {
      scroll-behavior: smooth;
      scroll-padding-top: 80px;
      overflow-x: clip;
      -webkit-text-size-adjust: 100%;
    }

    /* overflow-x: clip stops sideways overflow WITHOUT turning body into a
       scroll container (overflow-x: hidden did, which broke page scrolling
       and the sticky nav on mobile). */
    body {
      margin: 0;
      font-family: "Montserrat", sans-serif;
      color: var(--text);
      background: var(--surface);
      overflow-x: clip;
      min-height: 100%;
      transition: background .3s ease, color .3s ease;
    }

    a {
      text-decoration: none;
    }

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

    .container-custom {
      width: min(1180px, calc(100% - 40px));
      margin: auto;
    }


    /* =========================================================
           TOPBAR
        ========================================================== */

    .topbar {
      background: var(--dark);
      color: rgba(255, 255, 255, .75);
      font-size: 13px;
      padding: 9px 0;
    }

    .topbar-inner {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 20px;
    }

    .topbar-left {
      display: flex;
      align-items: center;
      gap: 22px;
      flex-wrap: wrap;
    }

    .topbar-item {
      display: flex;
      align-items: center;
    }

    .topbar-item i {
      color: var(--primary);
      margin-right: 7px;
    }

    .topbar a {
      color: #fff;
    }

    .top-social {
      display: flex;
      gap: 10px;
    }

    .top-social a {
      width: 30px;
      height: 30px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      background: rgba(255, 255, 255, .08);
      color: #fff;
      transition: .3s ease;
    }

    .top-social a:hover {
      background: var(--primary);
      transform: translateY(-2px);
      color: #fff;
    }


    /* =========================================================
           NAVIGATION
        ========================================================== */

    .main-nav {
      position: sticky;
      top: 0;
      z-index: 1000;
      background: var(--nav-bg);
      backdrop-filter: blur(14px);
      -webkit-backdrop-filter: blur(14px);
      border-bottom: 1px solid rgba(0, 0, 0, .06);
      transition: background .3s ease;
    }

    .nav-inner {
      min-height: 76px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .logo {
      font-size: 25px;
      font-weight: 800;
      color: var(--heading);
      letter-spacing: -.8px;
      white-space: nowrap;
    }

    .logo span {
      color: var(--primary);
    }

    .nav-links {
      display: flex;
      align-items: center;
      gap: 7px;
      list-style: none;
      margin: 0;
      padding: 0;
    }

    .nav-links li {
      margin: 0;
      padding: 0;
    }

    .nav-links a {
      display: block;
      color: var(--heading);
      font-size: 13px;
      font-weight: 600;
      padding: 11px 15px;
      border-radius: 10px;
      transition: .3s ease;
    }

    .nav-links a:hover,
    .nav-links a.active {
      color: var(--primary);
      background: var(--light);
    }

    .nav-links .nav-cta {
      background: var(--primary);
      color: #fff;
      padding: 12px 20px;
      border-radius: 9px;
      margin-left: 4px;
    }

    .nav-links .nav-cta:hover {
      background: var(--primary-dark);
      color: #fff;
    }

    .menu-btn {
      display: none;
      border: 0;
      background: var(--dark);
      color: #fff;
      width: 42px;
      height: 42px;
      border-radius: 9px;
      cursor: pointer;
      align-items: center;
      justify-content: center;
      font-size: 17px;
    }


    /* =========================================================
       THEME TOGGLE
    ========================================================= */

    .theme-toggle {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 38px;
      height: 38px;
      border: 1px solid var(--border);
      background: var(--surface);
      color: var(--heading);
      border-radius: 50%;
      cursor: pointer;
      font-size: 14px;
      transition: .3s ease;
    }

    .theme-toggle:hover {
      background: var(--primary);
      color: #fff;
      border-color: var(--primary);
      transform: translateY(-2px);
    }

    .theme-toggle .fa-sun {
      display: none;
    }

    html[data-theme="dark"] .theme-toggle .fa-moon {
      display: none;
    }

    html[data-theme="dark"] .theme-toggle .fa-sun {
      display: inline-block;
    }


    /* =========================================================
           FOOTER
        ========================================================== */

    footer {
      background: #040b14;
      color: #91a0b1;
      padding-top: 70px;
    }

    .footer-grid {
      display: grid;
      grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
      gap: 45px;
      padding-bottom: 55px;
    }

    .footer-logo {
      font-size: 24px;
      font-weight: 800;
      color: #fff;
      margin-bottom: 18px;
    }

    .footer-logo span {
      color: var(--primary);
    }

    .footer-column p {
      font-size: 12px;
      line-height: 1.8;
    }

    .footer-column h3 {
      color: #fff;
      font-size: 13px;
      margin: 0 0 20px;
    }

    .footer-column ul {
      list-style: none;
      padding: 0;
      margin: 0;
    }

    .footer-column li {
      margin-bottom: 11px;
    }

    .footer-column a {
      color: #91a0b1;
      font-size: 12px;
      transition: .25s ease;
    }

    .footer-column a:hover {
      color: #fff;
    }

    .footer-social {
      display: flex;
      gap: 8px;
      margin-top: 20px;
    }

    .footer-social a {
      width: 35px;
      height: 35px;
      border: 1px solid rgba(255, 255, 255, .1);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .footer-social a:hover {
      background: var(--primary);
      border-color: var(--primary);
      color: #fff;
    }

    .footer-contact {
      list-style: none;
      padding: 0;
      margin: 0;
    }

    .footer-contact li {
      display: flex;
      gap: 10px;
      margin-bottom: 14px;
      font-size: 12px;
      line-height: 1.6;
    }

    .footer-contact i {
      color: var(--primary);
      width: 18px;
      margin-top: 2px;
    }

    .footer-contact a {
      color: #91a0b1;
    }

    .copyright {
      border-top: 1px solid rgba(255, 255, 255, .08);
      padding: 22px 0;
      text-align: center;
      font-size: 11px;
    }

    .copyright a {
      color: #fff;
    }


    /* =========================================================
           WHATSAPP
        ========================================================== */

    .whatsapp-float {
      position: fixed;
      right: 25px;
      bottom: 25px;
      width: 57px;
      height: 57px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: #25d366;
      color: #fff;
      border-radius: 50%;
      font-size: 27px;
      z-index: 9998;
      box-shadow: 0 8px 25px rgba(0, 0, 0, .25);
      transition: .3s ease;
    }

    .whatsapp-float:hover {
      color: #fff;
      transform: scale(1.1);
      background: #1fba59;
    }


    /* =========================================================
           BACK TO TOP
        ========================================================== */

    .back-to-top {
      position: fixed;
      left: 25px;
      bottom: 25px;
      width: 45px;
      height: 45px;
      display: none;
      align-items: center;
      justify-content: center;
      background: var(--primary);
      color: #fff;
      border-radius: 50%;
      z-index: 9998;
      box-shadow: 0 7px 20px rgba(0, 0, 0, .2);
      transition: .3s ease;
    }

    .back-to-top:hover {
      color: #fff;
      background: var(--primary-dark);
      transform: translateY(-3px);
    }


    /* =========================================================
           COOKIE CONSENT — full-screen blur overlay
        ========================================================== */

    .cookie-consent {
      position: fixed;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px;

      background: rgba(4, 11, 20, .55);
      -webkit-backdrop-filter: blur(10px);
      backdrop-filter: blur(10px);

      z-index: 10000;
      opacity: 0;
      visibility: hidden;
      transition: .4s ease;
    }


    .cookie-consent {
      pointer-events: none;
      overscroll-behavior: contain;
    }

    .cookie-consent.show {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
    }

    html.no-scroll,
    html.no-scroll body {
      overflow: hidden;
    }


    .cookie-content {
      display: grid;
      grid-template-columns: 45px 1fr;
      gap: 13px;
      align-items: start;

      width: min(480px, 100%);
      background: rgba(7, 17, 31, .96);
      border: 1px solid rgba(255, 255, 255, .1);
      border-radius: 15px;
      padding: 24px;
      color: white;
      box-shadow: 0 25px 70px rgba(0, 0, 0, .45);

      transform: translateY(20px);
      transition: transform .4s ease;
    }


    .cookie-consent.show .cookie-content {
      transform: translateY(0);
    }


    .cookie-icon {
      width: 40px;
      height: 40px;
      background: rgba(13, 110, 253, .15);
      color: #65a3ff;
      border-radius: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
    }


    .cookie-text h5 {
      margin: 0 0 5px;
      color: white;
      font-size: 13px;
    }


    .cookie-text p {
      margin: 0 0 5px;
      color: #9daabd;
      font-size: 10px;
      line-height: 1.6;
    }


    .cookie-text a {
      color: #69a7ff;
      font-size: 10px;
    }


    .cookie-actions {
      grid-column: 2;
      display: flex;
      gap: 8px;
      margin-top: 10px;
    }


    .cookie-btn {
      border: 0;
      padding: 9px 13px;
      border-radius: 7px;
      font-family: inherit;
      font-size: 10px;
      font-weight: 700;
      cursor: pointer;
    }


    .cookie-accept {
      background: var(--primary);
      color: white;
    }


    .cookie-decline {
      background: rgba(255, 255, 255, .08);
      color: #c6d0dc;
    }

    .portfolio-section,
    .work-intro,
    .services-hero {
      overflow-x: clip;
    }

    /* =========================================================
           REVEAL ANIMATION
        ========================================================== */

    .reveal {
      opacity: 0;
      transform: translateY(35px);
      transition: opacity .75s ease, transform .75s ease;
    }

    .reveal.active {
      opacity: 1;
      transform: translateY(0);
    }

    .reveal-left {
      opacity: 0;
      transform: translateX(-45px);
      transition: opacity .75s ease, transform .75s ease;
    }

    .reveal-left.active {
      opacity: 1;
      transform: translateX(0);
    }

    .reveal-right {
      opacity: 0;
      transform: translateX(45px);
      transition: opacity .75s ease, transform .75s ease;
    }

    .reveal-right.active {
      opacity: 1;
      transform: translateX(0);
    }



    /* =========================================================
           PROJECT CARD SCROLL ANIMATION
           desktop : image fades in, then content slides in from the image side
                     (card 1 from the left, card 2 from the right, ...)
           mobile  : image fades in, content fades + slides up
        ========================================================== */

    html.js .project-card .project-shot,
    html.js .project-card .project-meta {
      opacity: 0;
      will-change: opacity, transform;
    }

    /* the image slides up using the separate "translate" property so the
       hover lift (which uses "transform") keeps working afterwards */
    html.js .project-card .project-shot {
      translate: 0 55px;
      transition: opacity .8s ease, translate .9s cubic-bezier(.2, .7, .2, 1), transform .5s cubic-bezier(.2, .7, .2, 1), box-shadow .5s ease, border-color .3s ease;
    }

    html.js .project-card .project-shot.in {
      translate: 0 0;
    }

    html.js .project-card .project-meta {
      transform: translate3d(-70px, 0, 0);
      transition: opacity .8s ease .35s, transform .9s cubic-bezier(.2, .7, .2, 1) .35s;
    }

    html.js .project-card.flip .project-meta {
      transform: translate3d(70px, 0, 0);
    }

    html.js .project-card .project-shot.in,
    html.js .project-card .project-meta.in {
      opacity: 1;
    }

    html.js .project-card .project-meta.in,
    html.js .project-card.flip .project-meta.in {
      transform: translate3d(0, 0, 0);
      will-change: auto;
    }

    html.js .project-card .project-shot.in {
      will-change: auto;
    }

    /* =========================================================
           SMOOTH, NON-STICKY SCROLLING ON TOUCH DEVICES
        ========================================================== */

    @media (max-width: 1000px) {
      html.js .project-card .project-shot {
        translate: 0 38px;
      }

      html.js .project-card .project-shot.in {
        translate: 0 0;
      }

      html.js .project-card .project-meta,
      html.js .project-card.flip .project-meta {
        transform: translate3d(0, 38px, 0);
        transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1);
      }

      html.js .project-card .project-meta.in,
      html.js .project-card.flip .project-meta.in {
        transform: translate3d(0, 0, 0);
      }
    }

    @media (max-width: 768px),
    (hover: none) {
      html {
        scroll-behavior: auto;
      }

      /* live blur on a sticky bar forces a repaint on every scroll frame */
      .main-nav {
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
      }

      /* hover lifts get "stuck" after a tap on touch screens */
      .project-card:hover .project-shot {
        transform: none;
      }

      .project-card:hover .shot-frame img {
        transform: none;
      }
    }

    @media (prefers-reduced-motion: reduce) {

      html.js .project-card .project-shot,
      html.js .project-card .project-meta {
        opacity: 1;
        transform: none;
        translate: none;
        transition: none;
      }
    }

    /* =========================================================
           TABLET
        ========================================================== */

    @media (max-width: 1000px) {

      .project-grid {
        gap: 70px;
      }

      .project-card {
        grid-template-columns: 1fr;
        gap: 26px;
      }

      .project-card.flip .project-shot,
      .project-card.flip .project-meta {
        order: 0;
      }

      .project-meta h3 {
        font-size: 24px !important;
      }

      .project-meta h3 {
        font-size: 20px;
      }

      .project-meta p {
        font-size: 13px;
      }

      .footer-grid {
        grid-template-columns: 1fr 1fr;
      }

      .process-grid,
      .build-grid {
        grid-template-columns: repeat(2, 1fr);
      }

      .work-stats {
        grid-template-columns: 1fr;
        max-width: 360px;
      }

    }


    /* =========================================================
           MOBILE
        ========================================================== */

    @media (max-width: 768px) {

      .topbar-inner {
        justify-content: center;
      }

      .topbar-left {
        justify-content: center;
      }

      .top-social {
        display: none;
      }

      .nav-inner {
        min-height: 65px;
      }

      .menu-btn {
        display: flex;
      }

      .nav-links {
        display: none;
        position: absolute;
        top: 65px;
        left: 0;
        right: 0;
        padding: 12px 20px 20px;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        box-shadow: 0 15px 30px rgba(0, 0, 0, .08);
        flex-direction: column;
        align-items: stretch;
        gap: 3px;
      }

      .nav-links.show {
        display: flex;
      }

      .nav-links a {
        display: block;
        width: 100%;
      }

      .nav-links .nav-cta {
        text-align: center;
        margin: 5px 0 0;
      }

      .hero-content {
        padding: 80px 0;
      }

      .project-grid {
        gap: 60px;
      }

      .project-meta h3 {
        font-size: 17px;
      }

      .project-meta p {
        font-size: 12px;
      }

      .portfolio-section {
        padding-bottom: 80px;
      }

      .work-intro {
        padding-top: 75px;
      }

      .footer-grid {
        grid-template-columns: 1fr 1fr;
      }

    }


    /* =========================================================
           SMALL MOBILE
        ========================================================== */

    @media (max-width: 576px) {

      .topbar {
        display: none;
      }

      .container-custom {
        width: min(100% - 28px, 1180px);
      }

      .hero-content h1 {
        font-size: 44px;
      }

      .hero-content p {
        font-size: 13px;
      }

      .work-intro {
        padding: 70px 0 45px;
      }

      .work-intro h2 {
        font-size: 32px;
      }

      .project-grid {
        gap: 54px;
      }

      .project-meta h3 {
        font-size: 22px !important;
      }

      .process-grid,
      .build-grid {
        grid-template-columns: 1fr;
      }

      .work-block {
        margin-top: 65px;
      }

      .price-strip {
        flex-direction: column;
        align-items: flex-start;
        padding: 26px 22px;
        margin-top: 65px;
      }

      .work-process {
        margin-top: 65px;
      }

      .project-facts {
        grid-template-columns: 1fr;
        gap: 2px;
      }

      .project-facts dd {
        margin-bottom: 8px;
      }

      .project-meta h3 {
        font-size: 21px;
      }

      .project-meta p {
        font-size: 13px;
      }

      .portfolio-filters {
        flex-wrap: nowrap;
        justify-content: flex-start;
        width: 100%;
        gap: 4px;
        padding: 5px;
        overflow-x: auto;
        margin-bottom: 38px;
        scrollbar-width: none;
      }

      .portfolio-filters::-webkit-scrollbar {
        display: none;
      }

      .filter-btn {
        flex: none;
        padding: 10px 16px;
        font-size: 12px;
      }

      .browser-bar {
        padding: 9px 12px;
      }

      .shot-cta {
        opacity: 1;
        transform: translate(-50%, 0);
        bottom: 14px;
        padding: 9px 15px;
        font-size: 11px;
      }

      .portfolio-cta {
        padding: 45px 22px;
        border-radius: 20px;
      }

      .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
      }

      .cookie-content {
        grid-template-columns: 1fr;
      }

      .cookie-icon {
        display: none;
      }

      .cookie-actions {
        grid-column: 1;
      }

      .whatsapp-float {
        width: 50px;
        height: 50px;
        right: 20px;
        bottom: 20px;
        font-size: 25px;
      }

      .back-to-top {
        width: 42px;
        height: 42px;
        left: 20px;
        bottom: 24px;
      }

    }

    /* =========================================================
   TABLET NAVBAR FIX (769px – 1000px) 
========================================================== */

    @media (min-width: 769px) and (max-width: 1000px) {

      .nav-inner {
        min-height: 65px;
      }

      .menu-btn {
        display: block;
      }

      .services-hero .hero-image {
        right: 15%;
        width: 60%;
      }

      .services-hero .hero-stat {
        left: 10%;
      }

      .nav-links {
        display: none;
        position: absolute;
        top: 65px;
        left: 0;
        right: 0;
        padding: 12px 20px 20px;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        box-shadow: 0 15px 30px rgba(0, 0, 0, .08);
        flex-direction: column;
        align-items: stretch;
      }

      .nav-links.show {
        display: flex;
      }

      .nav-links a {
        display: block;
      }

      .nav-cta {
        text-align: center;
      }

    }


    /* =========================================================
           REDUCED MOTION
        ========================================================== */

    @media (prefers-reduced-motion: reduce) {

      *,
      *::before,
      *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
      }

      .reveal,
      .reveal-left,
      .reveal-right {
        opacity: 1;
        transform: none;
      }

    }
  