  :root{
    --bg: #f7f6f3;
    --ink: #1b1b1a;
    --ink-soft: #6b6a66;
    --line: #d8d6d0;
    --accent: #3f5a4d;
    --white: #ffffff;
  }

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", sans-serif;
    font-optical-sizing: auto;
  /* font-weight: <weight>; */
    font-style: normal;
    line-height: 1.6;
    color: #2D3436;
}

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

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

main {
    max-width: 100%;
    margin: 0 auto;
}


/* Buttons */
.button {
    display: inline-block;
    font-size: 16px;
    font-weight: 500;
    background: #2D3436;
    color: #ffffff;
    padding: 10px 24px;
    border-radius: 100px;
    font-size: 16px;
    border: 2px solid #2D3436;
    transition:
        background-color 0.6s ease,
        color 0.3s ease,
        border-color 0.3s ease,
        transform 0.2s ease,
        box-shadow 0.3s ease;
}

.button.ghost {
    background: #ffffff;
    border: 2px solid #2D3436;
    color: #2D3436;
}

.button.ghost:hover {
    background: #2D3436;
    border: 2px solid #2D3436;
    color: #ffffff;
    transform: translateY(-2px);
}

.button:hover {
   background: #ffffff;
    border: 2px solid #2D3436;
    color: #2D3436; 
    transform: translateY(-2px);
}

/* Header */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border-bottom: 1px solid #E8E8E8;
}

header .logo img {
    width: 120px;
}

header .top-nav {
    display: flex;
    align-items: center;
    gap: 48px;
}

header .main-nav {
    ul {
        display: flex;
        gap: 48px;
    }

    ul li {
        display: flex;
        gap: 40px;
    }
    
    ul li a {
        font-size: 16px;
        font-weight: 500;
    }
}

nav a {
    position: relative;
    text-decoration: none;
    color: #333;
    padding: 8px 0;
}

nav a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -4px;

    width: 0;
    height: 2px;

    background: #222;

    transform: translateX(-50%);
    transition: width .3s ease;
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

header .header-buttons {
    display: flex;
    gap: 24px;
}

/* Sections */

section {
    margin: 0;
    position: relative;
    /* border-top: 1px solid #000000; */
    scroll-margin-top: 90px; /* Adjust to your header height */
    min-height: 100vh;
    scroll-margin-top: 99px;
    width: 100%;
    /* background:red; */
    
    .section-header {
        position: relative;
        margin-bottom: 100px;
        
        h1 {
            position: relative;
            font-weight: bold;
            z-index: 200;
            font-size: 40px;
    }

    .sub-title {
        font-weight: 800;
        font-size: 10rem;
        text-transform: uppercase;
        color: #F8F8F8;
        position: absolute;
        top: 24px;
        left: 0;
        z-index: 100;
        line-height: 0;
    }
    }
    
}

section .accent {
    width: 20%;
    display: none;
}

section .inner {
    margin: 0 auto;
    width: 1200px;
    padding: 130px 0;
}

section .accent img {
    width: 30%;
    position: absolute;
    right: -50px;
    top:0;
}

/* Footer */
footer {
    padding: 16px 24px;
    display: flex;
    text-align: center;
    border-top: 1px solid #E8E8E8;
    color: #C4C4C4;
}

footer p {
    width: 100%;
    font-weight: 200;
    font-size: 14px;
}

/* WELCOME SECTION */

#welcome {
    margin: 0;
    min-height: 50vh;
    background: #f9f9f9;
    .inner {
        .profile {
            width: 20%;
            height: 20%;
        }
        display: flex;
        gap: 40px;

        .text-intro {
            width: 100%;
            line-height: 60px;
            p {
                padding: 0;
                margin: 0;                
            }

            .line-one {
                font-size: 36px;
                font-weight: 200;
            }
            .line-two {
                font-size: 52px;
                font-weight: 700;
            }
            .line-three {
                font-size: 52px;
                font-weight: 700;
            }
            .line-four {
                font-size: 24px;
                font-weight: 300;
                color: #6C5CE7;
            }

            span {
                font-weight: 200;
            }
        }
    }
}

#about {
    .content {
        p {
            margin-top: 20px;
        }

        .brands { 
            margin-top: 64px;           
            h3 {
                font-size: 24px;
                font-weight: 600;
                margin-bottom: 20px;
            }

            .logos {
                flex-direction: row;
                align-items: center;
                display: flex;
                flex-wrap: nowrap;
                justify-content: space-between;
                gap: 36px;

                img {
                    width: 100px;
                    height: 100%;
                }
            }
        }
    }
}

