/* =========================================================
   body.css (uniform + inclusive refresh)
   - Consistent spacing + typography scale
   - Shared "card" + "button" patterns
   - Accessible focus-visible states
   - Hover as enhancement (not required for meaning)
   ========================================================= */
/* ===== T4SG only ===== */
.t4sg-page {
    width: min(860px, 92vw);
    margin: 0 auto;
    padding: 0 1.25rem;
}

.t4sg-page p,
.t4sg-page ul,
.t4sg-page ol {
    max-width: 68ch;
}

.t4sg-mockups {
    display: flex;
    gap: 2rem;
    justify-content: center;
    max-width: 900px;
    margin: 3rem auto;
}

.t4sg-mockups img {
    width: 100%;
    max-width: 420px;
}

/* ---------- Design tokens ---------- */
:root {
    --accent: #1ca591;

    --bg-panel: rgba(255, 255, 255, 0.03);
    --bg-panel-2: rgba(255, 255, 255, 0.04);

    --text-primary: #eaeaea;
    --text-secondary: #9a9a9a;
    --text-tertiary: #7a7a7a;

    --shadow: 0 10px 22px rgba(0, 0, 0, 0.25);
    --shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.20);

    /* Spacing scale */
    --s-1: 0.25rem;
    --s-2: 0.5rem;
    --s-3: 0.75rem;
    --s-4: 1rem;
    --s-5: 1.5rem;
    --s-6: 2rem;
    --s-7: 3rem;

    /* Type */
    --font-serif: "Crimson Text", serif;
    --fs-0: 0.5rem;
    --fs-1: 0.8rem;
    /* small */
    --fs-2: 1rem;
    /* body */
    --fs-3: 1.5rem;
    /* subtitle */
    --fs-4: 2rem;
    /* section title */
    --fs-5: 2.2rem;
    /* hero title */
    --lh: 1.8;
}

/* ---------- Global accessibility + defaults ---------- */
html {
    scroll-behavior: smooth;
}

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

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* ---------- Shared patterns ---------- */
.card {
    background: var(--bg-panel);
    box-shadow: var(--shadow);
}

.card--soft {
    background: rgba(0, 0, 0, 0.12);
    box-shadow: var(--shadow-soft);
}

.btn {
    background: rgba(255, 255, 255, 0.06);
    filter: blur(1px) grayscale(100%);

    color: inherit;
    padding: 10px 12px;
    cursor: pointer;
    white-space: nowrap;
    font-family: var(--font-serif);
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.btn:hover {
    border-color: rgba(28, 165, 145, 0.55);
    box-shadow: 0 0 18px rgba(28, 165, 145, 0.18);
    transform: translateY(-1px);

}

.pill {
    color: var(--accent);
    padding: 4px 10px;
    font-size: var(--fs-1);
    opacity: 0.95;
}

.video {
  width: min(920px, 100%);
  margin: 1.5rem auto;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 20px 40px rgba(0,0,0,0.25), 0 0 0 1px rgba(255,255,255,0.08);
}

.video video {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 9; /* if your mp4 is 16:9 */
  object-fit: cover;     /* use 'contain' if you don't want cropping */
}



/* =========================================================
   Progress + reveal
   ========================================================= */
.progress-wrap {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    z-index: 9998;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(6px);
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), #fff, var(--accent));
    background-size: 200% 100%;
    animation: progGlow 4s linear infinite;
    box-shadow: 0 0 18px rgba(28, 165, 145, 0.35);
}

@keyframes progGlow {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 200% 50%;
    }
}

.reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 700ms ease, transform 700ms ease;
}

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

/* =========================================================
   Case study hero + tags + callouts + media
   ========================================================= */
.case-hero {
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
    padding: var(--s-6);
    background:
        radial-gradient(circle at 18% 20%, rgba(28, 165, 145, 0.18), transparent 42%),
        radial-gradient(circle at 82% 10%, rgba(255, 255, 255, 0.07), transparent 40%),
        rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-soft);
}

.case-title {
    font-family: var(--font-serif);
    color: var(--text-primary);
    margin: var(--s-1) 0;
    letter-spacing: 0.3px;
    font-size: var(--fs-5);
    font-weight: 600;
}

.case-subtitle {
    font-family: var(--font-serif);
    color: var(--text-secondary);
    margin: var(--s-2) 0 var(--s-4);
    font-size: var(--fs-3);
    line-height: var(--lh);
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-2);
    margin-top: var(--s-3);
}

