:root{
  --violet-deep:  #2B0F52;
  --violet-deep-rgb: 43,15,82;
  --violet-mid:   #45208C;
  --violet-bright:#8A5CF0;
  --yellow:       #F9DD3B;
  --yellow-dim:   #C99A2C;
  --paper:        #F1E7D0;
  --paper-dark:   #DFC998;
  --cream:        #F6EFE2;
  --ink:          #241436;

  --display: "Fraunces", serif;
  --mono: "Space Mono", monospace;
  --body: "Work Sans", sans-serif;
}

html{
  scroll-behavior: smooth;
}
body{
  margin: 0;
  background: var(--violet-deep);
  color: var(--cream);
  font-family: var(--body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a{
  color: inherit;
}
img{
  max-width: 100%;
  display: block;
}
h1,h2,h3{
  font-family: var(--display);
  margin: 0;
}

/* HEADER */
.site-header{
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto;
}
.header-inner{
  display: contents;
}
.site-name{
  font-family: var(--display);
  font-weight: 900;
  font-size: 1.4rem;
  color: var(--yellow);
}
/* HERO */
.hero{
  max-width: 900px;
  margin: 0 auto;
  padding: 1vh 24px 2vh;
  text-align: center;
}
.hero-title{
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 900;
  color: var(--yellow);
  letter-spacing: -.01em;
}
.hero-contacts{
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 1.4em;
}
.social-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: none;
  background: none;
  color: var(--paper);
  cursor: pointer;
  transition: color .2s ease, transform .2s ease;
}
.social-icon svg{
  width: 100%;
  height: 100%;
  fill: currentColor;
}
.social-icon:hover, .social-icon:focus-visible{
  color: var(--yellow);
  transform: translateY(-2px);
}

/* TOAST */
.toast{
  position: fixed;
  left: 50%;
  bottom: 36px;
  transform: translate(-50%, 12px);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: .8rem;
  padding: 12px 20px;
  border-radius: 999px;
  box-shadow: 0 10px 26px rgba(0,0,0,.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 2000;
}
.toast.is-visible{
  opacity: 1;
  transform: translate(-50%, 0);
}

/* CARDS GRID */
.cards{
  max-width: 1180px;
  margin: 0 auto;
  padding: 2vh 24px 12vh;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 52px 28px;
}

.card{
  position: relative;
  background: var(--paper);
  color: var(--ink);
  border-radius: 14px;
  overflow: visible;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(0,0,0,.3);
  transition: transform .25s ease, box-shadow .25s ease;
  border: none;
  text-align: left;
  padding: 0;
  font: inherit;
}
.card:hover, .card:focus-visible{
  transform: translateY(-6px);
  box-shadow: 0 20px 44px rgba(0,0,0,.4);
}

.card-photos{
  position: absolute;
  left: 50%;
  bottom: -30px;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  z-index: 2;
}
.photo{
  width: 108px;
  height: 82px;
  margin-left: -32px;
  border-radius: 10px;
  border: 2px solid #fff;
  box-shadow: 0 10px 20px rgba(0,0,0,.4);
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease;
}
.photo:first-child{
  margin-left: 0;
}
.photo img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo:nth-child(1){
  transform: rotate(-9deg);
  z-index: 1;
}
.photo:nth-child(2){
  transform: rotate(4deg) translateY(-10px);
  z-index: 3;
}
.photo:nth-child(3){
  transform: rotate(11deg);
  z-index: 2;
}
.card:hover .photo:nth-child(1), .card:focus-visible .photo:nth-child(1){
  transform: rotate(-16deg) translateY(-4px);
  box-shadow: 0 14px 26px rgba(0,0,0,.45);
}
.card:hover .photo:nth-child(2), .card:focus-visible .photo:nth-child(2){
  transform: rotate(8deg) translateY(-16px);
  box-shadow: 0 14px 26px rgba(0,0,0,.45);
}
.card:hover .photo:nth-child(3), .card:focus-visible .photo:nth-child(3){
  transform: rotate(18deg) translateY(-4px);
  box-shadow: 0 14px 26px rgba(0,0,0,.45);
}

.card-body{
  padding: 24px 22px 84px;
}
.card-body h2{
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.card-body p{
  margin: 0;
  font-size: .92rem;
  color: rgba(36,20,54,.8);
}

.card-cta{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-family: var(--mono);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--violet-mid);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .25s ease, transform .25s ease;
}
.card:hover .card-cta, .card:focus-visible .card-cta{
  opacity: 1;
  transform: translateY(0);
}
.card-cta-arrow{
  transition: transform .25s ease;
}
.card:hover .card-cta-arrow, .card:focus-visible .card-cta-arrow{
  transform: translateX(4px);
}

/* FOOTER */
.site-footer{
  border-top: 1px solid rgba(246,239,226,.15);
  padding: 32px 24px;
  text-align: center;
}
.footer-motto{
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(246,239,226,.55);
}

/* MODAL */
.modal-overlay{
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15,6,30,.72);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 6vh 20px;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.modal-overlay.is-open{
  opacity: 1;
  pointer-events: auto;
}
.modal{
  position: relative;
  width: 90%;
  background: var(--paper);
  color: var(--ink);
  border-radius: 16px;
  padding: 40px 36px;
  box-shadow: 0 30px 70px rgba(0,0,0,.5);
  transform: translateY(20px);
  transition: transform .25s ease;
}
.modal-overlay.is-open .modal{
  transform: translateY(0);
}
.modal-close{
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--paper-dark);
  color: var(--ink);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.modal-title{
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin-bottom: 8px;
  padding-right: 40px;
}
.modal-desc{
  color: rgba(36,20,54,.8);
  margin-bottom: 28px;
}
.modal-items{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 46px 20px;
}
.modal-item{
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--cream);
  border-radius: 10px;
  overflow: visible;
  box-shadow: 0 4px 14px rgba(0,0,0,.12);
}
.modal-item-main{
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
  border-radius: 10px 10px 0 0;
}
.modal-item-body{
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 14px 16px 60px;
}
.modal-item-body h3{
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.modal-item-body p{
  margin: 0;
  font-size: .85rem;
  color: rgba(36,20,54,.75);
}
.modal-item-imgs{
  position: absolute;
  left: 50%;
  bottom: -26px;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  z-index: 2;
}
.modal-item-imgs img{
  width: 84px;
  height: 64px;
  margin-left: -24px;
  border-radius: 10px;
  border: 2px solid #fff;
  box-shadow: 0 8px 16px rgba(0,0,0,.35);
  object-fit: cover;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease;
}
.modal-item-imgs img:first-child{
  margin-left: 0;
}
.modal-item-imgs img:nth-child(1){
  transform: rotate(-7deg);
  z-index: 1;
}
.modal-item-imgs img:nth-child(2){
  transform: rotate(4deg) translateY(-8px);
  z-index: 3;
}
.modal-item-imgs img:nth-child(3){
  transform: rotate(9deg);
  z-index: 2;
}
.modal-item-imgs img:nth-child(1):hover{
  transform: rotate(-16deg) translateY(-4px);
  box-shadow: 0 12px 22px rgba(0,0,0,.4);
  z-index: 4;
}
.modal-item-imgs img:nth-child(2):hover{
  transform: rotate(10deg) translateY(-16px);
  box-shadow: 0 12px 22px rgba(0,0,0,.4);
  z-index: 4;
}
.modal-item-imgs img:nth-child(3):hover{
  transform: rotate(17deg) translateY(-4px);
  box-shadow: 0 12px 22px rgba(0,0,0,.4);
  z-index: 4;
}
.modal-item-links{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
}
.modal-item-link{
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--violet-mid);
  color: var(--cream);
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .03em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background .2s ease, transform .15s ease;
}
.modal-item-link:hover{
  background: var(--violet-bright);
  transform: translateY(-1px);
}

/* LIGHTBOX */
.lightbox-overlay{
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(10,4,20,.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.lightbox-overlay.is-open{
  opacity: 1;
  pointer-events: auto;
}
.lightbox-img{
  max-width: 88vw;
  max-height: 84vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 30px 70px rgba(0,0,0,.6);
}
.lightbox-close{
  position: absolute;
  top: 24px;
  right: 28px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: var(--paper);
  color: var(--ink);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: background .2s ease;
}
.lightbox-arrow{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--paper);
  color: var(--ink);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease;
}
.lightbox-prev{
  left: 24px;
}
.lightbox-next{
  right: 24px;
}
.lightbox-arrow:hover, .lightbox-close:hover{
  background: var(--yellow);
}

@media (max-width: 640px){
  .site-header{
    justify-content: center;
    text-align: center;
  }
  .modal{
    padding: 30px 20px;
  }
}