#case-studies {
    color: #ffffff;
    background: #2D3436;

    .section-header {
        h1 {
            color: #ffffff;
            span {
                display: block;
                font-size: 20px;
                font-weight: 400;
            }
        }

        .sub-title {
            font-size: 10rem;
            color: #333B3D;
        }
    }

    .content {
        p {    margin-bottom: 20px;
            color: beige;
        }
        
        .cs {
            display: flex;
            flex-direction: row;
            gap: 25px;

            img {
                /* width: 33%;
                height: 33%; */
            }
        }
    }
}

#tools {
    min-height: 50vh;

    h3 {
        font-weight: 700;
        font-size: 24px;
        margin-bottom: 70px;
    }

    .tools {
            display: flex;
            row-gap: 60px;
            column-gap: 110px;
            flex-direction: row;
            flex-wrap: wrap;
            justify-content: center;
            align-items: center;

            img {
               width: 50px;
               height: 100%;
            }

            .jira {
                width: 110px;
            }
    }
}

#galleryview {
    color: #2D3436;
    background: #F5F5F5;

    .section-header {
        h1 {
            color: #2D3436;
        }

        .sub-title {
            color: #F0F0F0;
        }
    }
    /* Start */
.gallery{
    max-width: 1200px;
    margin: 0 auto;
    /* padding: 48px 32px 100px; */
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
  }

  .tile{
    position: relative;
    aspect-ratio: 4/4;
    overflow: hidden;
    background: none;
    cursor: pointer;
    border: none;
    padding: 0;
    display: block;
    width: 100%;
  }

  .tile img{
    width: 100%;
    height: 100%;
    /* object-fit: cover; */
    display: block;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .tile:hover img{
    transform: scale(1.045);
  }

  .tile .caption{
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 14px 16px;
    background: linear-gradient(to top, rgba(0,0,0,0.55), transparent);
    color: #fff;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    font-size: 13px;
    letter-spacing: 0.02em;
  }

  .tile:hover .caption{
    opacity: 1;
    transform: translateY(0);
  }

  .caption .num{
    color: rgba(255,255,255,0.7);
    margin-right: 8px;
    /* font-family: 'Fraunces', serif; */
  }

  .tile:focus-visible{
    outline: 2px solid var(--accent);
    outline-offset: 3px;
  }

  /* Modal */
  .modal{
    position: fixed;
    inset: 0;
    background: var(--white);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 40px;
  }

  .modal.open{
    display: flex;
  }

  .modal img{
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 20px 60px rgba(0,0,0,0.08);
    opacity: 1;
    transform: scale(0.98);
    animation: reveal 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  @keyframes reveal{
    to{ opacity: 1; transform: scale(1); }
  }

  .modal-close{
    position: absolute;
    top: 28px;
    right: 32px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--white);
    color: var(--ink);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
  }

  .modal-close:hover{
    background: var(--bg);
    transform: rotate(90deg);
  }

  .modal-meta{
    position: absolute;
    left: 32px;
    bottom: 28px;
    font-size: 13px;
    color: var(--ink-soft);
    letter-spacing: 0.02em;
  }

  .modal-meta .num{
    /* font-family: 'Fraunces', serif; */
    color: var(--ink);
    margin-right: 10px;
  }

  .modal-nav{
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--white);
    color: var(--ink);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
  }

  .modal-nav:hover{ background: var(--bg); }
  .modal-nav.prev{ left: 32px; }
  .modal-nav.next{ right: 32px; }

  @media (max-width: 900px){
    .gallery{ grid-template-columns: repeat(2, 1fr); gap: 14px; padding: 32px 20px 72px; }
    header{ padding: 56px 20px 36px; }
    .modal-nav{ display: none; }
  }

  @media (prefers-reduced-motion: reduce){
    .tile img, .modal img, .modal-close{ transition: none; animation: none; }
  }
    /* End */
}

#contact {
    .accent {
        display: none;
    }
    h3 {
        font-size: 32px;
        margin-bottom: 20px;
    }

    ul {
        li {
            margin-bottom: 16px;
            font-size: 22px;
            display: flex;
            align-items: center;
            gap: 0;
     
            span {
                display: block;  
                margin-right: 12px;          
                img {
                    width: 24px;
                    height: 24px;
                }
            }

            a {
                text-decoration: underline;
                color: #6C5CE7;
    }
        }
    }
}

/* =========================================================
   MOBILE / RESPONSIVE STYLES
   ========================================================= */