.tag {
    font-family: var(--font-serif);
    font-size: var(--fs-1);
    color: var(--text-primary);
    /* always visible */
    padding: 0.35rem 0.6rem;
    background: var(--bg-panel);
    user-select: none;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.tag:hover {
    box-shadow: -0.25rem 0.25rem 0.5rem 0.05rem rgba(28, 165, 145, 0.45);
    border-color: rgba(28, 165, 145, 0.65);
    transform: translateY(-1px);
}

.split {
    display: flex;
    gap: 32px;
    align-items: stretch;
}

.callout {
    display: flex;
    flex-direction: column;
}

.callout {
    border: 1px solid var(--accent);
    padding: var(--s-4) var(--s-5);
    background: rgba(28, 165, 145, 0.06);
    max-width: 500px;
    margin: 0 auto;
}

.callout h3 {
    margin: 0 0 var(--s-2) 0;
    font-family: var(--font-serif);
    color: var(--text-primary);
    font-size: var(--fs-3);
    font-weight: 600;
    /* avoid italics-only meaning */
}

.callout p {
    margin: var(--s-1) 0;
    font-family: var(--font-serif);
    color: var(--text-secondary);
    font-size: var(--fs-2);
    line-height: var(--lh);
}

.media-card {
    width: min(750px, 85vw);
    margin: 0 auto;
    background: var(--bg-panel);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.media-card img {
    width: 100%;
    display: block;
    filter: grayscale(18%);
    outline: 1px solid rgba(255, 255, 255, 0.08);
    /* non-hover cue */
    transition: filter 200ms ease, transform 200ms ease;
}

.media-card:hover img {
    filter: grayscale(0%);
    transform: translateY(-2px);
}

.img-caption {
    font-family: var(--font-serif);
    color: var(--text-secondary);
    font-size: var(--fs-2);
    line-height: 1.6;
    max-width: 920px;
    margin: var(--s-3) auto 0 auto;
    opacity: 0.95;
}

/* Split layout */
.split {
    width: min(1100px, 95vw);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: var(--s-4);
    align-items: start;
}

@media screen and (max-width: 880px) {
    .split {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   Accordion
   ========================================================= */
.accordion {
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.12);
}

.acc-btn {
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-serif);
    padding: var(--s-4) var(--s-4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-4);
}

.acc-btn span {
    font-size: var(--fs-3);
    font-weight: 600;
}

.acc-btn .chev {
    opacity: 0.75;
    transition: transform 200ms ease;
}

.acc-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 350ms ease;
}

.acc-inner {
    padding: var(--s-4);
    color: var(--text-secondary);
    font-family: var(--font-serif);
    font-size: var(--fs-2);
    line-height: var(--lh);
}

/* =========================================================
   Contact icons
   ========================================================= */
.contact-logo {
    text-decoration: none;
    color: white;
    height: 1.5rem;
    width: auto;
    opacity: 0.55;
    transition: opacity 200ms ease, filter 200ms ease;
    filter: grayscale(100%);
    padding-inline: var(--s-2);
}

.contact-logo:hover {
    filter: blur(1px) grayscale(100%);
    opacity: 0.85;
}

/* =========================================================
   About page (bio)
   ========================================================= */
.bio-container {
    background-repeat: no-repeat;
    background-size: 10rem auto;
    max-width: 100%;
    margin: 0 auto;
    padding-top: var(--s-7);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-6);
    padding: var(--s-6);
    position: relative;
    text-align: center;
}

.bio-text {
    margin-bottom: var(--s-6);
    z-index: 2;
    position: relative;
    max-width: 50rem;
    text-align: justify;
    text-decoration: none;
}

.bio-text a {
    text-decoration: none;
    color: var(--text-secondary);
    transition: color 200ms ease;
}

