/* =========================================================
   1. GLOBAL RESETS & BASE ELEMENTS
   (lowest specificity: element, universal, and attribute
   selectors that everything else builds on top of)
========================================================= */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
}
.skip-link:focus {
    left: 1rem;
    top: 1rem;
    background: white;
    color: black;
    padding: .75rem 1rem;
    z-index: 9999;
}
html {
    scroll-behavior: smooth; /* Pure CSS smooth anchoring */
}

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

body {
    font-family: "Karla", sans-serif;
    color: #2c2520;
    background-color: #ffffff;
    /* line-height: 1.7; */
    -webkit-font-smoothing: antialiased;
}

body.modal-open {
    overflow: hidden;
}

p {
    margin: 1rem 0;
}

section[id] {
    scroll-margin-top: 96px;
}

/* =========================================================
   2. KEYFRAMES & SHARED ANIMATION UTILITIES
   (grouped together for maintainability — keyframes carry
   no specificity and apply globally regardless of position)
========================================================= */

/* @keyframes gradientMovement {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
} */

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/*title animation*/
h1 span.animate {
    display: inline-block;
}
@-webkit-keyframes fadeInLeft {
    from {
        -webkit-transform: translate3d(-22px, 0, 0);
                transform: translate3d(-22px, 0, 0);
        opacity: 0;
    } to {
        -webkit-transform: none;
                transform: none;
        opacity: 1;
    }
}
@keyframes fadeInLeft {
    from {
        -webkit-transform: translate3d(-22px, 0, 0);
                transform: translate3d(-22px, 0, 0);
        opacity: 0;
    } to {
        -webkit-transform: none;
                transform: none;
        opacity: 1;
    }
}
.fadeInLeft {
    -webkit-animation-name: fadeInLeft;
            animation-name: fadeInLeft;
}
.animate {
    -webkit-animation-duration: .75s;
            animation-duration: .75s;
    -webkit-animation-timing-function: cubic-bezier(.2, .3, .25, .9);
            animation-timing-function: cubic-bezier(.2, .3, .25, .9);
    -webkit-animation-fill-mode: both;
            animation-fill-mode: both;
}
.delay-500 {
    -webkit-animation-delay: 1s;
            animation-delay: 1s;
}
.delay-900 {
    -webkit-animation-delay: 1.7s;
            animation-delay: 1.7s;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================================
   3. GLOBAL SITE HEADER & NAVIGATION
========================================================= */

.global-site-header {
    width: 100%;
    background-color: rgba(242, 235, 212, 0.34);
    /* border-bottom: 1px solid #f0ebe6; */
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    /* max-width: 1060px; */
    margin: 0 auto;
    padding: 1.25rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header-container a img {
    height: 44px;
    width: auto;
}
/* .site-logo.active img {
    height: 45px;
    width: auto;
} */

.site-nav a {
    text-decoration: none;
    color: #6e655f;
    font-size: 0.95rem;
    font-weight: 500;
    margin-left: 2rem;
    margin-top: 15px;
    transition: color 0.2s ease;
    display: inline-block;
    height: 45px;
}

.site-nav a:hover,
.site-nav a.active {
    color: #111111;
}
footer {
  display: flex;
  justify-content: space-between;
  background-color: #2c2520;
  color: #ffffff;
  text-align: center;
  padding: 20px;
  width: 100%;
}
footer a {
    color: #ffffff;
}
/* --- Homepage Hero Intro --- */
.home-hero {
    /* background-color: #ebf1fd; */
    padding: 8rem 2rem;
    text-align: left;
    display: flex;
    justify-content: center;
    background-color: rgba(242, 235, 212, 0.34);
    /* background: linear-gradient(-45deg, #f4bdac, #f7bcd3, #a9e4f9, #a7f4e2);
    background-size: 400% 400%;
    animation: gradientMovement 45s ease infinite; */
    /* background: url(images/bkg.webp); */
    background-position: center;
}
.home-hero-content {
    max-width: 1020px;
    width: 100%;
    /* background-color: rgba(0, 0, 0, 0.6); */
    color: #111111; /* White text for contrast */
    padding: 40px 40px 40px 0;
    border-radius: 8px;
    /* max-width: 600px;
  text-align: center; */
}

.home-title {
    font-family: "Prata", serif;
    font-weight: 400;
    font-style: normal;
    font-size: 3.75rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.15;
    /* color: #111111; */
    margin-bottom: 1.5rem;
    max-width: 800px;
}
.home-title .heroAccent {
    color: #d07564;
}
.home-subtitle {
    font-family: "Karla", sans-serif;
    font-weight: 400;
    font-size: 1.5rem;
    line-height: 1.5;
    /* color: #000000; */
    max-width: 650px;
}
/* Second declaration for .home-subtitle intentionally follows the
   first — same specificity, so source order lets this animation-
   entrance version win the cascade */
.home-subtitle {
  /* display: block;  */

  /* 2. Set the initial state (shifted down and invisible) */
  opacity: 0;
  transform: translateY(20px); /* Adjust the pixels for a longer/shorter slide */

  /* 3. Apply the animation properties */
  animation-name: slideUp;
  animation-duration: 1.7s;        /* Match or slightly adjust your timing preference */
  animation-fill-mode: forwards; /* Crucial: stops the element from resetting to opacity 0 */

  /* 4. The Magic Trick: Wait for the H1 spans to finish */
  /* If your H1 animation duration is 1.5s, make this delay 1.5s (or slightly less to overlap) */
  animation-delay: 2s;
  animation-timing-function: ease-out;
}

/* =========================================================
   4. FEATURED WORK CARD SYSTEM
========================================================= */

.work-section {
    padding: 2rem 0;
}

.work-featured-card {
    display: grid;
    grid-template-columns: 2fr 2fr;
    gap: 4rem;
    align-items: normal;
    margin-top: 1rem;
    background-color: #ffffff;
    border-radius: 8px;
    padding: 1rem;
}

.work-image-side {
    width: 100%;
    height: 380px;
    background-color: #fbf9f7;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #f0ebe6;
    align-items: flex-start;
}

/* Fallback until you put an <img> in the card */
.image-fallback {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5f0eb 0%, #e6dfd9 100%);
    display: flex;
    justify-content: center;
    align-items: center;
}

.work-text-side {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.work-tag {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6e655f;
    margin-bottom: 0.75rem;
}

.work-text-side p {
    color: #4a423c;
    font-size: 1.05rem;
    margin: .25rem 0;
    line-height: 1.6;
}

.view-project-btn {
    display: inline-block;
    margin-top: 1rem;
    text-decoration: none;
    color: #ffffff;
    background-color: #2c2520;
    padding: 0.85rem 1.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 4px;
    /* transition: background-color 0.2s ease, transform 0.2s ease; */
}

.view-project-btn:hover {
    background-color: #d07564;
    transform: translateY(-1px);
}

/* CSS Interaction: Elevate card image subtly when hovering anywhere on the block */
.work-featured-card:hover .work-image-side {
    /* transform: translateY(-4px); */
    /* box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05); */
}

/* =========================================================
   5. CASE STUDY CONTAINER & DIVIDERS
========================================================= */

.case-study-container {
    max-width: 1060px;
    margin: 0 auto;
    padding: 2rem;
}

.section-divider {
    border: 0;
    height: 1px;
    background-color: #f0ebe6;
    margin: 2rem 0;
}
.section-divider-half {
    margin: 2rem auto;
    width: 50%;
}

/* --- Hero Header --- */
.hero-header {
    position: relative;
    max-width: 1060px;
    height: 50vh;
    min-height: 380px;
    /* background-color: #ebf1fd; */
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: left;
    padding: 2rem;
    margin: 0 auto;
    border-bottom: 1px solid #ccc;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #111;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: #4a423c;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
    margin: 0;
}
/* ACCESSIBILITY PAGE */
.accessibility {
    padding: 2rem;
}
/* =========================================================
   6. TIMELINE NAVIGATION SYSTEM
========================================================= */

/* .process-timeline {
    position: relative;
    margin: 3rem auto 5rem auto;
    max-width: 750px;
}

.timeline-line {
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #e6dfd9;
    z-index: 1;
}

.timeline-steps {
    display: flex;
    justify-content: space-between;
    list-style: none;
    position: relative;
    z-index: 2;
}

.timeline-steps a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #fff;
    border: 2px solid #2c2520;
    font-weight: bold;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease;
}

.step-label {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.timeline-steps a:hover .step-number {
    background-color: #2c2520;
    color: #fff;
    transform: scale(1.1);
} */

/* =========================================================
   7. RESPONSIVE SPLIT LAYOUT (Overview, User Flow, Style Guide)
========================================================= */

.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.section-title {
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #000000;
}

.title-column .section-title {
    position: sticky;
    top: 2rem; /* Keeps layout title grounded on desktop scroll */
}

.content-column p, .text-column p {
    font-size: 1.05rem;
    color: #4a423c;
    margin-bottom: 1.5rem;
}

.content-column .lead-text {
    font-size: 1.2rem;
    color: #2c2520;
}
.visual-column {
    border-radius: 20px;
    background: rgba(242, 235, 212, 0.34);
    padding: 1rem;
}
.impact-column {
    display: grid;
    grid-template-columns: 300px 1fr;
    grid-template-rows: repeat(5, 1fr);
    grid-column-gap: 0px;
    grid-row-gap: 0px;
}

.portfolio-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

.style-guide-preview {
    margin-top: 2.5rem;
}

/* =========================================================
   8. DUAL COLUMN LAYOUT (Problem / Solution)
========================================================= */

.dual-column-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.subsection-title {
    font-size: 2.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #000000;
    margin-bottom: 1rem;
}

/* =========================================================
   9. HIGH-FIDELITY MOCKUPS SHOWCASE GRID
========================================================= */

.section-intro {
    /* max-width: 700px; */
    margin-bottom: 3.5rem;
}

.section-description {
    font-size: 1.1rem;
    color: #4a423c;
    margin-top: .5rem;
}

.mockup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2.5rem;
    border-radius: 20px;
    background: rgba(242, 235, 212, 0.34);
    padding: 1rem;
}

.mockup-card {
    display: flex;
    flex-direction: column;
}

.mockup-image {
    width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

.mockup-caption {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #6e655f;
    font-weight: 500;
}

.mockup-card:hover .mockup-image {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.mockup-image-trigger {
    width: 100%;
    border: 0;
    background: transparent;
    padding: 0;
    text-align: left;
    cursor: zoom-in;
}

.mockup-image-trigger:focus-visible {
    outline: 3px solid #2c2520;
    outline-offset: 4px;
    border-radius: 6px;
}

/* =========================================================
   10. IMAGE MODAL
========================================================= */

.image-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.image-modal[hidden] {
    display: none;
}

.image-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 17, 17, 0.78);
    backdrop-filter: blur(2px);
}

.image-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(90vw, 900px);
    max-height: 90vh;
    overflow: auto;
    background: #ffffff;
    border: 1px solid #f0ebe6;
    border-radius: 12px;
    box-shadow: 0 20px 70px rgba(44, 37, 32, 0.25);
    padding: 1.5rem;
    animation: modalFadeIn 220ms ease-out forwards;
}

.image-modal__close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    border-radius: 999px;
    background: #f2ebd457;
    color: #2c2520;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.image-modal__close:hover,
.image-modal__close:focus-visible {
    background: #2c2520;
    color: #ffffff;
}

.image-modal__title {
    font-family: "Prata", serif;
    font-size: 1.5rem;
    color: #111111;
    margin-right: 3rem;
    margin-bottom: 0.5rem;
}

.image-modal__description {
    margin: 0 0 1rem;
    color: #6e655f;
    font-size: 0.95rem;
}

.image-modal__image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
    border: 1px solid #f0ebe6;
}