/* ---------- Tablet & below (≤1024px) ---------- */
@media (max-width: 1024px) {

  section .inner {
    width: 100%;
    padding: 90px 24px;
  }

  section .section-header .sub-title {
    font-size: 6rem;
  }

  #case-studies .section-header .sub-title {
    font-size: 6rem;
  }

  header .main-nav ul {
    gap: 28px;
  }

  header .top-nav {
    gap: 28px;
  }

  #tools .tools {
    column-gap: 60px;
    row-gap: 40px;
  }
}

/* ---------- Burger button (hidden on desktop) ---------- */

.case-studies-single {
  .burger {
      display: none;
    }
}

.burger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 18px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  z-index: 1200;
}

.burger span {
  display: block;
  width: 100%;
  height: 2px;
  background: #2D3436;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.burger.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.burger.active span:nth-child(2) {
  opacity: 0;
}

.burger.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Dims the page behind the open mobile nav */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-overlay.open {
  display: block;
  opacity: 1;
}

/* ---------- Mobile (≤768px) ---------- */
@media (max-width: 768px) {

  header {
    flex-wrap: nowrap;
    padding: 16px 20px;
  }

  header .logo img {
    width: 96px;
  }

  .burger {
    display: flex;
  }

  header .top-nav {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 75%;
    max-width: 320px;
    background: #ffffff;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 32px;
    padding: 100px 32px 32px;
    box-shadow: -12px 0 30px rgba(0, 0, 0, 0.08);
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1100;
  }

  header .top-nav.open {
    right: 0;
  }

  header .main-nav ul {
    flex-direction: column;
    gap: 24px;
  }

  header .main-nav ul li {
    gap: 20px;
  }

  header .header-buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    width: 50%;
  }

  header .header-buttons .button {
    width: 100%;
    text-align: center;
    padding: 10px 16px;
    font-size: 14px;
  }

  section {
    min-height: auto;
  }

  section .inner {
    padding: 60px 20px;
  }

  section .section-header {
    margin-bottom: 60px;
  }

  section .section-header h1 {
    font-size: 28px;
  }

  section .section-header .sub-title {
    font-size: 3.5rem;
    top: 12px;
  }

  section .accent {
    display: none !important;
  }

  /* Welcome */
  #welcome .inner {
    flex-direction: column;
    gap: 24px;
  }

  #welcome .inner .profile {
    width: 40%;
    height: auto;
  }

  #welcome .inner .text-intro {
    line-height: 1.3;
  }

  #welcome .inner .text-intro .line-one {
    font-size: 22px;
  }

  #welcome .inner .text-intro .line-two,
  #welcome .inner .text-intro .line-three {
    font-size: 32px;
  }

  #welcome .inner .text-intro .line-four {
    font-size: 18px;
  }

  /* About */
  #about .content .brands .logos {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 24px;
  }

  #about .content .brands .logos img {
    width: 70px;
  }

  /* Case studies */
  #case-studies .content .cs {
    flex-direction: column;
    gap: 20px;
  }

  /* Tools */
  #tools h3 {
    font-size: 28px;
    margin-bottom: 40px;
  }

  #tools .tools {
    column-gap: 36px;
    row-gap: 32px;
  }

  /* Gallery */
  #galleryview .gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    padding: 0;
  }

  /* Contact */
  #contact h3 {
    font-size: 24px;
  }

  #contact ul li {
    font-size: 16px;
    flex-wrap: wrap;
  }
}

/* ---------- Small mobile (≤480px) ---------- */
@media (max-width: 480px) {

  section .section-header h1 {
    font-size: 22px;
  }

  section .section-header .sub-title {
    font-size: 2.5rem;
  }

  #welcome .inner .profile {
    width: 55%;
  }

  #welcome .inner .text-intro .line-two,
  #welcome .inner .text-intro .line-three {
    font-size: 26px;
  }

  #about .content .brands .logos {
    justify-content: center;
  }

  #tools .tools img {
    width: 40px;
  }

  #galleryview .gallery {
    grid-template-columns: 1fr;
  }

  footer {
    padding: 16px;
  }

  footer p {
    font-size: 12px;
  }
}


/* Case Studies */
.case-study-full {
    /* position: relative;
    margin: 0 200px; */

    img {
        width: 100%;
    }

    .sub-footer, .links {
        margin: 0 auto 100px auto ;
        width: 370px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        text-align: center;

        img {
            width: 30%;
            margin-bottom: 20px;
        }

        a {
            color: #6C5CE7;
            margin-bottom: 20px;
        }

        a:hover {
            color: #000000;
        }

        .button {
            color: #000000;
        }

        .button:hover {
          color: #ffffff;
        }

        span {
            display: flex;
            justify-content: center;
            gap: 10px;
        }
    }
}