/* =====================================================
   BYTE SIZE STUDIO
   WORK PAGE
===================================================== */


/* =====================================================
   SHARED
===================================================== */

.work-page-shell {
  width: min(
    1540px,
    calc(100% - 68px)
  );

  margin-inline: auto;
}


.work-page-label,
.work-section-number {
  color: var(--purple);

  font-size: 0.59rem;
  font-weight: 700;

  letter-spacing: 0.14em;

  text-transform: uppercase;
}


/* =====================================================
   HERO
===================================================== */

.work-page-hero {
  padding: 180px 0 95px;

  background: var(--paper);

  border-bottom: 1px solid var(--line);
}


.work-page-label {
  display: block;

  margin-bottom: 55px;
}


.work-page-hero-grid {
  display: grid;

  grid-template-columns:
    minmax(0, 1.1fr)
    minmax(320px, 0.52fr);

  align-items: end;

  gap: clamp(70px, 10vw, 170px);
}


.work-page-hero h1 {
  margin: 0;

  font-family: var(--display);

  font-size: clamp(4.8rem, 9vw, 10rem);

  font-weight: 800;

  line-height: 0.82;

  letter-spacing: -0.075em;

  text-transform: uppercase;
}


.work-page-hero h1 span {
  color: var(--purple);
}


.work-page-intro {
  padding-bottom: 8px;
}


.work-page-intro p {
  margin: 0;

  color: rgba(22, 5, 33, 0.54);

  line-height: 1.75;
}


.work-page-lead {
  margin-bottom: 27px !important;

  color: var(--ink) !important;

  font-family: var(--display);

  font-size: clamp(1.4rem, 2.1vw, 2rem);

  font-weight: 500;

  line-height: 1.35 !important;

  letter-spacing: -0.03em;
}


/* =====================================================
   HERO LINKS
===================================================== */

.work-type-line {
  display: flex;

  align-items: center;

  gap: 24px;

  margin-top: 75px;

  padding-top: 25px;

  border-top: 1px solid var(--line);

  color: rgba(22, 5, 33, 0.42);

  font-size: 0.54rem;
  font-weight: 700;

  letter-spacing: 0.12em;
}


.work-type-line > span {
  color: rgba(22, 5, 33, 0.28);
}


.work-type-line a {
  position: relative;

  color: rgba(22, 5, 33, 0.58);

  transition: color 0.2s ease;
}


.work-type-line a::after {
  content: "";

  position: absolute;

  left: 0;
  bottom: -5px;

  width: 0;
  height: 1px;

  background: var(--ink);

  transition: width 0.2s ease;
}


.work-type-line a:hover {
  color: var(--ink);
}


.work-type-line a:hover::after {
  width: 100%;
}


.work-type-line i {
  width: 4px;
  height: 4px;

  flex: 0 0 auto;

  border-radius: 50%;

  background: var(--coral);
}


/* =====================================================
   SECTION HEADINGS
===================================================== */

.work-section-heading,
.graphic-section-heading {
  display: grid;

  grid-template-columns:
    minmax(350px, 1fr)
    minmax(300px, 0.45fr);

  align-items: end;

  gap: 70px;

  margin-bottom: 60px;

  padding-bottom: 45px;

  border-bottom: 1px solid var(--ink);
}


.work-section-heading h2,
.graphic-section-heading h2 {
  margin: 22px 0 0;

  font-family: var(--display);

  font-size: clamp(3.4rem, 6vw, 6.5rem);

  line-height: 0.84;

  letter-spacing: -0.07em;
}


.work-section-heading > p,
.graphic-section-heading > p {
  margin: 0;

  color: rgba(22, 5, 33, 0.52);

  line-height: 1.7;
}


/* =====================================================
   WEBSITE SECTION
===================================================== */

.website-work-section {
  padding: 120px 0 135px;

  background: var(--paper);
}


/* =====================================================
   WEBSITE GRID
===================================================== */

