/* =================================================================
   styles.css — shared styles for all pages
   ================================================================= */

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

/* -----------------------------------------------------------------
   VARIABLES
   ----------------------------------------------------------------- */
:root {
    --beige: #f5f0e8;
    --beige-dark: #ede8dc;
    --black: #1a1a18;
    --black-soft: #2c2c28;
    --blue: #0000ff;
    --blue-dim: rgba(0, 0, 255, 0.08);
    --gray: #888880;
    --gray-light: #c8c4b8;
}

/* -----------------------------------------------------------------
   BASE
   ----------------------------------------------------------------- */
html {
    scroll-behavior: smooth;
    cursor: none;
}

body {
    background: var(--beige);
    color: var(--black);
    font-family: "Inter", sans-serif;
    font-weight: 300;
    overflow-x: hidden;
}

/* -----------------------------------------------------------------
   CURSOR
   ----------------------------------------------------------------- */
.cursor {
    position: fixed;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
    background: white;
    transition:
        width 0.2s,
        height 0.2s;
}

.cursor.hover {
    width: 48px;
    height: 48px;
}

@media (hover: none) and (pointer: coarse) {
    html {
        cursor: auto;
    }

    .cursor {
        display: none;
    }
}

/* -----------------------------------------------------------------
   LOGO
   ----------------------------------------------------------------- */
.logo {
    position: fixed;
    top: 1.8rem;
    left: 2rem;
    z-index: 101;
    font-family: "Cormorant Garamond", serif;
    font-size: 1.8rem;
    font-weight: 400;
    color: var(--blue);
    text-decoration: none;
    line-height: 1;
    transition:
        color 0.3s,
        opacity 0.2s;
}

.logo:hover {
    opacity: 0.7;
}

.logo.on-dark {
    color: var(--beige);
}

/* -----------------------------------------------------------------
   NAVIGATION — global pill
   ----------------------------------------------------------------- */
nav.global-nav {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    background: rgba(245, 240, 232, 0.85);
    backdrop-filter: blur(12px);
    border: 0.5px solid var(--gray-light);
    border-radius: 100px;
    padding: 0.5rem 0.75rem;
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

nav.global-nav a {
    font-family: "Inter", sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--gray);
    text-decoration: none;
    padding: 0.5rem 1.1rem;
    border-radius: 100px;
    transition: all 0.2s;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

nav.global-nav a:hover,
nav.global-nav a.active {
    background: var(--black);
    color: var(--beige);
}

/* -----------------------------------------------------------------
   NAVIGATION — side nav (case study pages)
   ----------------------------------------------------------------- */
nav.side-nav {
    position: fixed;
    top: 50%;
    right: 2rem;
    transform: translateY(-50%);
    z-index: 100;
    background: transparent;
    backdrop-filter: blur(8px);
    border: 0.5px solid var(--gray-light);
    border-radius: 8px;
    padding: 0.5rem 0.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    align-items: stretch;
    transition: border-color 0.3s;
}

nav.side-nav.on-dark {
    border-color: rgba(245, 240, 232, 0.2);
}

nav.side-nav a {
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--gray);
    text-decoration: none;
    padding: 0.5rem 0.85rem;
    border-radius: 6px;
    transition: all 0.2s;
    letter-spacing: 0.02em;
    white-space: nowrap;
    text-align: center;
}

nav.side-nav a:hover,
nav.side-nav a.active {
    background: var(--black);
    color: var(--beige);
}

nav.side-nav.on-dark a {
    color: rgba(245, 240, 232, 0.5);
}

nav.side-nav.on-dark a:hover,
nav.side-nav.on-dark a.active {
    background: var(--beige);
    color: var(--black);
}

/* -----------------------------------------------------------------
   FOOTER
   ----------------------------------------------------------------- */
footer {
    padding: 3rem 6rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--blue);
}

.footer-copy {
    font-size: 0.75rem;
    color: rgba(245, 240, 232, 0.6);
    letter-spacing: 0.08em;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    font-size: 0.75rem;
    color: var(--beige);
    text-decoration: none;
    letter-spacing: 0.08em;
    transition: opacity 0.2s;
    cursor: none;
}

.footer-links a:hover {
    opacity: 0.6;
}