/* =========================================================
   11. MEDIA QUERIES
   (kept last regardless of the specificity of the selectors
   inside them, so their overrides reliably win the cascade
   at matching breakpoints)
========================================================= */

/* --- Homepage Media Queries --- */
@media (max-width: 768px) {
    .home-title { font-size: 2.5rem; }
    .home-subtitle { font-size: 1.15rem; }
    .home-hero { padding: 5rem 1.25rem; }
    .work-featured-card { grid-template-columns: 1fr; gap: 2rem; }
    .work-image-side { height: 240px; }
}

/* --- Media Queries --- */
@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem; }
    .timeline-line { display: none; }
    .timeline-steps { overflow-x: auto; padding-bottom: 1rem; }
    .split-layout { grid-template-columns: 1fr; gap: 1.5rem; }
    .dual-column-layout { grid-template-columns: 1fr; gap: 3rem; }
    #user-flow {
    display: grid;
    grid-template-columns: 1fr;
    /* Define the exact vertical stacking sequence */
    grid-template-areas: 
      "current-text"
      "current-map"
      "proposed-text"
      "proposed-map";
  }

  .current-text  { grid-area: current-text; }
  .current-map   { grid-area: current-map; }
  .proposed-text { grid-area: proposed-text; }
  .proposed-map  { grid-area: proposed-map; }
    .mockup-grid { grid-template-columns: 1fr; }
    .impact-column { display: block; }
    footer {display: block;}
}