.website-project-grid {
  display: grid;

  grid-template-columns: repeat(
    2,
    minmax(0, 1fr)
  );

  gap: 28px;
}


/* =====================================================
   WEBSITE CARDS
===================================================== */

.website-card {
  width: 100%;

  display: flex;

  flex-direction: column;

  min-width: 0;

  padding: 0;

  overflow: hidden;

  border: 1px solid var(--ink);

  border-radius: 0;

  background: var(--paper);

  color: var(--ink);

  font: inherit;

  text-align: left;

  cursor: pointer;

  appearance: none;

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}


.website-card:hover {
  transform: translateY(-5px);

  box-shadow:
    10px 10px 0
    rgba(22, 5, 33, 0.09);
}


.website-card-image {
  position: relative;

  width: 100%;

  aspect-ratio: 16 / 10;

  overflow: hidden;

  border-bottom: 1px solid var(--ink);

  background: var(--paper-dark);
}


.website-card-image img {
  width: 100%;
  height: 100%;

  object-fit: cover;

  object-position: top;

  transition: transform 0.45s ease;
}


.website-card:hover
.website-card-image img {
  transform: scale(1.025);
}


.website-card-status {
  position: absolute;

  left: 18px;
  top: 18px;

  min-height: 32px;

  display: inline-flex;

  align-items: center;

  padding: 0 11px;

  border: 1px solid var(--ink);

  background: var(--paper);

  font-size: 0.5rem;
  font-weight: 700;

  letter-spacing: 0.1em;
}


.website-card-content {
  flex: 1;

  display: flex;

  flex-direction: column;

  min-height: 300px;

  padding: 25px;
}


.website-card-meta {
  display: flex;

  justify-content: space-between;

  gap: 20px;

  margin-bottom: 45px;

  color: rgba(22, 5, 33, 0.4);

  font-size: 0.5rem;
  font-weight: 700;

  letter-spacing: 0.1em;
}


.website-card h3 {
  margin: 0 0 16px;

  font-family: var(--display);

  font-size: clamp(2rem, 3.2vw, 3.4rem);

  line-height: 0.95;

  letter-spacing: -0.055em;
}


.website-card-content > p {
  max-width: 520px;

  margin: 0;

  color: rgba(22, 5, 33, 0.52);

  font-size: 0.9rem;

  line-height: 1.65;
}


.website-card-bottom {
  display: flex;

  align-items: flex-end;
  justify-content: space-between;

  gap: 25px;

  margin-top: auto;

  padding-top: 35px;
}


.website-card-bottom > span {
  color: rgba(22, 5, 33, 0.42);

  font-size: 0.49rem;
  font-weight: 700;

  letter-spacing: 0.09em;
}


.website-card-bottom strong {
  color: var(--purple);

  font-size: 0.55rem;
  font-weight: 700;

  letter-spacing: 0.1em;

  white-space: nowrap;
}


/* =====================================================
   GRAPHIC DESIGN
===================================================== */

.graphic-work-section {
  padding: 120px 0 135px;

  background: var(--paper-dark);
}


/* =====================================================
   GRAPHIC GRID
===================================================== */

.graphics-grid {
  display: grid;

  grid-template-columns: repeat(
    12,
    minmax(0, 1fr)
  );

  gap: 18px;
}


.graphic-card-wide {
  grid-column: span 7;
}


.graphic-card-small {
  grid-column: span 5;
}


/* =====================================================
   GRAPHIC CARD
===================================================== */

.graphic-card {
  position: relative;

  min-width: 0;

  aspect-ratio: 4 / 3;

  padding: 0;

  overflow: hidden;

  border: 1px solid var(--ink);

  border-radius: 0;

  background: var(--paper);

  color: var(--ink);

  font: inherit;

  cursor: pointer;

  appearance: none;
}


.graphic-card:nth-child(2),
.graphic-card:nth-child(3),
.graphic-card:nth-child(6) {
  aspect-ratio: 1 / 1;
}