/* -----------------------------------------------------------------
   ANIMATIONS
   ----------------------------------------------------------------- */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition:
        opacity 0.7s ease,
        transform 0.7s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* -----------------------------------------------------------------
   SECTION LABELS
   ----------------------------------------------------------------- */
/* Homepage work/about sections */
.section-label {
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gray);
    margin-bottom: 4rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-label::before {
    content: "";
    width: 24px;
    height: 0.5px;
    background: var(--gray-light);
}

/* Case study sections */
.cs-section-label {
    font-size: 0.65rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gray-light);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cs-section-label::before {
    content: "";
    width: 20px;
    height: 0.5px;
    background: var(--gray-light);
}

/* Inverted variants inside dark sections */
.features-section .cs-section-label {
    color: rgba(245, 240, 232, 0.3);
}

.features-section .cs-section-label::before {
    background: rgba(245, 240, 232, 0.2);
}

.features-section .cs-section-title {
    color: var(--beige);
}

/* =================================================================
   CASE STUDY — SHARED COMPONENTS
   ================================================================= */

/* -----------------------------------------------------------------
   HERO
   ----------------------------------------------------------------- */
.cs-hero {
    padding: 10rem 6rem 5rem;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: center;
    border-bottom: 0.5px solid var(--gray-light);
    overflow: hidden;
}

.cs-hero>* {
    opacity: 0;
    animation: fadeUp 0.8s ease forwards;
}

.cs-hero>*:nth-child(1) {
    animation-delay: 0.2s;
}

.cs-hero>*:nth-child(2) {
    animation-delay: 0.4s;
}

.cs-title {
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 300;
    line-height: 1.1;
    color: var(--black);
}

.cs-title span {
    font-style: italic;
    color: var(--blue);
}

.cs-desc {
    font-size: 0.9rem;
    line-height: 1.75;
    color: var(--gray);
    margin-top: 1.5rem;
    max-width: 480px;
}

.cs-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 0.5px solid var(--gray-light);
}

.cs-meta dt {
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gray-light);
    margin-bottom: 0.4rem;
}

.cs-meta dd {
    font-size: 0.82rem;
    color: var(--black-soft);
    font-weight: 400;
    line-height: 1.5;
}

.cs-cover-img>img {
    width: 100%;
}

/* -----------------------------------------------------------------
   PHONE CAROUSEL
   ----------------------------------------------------------------- */
.phone-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    overflow: hidden;
    padding: 1rem 0;
}

.phone-track {
    display: flex;
    gap: 1.5rem;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.phone-frame {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
    opacity: 0;
    transform: translateY(30px);
    transition:
        opacity 0.6s ease,
        transform 0.6s ease;
}

/* Staggered load animation — no numbered classes needed */
.phone-frame:nth-child(1) {
    transition-delay: 0.3s;
}

.phone-frame:nth-child(2) {
    transition-delay: 0.45s;
}

.phone-frame:nth-child(3) {
    transition-delay: 0.6s;
}

.phone-frame:nth-child(4) {
    transition-delay: 0.75s;
}

.phone-frame.loaded {
    opacity: 1;
    transform: translateY(0);
}

.phone-frame img {
    width: 180px;
    height: auto;
    display: block;
}

.phone-shell {
    width: 180px;
    height: 360px;

    border-radius: 28px;

    position: relative;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.2),
        inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.phone-shell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    display: block;
}

.phone-notch {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 6px;
    border-radius: 100px;
    z-index: 2;
}

.phone-label {
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gray-light);
    text-align: center;
    max-width: 180px;
}

.phone-dots {
    display: flex;
    gap: 0.5rem;
}

.pdot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gray-light);
    cursor: none;
    transition: all 0.3s;
}

.pdot.active {
    background: var(--blue);
    filter: brightness(0.7);
    width: 18px;
    border-radius: 100px;
}

/* -----------------------------------------------------------------
   IMAGE BLOCKS
   ----------------------------------------------------------------- */
.cs-image-block {
    background: var(--beige-dark);
    border-radius: 4px;
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0.5px solid var(--gray-light);
    overflow: hidden;
}

.cs-image-block img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cs-image-placeholder {
    text-align: center;
    color: var(--gray-light);
}

.cs-image-placeholder p {
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-top: 0.5rem;
}