.bio-text a:hover {
    background: linear-gradient(45deg, var(--accent), #fff, var(--accent));
    background-size: 200%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientHover 2s infinite linear;
}

.bio-text h2,
.bio-text p {
    font-family: var(--font-serif);
    line-height: var(--lh);
}

.bio-text h2 {
    font-size: var(--fs-3);
    color: var(--accent);
    font-weight: 600;
}

.bio-text p {
    font-size: var(--fs-2);
    color: var(--text-secondary);
}

@keyframes gradientHover {
    0% {
        background-position: 0%;
    }

    100% {
        background-position: 100%;
    }
}

.image-container {
    position: relative;
    width: 100%;
    height: 70vh;
    overflow: hidden;
    z-index: 1;
}

.image {
    position: absolute;
    width: 150px;
    height: 150px;
    background-size: cover;
    background-position: center;
    transition: transform 200ms ease, box-shadow 200ms ease, top 200ms ease, left 200ms ease, opacity 200ms ease;
    cursor: pointer;
    z-index: 1;
    filter: grayscale(100%);
}

/* Inclusive tweak: don’t rely on sibling selector dimming only */
.image-container:hover .image {
    opacity: 0.55;
}

.image-container:hover .image:hover {
    opacity: 1;
}

.gif-image {
    position: relative;
    width: 25vw;
    height: auto;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    z-index: 1;
}

.popup-image {
    position: fixed;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 999;
    pointer-events: none;
}

.bio-image {
    flex: 0 0 auto;
    margin-left: 1vw;
    max-width: 300px;
    filter: grayscale(100%);
    opacity: 0.85;
    transition: filter 200ms ease, box-shadow 200ms ease;
}

.bio-image:hover {
    animation: grayscaleTransition 1s infinite alternate;
    box-shadow: -0.25rem 0.25rem 0.5rem 0.05rem rgba(28, 165, 145, 0.45);
}

@keyframes grayscaleTransition {
    from {
        filter: grayscale(100%);
    }

    to {
        filter: grayscale(25%);
    }
}

/* =========================================================
   Thumbnails
   ========================================================= */
.thumbnail-container {
    font-family: var(--font-serif);
    display: flex;
    flex-direction: column;
    gap: var(--s-6);
    padding: var(--s-7);
    max-width: 800px;
    margin: 0 auto;
}

.thumbnail {
    display: flex;
    overflow: hidden;
    background: var(--bg-panel);
    box-shadow: var(--shadow);
    transition: box-shadow 200ms ease, transform 200ms ease, border-color 200ms ease;
}

.thumbnail:hover {
    border-color: rgba(28, 165, 145, 0.35);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
    transform: translateY(-1px);
}

.thumbnail img {
    width: 300px;
    height: 150px;
    object-fit: cover;
}

.thumbnail-content {
    padding: var(--s-6);
    flex: 1;
}

.thumbnail-header {
    font-size: var(--fs-4);
    font-weight: 600;
    margin-bottom: var(--s-2);
    color: var(--text-primary);
    text-decoration: none;
}

.thumbnail-description {
    font-size: var(--fs-2);
    color: var(--text-secondary);
    line-height: 1.6;
}

/* =========================================================
   Masonry + lightbox
   ========================================================= */
.masonry {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: var(--s-4);
    gap: var(--s-3);
}

.item img {
    display: block;
    width: 100%;
    height: 20rem;
    object-fit: cover;
    transition: transform 200ms ease, box-shadow 200ms ease;
}

.item img:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.lightbox-overlay img {
    max-width: 90%;
    max-height: 90%;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    z-index: 1001;
    transition: opacity 200ms ease;
}

.close-btn:hover {
    opacity: 0.75;
}

/* Loader */
.loader-container {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    visibility: visible;
    transition: opacity 400ms ease, visibility 400ms ease;
}

.loader-container.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-container img {
    width: 10rem;
    height: auto;
}

/* Sketch */
#sketch-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    position: fixed;
    inset: 0;
}

/* =========================================================
   Responsive
   ========================================================= */
@media screen and (min-width: 666px) and (max-width: 880px) {
    .masonry {
        grid-template-columns: repeat(2, 1fr);
    }

    .bio-container {
        flex-direction: column;
        padding: var(--s-6);
    }

    .bio-text {
        max-width: 100%;
        padding: 0;
    }

    .image {
        width: 120px;
        height: 120px;
    }

    .thumbnail img {
        width: 200px;
        height: 100px;
    }

    .thumbnail-content {
        padding: var(--s-5);
    }
}

@media screen and (max-width: 666px) {
    .masonry {
        grid-template-columns: 1fr;
        gap: var(--s-2);
    }

    .bio-container {
        flex-direction: column;
        padding: var(--s-4);
    }

    .bio-text {
        font-size: var(--fs-2);
    }

    .image {
        width: 100px;
        height: 100px;
    }

    .thumbnail {
        flex-direction: column;
        align-items: center;
    }

    .thumbnail img {
        width: 100%;
        height: auto;
    }

    .thumbnail-content {
        padding: var(--s-4);
        text-align: left;
    }
}