.graphic-card > img {
  width: 100%;
  height: 100%;

  display: block;

  object-fit: cover;

  transition: transform 0.45s ease;
}


.graphic-card:hover > img {
  transform: scale(1.025);
}


/* =====================================================
   GRAPHIC OVERLAY
===================================================== */

.graphic-card-overlay {
  position: absolute;

  left: 0;
  right: 0;
  bottom: 0;

  min-height: 74px;

  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 20px;

  padding: 12px 17px;

  border-top: 1px solid var(--ink);

  background: rgba(244, 240, 248, 0.95);

  color: var(--ink);

  backdrop-filter: blur(8px);

  text-align: left;

  transition:
    background 0.2s ease,
    color 0.2s ease;
}


.graphic-card:hover
.graphic-card-overlay {
  background: var(--ink);

  color: var(--white);
}


.graphic-card-copy {
  display: flex;

  flex-direction: column;

  gap: 5px;

  min-width: 0;
}


.graphic-card-copy small {
  color: rgba(22, 5, 33, 0.43);

  font-size: 0.43rem;
  font-weight: 700;

  letter-spacing: 0.11em;
}


.graphic-card-copy b {
  overflow: hidden;

  font-family: var(--display);

  font-size: 0.92rem;
  font-weight: 700;

  letter-spacing: -0.025em;

  text-overflow: ellipsis;

  white-space: nowrap;
}


.graphic-card:hover
.graphic-card-copy small {
  color: rgba(255, 255, 255, 0.48);
}


.graphic-card-overlay > strong {
  flex: 0 0 auto;

  color: var(--purple);

  font-size: 0.5rem;
  font-weight: 700;

  letter-spacing: 0.1em;
}


.graphic-card:hover
.graphic-card-overlay > strong {
  color: var(--coral);
}


/* =====================================================
   CTA
===================================================== */

.work-page-cta {
  padding: 80px 0;

  background: var(--ink);

  color: var(--white);
}


.work-page-cta-inner {
  display: flex;

  align-items: flex-end;
  justify-content: space-between;

  gap: 60px;
}


.work-page-cta-inner > div > span {
  display: block;

  margin-bottom: 17px;

  color: var(--coral);

  font-size: 0.57rem;
  font-weight: 700;

  letter-spacing: 0.14em;
}


.work-page-cta h2 {
  margin: 0;

  font-family: var(--display);

  font-size: clamp(2.8rem, 5.2vw, 5.8rem);

  line-height: 0.9;

  letter-spacing: -0.06em;
}


.work-page-cta-button {
  min-height: 60px;

  display: inline-flex;

  align-items: center;

  gap: 30px;

  flex: 0 0 auto;

  padding: 0 22px;

  background: var(--white);

  color: var(--ink);

  font-size: 0.62rem;
  font-weight: 700;

  letter-spacing: 0.1em;
}


.work-page-cta-button span {
  color: var(--coral);
}


/* =====================================================
   MODAL
===================================================== */

body.modal-open {
  overflow: hidden;
}


.work-modal {
  position: fixed;

  inset: 0;

  z-index: 5000;

  visibility: hidden;

  opacity: 0;

  transition:
    opacity 0.28s ease,
    visibility 0.28s ease;
}


.work-modal.open {
  visibility: visible;

  opacity: 1;
}


.work-modal-backdrop {
  position: absolute;

  inset: 0;

  width: 100%;

  padding: 0;

  border: 0;

  background: rgba(9, 1, 13, 0.84);

  backdrop-filter: blur(10px);
}


.work-modal-panel {
  position: absolute;

  inset: 32px;

  overflow-y: auto;

  border: 1px solid var(--ink);

  background: var(--paper);

  transform: translateY(25px);

  transition: transform 0.3s ease;
}


.work-modal.open
.work-modal-panel {
  transform: translateY(0);
}


.work-modal-header {
  min-height: 60px;

  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 30px;

  padding: 0 22px;

  border-bottom: 1px solid var(--ink);

  font-size: 0.54rem;
  font-weight: 700;

  letter-spacing: 0.12em;
}