/* -----------------------------------------------------------------
   CONTENT SECTIONS
   ----------------------------------------------------------------- */
.cs-section {
    padding: 5rem 6rem;
    border-bottom: 0.5px solid var(--gray-light);
}

.cs-section-title {
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 300;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.cs-body {
    font-size: 0.85rem;
    line-height: 1.85;
    color: var(--gray);
    max-width: 680px;
}

.cs-body p+p {
    margin-top: 1.2rem;
}

/* Two-column layout */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
}

/* Insight / quote cards */
.insight-card {
    padding: 2rem;
    border: 0.5px solid var(--gray-light);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.3);
    margin-top: 2rem;
}

.insight-card p {
    font-size: 0.78rem;
    line-height: 1.7;
    color: var(--gray);
    font-style: italic;
}

.insight-card cite {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--black-soft);
    font-style: normal;
}

/* -----------------------------------------------------------------
   PROCESS GRID
   ----------------------------------------------------------------- */
.process-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.process-step {
    padding: 1.5rem;
    border: 0.5px solid var(--gray-light);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.3);
}

.process-week {
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--black-soft);
    margin-bottom: 0.75rem;
}

.process-step h4 {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    color: var(--black);
}

.process-step p {
    font-size: 0.75rem;
    color: var(--gray);
    line-height: 1.6;
}

/* -----------------------------------------------------------------
   WIREFRAME GRID
   ----------------------------------------------------------------- */
.wireframe-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.wireframe-item {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
}

.wireframe-item img {
    width: 180px;
    height: auto;
    display: block;
}

.wireframe-phone {
    width: 190px;
    height: 390px;

    border-radius: 20px;

    position: relative;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.wireframe-phone .phone-notch {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 5px;
    background: #111;
    border-radius: 100px;
    z-index: 2;
}

.wireframe-phone img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
}

.wireframe-label {
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gray-light);
    text-align: center;
}

/* -----------------------------------------------------------------
   FEATURES SECTION (dark background)
   ----------------------------------------------------------------- */
.features-section {
    padding: 5rem 6rem;
    background: var(--black);
    color: var(--beige);
}

.feature-toggle {
    display: flex;
    gap: 0.5rem;
    margin: 2.5rem 0;
    flex-wrap: wrap;
}

.feature-btn {
    font-family: "Inter", sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    padding: 0.6rem 1.4rem;
    border-radius: 8px;
    border: 0.5px solid rgba(245, 240, 232, 0.2);
    background: transparent;
    color: rgba(245, 240, 232, 0.5);
    cursor: none;
    transition: all 0.25s;
}

.feature-btn.active {
    background: var(--beige);
    border-color: var(--beige);
    color: var(--black);
    font-weight: 500;
}

.feature-panel {
    display: none;
}

.feature-panel.active {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.feature-panel h3 {
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(1.6rem, 2.5vw, 2.2rem);
    font-weight: 300;
    color: var(--beige);
    margin-bottom: 1rem;
}

.feature-panel h3 em {
    font-style: italic;
    color: var(--beige);
    opacity: 0.6;
}

.feature-panel p {
    font-size: 0.82rem;
    line-height: 1.85;
    color: rgba(245, 240, 232, 0.6);
}

.feature-panel p+p {
    margin-top: 1rem;
}

.feature-points {
    list-style: none;
    margin-top: 1.5rem;
}

.feature-points li {
    font-size: 0.8rem;
    color: rgba(245, 240, 232, 0.5);
    padding: 0.8rem 0;
    border-top: 0.5px solid rgba(245, 240, 232, 0.08);
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    line-height: 1.6;
}

.feature-points li::before {
    content: "→";
    color: rgba(245, 240, 232, 0.4);
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.feature-screens {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.feature-screen-phone {
    width: 260px;
    height: 520px;
    background: rgba(245, 240, 232, 0.05);
    border: 0.5px solid rgba(245, 240, 232, 0.1);
    border-radius: 20px;
    padding: 8px;
    position: relative;
    flex-shrink: 0;
}

.feature-screen-phone .phone-notch {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 5px;
    background: rgba(245, 240, 232, 0.1);
    border-radius: 100px;
    z-index: 2;
}

.feature-screen-phone img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
}

/* -----------------------------------------------------------------
   ACCESSIBILITY IMAGE SLIDER
   ----------------------------------------------------------------- */
.acc-arrow {
    background: transparent;
    border: 0.5px solid rgba(245, 240, 232, 0.3);
    color: rgba(245, 240, 232, 0.6);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 1rem;
    cursor: none;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.acc-arrow:hover {
    background: rgba(245, 240, 232, 0.15);
    color: var(--beige);
    border-color: rgba(245, 240, 232, 0.5);
}

.acc-dots {
    display: flex;
    gap: 0.5rem;
}

.acc-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(245, 240, 232, 0.2);
    cursor: none;
    transition: all 0.3s;
}

.acc-dot.active {
    background: var(--beige);
    width: 18px;
    border-radius: 100px;
}

/* -----------------------------------------------------------------
   OUTCOME SECTION
   ----------------------------------------------------------------- */
.outcome-section {
    padding: 5rem 6rem;
    background: var(--beige-dark);
}

.outcome-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.stat {
    padding: 2rem;
    border: 0.5px solid var(--gray-light);
    border-radius: 4px;
    background: var(--beige);
}

.stat-number {
    font-family: "Cormorant Garamond", serif;
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--black);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--gray);
    line-height: 1.5;
}