/* Facebook / recit */
.fb-video {
    float: right;
    height: auto;
}

.recit-image {
    height: 35vh;
    width: auto;
}

@media screen and (max-width: 600px) {
    .fb-video {
        float: none;
        width: 100vw;
        margin-left: 0;
    }

    .recit-image {
        height: auto;
        width: 100vw;
    }
}

/* =========================================================
   Interview Insights Explorer (uniform + inclusive)
   ========================================================= */
.insights-card {
    padding: var(--s-5);
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(10px);
}

.tab:hover,
.chip:hover {
    filter: blur(1px);
    opacity: 0.8;
}

.insights-head {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--s-2);
    margin-bottom: var(--s-3);
    padding-bottom: var(--s-3);
}

.insights-head>div {
    max-width: 62ch;
}

.insights-title {
    margin: 0;
    font-size: var(--fs-2);
    font-family: var(--font-serif);
    color: var(--text-primary);
    font-weight: 600;
}

.insights-subtitle {
    margin: var(--s-1) 0 0;
    max-width: 52ch;
    color: var(--text-secondary);
    font-size: var(--fs-2);
    line-height: var(--lh);
}

.insights-head .mini-btn {
    /* you can keep class name; uses .btn styling */
    position: absolute;
    right: 0;
    bottom: 0;
    transform: translateY(40%);
}

/* Optional: if your HTML uses .mini-btn, make it match .btn */
.mini-btn {
    /* fallback */
    background: rgba(255, 255, 255, 0.06);
    color: inherit;
    padding: 10px 12px;
    cursor: pointer;
    white-space: nowrap;

    font-family: var(--font-serif);
}

/* Tabs / Chips */
.tabs,
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-2);
    margin: var(--s-3) 0;
    justify-content: center;
}

.tab,
.chip {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    padding: 8px 12px;
    cursor: pointer;
    font-size: var(--fs-2);
    font-family: var(--font-serif);
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}


.tab.active,
.chip.active {
    border-color: rgba(255, 255, 255, 0.30);
    background: rgba(255, 255, 255, 0.10);
}

/* "Why this matters" row (was so-what) */
.so-what {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--s-3);
    margin: var(--s-4) 0 var(--s-5);
    justify-items: center;
    text-align: center;
}

.so-what-item {
    padding: var(--s-4);
    background: rgba(255, 255, 255, 0.03);
    max-width: 32ch;
}

.kicker {
    font-size: var(--fs-1);
    color: var(--text-secondary);
    margin-bottom: var(--s-2);
}

.big {
    font-size: var(--fs-3);
    line-height: 1.35;
    color: var(--text-primary);
    font-weight: 600;
}

/* Insights grid */
.insights-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--s-3);
    justify-content: center;
    align-items: start;
    margin: 3rem auto;

}

.insight {
    padding: var(--s-4);
    background: rgba(255, 255, 255, 0.03);
    text-align: center;
    transition: opacity 180ms ease, transform 180ms ease;
}

.insight .meta {
    display: flex;
    gap: var(--s-2);
    align-items: center;
    justify-content: center;
    margin-bottom: var(--s-3);
}

.tag-mini {
    font-size: var(--fs-1);
    color: var(--text-secondary);
}

.insight h4 {
    margin: 0 0 var(--s-2);
    font-size: var(--fs-2);
    font-family: var(--font-serif);
    color: var(--text-primary);
    font-weight: 600;
}

.insight p {
    margin: 0 0 var(--s-3);
    color: var(--text-secondary);
    font-family: var(--font-serif);
    font-size: var(--fs-0);
    line-height: var(--lh);
}

/* Filtering + expand */
.insight.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.expand {
    border: 0;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    font-family: var(--font-serif);
    opacity: 0.92;
}

.more {
    display: none;
    margin-top: var(--s-3);
    padding-top: var(--s-3);
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    color: var(--text-secondary);
    font-family: var(--font-serif);
    font-size: var(--fs-2);
    line-height: var(--lh);
}

.insight.open .more {
    display: block;
}

@media (max-width: 860px) {
    .so-what {
        grid-template-columns: 1fr;
    }

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

    .insights-head .mini-btn {
        position: static;
        transform: none;
        margin-top: var(--s-2);
    }
}