.work-modal-close {
  padding: 0;

  border: 0;

  background: transparent;

  color: var(--ink);

  font-size: 0.54rem;
  font-weight: 700;

  letter-spacing: 0.1em;

  cursor: pointer;
}


/* =====================================================
   MODAL LAYOUT
===================================================== */

.work-modal-layout {
  display: grid;

  grid-template-columns:
    minmax(0, 1.1fr)
    minmax(390px, 0.7fr);

  min-height: calc(100% - 60px);
}


/* =====================================================
   MODAL IMAGE
===================================================== */

.work-modal-image {
  display: flex;

  align-items: flex-start;
  justify-content: center;

  padding: 55px;

  border-right: 1px solid var(--ink);

  background: var(--paper-dark);
}


.work-modal-image img {
  display: block;

  width: 100%;
  height: auto;

  max-height: calc(100vh - 180px);

  object-fit: contain;

  border: 1px solid var(--ink);

  background: var(--white);

  box-shadow:
    16px 16px 0
    rgba(22, 5, 33, 0.1);
}


/* GRAPHIC MODE */

.work-modal.graphic-mode
.work-modal-image {
  align-items: center;

  background: #ddd5e6;
}


.work-modal.graphic-mode
.work-modal-image img {
  width: auto;

  max-width: 100%;
  max-height: calc(100vh - 160px);

  object-fit: contain;
}


/* =====================================================
   MODAL CONTENT
===================================================== */

.work-modal-content {
  display: flex;

  flex-direction: column;

  padding: 45px 35px;
}


.work-modal-meta {
  display: flex;

  flex-wrap: wrap;

  gap: 22px;

  margin-bottom: 32px;

  color: rgba(22, 5, 33, 0.42);

  font-size: 0.52rem;
  font-weight: 700;

  letter-spacing: 0.11em;
}


.work-modal-content h2 {
  margin: 0 0 25px;

  font-family: var(--display);

  font-size: clamp(2.8rem, 4.8vw, 5.5rem);

  line-height: 0.85;

  letter-spacing: -0.07em;
}


/* =====================================================
   TAGS
===================================================== */

.work-modal-tags {
  display: flex;

  flex-wrap: wrap;

  gap: 6px;

  margin-bottom: 28px;
}


.work-modal-tags:empty {
  display: none;
}


.work-modal-tags span {
  padding: 7px 9px;

  border: 1px solid var(--ink);

  font-size: 0.49rem;
  font-weight: 700;

  letter-spacing: 0.08em;
}


/* =====================================================
   MODAL TEXT
===================================================== */

.work-modal-intro {
  margin: 0 0 38px;

  color: rgba(22, 5, 33, 0.58);

  font-size: 0.95rem;

  line-height: 1.7;
}


.work-modal-detail {
  padding: 20px 0;

  border-top: 1px solid var(--line);
}


.work-modal-detail.hidden {
  display: none;
}


.work-modal-detail > span {
  display: block;

  margin-bottom: 10px;

  color: var(--purple);

  font-size: 0.5rem;
  font-weight: 700;

  letter-spacing: 0.11em;
}


.work-modal-detail p {
  margin: 0;

  color: rgba(22, 5, 33, 0.52);

  font-size: 0.86rem;

  line-height: 1.65;
}


/* =====================================================
   LIVE LINK
===================================================== */

.work-modal-link {
  min-height: 58px;

  display: flex;

  align-items: center;
  justify-content: space-between;

  margin-top: auto;

  padding: 0 18px;

  background: var(--ink);

  color: var(--white);

  font-size: 0.58rem;
  font-weight: 700;

  letter-spacing: 0.1em;
}


.work-modal-link span {
  color: var(--coral);
}


.work-modal-link.hidden {
  display: none;
}


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