/* -----------------------------------------------------------------
   NEXT PROJECT LINK
   ----------------------------------------------------------------- */
.next-project {
    padding: 5rem 6rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
    border-top: 0.5px solid var(--gray-light);
}

.next-label {
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gray-light);
    margin-bottom: 0.5rem;
}

.next-title {
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 300;
    color: var(--black);
}

.next-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--blue);
    color: white;
    font-size: 1.4rem;
    border: none;
    cursor: none;
    flex-shrink: 0;
    transition:
        background 0.25s,
        transform 0.25s;
    text-decoration: none;
}

.next-project:hover .next-arrow {
    background: var(--black);
    transform: translateX(6px);
}

/* =================================================================
   RESPONSIVE BREAKPOINTS
   48rem = 768px  (tablet)
   30rem = 480px  (mobile)
   ================================================================= */

@media (max-width: 48rem) {

    /* --- Navigation -------------------------------------------- */
    /* Side nav is hidden — global pill nav handles all navigation */
    nav.side-nav {
        display: none;
    }

    /* --- Section padding --------------------------------------- */
    /* All sections drop from 5–8rem / 6rem to 3rem / 1.5rem      */
    .cs-hero {
        padding: 6rem 1.5rem 3rem;
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .cs-section {
        padding: 3rem 1.5rem;
    }

    .features-section {
        padding: 3rem 1.5rem;
    }

    .outcome-section {
        padding: 3rem 1.5rem;
    }

    .next-project {
        padding: 3rem 1.5rem;
    }

    footer {
        padding: 2rem 1.5rem;
    }

    /* --- Multi-column layouts ---------------------------------- */
    .two-col {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

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

    .feature-panel.active {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* --- Phone carousel --------------------------------------- */
    /* Ensure only one phone is visible at a time               */
    .phone-hero {
        max-width: 100%;
    }
}

@media (max-width: 30rem) {

    /* --- Navigation -------------------------------------------- */
    nav.global-nav a {
        padding: 0.4rem 0.75rem;
        font-size: 0.75rem;
    }

    /* --- Section padding --------------------------------------- */
    .cs-hero {
        padding: 5rem 1.25rem 2.5rem;
    }

    .cs-section {
        padding: 2.5rem 1.25rem;
    }

    .features-section {
        padding: 2.5rem 1.25rem;
    }

    .outcome-section {
        padding: 2.5rem 1.25rem;
    }

    .next-project {
        padding: 2.5rem 1.25rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .next-arrow {
        align-self: flex-end;
    }

    footer {
        padding: 1.5rem 1.25rem;
    }

    /* --- Layouts ----------------------------------------------- */
    .process-grid {
        grid-template-columns: 1fr;
    }

    .outcome-stats {
        grid-template-columns: 1fr;
    }

    /* cs-meta: 3→2 cols (saves vertical space vs full stack)     */
    .cs-meta {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    /* Wireframe phones shrink and grid shifts to 2-col           */
    .wireframe-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .wireframe-phone {
        width: 140px;
        height: 280px;
    }
}