@media (max-width: 1000px) {

  .work-page-hero-grid {
    grid-template-columns: 1fr;

    gap: 50px;
  }


  .work-page-hero h1 {
    font-size: clamp(4.5rem, 13vw, 8rem);
  }


  .work-page-intro {
    max-width: 650px;
  }


  .work-section-heading,
  .graphic-section-heading {
    grid-template-columns: 1fr;

    gap: 30px;
  }


  .graphic-card-wide,
  .graphic-card-small {
    grid-column: span 6;
  }


  .work-modal-layout {
    grid-template-columns: 1fr;
  }


  .work-modal-image {
    border-right: 0;

    border-bottom: 1px solid var(--ink);
  }


  .work-modal-image img {
    max-height: 650px;
  }

}


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

@media (max-width: 700px) {

  .work-page-shell {
    width: calc(100% - 34px);
  }


  .work-page-hero {
    padding: 125px 0 65px;
  }


  .work-page-label {
    margin-bottom: 40px;
  }


  .work-page-hero-grid {
    gap: 40px;
  }


  .work-page-hero h1 {
    font-size: clamp(3.6rem, 17vw, 5.6rem);

    line-height: 0.85;
  }


  .work-page-lead {
    font-size: 1.35rem;
  }


  .work-type-line {
    align-items: flex-start;

    flex-direction: column;

    gap: 12px;

    margin-top: 50px;
  }


  .work-type-line i {
    display: none;
  }


  /* HEADINGS */

  .work-section-heading,
  .graphic-section-heading {
    margin-bottom: 40px;

    padding-bottom: 30px;
  }


  .work-section-heading h2,
  .graphic-section-heading h2 {
    font-size: clamp(2.8rem, 13vw, 4.4rem);
  }


  /* WEBSITES */

  .website-work-section {
    padding: 85px 0 95px;
  }


  .website-project-grid {
    grid-template-columns: 1fr;

    gap: 22px;
  }


  .website-card-content {
    min-height: 285px;

    padding: 20px 18px;
  }


  .website-card-meta {
    margin-bottom: 35px;
  }


  .website-card h3 {
    font-size: clamp(2rem, 10vw, 3rem);
  }


  .website-card:hover {
    transform: none;

    box-shadow: none;
  }


  .website-card:hover
  .website-card-image img {
    transform: none;
  }


  /* GRAPHICS */

  .graphic-work-section {
    padding: 85px 0 95px;
  }


  .graphics-grid {
    grid-template-columns: 1fr;

    gap: 17px;
  }


  .graphic-card-wide,
  .graphic-card-small {
    grid-column: auto;
  }


  .graphic-card,
  .graphic-card:nth-child(2),
  .graphic-card:nth-child(3),
  .graphic-card:nth-child(6) {
    aspect-ratio: 4 / 3;
  }


  .graphic-card:hover > img {
    transform: none;
  }


  /* CTA */

  .work-page-cta {
    padding: 65px 0;
  }


  .work-page-cta-inner {
    align-items: stretch;

    flex-direction: column;

    gap: 35px;
  }


  .work-page-cta h2 {
    font-size: clamp(2.8rem, 13vw, 4.4rem);
  }


  .work-page-cta-button {
    width: 100%;

    justify-content: space-between;
  }


  /* MODAL */

  .work-modal-panel {
    inset: 10px;
  }


  .work-modal-header {
    min-height: 52px;

    padding: 0 14px;
  }


  .work-modal-image {
    padding: 30px 17px;
  }


  .work-modal-image img,
  .work-modal.graphic-mode
  .work-modal-image img {
    max-height: none;
  }


  .work-modal-content {
    padding: 32px 17px 22px;
  }


  .work-modal-content h2 {
    font-size: clamp(2.7rem, 13vw, 4rem);
  }


  .work-modal-link {
    margin-top: 30px;
  }

}


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

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

  .website-card,
  .website-card-image img,
  .graphic-card img,
  .graphic-card-overlay,
  .work-modal,
  .work-modal-panel {
    transition: none;
  }

}